-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmini.lst
576 lines (574 loc) · 44.8 KB
/
mini.lst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
|| DiZZy v0.1, dead slow Z80 assembler tools, (c) 2017 Michael Hoffmeister
|| Loading tables z80_isa.csv, z80_syms.csv..
|| Assembling mini.asm..
|| Starting assemble stage 1 for: mini.asm..
*MARK@STAGE1*
In mini.asm(412) E0119: Jump target to far away for RELATIVE jump! Skipping!
|| Stage 1 completed.
|| Starting assemble stage 2 ..
0000: |;------------------------------
0000: |ENTRY EQU 5 ;entry point for the cp/m bdos.
0000: |TFCA EQU 5CH ;default file control block.
0000: |TFCB EQU TFCA+1
0000: |;------------------------------
0000: | ORG 100h
0100: | ;
0100: |hallo: ; START
0100: 3e00 | LD A,$00 |r <- n
0102: 06aa | LD B,$aa |r <- n
0104: cbc0 | SET 0,B |r[b] <- 1
0106: cbff | SET 7,A |r[b] <- 1
0108: | ;
0108:*fd210004| LD IY,buf |IY <- nn
010c: fd3602aa| LD (IY+2),$aa |(IY+d) <- n
0110: fdcb025e| BIT 3,(IY+2) |Z <- (IY+d)[b]
0114: fdcb0256| BIT 2,(IY+2) |Z <- (IY+d)[b]
0118: 00 | NOP |--
0119: | ;
0119:*dd210004| LD IX,buf |IX <- nn
011d: dd360255| LD (IX+2),$55 |(IX+d) <- n
0121: ddcb025e| BIT 3,(IX+2) |Z <- (IX+d)[b]
0125: ddcb0256| BIT 2,(IX+2) |Z <- (IX+d)[b]
0129: 00 | NOP |--
012a: | ; BIT TEST
012a:*210004 | LD HL,buf |Register pair <- nn
012d: 3655 | LD (HL),$55 |(HL) <- n
012f: cb5e | BIT 3,(HL) |Z <- (HL)[b]
0131: cb56 | BIT 2,(HL) |Z <- (HL)[b]
0133: 00 | NOP |--
0134: | ;
0134: 3eaa | LD A,$aa |r <- n
0136: cb57 | BIT 2,A |Z <- r[b]
0138: cb5f | BIT 3,A |Z <- r[b]
013a: cb47 | BIT 0,A |Z <- r[b]
013c: 47 | LD B,A |r <- s
013d: cb48 | BIT 1,B |Z <- r[b]
013f: | ; INC RR
013f: fd2155aa| LD IY,$aa55 |IY <- nn
0143: fd23 | INC IY |IY <- IY + 1
0145: fd2b | DEC IY |IY <- IY - 1
0147: | ; --
0147: 00 | NOP |--
0148: | ; INC/ DEC
0148:*fd210004| LD IY,buf |IY <- nn
014c: fd360255| LD (IY+2),$55 |(IY+d) <- n
0150: fd3402 | INC (IY+2) |(IY+d) <- (IY+d) + 1
0153: fd3502 | DEC (IY+2) |(IY+d) <- (IY+d) - 1
0156: 00 | NOP |--
0157:*dd210004| LD IX,buf |IX <- nn
015b: dd360255| LD (IX+2),$55 |(IX+d) <- n
015f: dd3402 | INC (IX+2) |(IX+d) <- (IX+d) + 1
0162: dd3502 | DEC (IX+2) |(IX+d) <- (IX+d) - 1
0165: 00 | NOP |--
0166:*210004 | LD HL,buf |Register pair <- nn
0169: 36aa | LD (HL),$aa |(HL) <- n
016b: 34 | INC (HL) |(HL) <- (HL) + 1
016c: 35 | DEC (HL) |(HL) <- (HL) - 1
016d: 00 | NOP |--
016e: 0600 | LD B,$00 |r <- n
0170: 04 | INC B |r <- r + 1
0171: 05 | DEC B |r <- r - 1
0172: 05 | DEC B |r <- r - 1
0173: 00 | NOP |--
0174: | ; CP
0174: 3e70 | LD A,$70 |r <- n
0176: 0670 | LD B,$70 |r <- n
0178: b8 | CP B ; compare A with B, shall have …|Z <- A = r
017c: | Z set
0179: 0691 | LD B,$91 |r <- n
017b: b8 | CP B |Z <- A = r
017c: fe70 | CP $70 |Z <- A = n
017e: fe90 | CP $90 |Z <- A = n
0180: | ;
0180:*dd210004| LD IX,buf |IX <- nn
0184: dd360270| LD (IX+2),$70 |(IX+d) <- n
0188: ddbe02 | CP (IX+2) |Z <- A = (IX+d)
018b: dd360290| LD (IX+2),$90 |(IX+d) <- n
018f: ddbe02 | CP (IX+2) |Z <- A = (IX+d)
0192: | ;
0192:*fd210004| LD IY,buf |IY <- nn
0196: fd360470| LD (IY+4),$70 |(IY+d) <- n
019a: fdbe04 | CP (IY+4) |Z <- A = (IY+d)
019d: fd360490| LD (IY+4),$90 |(IY+d) <- n
01a1: fdbe04 | CP (IY+4) |Z <- A = (IY+d)
01a4: | ;
01a4:*210004 | LD HL,buf |Register pair <- nn
01a7: 3670 | LD (HL),$70 |(HL) <- n
01a9: be | CP (HL) |Z <- A = (HL)
01aa: 3690 | LD (HL),$90 |(HL) <- n
01ac: be | CP (HL) |Z <- A = (HL)
01ad: | ; EX (SP),IY
01ad: 310a00 | LD SP,10 ; SP is 0x0a |Register pair <- nn
01b0: 013412 | LD BC,$1234 |Register pair <- nn
01b3: c5 | PUSH BC ; SP is 0x08 (0x09 is $12, 0x08…|(SP-1) <- QQh, (SP-2) <- QQl, SP <- SP - 2
01b7: | is $34)
01b4: d1 | POP DE ; SP shall be reset again t…|QQl <- (SP), QQh <- (SP+1), SP <- SP + 2
01b8: | o 0x0a
01b5: c5 | PUSH BC ; SP is 0x08 |(SP-1) <- QQh, (SP-2) <- QQl, SP <- SP - 2
01b6: fd21aa55| LD IY,$55aa |IY <- nn
01ba: fde3 | EX (SP),IY ; reads 0x08, 0x09, will end up…|IYl <-> (SP), IYh <-> (SP+1)
01be: | 0x0a
01bc: 00 | NOP ; ASSERT H = $12, L = $34 |--
01bd: fde3 | EX (SP),IY |IYl <-> (SP), IYh <-> (SP+1)
01bf: 00 | NOP ; ASSERT H = $55, L = $aa |--
01c0: | ; EX (SP),IX
01c0: 310a00 | LD SP,10 ; SP is 0x0a |Register pair <- nn
01c3: 013412 | LD BC,$1234 |Register pair <- nn
01c6: c5 | PUSH BC ; SP is 0x08 (0x09 is $12, 0x08…|(SP-1) <- QQh, (SP-2) <- QQl, SP <- SP - 2
01ca: | is $34)
01c7: d1 | POP DE ; SP shall be reset again t…|QQl <- (SP), QQh <- (SP+1), SP <- SP + 2
01cb: | o 0x0a
01c8: c5 | PUSH BC ; SP is 0x08 |(SP-1) <- QQh, (SP-2) <- QQl, SP <- SP - 2
01c9: dd21aa55| LD IX,$55aa |IX <- nn
01cd: dde3 | EX (SP),IX ; reads 0x08, 0x09, will end up…|IXl <-> (SP), IXh <-> (SP+1)
01d1: | 0x0a
01cf: 00 | NOP ; ASSERT H = $12, L = $34 |--
01d0: dde3 | EX (SP),IX |IXl <-> (SP), IXh <-> (SP+1)
01d2: 00 | NOP ; ASSERT H = $55, L = $aa |--
01d3: | ; EX (SP),HL
01d3: 310a00 | LD SP,10 ; SP is 0x0a |Register pair <- nn
01d6: 013412 | LD BC,$1234 |Register pair <- nn
01d9: c5 | PUSH BC ; SP is 0x08 (0x09 is $12, 0x08…|(SP-1) <- QQh, (SP-2) <- QQl, SP <- SP - 2
01dd: | is $34)
01da: d1 | POP DE ; SP shall be reset again t…|QQl <- (SP), QQh <- (SP+1), SP <- SP + 2
01de: | o 0x0a
01db: c5 | PUSH BC ; SP is 0x08 |(SP-1) <- QQh, (SP-2) <- QQl, SP <- SP - 2
01dc: 21aa55 | LD HL,$55aa |Register pair <- nn
01df: e3 | EX (SP),HL ; reads 0x08, 0x09, will end up…|L <-> (SP), H <-> (SP+1)
01e3: | 0x0a
01e0: 00 | NOP ; ASSERT H = $12, L = $34 |--
01e1: e3 | EX (SP),HL |L <-> (SP), H <-> (SP+1)
01e2: 00 | NOP ; ASSERT H = $55, L = $aa |--
01e3: | ; EXX
01e3: 015a44 | LD BC,$445a |Register pair <- nn
01e6: 11a23d | LD DE,$3da2 |Register pair <- nn
01e9: 215988 | LD HL,$8859 |Register pair <- nn
01ec: d9 | EXX |(BC) <-> (BC'), (DE) <-> (DE'), (HL) <-> (HL')
01ed: 00 | NOP ; ASSERT B = $00, C = $00, D = …|--
01f1: | $00, E = $00, H = $00, L = $00
01ee: 018809 | LD BC,$0988 |Register pair <- nn
01f1: 110093 | LD DE,$9300 |Register pair <- nn
01f4: 21e700 | LD HL,$00e7 |Register pair <- nn
01f7: d9 | EXX |(BC) <-> (BC'), (DE) <-> (DE'), (HL) <-> (HL')
01f8: 00 | NOP ; ASSERT B = $44, C = $5a, D = …|--
01fc: | $3d, E = $a2, H = $88, L = $59
01f9: d9 | EXX |(BC) <-> (BC'), (DE) <-> (DE'), (HL) <-> (HL')
01fa: 00 | NOP ; ASSERT B = $09, C = $88, D = …|--
01fe: | $93, E = $00, H = $00, L = $e7
01fb: | ; EX AF,AF'
01fb: 3e55 | LD A,$55 |r <- n
01fd: 37 | SCF |CY <- 1
01fe: 08 | EX AF,AF' |AF <-> AF'
01ff: 00 | NOP ; ASSERT A = $00, CY clear |--
0200: 3eaa | LD A,$aa |r <- n
0202: 08 | EX AF,AF' |AF <-> AF'
0203: 00 | NOP ; ASSERT A = $55, CY set |--
0204: 08 | EX AF,AF' |AF <-> AF'
0205: 00 | NOP ; ASSERT A = $aa, CY clear |--
0206: | ; EX DE.HL
0206: 113412 | LD DE,$1234 |Register pair <- nn
0209: 217856 | LD HL,$5678 |Register pair <- nn
020c: eb | EX DE,HL |DE <-> HL
020d: 00 | NOP ; ASSERT D = $56, E = $78, H = …|--
0211: | $12, L = $34
020e: | ; RRD
020e:*210006 | LD HL,buftmp |Register pair <- nn
0211: 3620 | LD (HL),00100000b |(HL) <- n
0213: 3e84 | LD A,10000100b |r <- n
0215: ed67 | RRD |[ A, (HL) ] <- [ A[7..4], (HL)[3..0], A[3..0], (HL)[7.4] ]
0217: 46 | LD B,(HL) ; ASSERT B = $42 |r <- (HL)
0218: 4f | LD C,A ; ASSERT C = $80 |r <- s
0219: | ; RLD
0219:*210006 | LD HL,buftmp |Register pair <- nn
021c: 3631 | LD (HL),00110001b |(HL) <- n
021e: 3e7a | LD A,01111010b |r <- n
0220: ed6f | RLD |[ A, (HL) ] <- [ A[7..4], (HL)[7..4], (HL)[3..0], A[3..0] ]
0222: 46 | LD B,(HL) ; ASSERT B = $1a |r <- (HL)
0223: 4f | LD C,A ; ASSERT C = $73 |r <- s
0224: | ; SRL in multiple ways
0224: b7 | OR A ; clear carry |A <- A | r
0225: 3e8f | LD A,10001111b |r <- n
0227: cb3f | SRL A |[r,CY] <- SHR([0,r], 1)
0229: 47 | LD B,A |r <- s
022a: 00 | NOP ; ASSERT B = $47, Cy set |--
022b: b7 | OR A ; clear carry |A <- A | r
022c: 3e8f | LD A,10001111b |r <- n
022e:*210006 | LD HL,buftmp ; not a constant one |Register pair <- nn
0231: 77 | LD (HL),A |(HL) <- r
0232: cb3e | SRL (HL) |[ (HL) ,CY] <- SHR([0, (HL) ], 1)
0234: 4e | LD C,(HL) |r <- (HL)
0235: 00 | NOP ; ASSERT C = $47, Cy set |--
0236: b7 | OR A ; clear carry |A <- A | r
0237: 3e8f | LD A,10001111b |r <- n
0239:*fd210006| LD IY,buftmp ; not a constant one |IY <- nn
023d: fd7701 | LD (IY+1),A |(IY+d) <- r
0240: fdcb013e| SRL (IY+1) |[ (IY+d) ,CY] <- SHR([0, (IY+d) ], 1)
0244: fd5601 | LD D,(IY+1) |r <- (IY+d)
0247: 00 | NOP ; ASSERT D = $47, Cy set |--
0248: | ; SRA in multiple ways
0248: b7 | OR A ; clear carry |A <- A | r
0249: 3eb8 | LD A,10111000b |r <- n
024b: cb2f | SRA A |[r,CY] <- SHR([r[7],r], 1)
024d: 47 | LD B,A |r <- s
024e: 00 | NOP ; ASSERT B = $dc, Cy cleared |--
024f: b7 | OR A ; clear carry |A <- A | r
0250: 3eb8 | LD A,10111000b |r <- n
0252:*210006 | LD HL,buftmp ; not a constant one |Register pair <- nn
0255: 77 | LD (HL),A |(HL) <- r
0256: cb2e | SRA (HL) |[ (HL) ,CY] <- SHR([ (HL)[7], (HL) ], 1)
0258: 4e | LD C,(HL) |r <- (HL)
0259: 00 | NOP ; ASSERT C = $dc, Cy cleared |--
025a: b7 | OR A ; clear carry |A <- A | r
025b: 3eb8 | LD A,10111000b |r <- n
025d:*fd210006| LD IY,buftmp ; not a constant one |IY <- nn
0261: fd7701 | LD (IY+1),A |(IY+d) <- r
0264: fdcb012e| SRA (IY+1) |[ (IY+d) ,CY] <- SHR([ (IY+d)[7], (IY+d) ], 1)
0268: fd5601 | LD D,(IY+1) |r <- (IY+d)
026b: 00 | NOP ; ASSERT D = $dc, Cy cleared |--
026c: | ; SLA in multiple ways
026c: b7 | OR A ; clear carry |A <- A | r
026d: 3eb1 | LD A,10110001b |r <- n
026f: cb27 | SLA A |[CY,r] <- SHL([r,0], 1)
0271: 47 | LD B,A |r <- s
0272: 00 | NOP ; ASSERT B = $62, Cy set |--
0273: b7 | OR A ; clear carry |A <- A | r
0274: 3eb1 | LD A,10110001b |r <- n
0276:*210006 | LD HL,buftmp ; not a constant one |Register pair <- nn
0279: 77 | LD (HL),A |(HL) <- r
027a: cb26 | SLA (HL) |[CY, (HL) ] <- SHL([ (HL) ,0], 1)
027c: 4e | LD C,(HL) |r <- (HL)
027d: 00 | NOP ; ASSERT C = $62, Cy set |--
027e: b7 | OR A ; clear carry |A <- A | r
027f: 3eb1 | LD A,10110001b |r <- n
0281:*fd210006| LD IY,buftmp ; not a constant one |IY <- nn
0285: fd7701 | LD (IY+1),A |(IY+d) <- r
0288: fdcb0126| SLA (IY+1) |[CY, (IY+d) ] <- SHL([ (IY+d) ,0], 1)
028c: fd5601 | LD D,(IY+1) |r <- (IY+d)
028f: 00 | NOP ; ASSERT D = $62, Cy set |--
0290: | ; RRC further
*MARK@STAGE2*
0290:*fd210006| LD IY,buftmp ; not a constant one |IY <- nn
0294: 3e31 | LD A,00110001b |r <- n
0296: fd7703 | LD (IY+3),A |(IY+d) <- r
0299: b7 | OR A ; clears carry? |A <- A | r
029a: fdcb030e| RRC (IY+3) ; shall by CY, $98 |[CY,(IY+d)] <- ROL([CY,(IY+d)], 1)
029e: fd4e03 | LD C,(IY+3) |r <- (IY+d)
02a1: 00 | NOP |--
02a2: 00 | NOP |--
02a3: | ; RR further
02a3:*210006 | LD HL,buftmp ; not a constant one |Register pair <- nn
02a6: 3edd | LD A,11011101b |r <- n
02a8: 77 | LD (HL),A |(HL) <- r
02a9: b7 | OR A ; clears carry? |A <- A | r
02aa: cb1e | RR (HL) ; shall by CY, $6e |[(HL),CY] <- ROR([(HL),CY], 1)
02ac: 46 | LD B,(HL) |r <- (HL)
02ad: 00 | NOP |--
02ae: 00 | NOP |--
02af: | ; RL further
02af:*fd210006| LD IY,buftmp ; not a constant one |IY <- nn
02b3: 3e8f | LD A,10001111b |r <- n
02b5: fd7704 | LD (IY+4),A |(IY+d) <- r
02b8: fdcb0416| RL (IY+4) ; shall by CY, $1e |CY <- (IY+d)[0], (IY+d) <- ROR( (IY+d) ,1)
02bc: fd4602 | LD B,(IY+2) |r <- (IY+d)
02bf: 00 | NOP |--
02c0: 00 | NOP |--
02c1: 0688 | LD B,10001000b |r <- n
02c3: cb10 | RL B ; shall be CY, %00010001 = $11 |CY <- r[0], r <- ROR(r,1)
02c5: 00 | NOP |--
02c6:*210006 | LD HL,buftmp ; not a constant one |Register pair <- nn
02c9: 3ecc | LD A,11001100b |r <- n
02cb: 77 | LD (HL),A |(HL) <- r
02cc: cb16 | RL (HL) ; shall by CY, $99 |CY <- (HL)[0], (HL) <- ROR( (HL) ,1)
02ce: 7e | LD A,(HL) |r <- (HL)
02cf: 00 | NOP |--
02d0: | ; RLC further
02d0:*fd210006| LD IY,buftmp ; not a constant one |IY <- nn
02d4: 3ecc | LD A,11001100b |r <- n
02d6: fd7704 | LD (IY+4),A |(IY+d) <- r
02d9: fdcb0406| RLC (IY+4) ; shall by CY, $99 |CY <- (IY+d)[7], (IY+d) <- ROL( (IY+d) ,1)
02dd: fd4602 | LD B,(IY+2) |r <- (IY+d)
02e0: 00 | NOP |--
02e1: 00 | NOP |--
02e2: 0688 | LD B,10001000b |r <- n
02e4: cb00 | RLC B ; shall be CY, %00010001 = $11 |CY <- r[7], r <- ROL(r,1)
02e6: 00 | NOP |--
02e7:*210006 | LD HL,buftmp ; not a constant one |Register pair <- nn
02ea: 3ecc | LD A,11001100b |r <- n
02ec: 77 | LD (HL),A |(HL) <- r
02ed: cb06 | RLC (HL) ; shall by CY, $99 |CY <- (HL)[7], (HL) <- ROL( (HL) ,1)
02ef: 7e | LD A,(HL) |r <- (HL)
02f0: 00 | NOP |--
02f1: | ; RRA
02f1: 3ee1 | LD A,11100001b |r <- n
02f3: b7 | OR A |A <- A | r
02f4: 1f | RRA ; shall be CY, %01110000 = $70 |[A,CY] <- ROR([A,CY], 1)
02f5: 00 | NOP |--
02f6: | ; RRCA
02f6: 3e11 | LD A,00010001b |r <- n
02f8: 0f | RRCA ; shall be CY, %10001000 = $88 |CY <- A[0], A <- ROR(A,1)
02f9: 00 | NOP |--
02fa: | ; RLA
02fa: 3e76 | LD A,01110110b |r <- n
02fc: 37 | SCF |CY <- 1
02fd: 17 | RLA ; shall be no CY, %11101101 = $…|[CY,A] <- ROL([CY,A], 1)
0301: | ed
02fe: 00 | NOP |--
02ff: | ; RLCA
02ff: 3e81 | LD A,10000001b |r <- n
0301: 07 | RLCA ; shall be CY, %00000011 = $03 |CY <- A[7], A <- ROL(A,1)
0302: 00 | NOP |--
0303: | ; XOR
0303: 3e55 | LD A, $55 |r <- n
0305: 06aa | LD B, $aa |r <- n
0307: a8 | XOR B ; shall be $ff |A <- A + r
0308: ee01 | XOR $01 ; shall be $fe, Signed |A <- A + n
030a:*dd211404| LD IX,buf7 ; is 43, 44, 45, 255 |IX <- nn
030e: ddae03 | XOR (IX+3) ; $01 |A <- A + (IX+d)
0311: 00 | NOP |--
0312: | ; AND
0312: 3eff | LD A, $ff |r <- n
0314: 06aa | LD B, $aa |r <- n
0316: a0 | AND B ; shall be $aa |A <- A & r
0317: e622 | AND $22 ; shall be $22 |A <- A & n
0319:*210404 | LD HL,buf2 ; is 5 |Register pair <- nn
031c: a6 | AND (HL) ; $00, Zero |A <- A & (HL)
031d: 00 | NOP |--
031e: | ; OR
031e: 3e55 | LD A, $55 |r <- n
0320: 06aa | LD B, $aa |r <- n
0322: b0 | OR B ; shall be $ff |A <- A | r
0323: 3e11 | LD A, $11 |r <- n
0325: f688 | OR $88 ; shall be $99 |A <- A | n
0327:*210404 | LD HL,buf2 ; is 5 |Register pair <- nn
032a: b6 | OR (HL) ; $99+5 = $9d |A <- A | (HL)
032b: 37 | SCF ; CY is 1 |CY <- 1
032c: b7 | OR A ; still $9d, but CY is 0 |A <- A | r
032d: 00 | NOP |--
032e: | ; ADD
032e: 3e2a | LD A,42 |r <- n
0330: 47 | LD B,A |r <- s
0331: 80 | ADD A,B ; 84, kein Carry |A <- A + r
0332: 0ee6 | LD C,230 |r <- n
0334: 81 | ADD A,C ; 84 + 230 -> 58, Carry! |A <- A + r
0335: | ; SUB
0335: 3e3a | LD A,58 |r <- n
0337: 1637 | LD D,55 |r <- n
0339: 92 | SUB D ; shall be 3, |A <- A - r
033a: d603 | SUB 3 ; shall be 0, Sign |A <- A - n
033c:*dd210004| LD IX,buf ; buf = 1,2,3,4.. |IX <- nn
0340: dd9600 | SUB (IX+0) ; A shall be $ff |A <- A - (IX+d)
0343:*fd210004| LD IY,buf |IY <- nn
0347: fd9601 | SUB (IY+1) ; A shall be $fd |A <- A + (IY+d)
034a: | ; SBC (with Carry)
034a: 3e3b | LD A,59 |r <- n
034c: 1637 | LD D,55 |r <- n
034e: 37 | SCF ; set CY |CY <- 1
034f: 9a | SBC A,D ; shall be 3, |A <- A + r + CY
0350: 37 | SCF ; set CY |CY <- 1
0351: de03 | SBC A,3 ; shall be ff, Carry (Borrow!) |A <- A + n + CY
0353:*dd210004| LD IX,buf ; buf = 1,2,3,4.. |IX <- nn
0357: dd9e00 | SBC A,(IX+0) ; A shall be $ff |A <- A + (IX+d) + CY
035a:*fd210004| LD IY,buf |IY <- nn
035e: fd9e01 | SBC A,(IY+1) ; A shall be $fd |A <- A + (IY+d) + CY
0361: c62a | ADD A,42 ; shall be 42 again |A <- A + n
0363:*211404 | LD HL,buf7 |Register pair <- nn
0366: 86 | ADD A,(HL) ; 85 |A <- A + (HL)
0367:*dd211404| LD IX,buf7 |IX <- nn
036b: dd8602 | ADD A,(IX+2) ; 85 + 45 = 130 |A <- A + (IX+d)
036e: 00 | NOP |--
036f:*dd210004| LD IX,buf |IX <- nn
0373: dd4e01 | LD C,(IX+1) |r <- (IX+d)
0376:*210404 | LD HL,buf2 |Register pair <- nn
0379: 71 | LD (HL),C |(HL) <- r
037a: 56 | LD D,(HL) |r <- (HL)
037b: dd72fe | LD (IX+-2),D |(IX+d) <- r
037e: 365a | LD (HL),$5a |(HL) <- n
0380: dd36fca5| LD (IX+-4),$a5 |(IX+d) <- n
0384: 0a | LD A,(BC) |A <- (BC)
0385: 3e0b | LD A,11 |r <- n
0387:*3a0704 | LD A,(buf2+3) |A <- (nn)
038a: 3e55 | LD A,$55 |r <- n
038c:*010004 | LD BC,buf |Register pair <- nn
038f: 02 | LD (BC),A |(BC) <- A
0390: 3e77 | LD A,$77 |r <- n
0392:*110004 | LD DE,buf |Register pair <- nn
0395: 12 | LD (DE),A |(DE) <- A
0396: 3e99 | LD A,$99 |r <- n
0398:*320004 | LD (buf),A |(nn) <- A
039b: 3e32 | LD A,$32 |r <- n
039d: ed47 | LD I,A |Interrupt vector reg <- A
039f: 3e43 | LD A,$43 |r <- n
03a1: ed4f | LD R,A |Memory refresh reg <- A
03a3: ed57 | LD A,I ; A to be $32 |A <- Interrupt vector reg
03a5: ed5f | LD A,R ; A to be $43 |A <- Memory refresh reg
03a7:*dd210004| LD IX,buf |IX <- nn
03ab: fd21aa55| LD IY,$55aa |IY <- nn
03af:*2a0a04 | LD HL,(buf4) ; HL to be $200 |H <- (nn+1), L <- (nn)
03b2:*ed4b0004| LD BC,(buf) ; BC to be $0201 |RRh <- (nn+1), RRl <- (nn)
03b6:*ed5b0104| LD DE,(buf+1) ; DE to be $0302 |RRh <- (nn+1), RRl <- (nn)
03ba:*ed7b0204| LD SP,(buf+2) ; SP to be $0403 |RRh <- (nn+1), RRl <- (nn)
03be:*dd2a0304| LD IX,(buf+3) ; SP to be $0504 |IXh <- (nn+1), IXl <- (nn)
03c2:*fd2a0404| LD IY,(buf+4) ; SP to be $0605 |IYh <- (nn+1), IYl <- (nn)
03c6:*220c04 | LD (buf6),HL |(nn+1) <- H, (nn) <- L
03c9:*ed430104| LD (buf+1),BC |(nn+1) <- RRh, (nn) <-RRl
03cd:*ed530204| LD (buf+2),DE |(nn+1) <- RRh, (nn) <-RRl
03d1:*ed730304| LD (buf+3),SP |(nn+1) <- RRh, (nn) <-RRl
03d5:*dd220404| LD (buf+4),IX |(nn+1) <- IXh, (nn) <-IXl
03d9:*fd220504| LD (buf+5),IY |(nn+1) <- IYh, (nn) <-IYl
03dd: f9 | LD SP,HL |SP <- HL
03de: ddf9 | LD SP,IX |SP <- IX
03e0: fdf9 | LD SP,IY |SP <- IY
03e2:*314406 | LD SP,spend |Register pair <- nn
03e5: c5 | PUSH BC |(SP-1) <- QQh, (SP-2) <- QQl, SP <- SP - 2
03e6: d5 | PUSH DE |(SP-1) <- QQh, (SP-2) <- QQl, SP <- SP - 2
03e7: e5 | PUSH HL |(SP-1) <- QQh, (SP-2) <- QQl, SP <- SP - 2
03e8: f5 | PUSH AF |(SP-1) <- QQh, (SP-2) <- QQl, SP <- SP - 2
03e9: dde5 | PUSH IX |(SP-1) <- IXh, (SP-2) <- IXl, SP <- SP - 2
03eb: fde5 | PUSH IY |(SP-1) <- IYh, (SP-2) <- IYl, SP <- SP - 2
03ed: c1 | POP BC |QQl <- (SP), QQh <- (SP+1), SP <- SP + 2
03ee: dde1 | POP IX |IXl <- (SP), IXh <- (SP+2), SP <- SP + 2
03f0: 00 | NOP |--
03f1: 23 | INC HL |RR <- RR + 1
03f2: cb16 | RL (HL) |CY <- (HL)[0], (HL) <- ROR( (HL) ,1)
03f4: 3e5d | LD A,TFCB |r <- n
03f6: 212312 | LD HL,1223H |Register pair <- nn
03f9:*010004 | LD BC, buf |Register pair <- nn
In mini.asm(412) E0119: Jump target to far away for RELATIVE jump! Skipping!
03fc: | JR hallo |PC <- PC + ee
03fc: c30001 | JP hallo |PC <- nn
03ff: |
03ff: |TFCC EQU $
03ff: |TFCD EQU $+20
03ff: |
03ff: |hallo2:
03ff: 7e | LD A,(HL) |r <- (HL)
0400: 02 | LD (BC),A |(BC) <- A
0401: 320500 | LD (5),A |(nn) <- A
0404: dd7e05 | LD A,(IX+5h) |r <- (IX+d)
0407: fd770c | LD (IY+12),A |(IY+d) <- r
040a:*ed4b0004| LD BC,(buf) |RRh <- (nn+1), RRl <- (nn)
040e:*210404 | LD HL,buf2 |Register pair <- nn
0411: |;
0411: |; Routine to convert (A) into upper case ascii. Only letters
0411: |; are affected.
0411: |;
0411: fe61 |UPPER: CP 'a' ;check for letters in the range…|Z <- A = n
0415: | of 'a' to 'z'.
0413: d8 | RET C |IF cc true, PCl <- (SP), PCh <- (SP), SP <- SP + 2
0414: fe7b | CP '{' |Z <- A = n
0416: d0 | RET NC |IF cc true, PCl <- (SP), PCh <- (SP), SP <- SP + 2
0417: e65f | AND 5FH ;convert it if found. |A <- A & n
0419: c9 | RET |PCl <- (SP), PCh <- (SP), SP <- SP + 2
041a: |
041a: | ORG $400
0400: |
0400: 01020304|buf: DB 1,2,3,4,
0404: 05060708|buf2: DB 5,6,7,8,9,10
0408: 090a |
040a: |
040a: 0002 |buf4: DEFW $200
040c: |
040c: a55a |buf6: DEFW $5aa5
040e: 5aa5 | DEFW $a55a
0410: 3412 | DEFW $1234
0412: 2143 | DEFW $4321
0414: |
0414: 2b |buf7: DB 43
0415: 2c | DB 44
0416: 2d | DB 45
0417: ff | DB 255
0418: |
0418: |buf3: ; arithmetic test suite ... see http://benryves.com/bin/brass/manual.htm#labels
In mini.asm(455) E0109: -1 cannot be evaluated as sequence of bytes! Skipping!
0418:*???? | DEFW -1 ; $ffff
In mini.asm(456) E0109: -2 cannot be evaluated as sequence of bytes! Skipping!
041a:*???? | DEFW -2 ; $feff
041c: 1600 | DEFW 17+5 ; $16
041e: 0c00 | DEFW 17-5 ; $0c
0420: 5500 | DEFW 17*5 ; $55
0422: 0300 | DEFW 17/5 ; $03
0424: 0200 | DEFW 17%5 ; $02
0426: 0700 | DEFW 15&7 ; $07
0428: 0700 | DEFW 4|3 ; $07
042a: 0c00 | DEFW 3^15 ; $0c
042c: 0000 | DEFW !1 ; $00
042e: 0100 | DEFW !0 ; $01
In mini.asm(467) E0109: ~1 cannot be evaluated as sequence of bytes! Skipping!
0430:*???? | DEFW ~1 ; $feff
0432: 0100 | DEFW 1 && 1 ; $01
0434: 0000 | DEFW 1 && 0 ; $00
0436: 0100 | DEFW 1 || 0 ; $01
0438: 0001 | DEFW 1 << 8 ; $0001
043a: 0200 | DEFW 8 >> 2 ; $02
043c: 0600 | DEFW 5 + 1 ; $04
043e: 0100 | DEFW 8 == 4*2 ; $01
0440: 0000 | DEFW 1+2 != 2+1 ; $00
0442: 0100 | DEFW 7 < 15 ; $01
0444: 0000 | DEFW 15 < 7 ; $00
0446: 0000 | DEFW 7 > 15 ; $00
0448: 0100 | DEFW 15 > -15 ; $01
044a: 0100 | DEFW 4 <= 4 ; $01
044c: 0100 | DEFW -4 <= -4 ; $01
044e: 46 | DEFB 33*2+4 ; $46
044f: 09 | DEFB 2*(36-(2*2))/ 17 *3 ; $03
0450: 01020304| DEFB 1,2,3,4,5,6,7
0454: 050607 |
0457: 48616c6c| DEFB 'Hallo \n\\\xaa\x55\r world!'
045b: 6f200a5c|
045f: aa550d20|
0463: 776f726c|
0467: 6421 |
0469: |
0469: |buf5: EQU 2000h
0469: 22564c6f| DEFB 34,56h,"Long term evolution\0\0"
046d: 6e672074|
0471: 65726d20|
0475: 65766f6c|
0479: 7574696f|
047d: 6e0000 |
0480: |
0480: | ORG $600
0600: |
0600: 00000000|buftmp: DEFB 0,0,0,0
0604: |
0604: 00000000|spstrt: DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0608: 00000000|
060c: 00000000|
0610: 00000000|
0614: 00000000| DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0618: 00000000|
061c: 00000000|
0620: 00000000|
0624: 00000000| DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0628: 00000000|
062c: 00000000|
0630: 00000000|
0634: 00000000| DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0638: 00000000|
063c: 00000000|
0640: 00000000|
0644: ff |spend: DEFB 255
|| Stage 2 completed. 123 errors, 6 invalid bytes remaining!
; +++ global symbols +++
BUF5 = $2000 = 8192 is Equ ; expr = 2000h
ENTRY = $0005 = 5 is Equ ; expr = 5
TFCA = $005c = 92 is Equ ; expr = 5CH
TFCB = $005d = 93 is Equ ; expr = TFCA+1
TFCC = $03ff = 1023 is Equ ; expr = $
TFCD = $0014 = 20 is Equ ; expr = $+20
BUF = $0400 = 1024 is Label
BUF2 = $0404 = 1028 is Label
BUF3 = $0418 = 1048 is Label
BUF4 = $040a = 1034 is Label
BUF6 = $040c = 1036 is Label
BUF7 = $0414 = 1044 is Label
BUFTMP = $0600 = 1536 is Label
HALLO = $0100 = 256 is Label
HALLO2 = $03ff = 1023 is Label
SPEND = $0644 = 1604 is Label
SPSTRT = $0604 = 1540 is Label
UPPER = $0411 = 1041 is Label
|| Writing binary bytes to: mini.rom
|| Found minimal org pos to be $100 = 256, last byte to be $644 = 1604
*MARK*
|| Writing completed. 1349 bytes written