
*---------------------------------------------------------*
*     Disassembled with The Flaming Bird Disassembler     *
*    (c) Phoenix corp. 1992,93  -  All rights reserved    *
*---------------------------------------------------------*

         REL
	 mx	%00

	 use	MAIN3.X.S
	 use	MAIN3.E.S

L120000  ENT
         JSL   L1200BA
         BCS   L12000F
         JSL   L12002E
         LDA   L023C89
         BNE   L120000
L12000F  RTL

         LDA   #$0004
         STA   $09
L120015  JSL   L120000
         BCS   L12001F
         DEC   $09
         BPL   L120015
L12001F  RTL

L120020  DB    $00
L120021  DB    $00
L120022  DB    $FF
         DB    $FF
         DB    $FF
         DB    $FF
         DB    $FF
         DB    $FF
         DB    $FF
         DB    $FF
         DB    $FF
         DB    $FF
         DB    $FF
         DB    $FF
L12002E  SEP   #$20
         LDAL  KEYMODREG
         AND   #$10
         BEQ   L1200A6
         LDAL  L120020
         BEQ   L120041
         REP   #$20
         RTL

         MX    %10
L120041  LDY   #$0000
         LDAL  KBD
         TAX
         BMI   L120052
         LDAL  KBDSTROBE
         BPL   L120080
         TXA
L120052  STAL  KBDSTROBE
         AND   #$7F
         CMP   #$30
         BEQ   L120086
         CMP   #$31
         BEQ   L1200B6
         CMP   #$32
         BEQ   L1200B5
         CMP   #$33
         BEQ   L1200B4
         CMP   #$34
         BEQ   L1200B3
         CMP   #$35
         BEQ   L1200B2
         CMP   #$36
         BEQ   L1200B1
         CMP   #$37
         BEQ   L1200B0
         CMP   #$38
         BEQ   L1200AF
         CMP   #$39
         BEQ   L120083
L120080  REP   #$20
         RTL

         MX    %10
L120083  LDY   #$0009
L120086  LDAL  L120021
         CMP   #$0A
         BCC   L120091
         REP   #$20
         RTL

L120091  TAX
         TYA
         STAL  L120022,X
         TXA
         INC
         STAL  L120021
         LDA   #$8FFF
         JSR   $1200
         REP   #$20
         RTL

L1200A6  LDA   #$8F00
         JSR   $1200
         REP   #$20
         RTL

L1200AF  INY
L1200B0  INY
L1200B1  INY
L1200B2  INY
L1200B3  INY
L1200B4  INY
L1200B5  INY
L1200B6  INY
         JMP   L120086

L1200BA  ENT
         PHP
         SEP   #$20
         JSL   L12021E
         LDAL  KBD
         BMI   L1200CC
         REP   #$20
         PLP
         CLC
         RTL

         MX    %11
L1200CC  STAL  KBDSTROBE
         AND   #$7F
         STZ   L023E04
         PHA
         LDAL  KEYMODREG
         TAX
         AND   #$03
         CMP   #$03
         BNE   L1200E4
         JMP   L12018B

L1200E4  PLA
         CMP   #$0D
         BNE   L1200F4
         LDA   #$01
         STA   L023E04
         PLP
         SEC
         PHP
         JMP   L120189

L1200F4  CMP   #$58
         BNE   L1200FF
         STA   L023E00
         JMPL  L0104EC

L1200FF  CMP   #$26
         BNE   L120109
         JSL   L140037
         BRA   L120186
L120109  CMP   #$5E
         BNE   L120113
         JSL   L120254
         BRA   L120186
L120113  CMP   #$40
         BNE   L120122
         LDA   L0242D7
         EOR   #$01
         STA   L0242D7
         JMP   L120186

L120122  CMP   #$21
         BNE   L12012D
         JSL   L290BE1
         JMP   L120186

L12012D  CMP   #$2B
         BNE   L120138
         JSL   L290CA3
         JMP   L120186

L120138  CMP   #$2D
         BNE   L120143
         JSL   L290CDF
         JMP   L120186

L120143  CMP   #$28
         BNE   L120157
         LDA   L0257F8
         BEQ   L120186
         LDA   #$01
         STA   L0257F6
         STZ   L023E06
         JMP   L1201AA

L120157  CMP   #$29
         BNE   L12016B
         LDA   L0257F8
         BEQ   L120186
         LDA   #$01
         STA   L0257F4
         STZ   L023E06
         JMP   L1201AA

L12016B  CMP   #$25
         BNE   L12017C
         LDA   L0257F0
         BEQ   L120186
         LDA   #$01
         STA   L020057
         JMP   L12019D

L12017C  CMP   #$66
         BNE   L120186
         JSR   L1201B8
         JMP   L120186

L120186  PLP
         CLC
         PHP
L120189  PLP
         RTL

L12018B  PLA
         XBA
         LDA   L0257F0
         BEQ   L120186
         XBA
         CMP   #$01
         BCC   L120186
         CMP   #$15
         BEQ   L12019D
         BCS   L120186
L12019D  LDX   L0257F8
         BEQ   L120186
         STA   L023E10
         LDA   #$01
         STA   L024546
L1201AA  REP   #$20
         STZ   L0257F8
         LDAL  L020353
         TCS
         JMPL  L01019C

L1201B8  PHP
         REP   #$20
         LDA   #$0001
         STA   L025800
         JSL   L1201FC
         BCC   L1201FA
         SEP   #$20
         CMP   #$61
         BNE   L1201FA
         REP   #$20
         LDA   #$0001
         STA   L025801
         JSL   L1201FC
         BCC   L1201FA
         SEP   #$20
         CMP   #$75
         BNE   L1201FA
         REP   #$20
         LDA   #$0001
         STA   L025801
         JSL   L1201FC
         BCC   L1201FA
         SEP   #$20
         CMP   #$74
         BNE   L1201FA
         LDA   #$01
         STA   L0257F0
L1201FA  PLP
         RTS

L1201FC  SEP   #$20
         LDAL  KBD
         BMI   L120212
         REP   #$20
         DEC   L0257FE
         BNE   L1201FC
         DEC   L025800
         BNE   L1201FC
         CLC
         RTL

L120212  SEP   #$20
         AND   #$7F
         STAL  KBDSTROBE
         REP   #$20
         SEC
         RTL

L12021E  PHP
         SEP   #$20
         LDAL  KBD
         BMI   L120229
         PLP
         RTL

L120229  AND   #$7F
         CMP   #$1B
         BNE   L120246
         STAL  KBDSTROBE
         LDA   L023FE6
         EOR   #$01
         STA   L023FE6
L12023B  ENT
         BEQ   L120252
L12023D  LDAL  KBD
         BMI   L120229
         JMP   L12023D

L120246  LDA   L023FE6
         BEQ   L120252
         STAL  KBDSTROBE
         JMP   L12023D

L120252  PLP
         RTL

         MX    %00
L120254  PHP
         REP   #$20
         LDX   #$5E80
         LDY   #L130000
         LDA   #$0C7F
         PHB
         MVN   $E10000,L130000
         PLB
         LDX   #$FFFF
         STX   L023D85
         LDX   #L023C51
         STX   $00
         LDX   #^L023C51
         STX   $02
         LDX   #$5E85
         STX   $04
         LDX   #$00E1
         STX   $06
         JSL   L1806EB
         LDX   #L023C6D
         STX   $00
         LDX   #^L023C6D
         STX   $02
         LDX   #$64C5
         STX   $04
         LDX   #$00E1
         STX   $06
         JSL   L1806EB
         SEP   #$20
L12029D  LDAL  KBD
         BMI   L1202A5
         BRA   L12029D
L1202A5  STAL  KBDSTROBE
         REP   #$20
         LDX   #L130000
         LDY   #$5E80
         LDA   #$0C7F
         PHB
         MVN   L130000,$E10000
         PLB
         PLP
         RTL

         REP   #$20
         LDA   #L023C8B
         STA   $04
         LDA   #$0806
         STA   $08
         JSL   L1202F8
         LDA   #L023C9C
         STA   $04
         LDA   #$080B
         STA   $08
         JSL   L1202F8
         LDA   #L023CA4
         STA   $04
         LDA   #$0910
         STA   $08
         JSL   L1202F8
         LDA   #L023C93
         STA   $04
         LDA   #$0914
         JSL   L1202F8
         JSL   L0F01AC
         RTL

L1202F8  LDA   #L120022
         STA   $00
         SEP   #$20
         LDA   L120021
         CMP   $09
         BEQ   L120309
         REP   #$20
         RTL

L120309  LDA   ($04)
         INC   $04
         CMP   ($00)
         BEQ   L120314
         REP   #$20
         RTL

L120314  INC   $00
         DEC   $09
         BNE   L120309
         LDA   $08
         REP   #$20
         RTL

L12031F  ENT
         PHP
         REP   #$20
         LDA   #L025E44
         STA   L025804
         LDA   #^L025E44
         STA   L025806
         LDA   #L023931
         STA   L025800
         LDA   #^L023931
         STA   L025802
         LDA   #$FFFF
         STA   L023D85
         LDA   #$0000
         STA   L025806
         LDA   #$0000
         STA   L025808
         PLP
         RTL

L12034E  ENT
         PHP
         SEP   #$20
         STZ   L024325
         LDA   L0244A0
         STA   $5C
         BEQ   L12035E
         STZ   L0244A0
L12035E  STZ   L023CAF
         REP   #$20
         LDA   #L025100
         STA   $6C
         JSR   L120AFA
         INC   $6C
         JSR   L120AFA
         INC   $6C
         JSR   L120AFA
         INC   $6C
         JSR   L120AFA
         INC   $6C
         JSR   L120AFA
         INC   $6C
         JSR   L120AFA
         INC   $6C
         JSR   L120AFA
         INC   $6C
         JSR   L120AFA
         LDA   #L024E00
         STA   $6C
         STZ   L023CB0
         JSL   L120605
         INC   L023CB0
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         JSL   L120605
         INC   L023CB0
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         JSL   L120605
         INC   L023CB0
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         JSL   L120605
         INC   L023CB0
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         JSL   L120605
         INC   L023CB0
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         JSL   L120605
         INC   L023CB0
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         JSL   L120605
         INC   L023CB0
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         JSL   L120605
         SEP   #$20
         LDA   L0244A2
         BEQ   L120415
         LDA   L023CAF
         ORA   #$01
         STA   L023CAF
         STZ   L0244A2
L120415  LDA   L02430D
         STA   $5C
         BEQ   L12047E
         DEC   $5C
         LDA   $5C
         STA   L02430D
         LDA   L024326
         STA   $5D
         BNE   L12042C
         PLP
         RTL

L12042C  LDX   $5C
         PHX
         LDA   L024325
         STA   $5C
         BEQ   L12044C
         STA   $65
L120438  LDX   $64
         PHX
         SEP   #$20
         STZ   $5C
         JSL   L18088D
         PLX
         STX   $64
         SEP   #$20
         DEC   $65
         BNE   L120438
L12044C  PLX
         STX   $5C
         LDA   $5C
         CMP   #$2E
         BEQ   L120457
         PLP
         RTL

L120457  LDA   #$01
         STA   L02441A
         JSL   L1802F7
         LDA   #$02
         STA   L024418
         LDA   #$14
         STA   L02441A
         JSL   L290F32
         LDA   L024480
         CMP   #$04
         BCC   L120477
         PLP
         RTL

L120477  LDA   #$04
         STA   L024480
         PLP
         RTL

L12047E  LDA   $5C
         STA   L024326
         LDA   L023CAF
         STA   $68
         LDA   L02431D
         STA   $5C
         BNE   L120495
         LDA   $68
         BIT   #$02
         BNE   L1204E6
L120495  LDA   $68
         BIT   #$01
         BNE   L12049D
         PLP
         RTL

L12049D  LDA   L02431D
         STA   $5C
         BEQ   L1204E6
         INC   L024303
         LDA   #$0F
         STA   L02430D
         LDA   #$02
         STA   L0244A0
         LDA   #$01
         STA   L02441A
         JSL   L1802F7
         LDA   #$01
         STA   $5C
         STA   L024418
         LDA   #$28
         STA   L02441A
         LDA   #$00
         STA   L023D85
         STA   L023D86
         STZ   L02431D
         REP   #$20
         LDA   #$4394
         STA   $00
         SEP   #$20
         LDA   #$FF
         JSL   L18066C
         JSL   L290F32
         PLP
         RTL

L1204E6  INC   L024303
         LDA   #$0F
         STA   L02430D
         LDA   #$02
         STA   L0244A0
         LDA   L02431B
         STA   $5C
         BEQ   L12051C
         JSL   L18056D
         DEC   L02431B
         BEQ   L120505
         PLP
         RTL

L120505  INC   $5C
         LDA   $5C
         STA   L02441A
         JSL   L1802F7
         LDA   #$03
         STA   L024418
         LDA   #$0F
         STA   L02441A
         PLP
         RTL

L12051C  LDA   L024484
         STA   $64
         JSL   L180C51
         AND   #$01
         STA   $5C
         BEQ   L12052E
         JMP   L1205B8

L12052E  LDA   $64
         AND   #$03
         STA   $5C
         BEQ   L120547
         LDA   $64
         BIT   #$04
         BEQ   L1205B8
         LDA   $64
         ORA   #$07
         STA   $5C
         STA   L024484
         PLP
         RTL

L120547  JSL   L180C51
         AND   #$01
         STA   $5C
         BNE   L120577
         LDA   L024484
         ORA   #$01
         STA   L024484
         LDA   #$01
         STA   L02441A
         JSL   L1802F7
         LDA   #$05
         STA   L024418
         LDA   #$14
         STA   L02441A
         LDA   L024323
         ORA   #$01
         STA   L024323
         JMP   L12059A

L120577  LDA   L024484
         ORA   #$02
         STA   L024484
         LDA   #$01
         STA   L02441A
         JSL   L1802F7
         LDA   #$04
         STA   L024418
         LDA   #$14
         STA   L02441A
         LDA   L024323
         ORA   #$02
         STA   L024323
L12059A  LDA   #$00
         STA   L023D85
         STA   L023D86
         STZ   L024319
         REP   #$20
         LDA   #$438C
         STA   $00
         SEP   #$20
         LDA   #$FF
         STA   $5C
         JSL   L18066C
         PLP
         RTL

L1205B8  LDA   $64
         BIT   #$04
         BEQ   L1205C1
         JMP   L12052E

L1205C1  LDA   L024484
         ORA   #$04
         STA   L024484
         LDA   #$01
         STA   L02441A
         JSL   L1802F7
         LDA   #$06
         STA   L024418
         LDA   #$14
         STA   L02441A
         LDA   L024323
         ORA   #$04
         STA   L024323
         STZ   $5C
         STZ   L024321
         JSL   L180BCA
         REP   #$20
         LDA   #$0000
         STA   L023D85
         LDA   #$4384
         STA   $00
         LDA   #$00FF
         STA   $5C
         JSL   L18066C
         PLP
         RTL

L120605  PHP
         SEP   #$20
         LDA   ($6C)
         AND   #$7F
         STA   $5C
         CMP   #$10
         BCS   L120614
         PLP
         RTL

L120614  LDY   #$000C
         LDA   ($6C),Y
         STA   $5C
         BEQ   L12061F
         PLP
         RTL

L12061F  LDY   #$0007
         LDA   ($6C),Y
         STA   $5C
         BNE   L12062A
         PLP
         RTL

L12062A  LDY   #$0008
         LDA   ($6C),Y
         STA   $68
         LDY   #$0009
         LDA   ($6C),Y
         STA   $69
         LDY   #$0005
         LDA   ($6C),Y
         STA   $60
         LDY   #$000A
         LDA   ($6C),Y
         STA   $61
         REP   #$20
         LDA   #L0244AC
         STA   $70
         JSR   L120A68
         INC   $70
         JSR   L120A68
         INC   $70
         JSR   L120A68
         INC   $70
         JSR   L120A68
         SEP   #$20
         LDA   L024442
         SEC
         SBC   #$04
         STA   $5C
         CMP   $69
         BCC   L12066F
         PLP
         RTL

L12066F  LDA   $5C
         CLC
         ADC   #$07
         STA   $5C
         CMP   $68
         BCS   L12067C
         PLP
         RTL

L12067C  LDA   L024443
         STA   $5C
         CMP   $60
         BCS   L120687
         PLP
         RTL

L120687  LDA   $5C
         SEC
         SBC   #$07
         STA   $5C
         CMP   $61
         BCC   L120694
         PLP
         RTL

L120694  INC   L024325
         LDA   L023E28
         CMP   #$FD
         BNE   L1206A8
         LDA   ($6C)
         AND   #$7F
         STA   $5C
         CMP   #$14
         BEQ   L1206B9
L1206A8  LDA   L024410
         EOR   #$FF
         INC
         STA   $5C
         BEQ   L1206EA
         STA   $64
         CMP   L023CB0
         BCC   L1206EA
L1206B9  LDX   L024442
         STX   $68
         JSL   L180C51
         AND   #$07
         SEC
         SBC   #$04
         STA   $5C
         CLC
         ADC   $68
         STA   $68
         JSL   L180C51
         AND   #$07
         EOR   #$FF
         INC
         STA   $5C
         CLC
         ADC   $69
         INC
         STA   $69
         JSL   L0F0384
         JSL   L290F5E
         JMP   L1206F1

L1206EA  LDA   #$00
         LDY   #$0007
         STA   ($6C),Y
L1206F1  LDA   ($6C)
         AND   #$7F
         STA   $5C
         CMP   #$10
         BEQ   L120705
         LDA   L023CAF
         ORA   #$01
         STA   L023CAF
         PLP
         RTL

L120705  DEC   L024325
         LDA   ($6C)
         AND   #$80
         CLC
         ADC   #$0F
         STA   ($6C)
         LDY   #$0006
         LDA   ($6C),Y
         ASL
         STA   L023CC4
         STZ   L023CC5
         REP   #$20
         LDA   #$0005
         STA   $04
         JSL   L18071A
         JSL   L290ED7
         LDA   L023CC4
         TAX
         SEP   #$20
         JMP   (L120735,X)

L120735  DA    L12074B
         DA    L12078E
         DA    L1207FD
         DA    L1209FF
         DA    L120839
         DA    L12086D
         DA    L120893
         DA    L1208FC
         DA    L120964
         DA    L120997
         DA    L120997
L12074B  JSR   L120A58
         STZ   L02442C
         LDX   #L0244AC
         STX   $70
         LDA   #$03
         STA   $65
L12075A  LDA   ($70)
         AND   #$80
         ORA   #$14
         STA   ($70)
         LDA   $65
         DEC
         ASL
         STA   $64
         ASL
         ASL
         CLC
         ADC   $64
         LDY   #$000C
         STA   ($70),Y
         REP   #$20
         INC   $70
         SEP   #$20
         DEC   $65
         BNE   L12075A
         LDA   #$01
         STA   L024414
         LDA   L023E28
         CMP   #$FD
         BEQ   L12078C
         JSL   L1801F5
L12078C  PLP
         RTL

L12078E  JSR   L120A58
         LDA   L024319
         STA   $5C
         BNE   L1207D6
         INC   L024319
         LDA   #$01
         STA   L02442C
         STZ   L02442E
         LDA   L024484
         STA   $5C
         LDX   $5C
         PHX
         AND   #$03
         BNE   L1207B3
         JSL   L0711A7
L1207B3  PLX
         STX   $5C
         TXA
         AND   #$FC
         STA   L024484
         LDA   #$02
         STA   L024414
         LDA   L023E28
         CMP   #$FD
         BEQ   L1207CC
         JSL   L1801F5
L1207CC  LDA   #$04
         STA   $60
         JSL   L18060E
         PLP
         RTL

L1207D6  LDA   L02442C
         CMP   #$01
         BEQ   L1207E5
         LDA   #$01
         STA   L02442C
         STZ   L02442E
L1207E5  LDA   L02442E
         STA   $5C
         CMP   #$0C
         BCS   L1207F5
         INC   $5C
         LDA   $5C
         STA   L02442E
L1207F5  DEC   $5C
         JSL   L18088D
         PLP
         RTL

L1207FD  JSR   L120A58
         STZ   L02442C
         LDA   #$0A
         STA   L024414
         LDA   L023E28
         CMP   #$FD
         BEQ   L120813
         JSL   L1801F5
L120813  LDX   #$0500
         STX   $04
         JSL   L18071A
         PLP
         RTL

L12081E  LDA   #$03
         STA   L024414
         LDA   L023E28
         CMP   #$FD
         BEQ   L12082E
         JSL   L1801F5
L12082E  LDX   #$0200
         STX   $04
         JSL   L18071A
         PLP
         RTL

L120839  JSR   L120A58
         STZ   L02442C
         LDA   L02431D
         STA   $5C
         BNE   L120863
         INC   L02431D
         LDA   #$05
         STA   L024414
         LDA   L023E28
         CMP   #$FD
         BEQ   L120859
         JSL   L1801F5
L120859  LDA   #$05
         STA   $60
         JSL   L18060E
         PLP
         RTL

L120863  LDA   #$0C
         STA   $5C
         JSL   L18088D
         PLP
         RTL

L12086D  LDA   #$05
         STA   L024480
         STZ   L02442C
         LDA   #$FF
         STA   L02430D
         STA   L024326
         LDA   #$06
         STA   L024414
         LDA   L023E28
         CMP   #$FD
         BEQ   L12088D
         JSL   L1801F5
L12088D  JSL   L290F06
         PLP
         RTL

L120893  JSR   L120A58
         STZ   L02442C
         LDA   L024484
         STA   $5C
         BNE   L1208CA
         LDA   L02431B
         STA   $5C
         CMP   #$06
         BCC   L1208AC
         JMP   L12081E

L1208AC  INC   L02431B
         LDA   L02431B
         STA   $5C
         JSL   L1804EC
         LDA   #$07
         STA   L024414
         LDA   L023E28
         CMP   #$FD
         BEQ   L1208C8
         JSL   L1801F5
L1208C8  PLP
         RTL

L1208CA  JSR   L120A58
         JSL   L0711A7
         JSL   L120BFD
         STZ   L024484
         STZ   L024486
         STZ   L024488
         STZ   L02448A
         LDX   #$4040
         STX   L02448C
         STX   L02448E
         LDA   #$0C
         STA   L024414
         LDA   L023E28
         CMP   #$FD
         BEQ   L1208FA
         JSL   L1801F5
L1208FA  PLP
         RTL

L1208FC  STZ   L02442C
         LDA   #$02
         STA   L02447E
         LDX   #L024E00
         STX   $70
         LDA   #$08
         STA   $65
         STZ   $60
L12090F  LDA   ($70)
         AND   #$7F
         STA   $5C
         CMP   #$14
         BCC   L12091B
         INC   $60
L12091B  LDA   #$00
         LDY   #$0007
         STA   ($70),Y
         REP   #$20
         LDA   $70
         CLC
         ADC   #$0060
         STA   $70
         SEP   #$20
         DEC   $65
         BNE   L12090F
         STZ   $61
         LDX   $60
         LDA   L023CBC,X
         STA   $5C
         LDX   $5C
         PHX
         LDA   #$06
         STA   L0244A0
         LDA   #$08
         STA   L024414
         LDA   L023E28
         CMP   #$FD
         BEQ   L120953
         JSL   L1801F5
L120953  PLX
         STX   $5C
         LDA   $5C
         CMP   #$FF
         BNE   L12095E
         PLP
         RTL

L12095E  JSL   L18088D
         PLP
         RTL

L120964  JSR   L120A58
         STZ   L02442C
         LDA   L024307
         STA   $5C
         CMP   #$04
         BCC   L120976
         JMP   L12081E

L120976  INC   L024307
         LDA   #$09
         STA   L024414
         LDA   L023E28
         CMP   #$FD
         BEQ   L120989
         JSL   L1801F5
L120989  LDA   L024307
         SEC
         SBC   #$02
         STA   $60
         JSL   L18060E
         PLP
         RTL

L120997  JSR   L120A58
         LDA   L024321
         STA   $5C
         BNE   L1209CF
         STZ   L02442C
         LDA   L024484
         AND   #$FB
         STA   $5C
         STA   L024484
         INC   L024321
         JSL   L180BCA
         LDA   #$0B
         STA   L024414
         LDA   L023E28
         CMP   #$FD
         BEQ   L1209C5
         JSL   L1801F5
L1209C5  LDA   #$03
         STA   $60
         JSL   L18060E
         PLP
         RTL

L1209CF  LDA   L02442C
         CMP   #$02
         BEQ   L1209DE
         LDA   #$02
         STA   L02442C
         STZ   L02442E
L1209DE  LDA   L02442E
         STA   $60
         CMP   #$0A
         BCS   L1209EE
         INC   $60
         LDA   $60
         STA   L02442E
L1209EE  DEC   $60
         STZ   $61
         LDX   $60
         LDA   L023CB2,X
         STA   $5C
         JSL   L18088D
         PLP
         RTL

L1209FF  JSR   L120A58
         STZ   L02442C
         LDA   L02431B
         STA   $5C
         CMP   #$06
         BCC   L120A11
         JMP   L12081E

L120A11  INC   $5C
         LDX   $5C
         PHX
         TXA
         JSL   L1804EC
         PLX
         STX   $5C
         LDA   $5C
         CMP   #$06
         BNE   L120A11
         STA   L02431B
         JSL   L120BFD
         JSL   L0711A7
         STZ   L024484
         STZ   L024486
         STZ   L024488
         STZ   L02448A
         LDX   #$4040
         STX   L02448C
         STX   L02448E
         LDA   #$04
         STA   L024414
         LDA   L023E28
         CMP   #$FD
         BEQ   L120A54
         JSL   L1801F5
L120A54  PLP
         RTL

L120A56  PLP
         RTS

L120A58  LDA   L024480
         STA   $5C
         CMP   #$03
         BCC   L120A62
         RTS

L120A62  LDA   #$03
         STA   L024480
         RTS

L120A68  PHP
         SEP   #$20
         LDA   ($70)
         STA   $5C
         AND   #$7F
         BNE   L120A75
         PLP
         RTS

L120A75  LDA   ($6C)
         AND   #$7F
         STA   $5C
         CMP   #$10
         BEQ   L120A56
         LDY   #$0004
         LDA   ($70),Y
         SEC
         SBC   #$04
         STA   $5C
         CMP   $69
         BCS   L120A56
         LDA   $5C
         CLC
         ADC   #$07
         STA   $5C
         CMP   $68
         BCC   L120A56
         LDY   #$0008
         LDA   ($70),Y
         SEC
         SBC   #$04
         STA   $5C
         CMP   $61
         BCS   L120A56
         LDA   $5C
         CLC
         ADC   #$07
         STA   $5C
         CMP   $60
         BCC   L120A56
         LDA   L024410
         EOR   #$FF
         INC
         STA   $5C
         BEQ   L120AC4
         LDA   $5C
         STA   $64
         CMP   L023CB0
         BCS   L120AF0
L120AC4  LDY   #$0007
         LDA   ($6C),Y
         STA   $64
         LDA   #$00
         STA   ($6C),Y
         LDA   ($70)
         STA   $65
         AND   #$7F
         SEC
         SBC   $64
         STA   $5C
         BCS   L120ADE
         STZ   $5C
L120ADE  LDA   $5C
         STA   $64
         LDA   $65
         AND   #$80
         ORA   $64
         STA   $5C
         STA   ($70)
         PLP
         PLX
         PLP
         RTL

L120AF0  LDA   ($70)
         AND   #$80
         STA   $5C
         STA   ($70)
         PLP
         RTS

L120AFA  PHP
         SEP   #$20
         LDA   ($6C)
         AND   #$7F
         STA   $5C
         BNE   L120B07
         PLP
         RTS

L120B07  LDY   #$0008
         LDA   ($6C),Y
         STA   $68
         LDY   #$0010
         LDA   ($6C),Y
         STA   $69
         LDX   #L0244AC
         STX   $70
         LDA   ($70)
         AND   #$7F
         STA   $5C
         BEQ   L120B25
         JSR   L120BAA
L120B25  LDX   $70
         INX
         STX   $70
         LDA   ($70)
         AND   #$7F
         STA   $5C
         BEQ   L120B35
         JSR   L120BAA
L120B35  LDX   $70
         INX
         STX   $70
         LDA   ($70)
         AND   #$7F
         STA   $5C
         BEQ   L120B45
         JSR   L120BAA
L120B45  LDX   $70
         INX
         STX   $70
         LDA   ($70)
         AND   #$7F
         STA   $5C
         BEQ   L120B55
         JSR   L120BAA
L120B55  LDA   L024442
         SEC
         SBC   #$04
         STA   $5C
         CMP   $68
         BCC   L120B63
         PLP
         RTS

L120B63  LDA   $5C
         CLC
         ADC   #$07
         STA   $5C
         CMP   $68
         BCS   L120B70
         PLP
         RTS

L120B70  LDA   L024443
         STA   $5C
         CMP   $69
         BCS   L120B7B
         PLP
         RTS

L120B7B  LDA   $5C
         SEC
         SBC   #$07
         STA   $5C
         CMP   $69
         BCC   L120B88
         PLP
         RTS

L120B88  LDA   L023CAF
         ORA   #$02
         STA   L023CAF
         LDA   ($6C)
         AND   #$80
         STA   ($6C)
         LDA   L024442
         STA   $68
         LDA   L024443
         STA   $69
         JSL   L0F0384
         JSL   L290F5E
         PLP
         RTS

L120BAA  LDY   #$0004
         LDA   ($70),Y
         SEC
         SBC   #$04
         STA   $5C
         CMP   $68
         BCC   L120BB9
         RTS

L120BB9  LDA   $5C
         CLC
         ADC   #$07
         STA   $5C
         CMP   $68
         BCS   L120BC5
         RTS

L120BC5  LDY   #$0008
         LDA   ($70),Y
         SEC
         SBC   #$04
         STA   $5C
         CMP   $69
         BCC   L120BD4
         RTS

L120BD4  LDA   $5C
         CLC
         ADC   #$07
         STA   $5C
         CMP   $69
         BCS   L120BE0
         RTS

L120BE0  PLX
         STX   $68
         LDA   ($6C)
         AND   #$80
         STA   ($6C)
         LDA   L024442
         STA   $68
         LDA   L024443
         STA   $69
         JSL   L0F0384
         JSL   L290F5E
         PLP
         RTS

L120BFD  ENT
         LDA   #$07
         STA   L024323
         LDA   L025E3C
         DEC
         STA   L025E38
         JSL   L180F41
         STZ   L024323
         RTL

L120C11  ENT
         REP   #$20
         LDA   #$0003
         JSL   L0729D4
         STZ   L024426
         JSL   L120FAD
         RTL

L120C22  REP   #$20
         JSL   L1803A2
         LDA   #$0002
         STA   L024444
         STZ   L02436E
         JSL   L201268
         JSL   L0F01AC
         LDX   #$0032
         STX   L023C89
         JSL   L120000
         JSL   L01025D
         JSL   L0F01AC
         JSL   L121626
         JSL   L0F01AC
         LDX   #$02BC
         STX   L023C89
         JSL   L120000
         SEP   #$20
         LDA   L023E04
         CMP   #$01
         BNE   L120C69
         JMP   L120C83

L120C69  STZ   L0242F9
         LDA   L0257F0
         ORA   L023E06
         CMP   #$01
         BNE   L120C7B
         LDA   #$01
         STA   L0242F9
L120C7B  REP   #$20
         LDA   #$0001
         STA   L023E0C
L120C83  REP   #$20
         JSL   L290C4C
         JSL   L0F01AC
         LDA   #$0001
         STA   L023E10
         RTL

L120C94  REP   #$20
         STZ   L02430D
         LDA   L023DB3
         BEQ   L120CA2
         JSL   L201410
L120CA2  JSL   L1803A2
         LDA   L023DB3
         BEQ   L120CAF
         JSL   L200D5F
L120CAF  LDA   L023E06
         BEQ   L120CB7
         JMP   L120CB7

L120CB7  REP   #$20
         LDA   #L024D58
         STA   $70
         LDA   #L024D78
         STA   $74
         JSL   L072347
         JSL   L290F8A
         SEP   #$20
         LDA   #$14
         STA   $65
L120CD1  LDA   #$13
         SEC
         SBC   $65
         STA   $5C
         REP   #$20
         LDA   $64
         PHA
         LDA   #$0000
         STA   L023D85
         LDA   #L025CA2
         STA   $60
         JSL   L120F34
         PLA
         STA   $64
         LDA   #$0000
         SEP   #$20
         LDA   $65
         AND   #$03
         STA   $5C
         REP   #$20
         ASL
         TAX
         LDA   L0243B8,X
         STA   L023D85
         SEP   #$20
         LDA   #$14
         SEC
         SBC   $65
         STA   $5C
         REP   #$20
         LDA   $64
         PHA
         LDA   #L025CA2
         STA   $60
         JSL   L120F34
         PLA
         STA   $64
         LDA   #$0000
         STA   L023D85
         SEP   #$20
         LDA   #$11
         SEC
         SBC   $65
         STA   $5C
         REP   #$20
         LDA   $64
         PHA
         LDA   #L025D22
         STA   $60
         JSL   L120F34
         PLA
         STA   $64
         LDA   #$0000
         SEP   #$20
         LDA   $65
         AND   #$03
         STA   $5C
         REP   #$20
         ASL
         TAX
         LDA   L0243B8,X
         STA   L023D85
         SEP   #$20
         LDA   #$12
         SEC
         SBC   $65
         STA   $5C
         REP   #$20
         LDA   #L025D22
         STA   $60
         LDA   $64
         PHA
         JSL   L120F34
         PLA
         STA   $64
         LDA   #$0000
         STA   L023D85
         SEP   #$20
         LDA   #$0F
         SEC
         SBC   $65
         STA   $5C
         REP   #$20
         LDA   $64
         PHA
         LDA   #L025CA2
         STA   $60
         JSL   L120F34
         PLA
         STA   $64
         LDA   #$0000
         SEP   #$20
         LDA   $65
         AND   #$03
         STA   $5C
         REP   #$20
         ASL
         TAX
         LDA   L0243B8,X
         STA   L023D85
         SEP   #$20
         LDA   #$10
         SEC
         SBC   $65
         STA   $5C
         REP   #$20
         LDA   $64
         PHA
         LDA   #L025CA2
         STA   $60
         JSL   L120F34
         PLA
         STA   $64
         LDA   #$0000
         STA   L023D85
         SEP   #$20
         LDA   #$0D
         SEC
         SBC   $65
         STA   $5C
         REP   #$20
         LDA   $64
         PHA
         LDA   #L025D22
         STA   $60
         JSL   L120F34
         PLA
         STA   $64
         LDA   #$0000
         SEP   #$20
         LDA   $65
         AND   #$03
         STA   $5C
         REP   #$20
         ASL
         TAX
         LDA   L0243B8,X
         STA   L023D85
         SEP   #$20
         LDA   #$0E
         SEC
         SBC   $65
         STA   $5C
         REP   #$20
         LDA   $64
         PHA
         LDA   #L025D22
         STA   $60
         JSL   L120F34
         PLA
         STA   $64
         LDA   #$0050
         STA   L023C89
         JSL   L120000
         LDA   L023E04
         CMP   #$0001
         BNE   L120E20
         JMP   L120F0C

L120E20  SEP   #$20
         DEC   $65
         BEQ   L120E29
         JMP   L120CD1

L120E29  LDA   L023E06
         STA   $5C
         BNE   L120E48
         LDA   L0242FD
         CMP   #$06
         BNE   L120E3A
         JMP   L120E48

L120E3A  CMP   #$0B
         BNE   L120E41
         JMP   L120E48

L120E41  CMP   #$10
         BNE   L120E48
         JMP   L120E48

L120E48  REP   #$20
         LDA   #$FFFD
         JSL   L0729D4
         LDA   #$0384
         STA   $64
L120E56  LDA   $64
         PHA
         LDA   #$5555
         STA   L023D85
         LDA   #$612E
         STA   $04
         LDA   #L120EA7
         STA   $00
         LDA   #^L120EA7
         STA   $02
         JSL   L1806EB
         JSL   L1200BA
         LDA   L023E04
         CMP   #$0001
         BNE   L120EB1
         PLA
         STA   $64
         LDA   #$0001
         STA   L023E10
         STZ   L023E06
         JSL   L0F00F0
         JSL   L0F01AC
         JSL   L290C4C
         LDA   #$0190
         STA   L023C89
         JSL   L120000
         LDA   #$0001
         STA   L023E04
         RTL

L120EA7  ASC   'GAME OVER'00
L120EB1  REP   #$20
         STZ   L023E04
         LDA   L023E14
         BEQ   L120EC1
         JSL   L0729D3
         BRA   L120ECA
L120EC1  LDA   L023E12
         BEQ   L120ECA
         JSL   L072418
L120ECA  PLA
         STA   $64
         DEC   $64
         BEQ   L120ED4
         JMP   L120E56

L120ED4  LDX   #L024313
         LDY   #L0244BC
         LDA   #$0005
         PHB
         MVN   L024313,L0244BC
         PLB
         JSL   L0F00F0
         JSL   L0F01AC
         JSL   L290C4C
         LDA   #$02BC
         STA   L023C89
         JSL   L120000
         LDA   L023E04
         CMP   #$0001
         BEQ   L120F0C
         LDA   #$0001
         STA   L0242F9
         LDA   #$0001
         STA   L023E0C
L120F0C  LDA   L023E04
         STA   $5C
         LDX   $5C
         PHX
         LDA   #$0001
         STA   L023E10
         STZ   L023E06
         LDX   #$02BC
         STX   L023C89
         JSL   L120000
         JSL   L0F01AC
         PLX
         STX   $5C
         LDA   $5C
         ORA   L023E04
         RTL

L120F34  PHP
         SEP   #$20
         LDA   $5C
         BPL   L120F3D
         LDA   #$00
L120F3D  CMP   #$08
         BCC   L120F43
         PLP
         RTL

L120F43  ASL
         STA   $5C
         STZ   $5D
         REP   #$20
         LDA   $5C
         CLC
         ADC   $60
         STA   $60
         LDA   #$0008
         STA   $64
L120F56  LDA   $64
         PHA
         LDA   ($60)
         STA   $68
         LDA   $60
         CLC
         ADC   #$0010
         STA   $60
         PHA
         LDA   L024442
         STA   $60
         SEP   #$20
         LDA   $68
         CLC
         ADC   $60
         STA   $68
         LDA   $69
         CLC
         ADC   $61
         DEC
         STA   $69
         CMP   #$90
         BCS   L120F9F
         STZ   $61
         LDA   $69
         STA   $60
         LDX   $60
         LDA   L020888,X
         AND   #$FE
         STA   $5C
         REP   #$20
         LDA   #L025A75
         STA   $60
         LDA   #^L025A75
         STA   $62
         JSL   L0F07DA
L120F9F  REP   #$20
         PLA
         STA   $60
         PLA
         STA   $64
         DEC   $64
         BNE   L120F56
         PLP
         RTL

L120FAD  SEP   #$20
         LDX   L0244AA
         STX   $62
         LDX   L0244A8
         STX   $60
         INX
         STX   L0244A8
         LDA   [$60]
         CMP   #$10
         BCC   L12101F
         CMP   #$1A
         BCS   L120FCA
         JMP   L12106C

L120FCA  CMP   #$40
         BNE   L120FD1
         JMP   L1210F1

L120FD1  CMP   #$41
         BNE   L120FD8
         JMP   L121131

L120FD8  CMP   #$42
         BNE   L120FDF
         JMP   L121131

L120FDF  CMP   #$43
         BNE   L120FE6
         JMP   L121192

L120FE6  CMP   #$44
         BNE   L120FED
         JMP   L1211D0

L120FED  CMP   #$45
         BNE   L120FF4
         JMP   L12122A

L120FF4  CMP   #$50
         BNE   L120FFB
         JMP   L121298

L120FFB  CMP   #$51
         BNE   L121002
         JMP   L1212BB

L121002  CMP   #$53
         BNE   L12100E
         LDA   #$01
         STA   L023DB5
         JMP   L120FAD

L12100E  CMP   #$62
         BNE   L121015
         JMP   L1212DD

L121015  CMP   #$FE
         BNE   L12101C
         JMP   L1212E5
L12101C  JMP   L120C94

L12101F  SEP   #$20
         STZ   L024412
         LDX   L0244A6
         LDA   L023DB9,X
         STZ   $5D
         STA   $5C
         BEQ   L121045
         PHA
         JSL   L290C4C
         PLA
         STA   $5C
         LDA   #$FF
         STA   $5D
         JSL   L2909FD
         LDA   #$01
         STA   L0242D5
L121045  STZ   L023DB3
         LDA   #$00
         XBA
         LDA   L0244A6
         INC   L0244A6
         ASL
         TAX
         REP   #$20
         LDAL  L040000,X
         TAX
         LDY   #L030000
         LDA   #$01BF
         PHB
         MVN   L04003D,L030000
         PLB
         JSL   L121324
         JMP   L120FAD

L12106C  SEP   #$20
         STA   L023DAF
         STZ   L023DB3
         LDA   #$00
         XBA
         LDA   L02441E
         TAX
         LDA   L023DCF,X
         BEQ   L121095
         PHA
         JSL   L290C4C
         LDA   #$FF
         STA   $5D
         PLA
         STA   $5C
         JSL   L2909FD
         LDA   #$01
         STA   L0242D5
L121095  REP   #$20
         LDA   L023DAF
         AND   #$00FF
         CMP   #$0010
         BNE   L1210AE
         JSL   L05334E
         LDX   #L1D0000
         STX   $6C
         JMP   L1210DC

L1210AE  CMP   #$0011
         BNE   L1210BF
         JSL   L0537D4
         LDX   #L1D0195
         STX   $6C
         JMP   L1210DC

L1210BF  CMP   #$0012
         BNE   L1210D0
         JSL   L053D6A
         LDX   #L1D032C
         STX   $6C
         JMP   L1210DC

L1210D0  CMP   #$0013
         BNE   L1210DC
         JSL   L05407E
         LDX   #L1D04C3
L1210DC  REP   #$20
         LDY   #L030000
         LDA   #$01A7
         PHB
         MVN   L1D04C3,L030000
         PLB
         SEP   #$20
         INC   L02441E
         JMP   L120FAD

L1210F1  REP   #$20
         JSL   L290C4C
         JSL   L121324
         LDA   #$0000
         JSL   L0729D4
         JSL   L190323
         JSL   L0F0122
         JSL   L190000
         JSL   L0F010E
         LDA   #$0003
         JSL   L0729D4
         LDY   #$001A
         LDX   #$0000
L12111F  LDA   #$FFFF
         STA   L0256D3,X
         TXA
         CLC
         ADC   #$000A
         TAX
         DEY
         BNE   L12111F
         JMP   L120FAD

L121131  REP   #$20
         LDA   #$0000
         STA   L0257F8
         JSL   L290C4C
         LDA   #$0064
         STA   L024420
         JSL   L121324
         JSL   L121324
         LDA   L020055
         CMP   #$0001
         BEQ   L121162
         STZ   $5C
         JSL   L0104FA
         LDA   #$0001
         STA   $5C
         JSL   L0104FA
L121162  STZ   L020055
         STZ   L02430D
         JSL   L1801CA
         JSL   L0711A7
         LDA   #$0000
         JSL   L0729D4
         JSL   L1805C1
         JSL   L070891
         LDA   #$0001
         STA   L0257F8
         LDA   #$0003
         JSL   L0729D4
         STZ   L024303
         JMP   L120FAD

L121192  REP   #$20
         LDA   #$0001
         STA   L0257F8
         LDA   #$0064
         STA   L024420
         JSL   L290C4C
         REP   #$20
         LDA   #$0003
         JSL   L0729D4
         STZ   L024426
         STZ   L024420
         LDA   #$0001
         STA   L023DB3
         REP   #$20
         LDX   #L1D065A
         LDY   #L030000
         LDA   #$01A7
         PHB
         MVN   L1D065A,L030000
         PLB
         JSL   L200F46
         JMP   L120FAD

L1211D0  REP   #$20
         JSL   L290C4C
         LDA   #$FF02
         STA   $5C
         JSL   L2909FD
         LDA   #$0001
         STA   L0242D5
         JMP   L120FAD

         LDA   #$0001
         STA   L0242D5
         LDA   #$181C
         STA   L0243C8
         STZ   L024426
L1211F7  LDA   L023E14
         BEQ   L121202
         JSL   L0729D3
         BRA   L12120B
L121202  LDA   L023E12
         BEQ   L12120B
         JSL   L072418
L12120B  LDA   L023E20
         CMP   #$0001
         BNE   L12121A
         JSL   L070F02
         STZ   L023E20
L12121A  LDA   L0243C8
         BNE   L1211F7
         JSL   L12131D
         JSL   L121324
         JMP   L120FAD

L12122A  REP   #$20
         LDA   #$0001
         STA   L0257F8
         STZ   L020055
         JSL   L290C4C
         STZ   L02430D
         LDA   L023E06
         CMP   #$0000
         BNE   L121292
         STZ   L024426
         LDA   #$002D
         STA   L023DEB
L12124D  REP   #$20
         LDA   L023E14
         BEQ   L12125A
         JSL   L0729D3
         BRA   L121263
L12125A  LDA   L023E12
         BEQ   L121263
         JSL   L072418
L121263  LDA   L023E20
         CMP   #$0001
         BNE   L121275
         JSL   L070F02
         STZ   L023E20
         DEC   L023DEB
L121275  JSL   L1200BA
         LDA   L023E04
         CMP   #$0001
         BEQ   L121292
         LDA   L023DEB
         BNE   L12124D
         JSL   L121324
         JSL   L121324
         JSL   L11000A
L121292  STZ   L023E04
         JMP   L120FAD

L121298  REP   #$20
         LDA   L024492
         XBA
         REP   #$20
         ADC   #L1A0000
         STA   $6C
         TAX
         LDY   #L02547F
         LDA   #$00FF
         PHB
         MVN   L1A0000,L02547F
         PLB
         JSL   L12131D
         INC   L024492
         JMP   L120FAD

L1212BB  SEP   #$20
         LDA   #$00
         XBA
         LDA   L024461
         INC   L024461
         REP   #$20
         ASL
         TAX
         LDAL  L041115,X
         TAX
         LDY   #L025150
         LDA   #$00FF
         PHB
         MVN   L041E56,L025150
         PLB
         JMP   L120FAD

L1212DD  REP   #$20
         STZ   L02449E
         JMP   L120FAD

L1212E5  REP   #$20
         LDA   #$00FF
         STA   L024438
         LDA   #$0002
         STA   L02443C
         LDA   #L025150
         CLC
         ADC   #$0002
         STA   L02443E
         SEP   #$20
         LDA   L025150
         STA   L024434
         LDA   L025151
         STA   L02442A
         STZ   L024428
         STZ   L024429
         STZ   L02449E
         LDA   L023E28
         STA   L024352
         JMP   L1213EB

L12131D  REP   #$20
         JSL   L121324
         RTL

L121324  REP   #$20
         RTL

L121327  SEP   #$20
         LDX   #$00FE
         STX   L024438
         LDA   L024432
         ORA   L023E28
         ORA   L024410
         BEQ   L12133D
         JMP   L121501

L12133D  LDA   #$01
         STA   L02449E
         LDA   L02790E
         CMP   #$01
         BEQ   L121357
         LDA   L023DB5
         CMP   #$01
         BNE   L121357
         STZ   L023DB5
         JSL   L290C1B
L121357  STZ   L02447E
         STZ   L024480
         LDA   L02449C
         ORA   L024414
         ORA   L024418
         ORA   L02447C
         ORA   L02447E
         ORA   L024480
         LDY   #$0010
         LDX   #$0000
L121375  ORA   L025280,X
         INX
         DEY
         BNE   L121375
         LDY   #$0008
         LDX   #$0000
L121382  ORA   L025100,X
         INX
         DEY
         BNE   L121382
         TAX
         BEQ   L12138F
         JMP   L121501

L12138F  REP   #$20
         LDA   L02790E
         BEQ   L1213AE
         LDA   L02792A
         CMP   #$FFFF
         SEP   #$20
         BEQ   L1213A3
         JMP   L121501

L1213A3  SEP   #$20
         STZ   L02790E
         STZ   L0242D5
         STZ   L027AD4
L1213AE  SEP   #$20
         LDA   L023E06
         BEQ   L1213E8
         STZ   L023E04
         JSL   L0F01AC
         JSL   L290C4C
         LDA   #$01
         STA   L023E0C
         LDA   #$01
         STA   L023E10
         STZ   L023E06
         REP   #$20
         LDA   #$02BC
         STA   L023C89
         JSL   L120000
         JSL   L0F01AC
         LDA   #$01F4
         STA   L023C89
         JSL   L120000
         RTL
L1213E8  JMP   L120FAD

L1213EB  REP   #$20
         LDA   L023E14
         BEQ   L1213F8
         JSL   L0729D3
         BRA   L121401
L1213F8  LDA   L023E12
         BEQ   L121401
         JSL   L072418
L121401  LDA   L023E22
         BEQ   L121409
         STZ   L023E22
L121409  LDA   L023E20
         BNE   L121419
         JSL   L1200BA
         JSL   L12021E
         JMP   L1213EB

L121419  STZ   L023E20
         LDA   L024428
         AND   #$000F
         BNE   L12142F
         REP   #$20
         LDA   #$0001
         STA   $04
         JSL   L18071A
L12142F  LDA   L02443C
         BEQ   L121437
         JMP   L121501

L121437  LDA   L024438
         CMP   #$00FE
         BCS   L121442
         JMP   L121501

L121442  BNE   L121447
         JMP   L121327

L121447  REP   #$20
         LDA   L02443E
         STA   $60
         SEP   #$20
         LDA   ($60)
         STA   $5C
         LDX   $60
         INX
         STX   $60
         LDA   ($60)
         STA   $68
         REP   #$20
         INC   $60
         LDA   $60
         STA   L02443E
         SEP   #$20
         LDA   $5C
         CMP   #$FC
         BEQ   L1214B2
         CMP   #$FD
         BEQ   L1214BD
         CMP   #$FE
         BEQ   L1214EC
         BCC   L12147B
         JMP   L1214F6

L12147B  LDA   L023E28
         CMP   #$FD
         BEQ   L121495
         LDA   $5C
         BEQ   L121495
         LDA   $5C
         STA   L02443A
         LDA   $68
         STA   L024438
         REP   #$20
         JMP   L121501

L121495  SEP   #$20
         LDA   $5C
         STA   L02443A
         LDA   $68
         STA   L024438
         LDA   ($60)
         STA   L024430
         REP   #$20
         INC   $60
         LDA   $60
         STA   L02443E
         JMP   L121501

L1214B2  REP   #$20
         LDA   #$0064
         STA   L024420
         JMP   L121501

L1214BD  SEP   #$20
         LDA   ($60)
         STA   $69
         REP   #$20
         LDA   L024428
         SEC
         SBC   $68
         STA   $60
         PHP
         LDA   L02443E
         STA   $60
         PLP
         BCC   L1214E0
         INC   $60
         LDA   $60
         STA   L02443E
         JMP   L1213EB

L1214E0  DEC   $60
         DEC   $60
         LDA   $60
         STA   L02443E
         JMP   L121501

L1214EC  SEP   #$20
         LDA   $68
         STA   L02443C
         JMP   L121501

L1214F6  REP   #$20
         LDA   #$00FE
         STA   L024438
         JMP   L121501

L121501  REP   #$20
         LDA   L023E14
         BEQ   L12150E
         JSL   L0729D3
         BRA   L121517
L12150E  LDA   L023E12
         BEQ   L121517
         JSL   L072418
L121517  JSL   L070F02
         LDA   L02436C
         CMP   #$0001
         BNE   L121526
         JMP   L120C94

L121526  JSL   L0F1815
         JSL   L1200BA
         LDA   L023E06
         BEQ   L121545
         LDA   L023E04
         CMP   #$0001
         BNE   L121545
         LDA   #$0001
         STA   L023E10
         STZ   L023E06
         RTL

L121545  REP   #$20
         LDA   L024546
         CMP   #$0001
         BNE   L121550
         RTL

L121550  STZ   L024410
         LDX   #L024E00
         STX   $44
         LDY   #$0008
         LDX   #$0000
L12155E  SEP   #$20
         LDA   ($44)
         STA   L024D48,X
         REP   #$20
         INX
         LDA   $44
         CLC
         ADC   #$0060
         STA   $44
         DEY
         BNE   L12155E
         JSL   L030EF5
         LDA   L024444
         BEQ   L12157F
         JMP   L120C22

L12157F  LDA   #L024E00
         STA   $44
         LDY   #$0008
         LDX   #$0000
L12158A  SEP   #$20
         LDA   L024D48,X
         AND   #$80
         BEQ   L12159E
         LDA   ($44)
         BIT   #$80
         BEQ   L12159E
         LDA   #$A8
         JMP   L1215A0

L12159E  LDA   #$00
L1215A0  STA   L024D48,X
         REP   #$20
         INX
         LDA   $44
         CLC
         ADC   #$0060
         STA   $44
         DEY
         BNE   L12158A
         REP   #$20
         LDA   L023E28
         CMP   #$00FF
         BEQ   L1215CA
         CMP   #$00FE
         BEQ   L1215D0
         TAX
         BEQ   L1215C7
         JSL   L190666
L1215C7  JMP   L1215D0

L1215CA  LDA   #$00FF
         STA   L0243C8
L1215D0  REP   #$20
         LDA   L023E28
         CMP   #$00FF
         BEQ   L1215E8
         LDA   L0243C8
         CMP   #$00FF
         BNE   L1215E8
         LDX   #$1801
         STX   L0243C8
L1215E8  REP   #$20
         JSL   L031160
         JSL   L12034E
         LDA   L024484
         CMP   #$0007
         BCC   L1215FD
         JMP   L120C94

L1215FD  JSL   L180AAC
         JSL   L0F030E
         JSL   L180224
         JSL   L1802F7
         JSL   L180414
         JSL   L180F41
         INC   L024428
         REP   #$20
         LDA   L023E24
         EOR   L024494
         STA   L024494
         JMP   L1213EB

L121626  PHP
         REP   #$20
         LDA   #$FFFF
         STA   L023D85
         LDA   #$521E
         STA   $04
         LDA   #L160000
         STA   $00
         LDA   #^L160000
         STA   $02
         JSL   L1806EB
         LDA   #$585E
         STA   $04
         LDA   #L160019
         STA   $00
         LDA   #^L160019
         STA   $02
         JSL   L1806EB
         LDA   #$5E9E
         STA   $04
         LDA   #L160031
         STA   $00
         LDA   #^L160031
         STA   $02
         JSL   L1806EB
         LDA   #$64DE
         STA   $04
         LDA   #L160048
         STA   $00
         LDA   #^L160048
         STA   $02
         JSL   L1806EB
         LDX   #$2328
         STX   L023C89
         JSL   L120000
         JSL   L0F01AC
         LDX   #$07D0
         STX   L023C89
         JSL   L120000
         LDA   #$587A
         STA   $04
         LDA   #L160062
         STA   $00
         LDA   #^L160062
         STA   $02
         JSL   L1806EB
         LDX   #$1B58
         STX   L023C89
         JSL   L120000
         PLP
         RTL

L1216B2  ENT
         PHP
         SEP   #$20
         LDA   ($6C)
         BIT   #$80
         BEQ   L1216C4
         LDA   #$00
         STA   L023FEC
         JSL   L1218F3
L1216C4  LDA   L02436E
         BEQ   L1216CC
         JMP   L121891

L1216CC  LDY   #$0030
         LDA   ($6C),Y
         CMP   #$10
         BCS   L1216DB
         LDA   #$00
         STA   ($6C)
         PLP
         RTL

L1216DB  LDY   #$0050
         STA   ($6C),Y
         SEC
         SBC   #$20
         BCC   L1216E8
         JMP   L1216EA

L1216E8  LDA   #$00
L1216EA  LDY   #$0030
         STA   ($6C),Y
         STA   L02580E
         LDA   L023E28
         CMP   #$FD
         BNE   L121754
         LDY   #$0020
         LDA   ($6C),Y
         LSR
         LSR
         LSR
         STA   $68
         REP   #$20
         AND   #$0007
         TAX
         SEP   #$20
         LDA   L0257D7,X
         STA   $64
         LDA   $68
         LSR
         LSR
         LSR
         STA   $68
         LDY   #$0050
         LDA   ($6C),Y
         STA   $69
         SEC
         SBC   #$10
         ASL
         CLC
         ADC   $68
         REP   #$20
         AND   #$00FF
         TAX
         SEP   #$20
         LDA   #$20
         STA   $65
L121731  LDA   L02537F,X
         AND   $64
         BNE   L121748
         DEX
         DEX
         DEC   $69
         TXA
         CMP   #$00
         BEQ   L121754
         DEC   $65
         BNE   L121731
         JMP   L121754

L121748  LDA   $69
         STA   L02580E
         LDY   #$0030
         LDA   #$00
         STA   ($6C),Y
L121754  LDY   #$0050
         LDA   ($6C),Y
         STA   $68
L12175B  LDA   L02580E
         STA   $69
         REP   #$20
         STZ   $64
         LDA   #L024E00
         STA   $70
         JSL   L121893
         LDA   $70
         CLC
         ADC   #$0060
         STA   $70
         JSL   L121893
         LDA   $70
         CLC
         ADC   #$0060
         STA   $70
         JSL   L121893
         LDA   $70
         CLC
         ADC   #$0060
         STA   $70
         JSL   L121893
         LDA   $70
         CLC
         ADC   #$0060
         STA   $70
         JSL   L121893
         LDA   $70
         CLC
         ADC   #$0060
         STA   $70
         JSL   L121893
         LDA   $70
         CLC
         ADC   #$0060
         STA   $70
         JSL   L121893
         LDA   $70
         CLC
         ADC   #$0060
         STA   $70
         JSL   L121893
         LDA   $64
         BNE   L1217C8
         JMP   L121873

L1217C8  STA   $70
         SEP   #$20
         LDA   ($70)
         AND   #$7F
         CMP   #$13
         BEQ   L1217F2
         LDY   #$0060
         LDA   ($6C),Y
         LDY   #$0007
         SEC
         SBC   ($70),Y
         BCC   L12183A
         BEQ   L12183A
         LDY   #$0060
         STA   ($6C),Y
         LDY   #$0007
         LDA   #$00
         STA   ($70),Y
         JMP   L12175B

L1217F2  LDY   #$000A
         LDA   ($70),Y
         STA   $69
         LDY   #$0020
         LDA   ($6C),Y
         STA   $68
         LDA   $69
         PHA
         LDA   $68
         PHA
         LDA   #$03
         JSL   L180A3A
         PLA
         STA   $68
         PLA
         STA   $69
         PHA
         LDA   $68
         PHA
         JSL   L0F0384
         JSL   L290F5E
         PLA
         STA   $68
         PLA
         STA   $69
         LDY   #$0030
         LDA   #$00
         STA   ($6C),Y
         LDA   L024480
         CMP   #$02
         BCS   L121873
         LDA   #$02
         STA   L024480
         JMP   L121873

L12183A  LDY   #$0007
         LDA   ($70),Y
         SEC
         LDY   #$0060
         SBC   ($6C),Y
         LDY   #$0007
         STA   ($70),Y
         LDY   #$0030
         LDA   #$00
         STA   ($6C),Y
         LDY   #$000A
         LDA   ($70),Y
         STA   $69
         LDA   $69
         PHA
         LDA   $68
         PHA
         LDY   #$0020
         LDA   ($6C),Y
         STA   $68
         JSL   L0F0384
         JSL   L290F5E
         PLA
         STA   $68
         PLA
         STA   $69
L121873  SEP   #$20
         LDA   $69
         CMP   #$11
         BCS   L12187D
         LDA   #$10
L12187D  LDY   #$0040
         STA   ($6C),Y
         LDA   ($6C)
         ORA   #$80
         STA   ($6C)
         LDA   #$05
         STA   L023FEC
         JSL   L1218F3
L121891  PLP
         RTL

L121893  PHP
         SEP   #$20
         LDA   ($70)
         AND   #$7F
         CMP   #$11
         BCS   L1218A0
         PLP
         RTL

L1218A0  LDY   #$000C
         LDA   ($70),Y
         BEQ   L1218A9
         PLP
         RTL

L1218A9  LDY   #$0007
         LDA   ($70),Y
         BNE   L1218B2
         PLP
         RTL

L1218B2  LDY   #$000A
         LDA   ($70),Y
         CMP   #$10
         BCS   L1218BD
         PLP
         RTL

L1218BD  CMP   $69
         BCS   L1218C3
         PLP
         RTL

L1218C3  CMP   $68
         BCC   L1218C9
         PLP
         RTL

L1218C9  LDY   #$0020
         LDA   ($6C),Y
         INC
         LDY   #$0008
         CMP   ($70),Y
         BCS   L1218D8
         PLP
         RTL

L1218D8  SEC
         SBC   #$02
         LDY   #$0009
         CMP   ($70),Y
         BCC   L1218E4
         PLP
         RTL

L1218E4  LDY   #$000A
         LDA   ($70),Y
         STA   $69
         REP   #$20
         LDA   $70
         STA   $64
         PLP
         RTL

L1218F3  PHP
         SEP   #$20
         LDA   $61
         STA   L025811
         LDA   $60
         STA   L025810
         LDY   #$0040
         LDA   ($6C),Y
         STA   $69
         STA   $61
         LDY   #$0020
         LDA   ($6C),Y
         STA   $68
         STZ   $60
         REP   #$20
         LDA   $60
         LSR
         LSR
         CLC
         ADC   #L020B08
         STA   $60
         PHA
         SEP   #$20
         STZ   $65
         LDA   $68
         BIT   #$40
         BNE   L12193F
         LDA   $68
         STA   $64
         REP   #$20
         CLC
         LDA   $60
         ADC   $64
         STA   $60
         SEP   #$20
         LDA   ($60)
         STA   $5C
         JMP   L121961

L12193F  LDA   $68
         AND   #$3F
         STA   $64
         LDA   ($60)
         EOR   #$FF
         INC
         STA   $5C
         REP   #$20
         LDA   $60
         CLC
         ADC   $64
         STA   $60
         SEP   #$20
         LDA   $5C
         CLC
         ADC   ($60)
         CLC
         ADC   #$80
         STA   $5C
L121961  LDA   #$00
         XBA
         LDA   $69
         TAX
         LDA   L0206A8,X
         XBA
         LDA   $5C
         REP   #$20
         STA   L023FEE
         SEP   #$20
         INC   $68
         PLA
         STA   $60
         PLA
         STA   $61
         LDA   $68
         BIT   #$40
         BNE   L121998
         LDA   $68
         STA   $64
         REP   #$20
         LDA   $60
         CLC
         ADC   $64
         STA   $60
         SEP   #$20
         LDA   ($60)
         STA   $5C
         JMP   L1219BA

L121998  LDA   $68
         AND   #$3F
         STA   $64
         LDA   ($60)
         EOR   #$FF
         INC
         STA   $5C
         REP   #$20
         LDA   $60
         CLC
         ADC   $64
         STA   $60
         SEP   #$20
         LDA   $5C
         CLC
         ADC   ($60)
         CLC
         ADC   #$80
         STA   $5C
L1219BA  LDA   #$00
         XBA
         LDA   $69
         TAX
         LDA   L0206A8,X
         STA   L024DB9
         LDA   $5C
         STA   L024DB8
         LDY   #$0050
         LDA   ($6C),Y
         STA   $69
         STA   $61
         STZ   $60
         REP   #$20
         LDA   $60
         LSR
         LSR
         CLC
         ADC   #L020B08
         STA   $60
         SEP   #$20
         STZ   $65
         LDA   $61
         PHA
         LDA   $60
         PHA
         LDA   $68
         BIT   #$40
         BNE   L121A08
         LDA   $68
         STA   $64
         REP   #$20
         LDA   $60
         CLC
         ADC   $64
         STA   $60
         SEP   #$20
         LDA   ($60)
         STA   $5C
         JMP   L121A2A

L121A08  LDA   $68
         AND   #$3F
         STA   $64
         LDA   ($60)
         EOR   #$FF
         INC
         STA   $5C
         REP   #$20
         LDA   $60
         CLC
         ADC   $64
         STA   $60
         SEP   #$20
         LDA   $5C
         CLC
         ADC   ($60)
         CLC
         ADC   #$80
         STA   $5C
L121A2A  LDA   #$00
         XBA
         LDA   $69
         TAX
         LDA   L0206A8,X
         STA   L024DBB
         LDA   $5C
         STA   L024DBA
         DEC   $68
         PLA
         STA   $60
         PLA
         STA   $61
         LDA   $68
         BIT   #$40
         BNE   L121A5F
         LDA   $68
         STA   $64
         REP   #$20
         LDA   $60
         CLC
         ADC   $64
         STA   $60
         SEP   #$20
         LDA   ($60)
         STA   $5C
         JMP   L121A81

L121A5F  LDA   $68
         AND   #$3F
         STA   $64
         LDA   ($60)
         EOR   #$FF
         INC
         STA   $5C
         REP   #$20
         LDA   $60
         CLC
         ADC   $64
         STA   $60
         SEP   #$20
         LDA   $5C
         CLC
         ADC   ($60)
         CLC
         ADC   #$80
         STA   $5C
L121A81  LDA   #$00
         XBA
         LDA   $69
         TAX
         PHX
         LDA   L0206A8,X
         STA   L023FF1
         LDA   $5C
         STA   L023FF0
         REP   #$20
         LDA   L025810
         STA   $60
         LDA   $6C
         PHA
         JSL   L0F2148
         LDA   L024DB8
         STA   L023FEE
         LDA   L024DBA
         STA   L023FF0
         LDA   L025810
         STA   $60
         JSL   L0F2148
         PLA
         STA   $6C
         PLA
         STA   $60
         PLP
         RTL

