source: buchla-68k/alcyon/dbentr.s@ abd4109

Last change on this file since abd4109 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 6.4 KB
RevLine 
[7bf3856]1.globl _DB_In
2.comm _DB_In,2
3.globl _DB_Out
4.comm _DB_Out,2
5.globl _DB_Flag
6.comm _DB_Flag,2
7.globl _DB_Levl
8.comm _DB_Levl,4
9.globl _DB_Last
10.comm _DB_Last,4
11.globl _DB_Ents
12.comm _DB_Ents,1536
13.globl _DB_Type
14.data
15_DB_Type:
16*line 61
17.dc.l L1
18*line 62
19.dc.l L2
20*line 64
21.dc.l L3
22.globl _DB_Entr
23.text
24_DB_Entr:
25~~DB_Entr:
26~str=8
27link R14,#-4
28*line 78
29move _DB_In,R0
30muls #6,R0
31add.l #_DB_Ents,R0
32move.l R0,R8
33clr 4(R8)
34*line 79
35move _DB_In,R0
36muls #6,R0
37add.l #_DB_Ents,R0
38move.l R0,R8
39move.l 8(R14),(R8)
40*line 81
41move.l 8(R14),_DB_Last
42*line 83
43add.l #$1,_DB_Levl
44*line 85
45*line 86
46add #1,_DB_In
47move _DB_In,R0
48cmp #256,R0
49blt L5
50*line 86
51clr _DB_In
52*line 87
53L5:
54*line 88
55*line 88
56move _DB_In,R0
57cmp _DB_Out,R0
58bne L6
59*line 89
60*line 90
61*line 91
62add #1,_DB_Out
63move _DB_Out,R0
64cmp #256,R0
65blt L7
66*line 91
67clr _DB_Out
68L7:
69*line 92
70L6:L4:unlk R14
71rts
72.globl _DB_Exit
73.text
74_DB_Exit:
75~~DB_Exit:
76~str=8
77link R14,#-4
78*line 107
79move _DB_In,R0
80muls #6,R0
81add.l #_DB_Ents,R0
82move.l R0,R8
83move #1,4(R8)
84*line 108
85move _DB_In,R0
86muls #6,R0
87add.l #_DB_Ents,R0
88move.l R0,R8
89move.l 8(R14),(R8)
90*line 110
91move.l 8(R14),_DB_Last
92*line 112
93*line 113
94tst.l _DB_Levl
95ble L9
96*line 113
97sub.l #$1,_DB_Levl
98*line 114
99bra L10
100L9:
101*line 115
102clr.l _DB_Levl
103L10:
104*line 117
105*line 118
106add #1,_DB_In
107move _DB_In,R0
108cmp #256,R0
109blt L11
110*line 118
111clr _DB_In
112*line 119
113L11:
114*line 120
115*line 120
116move _DB_In,R0
117cmp _DB_Out,R0
118bne L12
119*line 121
120*line 122
121*line 123
122add #1,_DB_Out
123move _DB_Out,R0
124cmp #256,R0
125blt L13
126*line 123
127clr _DB_Out
128L13:
129*line 124
130L12:L8:unlk R14
131rts
132.globl _DB_Cmnt
133.text
134_DB_Cmnt:
135~~DB_Cmnt:
136~str=8
137link R14,#-4
138*line 139
139move _DB_In,R0
140muls #6,R0
141add.l #_DB_Ents,R0
142move.l R0,R8
143move #2,4(R8)
144*line 140
145move _DB_In,R0
146muls #6,R0
147add.l #_DB_Ents,R0
148move.l R0,R8
149move.l 8(R14),(R8)
150*line 142
151move.l 8(R14),_DB_Last
152*line 144
153*line 145
154add #1,_DB_In
155move _DB_In,R0
156cmp #256,R0
157blt L15
158*line 145
159clr _DB_In
160*line 146
161L15:
162*line 147
163*line 147
164move _DB_In,R0
165cmp _DB_Out,R0
166bne L16
167*line 148
168*line 149
169*line 150
170add #1,_DB_Out
171move _DB_Out,R0
172cmp #256,R0
173blt L17
174*line 150
175clr _DB_Out
176L17:
177*line 151
178L16:L14:unlk R14
179rts
180.globl _DB_Clr
181.text
182_DB_Clr:
183~~DB_Clr:
184link R14,#0
185movem.l R6-R7,-(sp)
186~i=R7
187*line 167
188clr _DB_In
189*line 168
190clr _DB_Out
191*line 170
192clr R7
193bra L21
194L22:
195*line 171
196*line 172
197move R7,R0
198muls #6,R0
199add.l #_DB_Ents,R0
200move.l R0,R8
201clr 4(R8)
202*line 173
203move R7,R0
204muls #6,R0
205add.l #_DB_Ents,R0
206move.l R0,R8
207move.l #$0,(R8)
208L20:
209*line 170
210add #1,R7
211L21:
212*line 170
213cmp #256,R7
214blt L22
215L19:
216*line 176
217clr.l _DB_Levl
218*line 177
219clr.l _DB_Last
220L18:tst.l (sp)+
221movem.l (sp)+,R7-R7
222unlk R14
223rts
224.globl _DB_Dump
225.text
226_DB_Dump:
227~~DB_Dump:
228link R14,#0
229movem.l R4-R7,-(sp)
230~tag=R7
231~i=R6
232~lev=R5
233*line 194
234*line 194
235cmp #256,_DB_In
236bge L10000
237tst _DB_In
238bge L24
239L10000:*line 195
240*line 196
241move _DB_In,(sp)
242move.l #L25,-(sp)
243jsr _printf
244addq.l #4,sp
245*line 197
246*line 198
247jsr _xtrap15
248*line 199
249*line 200
250jsr _DB_Clr
251bra L23
252*line 201
253*line 202
254*line 203
255L24:
256*line 204
257*line 204
258cmp #256,_DB_Out
259bge L10001
260tst _DB_Out
261bge L26
262L10001:*line 205
263*line 206
264move _DB_Out,(sp)
265move.l #L27,-(sp)
266jsr _printf
267addq.l #4,sp
268*line 207
269*line 208
270jsr _xtrap15
271*line 209
272*line 210
273jsr _DB_Clr
274bra L23
275*line 211
276*line 212
277*line 213
278L26:
279*line 214
280*line 214
281move _DB_In,R0
282cmp _DB_Out,R0
283bne L28
284*line 215
285*line 216
286move _DB_In,(sp)
287move.l #L29,-(sp)
288jsr _printf
289addq.l #4,sp
290*line 217
291*line 218
292*line 219
293tst.l _DB_Levl
294beq L30
295*line 219
296move.l _DB_Levl,(sp)
297move.l #L31,-(sp)
298jsr _printf
299addq.l #4,sp
300*line 220
301L30:
302*line 221
303*line 222
304tst.l _DB_Last
305beq L32
306*line 222
307move.l _DB_Last,(sp)
308move.l #L33,-(sp)
309jsr _printf
310addq.l #4,sp
311*line 223
312L32:
313*line 224
314*line 225
315tst _DB_Flag
316bne L34
317*line 225
318jsr _xtrap15
319*line 226
320L34:
321*line 227
322jsr _DB_Clr
323bra L23
324*line 228
325*line 229
326*line 230
327*line 231
328L28:
329*line 232
330move.l _DB_Levl,(sp)
331move.l #L35,-(sp)
332jsr _printf
333addq.l #4,sp
334*line 234
335clr.l R5
336*line 236
337bra L38
338L37:
339*line 237
340*line 238
341clr.l R6
342bra L41
343L42:
344*line 239
345move.l #L43,(sp)
346jsr _printf
347L40:
348*line 238
349add.l #$1,R6
350L41:
351*line 238
352cmp.l R5,R6
353blt L42
354L39:
355*line 239
356*line 240
357*line 241
358move _DB_Out,R0
359muls #6,R0
360add.l #_DB_Ents,R0
361move.l R0,R8
362move 4(R8),R7
363*line 242
364*line 243
365move _DB_Out,R0
366muls #6,R0
367move.l R0,R8
368move.l #_DB_Ents,R9
369move.l 0(R8,R9.l),(sp)
370move R7,R8
371add.l R8,R8
372add.l R8,R8
373move.l #_DB_Type,R9
374move.l 0(R8,R9.l),-(sp)
375move.l #L44,-(sp)
376jsr _printf
377addq.l #8,sp
378*line 244
379*line 245
380move R7,R0
381bra L46
382*line 246
383L47:
384*line 247
385*line 248
386*line 249
387add.l #$1,R5
388bra L45
389*line 250
390*line 251
391L48:
392*line 252
393*line 253
394*line 254
395*line 254
396sub.l #$1,R5
397bge L49
398*line 255
399*line 256
400clr.l R5
401*line 257
402move.l #L50,(sp)
403jsr _printf
404*line 258
405*line 259
406L49:bra L45
407*line 260
408bra L45
409L46:tst R0
410beq L47
411cmp #1,R0
412beq L48
413bra L45
414L45:
415*line 261
416*line 262
417*line 263
418*line 264
419add #1,_DB_Out
420move _DB_Out,R0
421cmp #256,R0
422blt L51
423*line 264
424clr _DB_Out
425L51:L38:
426*line 265
427move _DB_Out,R0
428cmp _DB_In,R0
429bne L37
430L36:
431*line 267
432move.l #L52,(sp)
433jsr _printf
434*line 269
435jsr _DB_Clr
436*line 271
437*line 272
438tst _DB_Flag
439bne L53
440*line 272
441jsr _xtrap15
442*line 273
443L53:bra L23
444L23:tst.l (sp)+
445movem.l (sp)+,R5-R7
446unlk R14
447rts
448.data
449L1:.dc.b $2D,$2D,$3E,$3E,$0
450L2:.dc.b $3C,$3C,$2D,$2D,$0
451L3:.dc.b $4E,$6F,$74,$65,$0
452L25:.dc.b $44,$42,$5F,$49,$6E,$20,$77,$61,$73,$20,$63,$6F,$72,$72,$75,$70,$74,$3A,$20,$20,$25,$64,$A,$0
453L27:.dc.b $44,$42,$5F,$4F,$75,$74,$20,$77,$61,$73,$20,$63,$6F,$72,$72,$75,$70,$74,$3A,$20,$20,$25,$64,$A,$0
454L29:.dc.b $44,$65,$62,$75,$67,$20,$62,$75,$66,$66,$65,$72,$20,$69,$73,$20,$65,$6D,$70,$74,$79,$3A,$20,$20,$49,$6E,$20,$3D,$20,$4F
455.dc.b $75,$74,$20,$3D,$20,$25,$64,$A,$0
456L31:.dc.b $44,$65,$62,$75,$67,$20,$74,$72,$61,$63,$65,$20,$6C,$65,$76,$65,$6C,$20,$3D,$20,$25,$6C,$64,$A,$0
457L33:.dc.b $4C,$61,$74,$65,$73,$74,$20,$65,$6E,$74,$72,$79,$20,$3D,$20,$22,$25,$73,$22,$A,$0
458L35:.dc.b $44,$65,$62,$75,$67,$20,$74,$72,$61,$63,$65,$20,$6C,$65,$76,$65,$6C,$20,$3D,$20,$25,$6C,$64,$A,$A,$0
459L43:.dc.b $7C,$0
460L44:.dc.b $25,$73,$3A,$20,$20,$25,$73,$A,$0
461L50:.dc.b $A,$0
462L52:.dc.b $A,$2D,$2D,$2D,$2D,$2D,$20,$45,$6E,$64,$20,$6F,$66,$20,$64,$65,$62,$75,$67,$20,$62,$75,$66,$66,$65,$72,$20,$2D,$2D,$2D
463.dc.b $2D,$2D,$A,$A,$0
Note: See TracBrowser for help on using the repository browser.