; CMI IIx\MAINFRAME\Q133 - Processor Control Card\Q9F0MRK1.bin (6809)

M8000 EQU $8000 ; P1 RAM: Graphics Board Video RAM   ($8000..$BFFF)
MF3F1 EQU $F3F1
MF400 EQU $F400
MF76D EQU $F76D
MF77B EQU $F77B
ZF806 EQU $F806
MFC43 EQU $FC43 ; Reserved Location: RAM Map Control ($FC40..$FC4F)
MFC5F EQU $FC5F
MFC80 EQU $FC80
MFC81 EQU $FC81
MFCC4 EQU $FCC4
MFCD3 EQU $FCD3 ; Reserved Location: Graphics Display Registers ($FCD0-$FCDF)
MFCDB EQU $FCDB ; Reserved Location: Graphics Display Registers ($FCD0-$FCDF)
MFE05 EQU $FE05
MFE07 EQU $FE07
MFE0B EQU $FE0B
MFE0C EQU $FE0C
MFE0E EQU $FE0E
MFE0F EQU $FE0F
MFE13 EQU $FE13
MFE16 EQU $FE16
MFE17 EQU $FE17
MFE18 EQU $FE18
MFE1A EQU $FE1A
MFE35 EQU $FE35
MFE60 EQU $FE60
MFE61 EQU $FE61
MFE72 EQU $FE72
MFF80 EQU $FF80
MFF8C EQU $FF8C
MFF90 EQU $FF90
MFF92 EQU $FF92
MFF95 EQU $FF95
MFF98 EQU $FF98
MFFA0 EQU $FFA0
MFFC8 EQU $FFC8
MFFC9 EQU $FFC9
MFFCA EQU $FFCA
MFFCF EQU $FFCF
MFFFA EQU $FFFA
MFFFC EQU $FFFC

; Program's Code / Data Areas
  ORG $0000
  LBRA Z00BB         ; $0000: 16 00 B8
  LBRA Z0058         ; $0003: 16 00 52
  LBRA Z0036         ; $0006: 16 00 2D
  LBRA Z07C6         ; $0009: 16 07 BA
  LBRA Z07CA         ; $000C: 16 07 BB
  LBRA Z0070         ; $000F: 16 00 5E
  LBRA Z00C7         ; $0012: 16 00 B2
Z0015
  LBRA Z07F7         ; $0015: 16 07 DF
  LBRA Z07E8         ; $0018: 16 07 CD
  LBRA Z07FD         ; $001B: 16 07 DF
  BRA Z009D          ; $001E: 20 7D

  FCB 0              ; $0020: 00

Z0021
  LBRA Z07EB         ; $0021: 16 07 C7

Z0024
  LBSR Z07EB         ; $0024: 17 07 C4
  LBRA Z07F1         ; $0027: 16 07 C7
Z002A
  LDA #$20           ; $002A: 86 20
  NOP                ; $002C: 12
Z002D
  LBRA Z07E8         ; $002D: 16 07 B8
  LBRA Z00A0         ; $0030: 16 00 6D
  LBRA Z02D2         ; $0033: 16 02 9C
Z0036
  CMPA #$30          ; $0036: 81 30
  BCS Z004B          ; $0038: 25 11
  CMPA #$39          ; $003A: 81 39
  BLS Z0048          ; $003C: 23 0A
  CMPA #$41          ; $003E: 81 41
  BCS Z004B          ; $0040: 25 09
  CMPA #$46          ; $0042: 81 46
  BHI Z004B          ; $0044: 22 05
  SUBA #$07          ; $0046: 80 07
Z0048
  ANDA #$0F          ; $0048: 84 0F
  RTS                ; $004A: 39

Z004B
  ORCC #$08          ; $004B: 1A 08
  RTS                ; $004D: 39

Z004E
  FCC "BEG:"         ; $004E..$0051
  FCB $04            ; $0052: 04

Z0053
  FCC "END:"         ; $0053..$0056
  FCB $04            ; $0057: 04

Z0058
  LDU #$FFCB         ; $0058: CE FF CB
  LEAX Z004E,PCR     ; $005B: 30 8C F0
  BSR Z006C          ; $005E: 8D 0C
  LEAX Z0053,PCR     ; $0060: 30 8C F0
  BSR Z006C          ; $0063: 8D 07
  BSR Z0021          ; $0065: 8D BA
  LDX -2,U           ; $0067: AE 5E
  CMPX -4,U          ; $0069: AC 5C
  RTS                ; $006B: 39

Z006C
  BSR Z0024          ; $006C: 8D B6
  LEAX ,U++          ; $006E: 30 C1
Z0070
  BSR Z00D2          ; $0070: 8D 60
Z0072
  CLR ,X             ; $0072: 6F 84
  CLR $01,X          ; $0074: 6F 01
  BRA Z0087          ; $0076: 20 0F
Z0078
  LDB #$04           ; $0078: C6 04
Z007A
  ASL $01,X          ; $007A: 68 01
  ROL ,X             ; $007C: 69 84
  DECB               ; $007E: 5A
  BNE Z007A          ; $007F: 26 F9
  ORA $01,X          ; $0081: AA 01
  STA $01,X          ; $0083: A7 01
  BSR Z00D2          ; $0085: 8D 4B
Z0087
  BSR Z0036          ; $0087: 8D AD
  BPL Z0078          ; $0089: 2A ED
  RTS                ; $008B: 39

Z008C
  BSR Z00D2          ; $008C: 8D 44
  CMPA #$2D          ; $008E: 81 2D
  BNE Z0072          ; $0090: 26 E0
  BSR Z0070          ; $0092: 8D DC
  COM ,X             ; $0094: 63 84
  NEG $01,X          ; $0096: 60 01
  BCS Z009C          ; $0098: 25 02
  INC ,X             ; $009A: 6C 84
Z009C
  RTS                ; $009C: 39

Z009D
  LBRA Z07FA         ; $009D: 16 07 5A
Z00A0
  CLR MFFCA          ; $00A0: 7F FF CA
  CLR MFF92          ; $00A3: 7F FF 92
  LDX #$F2C0         ; $00A6: 8E F2 C0
  STX MFF90          ; $00A9: BF FF 90
  LDX #$F2D2         ; $00AC: 8E F2 D2
  STX MFFFA          ; $00AF: BF FF FA
  LDX #$F2C5         ; $00B2: 8E F2 C5
  STX MFFFC          ; $00B5: BF FF FC
  LBRA Z0375         ; $00B8: 16 02 BA
Z00BB
  STS MFF8C          ; $00BB: 10 FF FF 8C
  LDS #MFF80         ; $00BF: 10 CE FF 80
  BSR Z00A0          ; $00C3: 8D DB
  BRA Z00CC          ; $00C5: 20 05
Z00C7
  LDA #$80           ; $00C7: 86 80
  STA MFFCA          ; $00C9: B7 FF CA
Z00CC
  LDA #$FF           ; $00CC: 86 FF
  TFR A,DP           ; $00CE: 1F 8B
  BRA Z00EC          ; $00D0: 20 1A
Z00D2
  LBRA Z07E5         ; $00D2: 16 07 10
Z00D5
  LDD -$02,U         ; $00D5: EC 5E
  ANDA #$03          ; $00D7: 84 03
  ORA #$F0           ; $00D9: 8A F0
  TFR D,Y            ; $00DB: 1F 02
  LDU <$95           ; $00DD: DE 95
  LDX <$98           ; $00DF: 9E 98
  CLRB               ; $00E1: 5F
  LDA <$9B           ; $00E2: 96 9B
  JSR ,Y             ; $00E4: AD A4
  BCC Z00EC          ; $00E6: 24 04
Z00E8
  LDA #$3F           ; $00E8: 86 3F
  BSR Z0155          ; $00EA: 8D 69
Z00EC
  LBSR Z0021         ; $00EC: 17 FF 32
  CLR <$CF           ; $00EF: 0F CF
  LDA MFC5F          ; $00F1: B6 FC 5F
  ANDA #$01          ; $00F4: 84 01
  NEGA               ; $00F6: 40
  ANDA #$19          ; $00F7: 84 19
  ADDA #$21          ; $00F9: 8B 21
  BSR Z0155          ; $00FB: 8D 58
  CLR <$C9           ; $00FD: 0F C9
  CLR <$97           ; $00FF: 0F 97
Z0101
  CLR <$9A           ; $0101: 0F 9A
  LDX #MFF98         ; $0103: 8E FF 98
  LDB #$FF           ; $0106: C6 FF
  BSR Z008C          ; $0108: 8D 82
  STB <$9B           ; $010A: D7 9B
  BRA Z0116          ; $010C: 20 08
  LDX #MFF98         ; $010E: 8E FF 98
  LBSR Z07B6         ; $0111: 17 06 A2
Z0114
  BSR Z00D2          ; $0114: 8D BC
Z0116
  LDS #MFF80         ; $0116: 10 CE FF 80
  LDU #$F3BB         ; $011A: CE F3 BB
  LDB #$11           ; $011D: C6 11
  ROR <$9A           ; $011F: 06 9A
  BCC Z0125          ; $0121: 24 02
  LDB #$19           ; $0123: C6 19
Z0125
  ASLA               ; $0125: 48
  ASLA               ; $0126: 48
  BVS Z012E          ; $0127: 29 05
  LEAU <-$04,U       ; $0129: 33 C8 FC
  LDB #$02           ; $012C: C6 02
Z012E
  STA <$9C           ; $012E: 97 9C
Z0130
  LDA ,U++           ; $0130: A6 C1
  ANDA #$FC          ; $0132: 84 FC
  CMPA <$9C          ; $0134: 91 9C
  BEQ Z00D5          ; $0136: 27 9D
  DECB               ; $0138: 5A
  BNE Z0130          ; $0139: 26 F5
  BRA Z00E8          ; $013B: 20 AB
  LBSR Z0273         ; $013D: 17 01 33
  LDD ,U             ; $0140: EC C4
  BCS Z0147          ; $0142: 25 03
  TFR A,B            ; $0144: 1F 89
  SEX                ; $0146: 1D
Z0147
  CMPX #$DC8E        ; $0147: 8C DC 8E
  ADDD <$98          ; $014A: D3 98
Z014C
  STD <$98           ; $014C: DD 98
  CLR <$9B           ; $014E: 0F 9B
  CMPX #$C9A         ; $0150: 8C 0C 9A
  BRA Z0114          ; $0153: 20 BF
Z0155
  LBRA Z002D         ; $0155: 16 FE D5
Z0158
  LDA <$99           ; $0158: 96 99
  STA ,U             ; $015A: A7 C4
  EORA ,U            ; $015C: A8 C4
  BNE Z0173          ; $015E: 26 13
Z0160
  ROLB               ; $0160: 59
Z0161
  RTS                ; $0161: 39

Z0162
  LDB <$97           ; $0162: D6 97
  BEQ Z0161          ; $0164: 27 FB
  LSRB               ; $0166: 54
  TST <$9B           ; $0167: 0D 9B
  BNE Z0160          ; $0169: 26 F5
  BCS Z0158          ; $016B: 25 EB
  STX ,U             ; $016D: AF C4
  CMPX ,U            ; $016F: AC C4
  BEQ Z0160          ; $0171: 27 ED
Z0173
  LDX #$F3ED         ; $0173: 8E F3 ED
  LBSR Z0024         ; $0176: 17 FE AB
  BRA Z01B3          ; $0179: 20 38
  LBSR Z0015         ; $017B: 17 FE 97
  TFR A,B            ; $017E: 1F 89
  CLRA               ; $0180: 4F
  BRA Z014C          ; $0181: 20 C9
  BSR Z0162          ; $0183: 8D DD
  BEQ Z019A          ; $0185: 27 13
  NEGB               ; $0187: 50
  SEX                ; $0188: 1D
  BRA Z01B1          ; $0189: 20 26
  LDA #$0D           ; $018B: 86 0D
  BSR Z0155          ; $018D: 8D C6
  BSR Z0162          ; $018F: 8D D1
  BEQ Z019A          ; $0191: 27 07
  LEAU B,U           ; $0193: 33 C5
  BRA Z01B6          ; $0195: 20 1F
  BSR Z0162          ; $0197: 8D C9
  DECB               ; $0199: 5A
Z019A
  BLE Z01E6          ; $019A: 2F 4A
  LDU ,U             ; $019C: EE C4
  BRA Z01B3          ; $019E: 20 13
  BSR Z0162          ; $01A0: 8D C0
  BEQ Z01E6          ; $01A2: 27 42
  LSRB               ; $01A4: 54
  BCC Z01AB          ; $01A5: 24 04
  LDB ,U             ; $01A7: E6 C4
  SEX                ; $01A9: 1D

  FCB $8C            ; $01AA: 8C

Z01AB
  LDD ,U             ; $01AB: EC C4
  ADDB <$97          ; $01AD: DB 97
  ADCA #$00          ; $01AF: 89 00
Z01B1
  LEAU D,U           ; $01B1: 33 CB
Z01B3
  LBSR Z0021         ; $01B3: 17 FE 6B
Z01B6
  STU <$95           ; $01B6: DF 95
  LDX #MFF95         ; $01B8: 8E FF 95
  LBSR Z07B6         ; $01BB: 17 05 F8
  LDA <$97           ; $01BE: 96 97
  DECA               ; $01C0: 4A
  NEGA               ; $01C1: 40
  ANDA #$2D          ; $01C2: 84 2D
  ADDA #$2F          ; $01C4: 8B 2F
  BSR Z0155          ; $01C6: 8D 8D
  BRA Z01FD          ; $01C8: 20 33
  BSR Z0162          ; $01CA: 8D 96
  LEAU B,U           ; $01CC: 33 C5
  BRA Z01FF          ; $01CE: 20 2F
  BSR Z0229          ; $01D0: 8D 57
  LDD <$98           ; $01D2: DC 98
  SUBD <$95          ; $01D4: 93 95
  SUBB <$97          ; $01D6: D0 97
  SBCA #$00          ; $01D8: 82 00
  ROR <$97           ; $01DA: 06 97
  BCC Z01E8          ; $01DC: 24 0A
  ROL <$97           ; $01DE: 09 97
  TSTA               ; $01E0: 4D
  BPL Z01E4          ; $01E1: 2A 01
  INCA               ; $01E3: 4C
Z01E4
  BEQ Z01ED          ; $01E4: 27 07
Z01E6
  COMB               ; $01E6: 53
  RTS                ; $01E7: 39

Z01E8
  ROL <$97           ; $01E8: 09 97
  LBSR Z07BA         ; $01EA: 17 05 CD
Z01ED
  TFR B,A            ; $01ED: 1F 98
  LBSR Z07BA         ; $01EF: 17 05 C8
  BRA Z01B3          ; $01F2: 20 BF
  INCB               ; $01F4: 5C
  INCB               ; $01F5: 5C
  TSTA               ; $01F6: 4D
  BNE Z01FB          ; $01F7: 26 02
  TFR X,U            ; $01F9: 1F 13
Z01FB
  STB <$97           ; $01FB: D7 97
Z01FD
  BSR Z0204          ; $01FD: 8D 05
Z01FF
  STU <$95           ; $01FF: DF 95
  LBRA Z0101         ; $0201: 16 FE FD
Z0204
  TFR U,X            ; $0204: 1F 31
  LDA <$97           ; $0206: 96 97
Z0208
  RORA               ; $0208: 46
  LBCS Z07FD         ; $0209: 10 25 05 F0
  DECB               ; $020D: 5A
Z020E
  LBRA Z07FA         ; $020E: 16 05 E9
  LBSR Z0058         ; $0211: 17 FE 44
  BCS  Z0220         ; $0214: 25 0A
  LDA  <$99          ; $0216: 96 99
  LEAX $01,X         ; $0218: 30 01
Z021A
  STA ,-X            ; $021A: A7 82
  CMPX <$CB          ; $021C: 9C CB
  BNE Z021A          ; $021E: 26 FA
Z0220
  RTS                ; $0220: 39

  BSR Z0273          ; $0221: 8D 50
  ADCB #$01          ; $0223: C9 01
  BSR Z0229          ; $0225: 8D 02
  BRA Z01FB          ; $0227: 20 D2
Z0229
  LBRA Z002A         ; $0229: 16 FD FE
  PSHS X             ; $022C: 34 10
  LEAX ,--S          ; $022E: 30 E3
  LBSR Z0070         ; $0230: 17 FE 3D
Z0233
  LBSR Z0021         ; $0233: 17 FD EB
  LEAX $02,S         ; $0236: 30 62
  BSR Z020E          ; $0238: 8D D4
  BSR Z0229          ; $023A: 8D ED
  LDX $02,S          ; $023C: AE 62
  LDB #$10           ; $023E: C6 10
Z0240
  LDA <$92           ; $0240: 96 92
  BSR Z0208          ; $0242: 8D C4
  DECB               ; $0244: 5A
  BNE Z0240          ; $0245: 26 F9
  BSR Z0229          ; $0247: 8D E0
  PULS Y,X           ; $0249: 35 30
  LDB #$10           ; $024B: C6 10
Z024D
  LDA ,Y+            ; $024D: A6 A0
  ANDA #$7F          ; $024F: 84 7F
  CMPA #$20          ; $0251: 81 20
  BCS Z0259          ; $0253: 25 04
  CMPA #$7F          ; $0255: 81 7F
  BCS Z025B          ; $0257: 25 02
Z0259
  LDA #$2E           ; $0259: 86 2E
Z025B
  BSR Z02BD          ; $025B: 8D 60
  DECB               ; $025D: 5A
  BNE Z024D          ; $025E: 26 ED
Z0260
  LDA MFE1A          ; $0260: B6 FE 1A
  ORA <$CF           ; $0263: 9A CF
  BMI Z0284          ; $0265: 2B 1D
  BNE Z0260          ; $0267: 26 F7
  PSHS Y             ; $0269: 34 20
  LEAX -$01,X        ; $026B: 30 1F
  STX ,--S           ; $026D: AF E3
  BGT Z0233          ; $026F: 2E C2
  PULS PC,Y,X        ; $0271: 35 B0
Z0273
  LDU #MFF80         ; $0273: CE FF 80
  LBSR Z07E5         ; $0276: 17 05 6C
  LDX #MF3F1         ; $0279: 8E F3 F1
  CMPA #$44          ; $027C: 81 44
  BNE Z0290          ; $027E: 26 10
  LEAU $01,U         ; $0280: 33 41
  CLRB               ; $0282: 5F
  COMA               ; $0283: 43
Z0284
  RTS                ; $0284: 39

Z0285
  ROLA               ; $0285: 49
  CLRB               ; $0286: 5F
  CMPA -$01,X        ; $0287: A1 1F
  BEQ Z0297          ; $0289: 27 0C
  LSRA               ; $028B: 44
  ADCB #$01          ; $028C: C9 01
  LEAU B,U           ; $028E: 33 C5
Z0290
  LDB ,X+            ; $0290: E6 80
  LSRB               ; $0292: 54
  BNE Z0285          ; $0293: 26 F0
  PULS PC,X          ; $0295: 35 90
Z0297
  LSRA               ; $0297: 44
  RTS                ; $0298: 39

Z0299
  BSR Z0229          ; $0299: 8D 8E
  PSHS B             ; $029B: 34 04
  LDX #MFF80         ; $029D: 8E FF 80
  LDU #MF3F1         ; $02A0: CE F3 F1
  LDB #$0E           ; $02A3: C6 0E
Z02A5
  LDA ,U             ; $02A5: A6 C4
  LSRA               ; $02A7: 44
  BSR Z02BD          ; $02A8: 8D 13
  LDA #$3D           ; $02AA: 86 3D
  BSR Z02BD          ; $02AC: 8D 0F
  LDA ,U+            ; $02AE: A6 C0
  INCA               ; $02B0: 4C
  LBSR Z0208         ; $02B1: 17 FF 54
  DECB               ; $02B4: 5A
  BNE Z02A5          ; $02B5: 26 EE
  PULS PC,B          ; $02B7: 35 84
Z02B9
  LDB #$7C           ; $02B9: C6 7C
Z02BB
  EXG A,B            ; $02BB: 1E 89
Z02BD
  LBRA Z07E8         ; $02BD: 16 05 28
  LDA #$3F           ; $02C0: 86 3F
  CLRB               ; $02C2: 5F
  BRA Z02EB          ; $02C3: 20 26
  LDA MFFCA          ; $02C5: B6 FF CA
  BEQ Z02E7          ; $02C8: 27 1D
  STA MFFCF          ; $02CA: B7 FF CF
  RTI                ; $02CD: 3B

Z02CE
  JMP [MFF90]        ; $02CE: 6E 9F FF 90
Z02D2
  LDX $0A,S          ; $02D2: AE 6A
  LEAX -$01,X        ; $02D4: 30 1F
  BSR Z0353          ; $02D6: 8D 7B
  BCS Z02CE          ; $02D8: 25 F4
  STX $0A,S          ; $02DA: AF 6A
  TFR U,D            ; $02DC: 1F 30
  SUBB #$E0          ; $02DE: C0 E0
  LSRB               ; $02E0: 54
  LSRB               ; $02E1: 54
  BSR Z02BB          ; $02E2: 8D D7
  LDA ,U             ; $02E4: A6 C4

  FCB $8C            ; $02E6: 8C 

Z02E7
  LDA #$41           ; $02E7: 86 41
  LDB #$80           ; $02E9: C6 80
Z02EB
  STB MFFCA          ; $02EB: F7 FF CA
  BSR Z02BD          ; $02EE: 8D CD
  BSR Z02B9          ; $02F0: 8D C7
  LDA #$FF           ; $02F2: 86 FF
  TFR A,DP           ; $02F4: 1F 8B
  LDX #MFF80         ; $02F6: 8E FF 80
Z02F9
  PULS A             ; $02F9: 35 02
  STA ,X+            ; $02FB: A7 80
  CMPX #MFF8C        ; $02FD: 8C FF 8C
  BNE Z02F9          ; $0300: 26 F7
  STS <$8C           ; $0302: 10 DF 8C
  LEAS -$0C,X        ; $0305: 32 14
  BSR Z0360          ; $0307: 8D 57
  BEQ Z0311          ; $0309: 27 06
Z030B
  STA ,X             ; $030B: A7 84
  BSR Z0369          ; $030D: 8D 5A
  BNE Z030B          ; $030F: 26 FA
Z0311
  BSR Z0299          ; $0311: 8D 86
  SUBB #$54          ; $0313: C0 54
  BEQ Z0324          ; $0315: 27 0D
  LBRA Z00EC         ; $0317: 16 FD D2
  LDA <$CA           ; $031A: 96 CA
  BEQ Z035E          ; $031C: 27 40
  BRA Z0324          ; $031E: 20 04
  BNE Z035E          ; $0320: 26 3C
  STX <$8A           ; $0322: 9F 8A
Z0324
  LDB #$3F           ; $0324: C6 3F
  BSR Z0360          ; $0326: 8D 38
  BEQ Z0338          ; $0328: 27 0E
Z032A
  LDA ,X             ; $032A: A6 84
  STA $01,U          ; $032C: A7 41
  CMPX <$8A          ; $032E: 9C 8A
  BEQ Z0334          ; $0330: 27 02
  STB ,X             ; $0332: E7 84
Z0334
  BSR Z0369          ; $0334: 8D 33
  BNE Z032A          ; $0336: 26 F2
Z0338
  LBSR Z0021         ; $0338: 17 FC E6
  LDX #MFF8C         ; $033B: 8E FF 8C
  LEAS [,X]          ; $033E: 32 94
  INC <$C9           ; $0340: 0C C9
  LDA #$0C           ; $0342: 86 0C
Z0344
  LDB ,-X            ; $0344: E6 82
  PSHS B             ; $0346: 34 04
  DECA               ; $0348: 4A
  BNE Z0344          ; $0349: 26 F9
  CLR <$CA           ; $034B: 0F CA
  LDA <$CF           ; $034D: 96 CF
  BNE Z02E7          ; $034F: 26 96
  PULS PC,U,Y,X,DP,D,CC ; $0351: 35 FF
Z0353
  LDU #MFFA0         ; $0353: CE FF A0
Z0356
  CMPX $02,U         ; $0356: AC 42
  BEQ Z035F          ; $0358: 27 05
  BSR Z036E          ; $035A: 8D 12
  BNE Z0356          ; $035C: 26 F8
Z035E
  COMB               ; $035E: 53
Z035F
  RTS                ; $035F: 39

Z0360
  LDU #MFFA0         ; $0360: CE FF A0
Z0363
  LDA $01,U          ; $0363: A6 41
  LDX $02,U          ; $0365: AE 42
  BNE Z036D          ; $0367: 26 04
Z0369
  BSR Z036E          ; $0369: 8D 03
  BNE Z0363          ; $036B: 26 F6
Z036D
  RTS                ; $036D: 39

Z036E
  LEAU $04,U         ; $036E: 33 44
Z0370
  CMPU #MFFC8        ; $0370: 11 83 FF C8
  RTS                ; $0374: 39

Z0375
  LDU #MFFA0         ; $0375: CE FF A0
Z0378
  CLR ,U+            ; $0378: 6F C0
  BSR Z0370          ; $037A: 8D F4
  BNE Z0378          ; $037C: 26 FA
  RTS                ; $037E: 39

  LBSR Z002A         ; $037F: 17 FC A8
  LDX #MFFA0         ; $0382: 8E FF A0
Z0385
  LDA ,X++           ; $0385: A6 81
  LBSR Z002D         ; $0387: 17 FC A3
  LBSR Z07FA         ; $038A: 17 04 6D
  CMPX #MFFC8        ; $038D: 8C FF C8
  BNE Z0385          ; $0390: 26 F3
  RTS                ; $0392: 39

  LDB #$12           ; $0393: C6 12
  ADDB #$42          ; $0395: CB 42
  LDU #MFFA0         ; $0397: CE FF A0
Z039A
  CMPX $02,U         ; $039A: AC 42
  BEQ Z03B2          ; $039C: 27 14
  LDY $02,U          ; $039E: 10 AE 42
  BEQ Z03B2          ; $03A1: 27 0F
  BSR Z036E          ; $03A3: 8D C9
  BNE Z039A          ; $03A5: 26 F3
  COMB               ; $03A7: 53
  RTS                ; $03A8: 39

  LDX <$8A           ; $03A9: 9E 8A
  BSR Z0353          ; $03AB: 8D A6
  BCS Z03B6          ; $03AD: 25 07
  CLRA               ; $03AF: 4F
  TFR D,X            ; $03B0: 1F 01
Z03B2
  STX $02,U          ; $03B2: AF 42
  STB ,U             ; $03B4: E7 C4
Z03B6
  RTS                ; $03B6: 39

  FDB $3562          ; $03B7: 35 62
  FDB $298B          ; $03B9: 29 8B
  FDB $ED51          ; $03BB: ED 51
  FDB $B13D          ; $03BD: B1 3D
  FDB $8201          ; $03BF: 82 01
  FDB $B948          ; $03C1: B9 48
  FDB $F50E          ; $03C3: F5 0E
  FDB $71F4          ; $03C5: 71 F4
  FDB $BDF5          ; $03C7: BD F5
  FDB $9221          ; $03C9: 92 21
  FDB $7983          ; $03CB: 79 83
  FDB $337F          ; $03CD: 33 7F
  FDB $431A          ; $03CF: 43 1A
  FDB $0197          ; $03D1: 01 97
  FDB $F9A0          ; $03D3: F9 A0
  FDB $9D7B          ; $03D5: 9D 7B
  FDB $E9CA          ; $03D7: E9 CA
  FDB $8E2C          ; $03D9: 8E 2C
  FDB $4A99          ; $03DB: 4A 99
  FDB $1F20          ; $03DD: 1F 20
  FDB $3DD0          ; $03DF: 3D D0
  FDB $5393          ; $03E1: 53 93
  FDB $0B95          ; $03E3: 0B 95
  FDB $13A9          ; $03E5: 13 A9
  FDB $2FAB          ; $03E7: 2F AB
  FDB $0F75          ; $03E9: 0F 75
  FDB $1A11          ; $03EB: 1A 11

  FCC "BAD"          ; $03ED..03EF
  FCB $04            ; $03F0: 04

  FDB $8682          ; $03F1: 86 82
  FDB $848E          ; $03F3: 84 8E
  FDB $B1B3          ; $03F5: B1 B3
  FDB $ABA1          ; $03F7: AB A1
  FDB $A7A5          ; $03F9: A7 A5
  FDB $918C          ; $03FB: 91 8C
  FDB $A955          ; $03FD: A9 55
  FCB $01            ; $03FF: 01

  INCLUDE CHR.asm    ; $0400..$05BF: Character Data

Z05C0
  LDA #$20           ; $05C0: 86 20
Z05C2
  PSHS U,X,DP,D      ; $05C2: 34 5E
  LDB #$FE           ; $05C4: C6 FE
  TFR B,DP           ; $05C6: 1F 9B
  LDB MFC5F          ; $05C8: F6 FC 5F
  RORB               ; $05CB: 56
  BCC Z05FA          ; $05CC: 24 2C
  TST <MFE72         ; $05CE: 0D 72       (DP = $FE)
  BNE Z05FF          ; $05D0: 26 2D
  LDX #MFE60         ; $05D2: 8E FE 60
  PSHS CC            ; $05D5: 34 01
  ORCC #$50          ; $05D7: 1A 50
  LDB <MFE61         ; $05D9: D6 61       (DP = $FE)
  EXG X,S            ; $05DB: 1E 14
  PSHS X,B           ; $05DD: 34 14
  LDB #$02           ; $05DF: C6 02
  STB MFC43          ; $05E1: F7 FC 43
  TST <MFE17         ; $05E4: 0D 17       (DP = $FE)
  BEQ Z05ED          ; $05E6: 27 05
  JSR [MFE05]        ; $05E8: AD 9F FE 05

  FCB $8C            ; $05EC: 8C

Z05ED
  BSR Z0608          ; $05ED: 8D 19
  PULS X,B           ; $05EF: 35 14
  STB MFC43          ; $05F1: F7 FC 43
  LEAS ,X            ; $05F4: 32 84
  PULS CC            ; $05F6: 35 01
  BRA Z0605          ; $05F8: 20 0B
Z05FA
  JSR ZF806          ; $05FA: BD F8 06
  BRA Z0605          ; $05FD: 20 06
Z05FF
  TST <$1D           ; $05FF: 0D 1D
  BNE Z05FF          ; $0601: 26 FC
  STA <$1D           ; $0603: 97 1D
Z0605
  CLRB               ; $0605: 5F
  PULS PC,U,X,DP,D   ; $0606: 35 DE
Z0608
  BSR Z0645          ; $0608: 8D 3B
  ANDA #$7F          ; $060A: 84 7F
  SUBA #$20          ; $060C: 80 20
  BCS Z0643          ; $060E: 25 33
  CMPA #$5F          ; $0610: 81 5F
  BCC Z0643          ; $0612: 24 2F
  CMPA #$3F          ; $0614: 81 3F
  BNE Z0620          ; $0616: 26 08
  LDA <$0B           ; $0618: 96 0B
  COMA               ; $061A: 43
  STA MFCD3          ; $061B: B7 FC D3
  BRA Z0640          ; $061E: 20 20
Z0620
  BCS Z0624          ; $0620: 25 02
  EORA #$60          ; $0622: 88 60
Z0624
  LDB #$07           ; $0624: C6 07
  MUL                ; $0626: 3D
  LDX #MF400         ; $0627: 8E F4 00
  LEAX D,X           ; $062A: 30 8B
  LDA <$0B           ; $062C: 96 0B
  STA MFCDB          ; $062E: B7 FC DB
  LDB #$08           ; $0631: C6 08
  BRA Z063A          ; $0633: 20 05
Z0635
  LDA ,X+            ; $0635: A6 80
  ASLA               ; $0637: 48
  EORA <$0B          ; $0638: 98 0B
Z063A
  STA MFCDB          ; $063A: B7 FC DB
  DECB               ; $063D: 5A
  BNE Z0635          ; $063E: 26 F5
Z0640
  BSR Z06A5          ; $0640: 8D 63

  FCB $8C            ; $0642: 8C

Z0643
  BSR Z064A          ; $0643: 8D 05
Z0645
  COM [MFE07]        ; $0645: 63 9F FE 07
  RTS                ; $0649: 39

Z064A
  CMPA #$ED          ; $064A: 81 ED
  BEQ Z06AF          ; $064C: 27 61
  CMPA #$EA          ; $064E: 81 EA
  BEQ Z0673          ; $0650: 27 21
  CMPA #$E8          ; $0652: 81 E8
  BEQ Z06B6          ; $0654: 27 60
  CMPA #$E9          ; $0656: 81 E9
  BEQ Z06A5          ; $0658: 27 4B
  CMPA #$EC          ; $065A: 81 EC
  BNE Z0672          ; $065C: 26 14
  CLRA               ; $065E: 4F
  BSR Z069F          ; $065F: 8D 3E
  LDA <MFE0B         ; $0661: 96 0B       (DP = $FE)
  LDX #M8000         ; $0663: 8E 80 00
Z0666
  STA ,X+            ; $0666: A7 80       (Fill VRAM)
  CMPX #$C000        ; $0668: 8C C0 00
  BNE Z0666          ; $066B: 26 F9
  LEAX -$40,X        ; $066D: 30 88 C0
  STX <MFE07         ; $0670: 9F 07       (DP = $FE)
Z0672
  RTS                ; $0672: 39

Z0673
  LDD <$07           ; $0673: DC 07
  TFR D,X            ; $0675: 1F 01
  ADDD #$240         ; $0677: C3 02 40
  ANDA #$BF          ; $067A: 84 BF
  STD <$07           ; $067C: DD 07
  LDA #$0D           ; $067E: 86 0D
  LEAX $40,X         ; $0680: 30 88 40
Z0683
  PSHS A             ; $0683: 34 02
  TFR X,D            ; $0685: 1F 10
  ANDA #$BF          ; $0687: 84 BF
  ANDB #$C0          ; $0689: C4 C0
  TFR D,X            ; $068B: 1F 01
  LDA <$0B           ; $068D: 96 0B
  LDB #$40           ; $068F: C6 40
Z0691
  STA ,X+            ; $0691: A7 80
  DECB               ; $0693: 5A
  BNE Z0691          ; $0694: 26 FB
  PULS A             ; $0696: 35 02
  DECA               ; $0698: 4A
  BNE Z0683          ; $0699: 26 E8
  LDA #$09           ; $069B: 86 09
  ADDA <$0C          ; $069D: 9B 0C
Z069F
  STA <MFE0C         ; $069F: 97 0C       (DP = $FE)
  STA MFCC4          ; $06A1: B7 FC C4
  RTS                ; $06A4: 39

Z06A5
  LDA <$08           ; $06A5: 96 08
  INCA               ; $06A7: 4C
  BITA #$3F          ; $06A8: 85 3F
  BEQ Z06AE          ; $06AA: 27 02
  STA <$08           ; $06AC: 97 08
Z06AE
  RTS                ; $06AE: 39

Z06AF
  LDA <$08           ; $06AF: 96 08
  ANDA #$C0          ; $06B1: 84 C0
  STA <$08           ; $06B3: 97 08
  RTS                ; $06B5: 39

Z06B6
  LDA <$08           ; $06B6: 96 08
  BITA #$3F          ; $06B8: 85 3F
  BEQ Z06BE          ; $06BA: 27 02
  DEC <$08           ; $06BC: 0A 08
Z06BE
  RTS                ; $06BE: 39

Z06BF
  PSHS DP,B          ; $06BF: 34 0C
  LDB #$FE           ; $06C1: C6 FE
  TFR B,DP           ; $06C3: 1F 9B
  LDB MFC5F          ; $06C5: F6 FC 5F
  RORB               ; $06C8: 56
  BCS Z06CF          ; $06C9: 25 04
  BSR Z06D3          ; $06CB: 8D 06
  PULS PC,DP,B       ; $06CD: 35 8C
Z06CF
  BSR Z06FA          ; $06CF: 8D 29
  PULS PC,DP,B       ; $06D1: 35 8C
Z06D3
  LDA MFC81          ; $06D3: B6 FC 81
  BITA #$08          ; $06D6: 85 08
  BEQ Z06D3          ; $06D8: 27 F9
  LDA MFC80          ; $06DA: B6 FC 80
  CLR <$1A           ; $06DD: 0F 1A
  BRA Z0705          ; $06DF: 20 24
Z06E1
  LDB MFC81          ; $06E1: F6 FC 81
  BITB #$08          ; $06E4: C5 08
  BEQ Z06F8          ; $06E6: 27 10
  LDA MFC80          ; $06E8: B6 FC 80
  BITB #$02          ; $06EB: C5 02
  BNE Z06F8          ; $06ED: 26 09
  CLR <$1A           ; $06EF: 0F 1A
  TSTA               ; $06F1: 4D
  BPL Z0705          ; $06F2: 2A 11
  LDB <$2B           ; $06F4: D6 2B
  BNE Z070C          ; $06F6: 26 14
Z06F8
  BSR Z0710          ; $06F8: 8D 16
Z06FA
  LDB <$1E           ; $06FA: D6 1E
  LSRB               ; $06FC: 54
  BCC Z06E1          ; $06FD: 24 E2
  LDA <$19           ; $06FF: 96 19
  BEQ Z06F8          ; $0701: 27 F5
  CLR <$19           ; $0703: 0F 19
Z0705
  LDB MFFC9          ; $0705: F6 FF C9
  LBEQ Z05C2         ; $0708: 10 27 FE B6
Z070C
  CLR MFFC9          ; $070C: 7F FF C9
Z070F
  RTS                ; $070F: 39

Z0710
  TST MFE0E          ; $0710: 7D FE 0E
  BEQ Z070F          ; $0713: 27 FA
  PSHS U,Y,DP        ; $0715: 34 68
  JSR [MFE0F]        ; $0717: AD 9F FE 0F
  PULS PC,U,Y,DP     ; $071B: 35 E8
Z071D
  PSHS D             ; $071D: 34 06
  BSR Z074F          ; $071F: 8D 2E
  BVC Z073F          ; $0721: 28 1C
  PSHS X             ; $0723: 34 10
  LDX #MF76D         ; $0725: 8E F7 6D
  BSR Z078D          ; $0728: 8D 63
Z072A
  BSR Z074F          ; $072A: 8D 23
  BVS Z072A          ; $072C: 29 FC
  LDB #$0C           ; $072E: C6 0C
Z0730
  LDX #MF77B         ; $0730: 8E F7 7B
  BSR Z078D          ; $0733: 8D 58
  DECB               ; $0735: 5A
  BNE Z0730          ; $0736: 26 F8
  LDA #$16           ; $0738: 86 16
  LBSR Z05C2         ; $073A: 17 FE 85
  PULS X             ; $073D: 35 10
Z073F
  LDA MFE16          ; $073F: B6 FE 16
  STA MFE13          ; $0742: B7 FE 13
  PULS D             ; $0745: 35 06
  ORA #$80           ; $0747: 8A 80
  STA MFE18          ; $0749: B7 FE 18
  ANDCC #$FE         ; $074C: 1C FE
  RTS                ; $074E: 39

Z074F
  LDB MFE18          ; $074F: F6 FE 18
  BEQ Z075D          ; $0752: 27 09
  BSR Z0710          ; $0754: 8D BA
  LDB MFE35          ; $0756: F6 FE 35
  BNE Z074F          ; $0759: 26 F4
  ORCC #$02          ; $075B: 1A 02
Z075D
  RTS                ; $075D: 39

Z075E
  LDA #$0D           ; $075E: 86 0D
  BSR Z071D          ; $0760: 8D BB
  LDA #$0A           ; $0762: 86 0A
Z0764
  BSR Z071D          ; $0764: 8D B7
Z0766
  LDA ,X+            ; $0766: A6 80
  CMPA #$04          ; $0768: 81 04
  BNE Z0764          ; $076A: 26 F8
Z076C
  RTS                ; $076C: 39

  FCB $16            ; $076D: 16
  FCC "PRINTER DOWN" ; $076E..$0779
  FCB $04            ; $077A: 04

M077B
  FDB $0820          ; $F77B: 08 20
  FDB $0804          ; $F77D: 08 04

Z077F
  PSHS A             ; $077F: 34 02
  LDA #$0D           ; $0781: 86 0D
  BSR Z07E8          ; $0783: 8D 63
  LDA #$0A           ; $0785: 86 0A
  BSR Z07E8          ; $0787: 8D 5F
  PULS PC,A          ; $0789: 35 82
Z078B
  BSR Z07E8          ; $078B: 8D 5B
Z078D
  LDA ,X+            ; $078D: A6 80
  CMPA #$04          ; $078F: 81 04
  BNE Z078B          ; $0791: 26 F8
  RTS                ; $0793: 39

Z0794
  PSHS A             ; $0794: 34 02
  LDA #$0C           ; $0796: 86 0C
  BSR Z07E8          ; $0798: 8D 4E
  PULS PC,A          ; $079A: 35 82
Z079C
  BSR Z07F7          ; $079C: 8D 59
  CMPA #$7A          ; $079E: 81 7A
  BHI Z07A8          ; $07A0: 22 06
  CMPA #$61          ; $07A2: 81 61
  BCS Z07A8          ; $07A4: 25 02
  SUBA #$20          ; $07A6: 80 20
Z07A8
  ANDCC #$FE         ; $07A8: 1C FE
  RTS                ; $07AA: 39

Z07AB
  BSR Z07B8          ; $07AB: 8D 0B
Z07AD
  BSR Z07B8          ; $07AD: 8D 09
  LBRA Z05C0         ; $07AF: 16 FE 0E

  FDB $0000          ; $07B2: 00 00
  FDB $0000          ; $07B4: 00 00

Z07B6
  BSR Z07B8          ; $07B6: 8D 00
Z07B8
  LDA ,X+            ; $07B8: A6 80
Z07BA
  PSHS A             ; $07BA: 34 02
  BSR Z07C6          ; $07BC: 8D 08
  BSR Z07E8          ; $07BE: 8D 28
  PULS A             ; $07C0: 35 02
  BSR Z07CA          ; $07C2: 8D 06
  BRA Z07E8          ; $07C4: 20 22
Z07C6
  LSRA               ; $07C6: 44
  LSRA               ; $07C7: 44
  LSRA               ; $07C8: 44
  LSRA               ; $07C9: 44
Z07CA
  ANDA #$0F          ; $07CA: 84 0F
  CMPA #$09          ; $07CC: 81 09
  BLS Z07D2          ; $07CE: 23 02
  ADDA #$07          ; $07D0: 8B 07
Z07D2
  ADDA #$30          ; $07D2: 8B 30
  RTS                ; $07D4: 39

  FCB $4B            ; $07D5: 4B
  FCB $39            ; $07D6: 39
  FCB $39            ; $07D7: 39
  FCB $39            ; $07D8: 39

  LBRA Z076C         ; $07D9: 16 FF 90
  LBRA Z071D         ; $07DC: 16 FF 3E
Z07DF
  LBRA Z0766         ; $07DF: 16 FF 84
  LBRA Z075E         ; $07E2: 16 FF 79
Z07E5
  LBRA Z079C         ; $07E5: 16 FF B4
Z07E8
  LBRA Z05C2         ; $07E8: 16 FD D7
Z07EB
  LBRA Z077F         ; $07EB: 16 FF 91
  LBSR Z077F         ; $07EE: 17 FF 8E
Z07F1
  LBRA Z078D         ; $07F1: 16 FF 99
  LBRA Z0794         ; $07F4: 16 FF 9D
Z07F7
  LBRA Z06BF         ; $07F7: 16 FE C5
Z07FA
  LBRA Z07AB         ; $07FA: 16 FF AE
Z07FD
  LBRA Z07AD         ; $07FD: 16 FF AD