OpenCores
URL https://opencores.org/ocsvn/rf6809/rf6809/trunk

Subversion Repositories rf6809

[/] [rf6809/] [trunk/] [software/] [boot/] [disassem.asm] - Blame information for rev 13

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 robfinch
; ============================================================================
2
;        __
3
;   \\__/ o\    (C) 2013-2022  Robert Finch, Waterloo
4
;    \  __ /    All rights reserved.
5
;     \/_//     robfinch@opencores.org
6
;       ||
7
;
8
;
9
; BSD 3-Clause License
10
; Redistribution and use in source and binary forms, with or without
11
; modification, are permitted provided that the following conditions are met:
12
;
13
; 1. Redistributions of source code must retain the above copyright notice, this
14
;    list of conditions and the following disclaimer.
15
;
16
; 2. Redistributions in binary form must reproduce the above copyright notice,
17
;    this list of conditions and the following disclaimer in the documentation
18
;    and/or other materials provided with the distribution.
19
;
20
; 3. Neither the name of the copyright holder nor the names of its
21
;    contributors may be used to endorse or promote products derived from
22
;    this software without specific prior written permission.
23
;
24
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
;
35
; ============================================================================
36
;
37
; Disassembler
38
;
39
;
40
DIRECT  EQU     1
41
LSREL           EQU     2
42
IMMB            EQU     3
43
SREL            EQU     4
44
NDX                     EQU     5
45
EXT                     EQU     6
46
IMMW            EQU     7
47
FAREXT  EQU     8
48
 
49
distbl1:
50
        ; 00 to 0F
51
        fcb             "NEG ", DIRECT
52
        fcb             "    ", 0
53
        fcb             "    ", 0
54
        fcb             "COM ", DIRECT
55
        fcb             "LSR ", DIRECT
56
        fcb             "    ", 0
57
        fcb             "ROR ", DIRECT
58
        fcb             "ASR ", DIRECT
59
        fcb             "ASL ", DIRECT
60
        fcb             "ROL ", DIRECT
61
        fcb             "DEC ", DIRECT
62
        fcb             "    ", 0
63
        fcb             "INC ", DIRECT
64
        fcb             "TST ", DIRECT
65
        fcb             "JMP ", DIRECT
66
        fcb             "CLR ", DIRECT
67
 
68
        ; 10 to 1F
69
        fcb             "    ", 0
70
        fcb             "    ", 0
71
        fcb             "NOP ", 0
72
        fcb             "SYNC", 0
73
        fcb             "    ", 0
74
        fcb             "FAR ", 0
75
        fcb             "LBRA", LSREL
76
        fcb             "LBSR", LSREL
77
        fcb             "    ", 0
78
        fcb             "DAA ", 0
79
        fcb             "ORCC", IMMB
80
        fcb             "    ", 0
81
        fcb             "ANDC", IMMB
82
        fcb             "SEX ", 0
83
        fcb             "EXG ", IMMB
84
        fcb             "TFR ", IMMB
85
 
86
        ; 20 to 2F
87
        fcb             "BRA ", SREL
88
        fcb             "BRN ", SREL
89
        fcb             "BHI ", SREL
90
        fcb             "BLS ", SREL
91
        fcb             "BHS ", SREL
92
        fcb             "BLO ", SREL
93
        fcb             "BNE ", SREL
94
        fcb             "BEQ ", SREL
95
        fcb             "BVC ", SREL
96
        fcb             "BVS ", SREL
97
        fcb             "BPL ", SREL
98
        fcb             "BMI ", SREL
99
        fcb             "BGE ", SREL
100
        fcb             "BLT ", SREL
101
        fcb             "BGT ", SREL
102
        fcb             "BLE ", SREL
103
 
104
        ; 30 to 3F
105
        fcb             "LEAX", NDX
106
        fcb             "LEAY", NDX
107
        fcb             "LEAS", NDX
108
        fcb             "LEAU", NDX
109
        fcb             "PSHS", IMMB
110
        fcb             "PULS", IMMB
111
        fcb             "PSHU", IMMB
112
        fcb             "PULU", IMMB
113
        fcb             "RTF ", 0
114
        fcb             "RTS ", 0
115
        fcb             "ABX ", 0
116
        fcb             "RTI ", 0
117
        fcb             "CWAI", IMMB
118
        fcb             "MUL ", 0
119
        fcb             "    ", 0
120
        fcb             "SWI ", 0
121
 
122
        ; 40 to 4F
123
        fcb             "NEGA", 0
124
        fcb             "    ", 0
125
        fcb       "    ", 0
126
        fcb             "COMA", 0
127
        fcb             "LSRA", 0
128
        fcb             "    ", 0
129
        fcb             "RORA", 0
130
        fcb             "ASRA", 0
131
        fcb             "ASLA", 0
132
        fcb             "ROLA", 0
133
        fcb             "DECA", 0
134
        fcb             "    ", 0
135
        fcb             "INCA", 0
136
        fcb             "TSTA", 0
137
        fcb             "    ", 0
138
        fcb             "CLRA", 0
139
 
140
        ; 50 to 5F
141
        fcb             "NEGB", 0
142
        fcb             "    ", 0
143
        fcb       "    ", 0
144
        fcb             "COMB", 0
145
        fcb             "LSRB", 0
146
        fcb             "    ", 0
147
        fcb             "RORB", 0
148
        fcb             "ASRB", 0
149
        fcb             "ASLB", 0
150
        fcb             "ROLB", 0
151
        fcb             "DECB", 0
152
        fcb             "    ", 0
153
        fcb             "INCB", 0
154
        fcb             "TSTB", 0
155
        fcb             "    ", 0
156
        fcb             "CLRB", 0
157
 
158
        ; 60 to 6F
159
        fcb             "NEG ", NDX
160
        fcb             "    ", 0
161
        fcb       "    ", 0
162
        fcb             "COM ", NDX
163
        fcb             "LSR ", NDX
164
        fcb             "    ", 0
165
        fcb             "ROR ", NDX
166
        fcb             "ASR ", NDX
167
        fcb             "ASL ", NDX
168
        fcb             "ROL ", NDX
169
        fcb             "DEC ", NDX
170
        fcb             "    ", 0
171
        fcb             "INC ", NDX
172
        fcb             "TST ", NDX
173
        fcb             "JMP ", NDX
174
        fcb             "CLR ", NDX
175
 
176
        ; 70 to 7F
177
        fcb             "NEG ", EXT
178
        fcb             "    ", 0
179
        fcb       "    ", 0
180
        fcb             "COM ", EXT
181
        fcb             "LSR ", EXT
182
        fcb             "    ", 0
183
        fcb             "ROR ", EXT
184
        fcb             "ASR ", EXT
185
        fcb             "ASL ", EXT
186
        fcb             "ROL ", EXT
187
        fcb             "DEC ", EXT
188
        fcb             "    ", 0
189
        fcb             "INC ", EXT
190
        fcb             "TST ", EXT
191
        fcb             "JMP ", EXT
192
        fcb             "CLR ", EXT
193
 
194
        ; 80 to 8F
195
        fcb             "SUBA", IMMB
196
        fcb             "CMPA", IMMB
197
        fcb             "SBCA", IMMB
198
        fcb             "SUBD", IMMW
199
        fcb             "ANDA", IMMB
200
        fcb             "BITA", IMMB
201
        fcb             "LDA ", IMMB
202
        fcb             "    ", 0
203
        fcb             "EORA", IMMB
204
        fcb             "ADCA", IMMB
205
        fcb             "ORA ", IMMB
206
        fcb             "ADDA", IMMB
207
        fcb             "CMPX", IMMW
208
        fcb             "BSR ", SREL
209
        fcb             "LDX ", IMMW
210
        fcb             "JMF ", FAREXT
211
 
212
        ; 90 to 9F
213
        fcb             "SUBA", DIRECT
214
        fcb             "CMPA", DIRECT
215
        fcb             "SBCA", DIRECT
216
        fcb             "SUBD", DIRECT
217
        fcb             "ANDA", DIRECT
218
        fcb             "BITA", DIRECT
219
        fcb             "LDA ", DIRECT
220
        fcb             "STA ", DIRECT
221
        fcb             "EORA", DIRECT
222
        fcb             "ADCA", DIRECT
223
        fcb             "ORA ", DIRECT
224
        fcb             "ADDA", DIRECT
225
        fcb             "CMPX", DIRECT
226
        fcb             "JSR ", DIRECT
227
        fcb             "LDX ", DIRECT
228
        fcb             "STX ", DIRECT
229
 
230
        ; A0 to AF
231
        fcb             "SUBA", NDX
232
        fcb             "CMPA", NDX
233
        fcb             "SBCA", NDX
234
        fcb             "SUBD", NDX
235
        fcb             "ANDA", NDX
236
        fcb             "BITA", NDX
237
        fcb             "LDA ", NDX
238
        fcb             "STA ", NDX
239
        fcb             "EORA", NDX
240
        fcb             "ADCA", NDX
241
        fcb             "ORA ", NDX
242
        fcb             "ADDA", NDX
243
        fcb             "CMPX", NDX
244
        fcb             "JSR ", NDX
245
        fcb             "LDX ", NDX
246
        fcb             "STX ", NDX
247
 
248
        ; B0 to BF
249
        fcb             "SUBA", EXT
250
        fcb             "CMPA", EXT
251
        fcb             "SBCA", EXT
252
        fcb             "SUBD", EXT
253
        fcb             "ANDA", EXT
254
        fcb             "BITA", EXT
255
        fcb             "LDA ", EXT
256
        fcb             "STA ", EXT
257
        fcb             "EORA", EXT
258
        fcb             "ADCA", EXT
259
        fcb             "ORA ", EXT
260
        fcb             "ADDA", EXT
261
        fcb             "CMPX", EXT
262
        fcb             "JSR ", EXT
263
        fcb             "LDX ", EXT
264
        fcb             "STX ", EXT
265
 
266
        ; C0 to CF
267
        fcb             "SUBB", IMMB
268
        fcb             "CMPB", IMMB
269
        fcb             "SBCb", IMMB
270
        fcb             "ADDD", IMMW
271
        fcb             "ANDB", IMMB
272
        fcb             "BITB", IMMB
273
        fcb             "LDB ", IMMB
274
        fcb             "    ", 0
275
        fcb             "EORB", IMMB
276
        fcb             "ADCB", IMMB
277
        fcb             "ORB ", IMMB
278
        fcb             "ADDB", IMMB
279
        fcb             "LDD ", IMMW
280
        fcb             "    ", SREL
281
        fcb             "LDU ", IMMW
282
        fcb             "JSF ", FAREXT
283
 
284
        ; D0 to DF
285
        fcb             "SUBB", DIRECT
286
        fcb             "CMPB", DIRECT
287
        fcb             "SBCB", DIRECT
288
        fcb             "ADDD", DIRECT
289
        fcb             "ANDB", DIRECT
290
        fcb             "BITB", DIRECT
291
        fcb             "LDB ", DIRECT
292
        fcb             "STB ", DIRECT
293
        fcb             "EORB", DIRECT
294
        fcb             "ADCB", DIRECT
295
        fcb             "ORB ", DIRECT
296
        fcb             "ADDB", DIRECT
297
        fcb             "LDD ", DIRECT
298
        fcb             "STD ", DIRECT
299
        fcb             "LDU ", DIRECT
300
        fcb             "STU ", DIRECT
301
 
302
        ; E0 to EF
303
        fcb             "SUBB", NDX
304
        fcb             "CMPB", NDX
305
        fcb             "SBCB", NDX
306
        fcb             "ADDD", NDX
307
        fcb             "ANDB", NDX
308
        fcb             "BITB", NDX
309
        fcb             "LDB ", NDX
310
        fcb             "STB ", NDX
311
        fcb             "EORB", NDX
312
        fcb             "ADCB", NDX
313
        fcb             "ORB ", NDX
314
        fcb             "ADDB", NDX
315
        fcb             "LDD ", NDX
316
        fcb             "STD ", NDX
317
        fcb             "LDU ", NDX
318
        fcb             "STU ", NDX
319
 
320
        ; F0 to FF
321
        fcb             "SUBB", EXT
322
        fcb             "CMPB", EXT
323
        fcb             "SBCB", EXT
324
        fcb             "ADDD", EXT
325
        fcb             "ANDB", EXT
326
        fcb             "BITB", EXT
327
        fcb             "LDB ", EXT
328
        fcb             "STB ", EXT
329
        fcb             "EORB", EXT
330
        fcb             "ADCB", EXT
331
        fcb             "ORB ", EXT
332
        fcb             "ADDB", EXT
333
        fcb             "LDD ", EXT
334
        fcb             "STD ", EXT
335
        fcb             "LDU ", EXT
336
        fcb             "STU ", EXT
337
 
338
        ; 120 to 12F
339
distbl2:
340
        fcb             "LBRA"
341
        fcb             "LBRN"
342
        fcb             "LBHI"
343
        fcb             "LBLS"
344
        fcb             "LBHS"
345
        fcb             "LBLO"
346
        fcb             "LBNE"
347
        fcb             "LBEQ"
348
        fcb             "LBVC"
349
        fcb             "LBVS"
350
        fcb             "LBPL"
351
        fcb             "LBMI"
352
        fcb             "LBGE"
353
        fcb             "LBLT"
354
        fcb             "LBGT"
355
        fcb             "LBLE"
356
 
357
distbl3:
358
        fcb             $13F
359
        fcb             $183
360
        fcb             $18C
361
        fcb             $18E
362
        fcb             $193
363
        fcb             $19C
364
        fcb             $19E
365
        fcb             $19F
366
        fcb             $1A3
367
        fcb             $1AC
368
        fcb             $1AE
369
        fcb             $1AF
370
        fcb             $1B3
371
        fcb             $1BC
372
        fcb             $1BE
373
        fcb             $1BF
374
        fcb             $1CE
375
        fcb             $1DE
376
        fcb             $1DF
377
        fcb             $1EE
378
        fcb             $1EF
379
        fcb             $1FE
380
        fcb             $1FF
381
        fcb             $23F
382
        fcb             $283
383
        fcb             $28C
384
        fcb             $293
385
        fcb             $29C
386
        fcb             $2A3
387
        fcb             $2AC
388
        fcb             $2B3
389
        fcb             $2BC
390
 
391
distbl4:
392
        fcb             "SWI2", 0
393
        fcb             "CMPD", IMMW
394
        fcb             "CMPY", IMMW
395
        fcb             "LDY ", IMMW
396
        fcb             "CMPD", DIRECT
397
        fcb             "CMPY", DIRECT
398
        fcb             "LDY ", DIRECT
399
        fcb             "STY ", DIRECT
400
        fcb             "CMPD", NDX
401
        fcb             "CMPY", NDX
402
        fcb             "LDY ", NDX
403
        fcb             "STY ", NDX
404
        fcb             "CMPD", EXT
405
        fcb             "CMPY", EXT
406
        fcb             "LDY ", EXT
407
        fcb             "STY ", EXT
408
        fcb             "LDS ", IMMW
409
        fcb             "LDS ", DIRECT
410
        fcb             "STS ", DIRECT
411
        fcb             "LDS ", NDX
412
        fcb             "STS ", NDX
413
        fcb             "LDS ", EXT
414
        fcb             "STS ", EXT
415
        fcb             "SWI3", 0
416
        fcb             "CMPU", IMMW
417
        fcb             "CMPS", IMMW
418
        fcb             "CMPU", DIRECT
419
        fcb             "CMPS", DIRECT
420
        fcb             "CMPU", NDX
421
        fcb             "CMPS", NDX
422
        fcb             "CMPU", EXT
423
        fcb             "CMPS", EXT
424
 
425
disassem:
426
        lbsr    GetTwoParams
427
        lbsr    CRLF
428
        ldy             mon_r1+2
429
disLoop1:
430
        tfr             y,d
431
        lbsr    DispWordAsHex
432
        ldb             #' '
433
        lbsr    OUTCH
434
        ldb             ,y+
435
        bitb    #$300
436
        lbne    dis1
437
dis20:
438
        ldx             #distbl1
439
dis23:
440
        lda             #5
441
        mul
442
        abx
443
        ldb             ,x+
444
        lbsr    OUTCH
445
        ldb             ,x+
446
        lbsr    OUTCH
447
        ldb             ,x+
448
        lbsr    OUTCH
449
        ldb             ,x+
450
        lbsr    OUTCH
451
        ldb             #' '
452
        lbsr    OUTCH
453
        ldb             ,x+
454
        lbeq    disNextLine
455
        cmpb    #DIRECT
456
        bne             disNotDirect
457
        ldb             ,y+
458
        lbsr    DispByteAsHex
459
        lbra    disNextLine
460
disNotDirect:
461
        cmpb    #LSREL
462
        bne             disNotLRel
463
dis21:
464
        ldd             ,y++
465
dis2:
466
        leax    d,y
467
        tfr             x,d
468
        lbsr    DispWordAsHex
469
        lbra    disNextLine
470
disNotLRel:
471
        cmpb    #SREL
472
        bne             disNotRel
473
        ldb             ,y+
474
        clra
475
        bra             dis2
476
disNotRel:
477
        cmpb    #NDX
478
        bne             disNotNdx
479
        ldb             ,y+
480
        bitb    #$800
481
        bne             disNot9                 ; test for offset 9 mode
482
        pshs    b
483
        andb    #$1FF                           ; mask to offset bits
484
        clra                                                    ;
485
        bitb    #$100                           ; test for negative offset
486
        beq             dis3
487
        deca                                                    ; sign extend offset
488
        orb             #$E00
489
dis3:
490
        lbsr    DispWordAsHex
491
        ldb             #','
492
        lbsr    OUTCH
493
        puls    b
494
        bsr             disNdxReg
495
        lbsr    OUTCH
496
        lbra    disNextLine
497
disNot9:
498
        pshs    b
499
        bitb    #$100                   ; check if indirect
500
        bne             dis4
501
        ldb             #'['
502
        lbsr    OUTCH
503
dis4:
504
        ldb             ,s                              ; get back b
505
        andb    #15
506
        bne             disNotRplus
507
        ldb             ,s
508
        bitb    #$80                    ; outer indexed?
509
        bne             dis5
510
        ldb             #']'
511
        lbsr    OUTCH
512
dis5:
513
        ldb             #','
514
        lbsr    OUTCH
515
        ldb             ,s
516
        bsr             disNdxReg
517
        lbsr    OUTCH
518
        ldb             #'+'
519
        lbsr    OUTCH
520
        puls    b
521
        bitb    #$100
522
        lbne    disNextLine
523
        bitb    #$80
524
        lbne    disNextLine
525
        ldb             #']'
526
        lbsr    OUTCH
527
        lbra    disNextLine
528
disNotRplus:
529
        cmpb    #1
530
        bne             disNotRplusplus
531
        ldb             ,s
532
        bitb    #$80                    ; outer indexed?
533
        bne             dis6
534
        ldb             #']'
535
        lbsr    OUTCH
536
dis6:
537
        ldb             #','
538
        lbsr    OUTCH
539
        ldb             ,s
540
        bsr             disNdxReg
541
        lbsr    OUTCH
542
        ldb             #'+'
543
        lbsr    OUTCH
544
        lbsr    OUTCH
545
        puls    b
546
        bitb    #$100
547
        lbne    disNextLine
548
        bitb    #$80
549
        lbne    disNextLine
550
        ldb             #']'
551
        lbsr    OUTCH
552
        lbra    disNextLine
553
disNotRplusplus:
554
        cmpb    #2
555
        bne             disNotRminus
556
        ldb             ,s
557
        bitb    #$80                    ; outer indexed?
558
        bne             dis7
559
        ldb             #']'
560
        lbsr    OUTCH
561
dis7:
562
        ldb             #','
563
        lbsr    OUTCH
564
        ldb             ,s
565
        bsr             disNdxReg
566
        lbsr    OUTCH
567
        ldb             #'-'
568
        lbsr    OUTCH
569
        puls    b
570
        bitb    #$100
571
        lbne    disNextLine
572
        bitb    #$80
573
        lbne    disNextLine
574
        ldb             #']'
575
        lbsr    OUTCH
576
        lbra    disNextLine
577
disNotRminus:
578
        cmpb    #3
579
        bne             disNotRminusminus
580
        ldb             ,s
581
        bitb    #$80                    ; outer indexed?
582
        bne             dis8
583
        ldb             #']'
584
        lbsr    OUTCH
585
dis8:
586
        ldb             #','
587
        lbsr    OUTCH
588
        ldb             ,s
589
        bsr             disNdxReg
590
        lbsr    OUTCH
591
        ldb             #'-'
592
        lbsr    OUTCH
593
        lbsr    OUTCH
594
        puls    b
595
        bitb    #$100
596
        lbne    disNextLine
597
        bitb    #$80
598
        lbne    disNextLine
599
        ldb             #']'
600
        lbsr    OUTCH
601
        lbra    disNextLine
602
disNotRminusminus:
603
        cmpb    #4
604
        bne             disNotR
605
        ldb             ,s
606
        bitb    #$80                    ; outer indexed?
607
        bne             dis9
608
        ldb             #']'
609
        lbsr    OUTCH
610
dis9:
611
        ldb             #','
612
        lbsr    OUTCH
613
        ldb             ,s
614
        bsr             disNdxReg
615
        lbsr    OUTCH
616
        puls    b
617
        bitb    #$100
618
        lbne    disNextLine
619
        bitb    #$80
620
        lbne    disNextLine
621
        ldb             #']'
622
        lbsr    OUTCH
623
        lbra    disNextLine
624
disNotR:
625
        cmpb    #5
626
        bne             disNotBOffs
627
        ldb             #'B'
628
        lbsr    OUTCH
629
        ldb             ,s
630
        bitb    #$80                    ; outer indexed?
631
        bne             dis10
632
        ldb             #']'
633
        lbsr    OUTCH
634
dis10:
635
        ldb             #','
636
        lbsr    OUTCH
637
        ldb             ,s
638
        bsr             disNdxReg
639
        lbsr    OUTCH
640
        ldb             #'-'
641
        lbsr    OUTCH
642
        lbsr    OUTCH
643
        puls    b
644
        bitb    #$100
645
        lbne    disNextLine
646
        bitb    #$80
647
        lbne    disNextLine
648
        ldb             #']'
649
        lbsr    OUTCH
650
        lbra    disNextLine
651
disNotBOffs:
652
        cmpb    #6
653
        bne             disNotAOffs
654
        ldb             #'A'
655
        lbsr    OUTCH
656
        ldb             ,s
657
        bitb    #$80                    ; outer indexed?
658
        bne             dis11
659
        ldb             #']'
660
        lbsr    OUTCH
661
dis11:
662
        ldb             #','
663
        lbsr    OUTCH
664
        ldb             ,s
665
        bsr             disNdxReg
666
        lbsr    OUTCH
667
        ldb             #'-'
668
        lbsr    OUTCH
669
        lbsr    OUTCH
670
        puls    b
671
        bitb    #$100
672
        lbne    disNextLine
673
        bitb    #$80
674
        lbne    disNextLine
675
        ldb             #']'
676
        lbsr    OUTCH
677
        lbra    disNextLine
678
disNotAOffs:
679
        cmpb    #8
680
        bne             disNotBO
681
        ldb             ,y+
682
        sex
683
        lbsr    DispWordAsHex
684
        ldb             ,s
685
        bitb    #$80                    ; outer indexed?
686
        bne             dis12
687
        ldb             #']'
688
        lbsr    OUTCH
689
dis12:
690
        ldb             #','
691
        lbsr    OUTCH
692
        ldb             ,s
693
        bsr             disNdxReg
694
        lbsr    OUTCH
695
        ldb             #'-'
696
        lbsr    OUTCH
697
        lbsr    OUTCH
698
        puls    b
699
        bitb    #$100
700
        lbne    disNextLine
701
        bitb    #$80
702
        lbne    disNextLine
703
        ldb             #']'
704
        lbsr    OUTCH
705
        lbra    disNextLine
706
disNotBO:
707
        cmpb    #9
708
        bne             disNotWO
709
        ldd             ,y++
710
        lbsr    DispWordAsHex
711
        ldb             ,s
712
        bitb    #$80                    ; outer indexed?
713
        bne             dis13
714
        ldb             #']'
715
        lbsr    OUTCH
716
dis13:
717
        ldb             #','
718
        lbsr    OUTCH
719
        ldb             ,s
720
        bsr             disNdxReg
721
        lbsr    OUTCH
722
        ldb             #'-'
723
        lbsr    OUTCH
724
        lbsr    OUTCH
725
        puls    b
726
        bitb    #$100
727
        lbne    disNextLine
728
        bitb    #$80
729
        lbne    disNextLine
730
        ldb             #']'
731
        lbsr    OUTCH
732
        lbra    disNextLine
733
disNotWO:
734
        cmpb    #10
735
        bne             disNotTO
736
        ldb             ,y++
737
        lbsr    DispByteAsHex
738
        ldd             ,y++
739
        lbsr    DispWordAsHex
740
        ldb             ,s
741
        bitb    #$80                    ; outer indexed?
742
        bne             dis14
743
        ldb             #']'
744
        lbsr    OUTCH
745
dis14:
746
        ldb             #','
747
        lbsr    OUTCH
748
        ldb             ,s
749
        bsr             disNdxReg
750
        lbsr    OUTCH
751
        ldb             #'-'
752
        lbsr    OUTCH
753
        lbsr    OUTCH
754
        puls    b
755
        bitb    #$100
756
        lbne    disNextLine
757
        bitb    #$80
758
        lbne    disNextLine
759
        ldb             #']'
760
        lbsr    OUTCH
761
        lbra    disNextLine
762
disNotTO:
763
        cmpb    #11
764
        bne             disNotDOffs
765
        ldb             #'D'
766
        lbsr    OUTCH
767
        ldb             ,s
768
        bitb    #$80                    ; outer indexed?
769
        bne             dis15
770
        ldb             #']'
771
        lbsr    OUTCH
772
dis15:
773
        ldb             #','
774
        lbsr    OUTCH
775
        ldb             ,s
776
        bsr             disNdxReg
777
        lbsr    OUTCH
778
        ldb             #'-'
779
        lbsr    OUTCH
780
        lbsr    OUTCH
781
        puls    b
782
        bitb    #$100
783
        lbne    disNextLine
784
        bitb    #$80
785
        lbne    disNextLine
786
        ldb             #']'
787
        lbsr    OUTCH
788
        lbra    disNextLine
789
disNotDOffs:
790
        cmpb    #12
791
        bne             disNotPBO
792
        ldb             ,y+
793
        sex
794
        lbsr    DispWordAsHex
795
        ldb             ,s
796
        bitb    #$80                    ; outer indexed?
797
        bne             dis16
798
        ldb             #']'
799
        lbsr    OUTCH
800
dis16:
801
        ldb             #','
802
        lbsr    OUTCH
803
        ldb             ,s
804
        bsr             disNdxReg
805
        ldb             #'P'
806
        lbsr    OUTCH
807
        ldb             #'C'
808
        lbsr    OUTCH
809
        ldb             #'-'
810
        lbsr    OUTCH
811
        lbsr    OUTCH
812
        puls    b
813
        bitb    #$100
814
        lbne    disNextLine
815
        bitb    #$80
816
        lbne    disNextLine
817
        ldb             #']'
818
        lbsr    OUTCH
819
        lbra    disNextLine
820
disNotPBO:
821
        cmpb    #13
822
        bne             disNotPWO
823
        ldd             ,y++
824
        lbsr    DispWordAsHex
825
        ldb             ,s
826
        bitb    #$80                    ; outer indexed?
827
        bne             dis17
828
        ldb             #']'
829
        lbsr    OUTCH
830
dis17:
831
        ldb             #','
832
        lbsr    OUTCH
833
        ldb             ,s
834
        bsr             disNdxReg
835
        ldb             #'P'
836
        lbsr    OUTCH
837
        ldb             #'C'
838
        lbsr    OUTCH
839
        ldb             #'-'
840
        lbsr    OUTCH
841
        lbsr    OUTCH
842
        puls    b
843
        bitb    #$100
844
        lbne    disNextLine
845
        bitb    #$80
846
        lbne    disNextLine
847
        ldb             #']'
848
        lbsr    OUTCH
849
        lbra    disNextLine
850
disNotPWO:
851
        cmpb    #14
852
        bne             disNotPTO
853
        ldb             ,y+
854
        lbsr    DispByteAsHex
855
        ldd             ,y++
856
        lbsr    DispWordAsHex
857
        ldb             ,s
858
        bitb    #$80                    ; outer indexed?
859
        bne             dis18
860
        ldb             #']'
861
        lbsr    OUTCH
862
dis18:
863
        ldb             #','
864
        lbsr    OUTCH
865
        ldb             ,s
866
        bsr             disNdxReg
867
        ldb             #'P'
868
        lbsr    OUTCH
869
        ldb             #'C'
870
        lbsr    OUTCH
871
        ldb             #'-'
872
        lbsr    OUTCH
873
        lbsr    OUTCH
874
        puls    b
875
        bitb    #$100
876
        lbne    disNextLine
877
        bitb    #$80
878
        lbne    disNextLine
879
        ldb             #']'
880
        lbsr    OUTCH
881
        lbra    disNextLine
882
disNotPTO:
883
        ldb             #'['
884
        lbsr    OUTCH
885
        ldd             ,y++
886
        lbsr    DispWordAsHex
887
        ldb             #']'
888
        lbsr    OUTCH
889
        lbra    disNextLine
890
disNotNdx:
891
        cmpb    #EXT
892
        bne             disNotExt
893
        ldd             ,y++
894
        lbsr    DispWordAsHex
895
        lbra    disNextLine
896
disNotExt:
897
        cmpb    #IMMB
898
        bne             disNotIMMB
899
        ldb             #'#'
900
        lbsr    OUTCH
901
        ldb             ,y+
902
        lbsr    DispByteAsHex
903
        lbra    disNextLine
904
disNotIMMB:
905
        cmpb    #IMMW
906
        bne             disNotIMMW
907
        ldb             #'#'
908
        lbsr    OUTCH
909
        ldd             ,y++
910
        lbsr    DispWordAsHex
911
        bra             disNextLine
912
disNotIMMW:
913
dis1:
914
        cmpb    #$121
915
        blo             dis19
916
        cmpb    #$12F
917
        bhi             dis19
918
        andb    #$FF
919
        ldx             #distbl1
920
        aslb
921
        aslb
922
        abx
923
        ldb             ,x+
924
        lbsr    OUTCH
925
        ldb             ,x+
926
        lbsr    OUTCH
927
        ldb             ,x+
928
        lbsr    OUTCH
929
        ldb             ,x+
930
        lbsr    OUTCH
931
        ldb             #' '
932
        lbsr    OUTCH
933
        lbra    dis21
934
dis19:
935
        ldx             #0
936
dis24:
937
        cmpb    distbl3,x
938
        bne             dis25
939
        ldx             #distbl4
940
        lbra    dis23
941
dis25:
942
        inx
943
        cmpx    #31
944
        blo             dis24
945
        ldb             #'?'
946
        lbsr    OUTCH
947
        lbsr    OUTCH
948
        lbsr    OUTCH
949
        lbsr    OUTCH
950
        bra             disNextLine
951
disNextLine
952
        lbsr    CRLF
953
        cmpy    mon_r2+2
954
        lblo    disLoop1
955
        lbra    Monitor
956
 
957
disNdxRegs:
958
        fcb             'X','Y','S','U'
959
disNdxReg:
960
        andb    #$600
961
        rolb
962
        rolb
963
        rolb
964
        rolb
965
        clra
966
        pshs    u
967
        tfr             d,u
968
        lda             disNdxRegs,u
969
        puls    u
970
        exg             a,b
971
        rts
972
 
973
ASMO:
974
        pshs    d
975
        ldd             #ASMOUTCH
976
        std             CharOutVec
977
        puls    d,pc
978
 
979
ASMOO:
980
        pshs    d
981
        ldd             #DisplayChar
982
        std             CharOutVec
983
        puls    d,pc
984
 
985
ASMOUTCH:
986
        stb             ,u+
987
        rts
988
 
989
DumpAsmbuf:
990
        ldu             #asmbuf
991
dab2:
992
        ldb             ,u+
993
        beq             dab1
994
        lbsr    OUTCH
995
        bra             dab2
996
dab1:
997
        rts

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.