*
* Magical Myths
*
* (c) 1988, Unicorn Software
* (s) 2021, Antoine Vignau
*

	mx	%00
	rel
	dsk	MAGICAL.HDD
	lst	off

*-------------------------------

GSOS	=	$e100a8

	use	4/Ctl.Macs
	use	4/Dialog.Macs
	use	4/Event.Macs
	use	4/Font.Macs
	use	4/Int.Macs
	use	4/Line.Macs
	use	4/Locator.Macs
	use	4/Mem.Macs
	use	4/Menu.Macs
	use	4/Misc.Macs
	use	4/QD.Macs
	use	4/QDAux.Macs
	use	4/SANE.Macs
	use	4/Sound.Macs
	use	4/Std.Macs
	use	4/Text.Macs
	use	4/Util.Macs
	use	4/Window.Macs
	
*-------------------------------

         PHA
         SEP   #$20
         LDA   #^L0150
         PHA
         PLB
         REP   #$20
         PLA
         STA   L013E
         STX   L0154+2
         STY   L0154
         TSX
         STX   L0150
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F4
         TCS
         PHA
         _MMStartUp
         STAL  L013C
         PLA
         PHX
         PHA
         PEA   $0000
         PEA   $0100
         LDA   L013E
         PHA
         PEA   $C011
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L013C
         PLA
         PLX
         STX   L0158+2
         STA   L0158
         STX   $F8
         ORA   $F8
         BNE   L0071
         PEA   ^L015C
         PEA   L015C
         _WriteCString
         STAL  L013C
         BRL   L0130
L0071    LDX   L0158+2
         LDA   L0158
         STA   $F8
         STX   $FA
         LDY   #$0002
         LDA   [$F8],Y
         TAX
         LDA   [$F8]
         STA   $F6
         PEI   $F6
         _SANEStartUp
         LDX   L0154+2
         LDA   L0154
         PHX
         PHA
         JSL   LA9A8
         PLY
         PLY
         PEA   $0000
         LDA   LC0B6
         PHA
         JSL   LB83C
         PLY
         PLY
         PEA   ^L017C
         PEA   L017C
         JSL   LB5B8
         PLY
         PLY
         TAY
         BNE   L00D3
         LDX   L0142+2
         LDA   L0142
         PHX
         PHA
         LDA   L0140
         PHA
         JSL   L018A
         PLY
         PLY
         PLY
         PEA   $0000
         JSL   LB9E5
         PLY
L00D3    LDA   L013E
         ORA   #$0F00
         PHA
         _DisposeAll
         STAL  L013C
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   L014C+2
         LDA   L014C
         JSL   LBD97
         BEQ   L0107
         LDX   L014C+2
         LDA   L014C
         PHX
         PHA
         JSL   LB0E1
         PLY
         PLY
L0107    LDX   L014C+2
         LDA   L014C
         PHA
         TXA
         STAL  L0186
         PLA
         STAL  L0184
         LDA   L013A
         STAL  L0188
         LDA   L014A
         PHA
         PEA   ^L0184
         PEA   L0184
         JSL   LC09D
         PLY
         PLY
         PLY
L0130    TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

L013A    DW    $0000
L013C    DW    $0000
L013E    DW    $0000
L0140    DW    $0000
L0142    ADRL  $00000000
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L014A    DB    $00
         DB    $00
L014C    ADRL  $00000000
L0150    DW    $0000
         DW    $0000
L0154    ADRL  $00000000
L0158    ADRL  $00000000
L015C    ASC   'Can'27't allocate SANE direct page'00
L017C    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0184    DB    $00
         DB    $00
L0186    DB    $00
         DB    $00
L0188    DB    $00
         DB    $00
L018A    PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F6
         TCS
         JSL   L0906
         JSL   L06FD
         TDC
         CLC
         ADC   #$00FB
         TCS
         PLD
         RTL

L01A5    PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EC
         TCS
         PHX
         PHA
         PEI   $FD
         PEI   $FB
         LDA   L0803
         PHA
         PEI   $FF
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L013C
         PLA
         PLX
         STX   $F0
         STA   $EE
         TAY
         TDC
         CLC
         ADC   #$00F5
         TCS
         TYA
         PLD
         RTL

L01DD    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDY   #$0004
         LDA   [$FD],Y
         ORA   #$8000
         LDY   #$0004
         STA   [$FD],Y
         LDY   #$0002
         LDA   [$FD],Y
         TAX
         LDA   [$FD]
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

L0207    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDY   #$0004
         LDA   [$FD],Y
         AND   #$7FFF
         LDY   #$0004
         STA   [$FD],Y
         TDC
         CLC
         ADC   #$00F7
         TCS
         PLD
         RTL

L0227    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EA
         TCS
         PEA   ^L082D
         PEA   L082D
         PEI   $FF
         PEI   $FD
         JSL   LA7D0
         PLY
         PLY
         PLY
         PLY
         STX   $F2
         STA   $F0
         STX   $F4
         ORA   $F4
         BEQ   L029A
         PEA   $0002
         PEA   $0000
         PEA   $0000
         PEI   $F2
         PEI   $F0
         JSL   LA441
         PLY
         PLY
         PLY
         PLY
         PLY
         PEI   $F2
         PEI   $F0
         JSL   LA6DB
         PLY
         PLY
         STX   $EE
         STA   $EC
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEI   $F2
         PEI   $F0
         JSL   LA441
         PLY
         PLY
         PLY
         PLY
         PLY
         PEI   $F2
         PEI   $F0
         JSL   LB296
         PLY
         PLY
         LDX   $EE
         LDA   $EC
         BRA   L02A0
         BRA   L02A0
L029A    LDX   #$0000
         LDA   #$0000
L02A0    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

L02AA    PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00CE
         TCS
         PEI   $F7
         PEI   $F5
         JSL   L0227
         PLY
         PLY
         STX   $E6
         STA   $E4
         PEA   ^L082F
         PEA   L082F
         PEI   $F7
         PEI   $F5
         JSL   LA7D0
         PLY
         PLY
         PLY
         PLY
         STX   $D2
         STA   $D0
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $D2
         LDA   $D0
         JSL   LBD97
         BNE   L02F1
         LDA   #$0000
         BRL   L046A
L02F1    PEI   $D2
         PEI   $D0
         PEA   $0001
         PEA   $0004
         PEA   $0000
         TDC
         CLC
         ADC   #$00E0
         PHA
         JSL   LA2C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEI   $D2
         PEI   $D0
         PEA   $0001
         PEA   $0002
         PEA   $0000
         TDC
         CLC
         ADC   #$00EA
         PHA
         JSL   LA2C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         LDX   $E6
         LDA   $E4
         PHX
         PHA
         LDX   $E2
         LDA   $E0
         CLC
         ADC   #$0004
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         CLC
         ADC   #$0002
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         JSL   LBD97
         BEQ   L0365
         PEI   $D2
         PEI   $D0
         JSL   LB296
         PLY
         PLY
         LDA   #$0000
         BRL   L046A
L0365    PEA   $0000
         PEI   $E2
         PEI   $E0
         JSL   L01A5
         PLY
         PLY
         PLY
         STX   $DA
         STA   $D8
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $DA
         LDA   $D8
         JSL   LBD97
         BNE   L038F
         LDA   #$0000
         BRL   L046A
L038F    LDA   $EA
         CMP   #$0064
         BCS   L03A4
         LDA   $EA
         PHA
         LDA   #$03E8
         CLC
         JSL   LB5E0
         PLA
         STA   $EA
L03A4    PEI   $DA
         PEI   $D8
         JSL   L01DD
         PLY
         PLY
         STX   $D6
         STA   $D4
         LDX   $E2
         LDA   $E0
         STX   $DE
         STA   $DC
L03BA    SEC
         LDA   $DC
         SBC   #$7530
         BNE   L03C9
         LDA   $DE
         SBC   #$0000
         BRA   L03D0
L03C9    LDA   $DE
         SBC   #$0000
         REP   #$02
L03D0    BEQ   L041C
         BCC   L041C
         PEI   $D2
         PEI   $D0
         PEA   $7530
         PEA   $0001
         PEI   $D6
         PEI   $D4
         JSL   LA2C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         STA   $E8
         LDA   $E8
         LDX   #$0000
         PHX
         PHA
         LDX   $D6
         LDA   $D4
         JSL   LB28B
         PLA
         PLX
         STX   $D6
         STA   $D4
         LDA   $E8
         LDX   #$0000
         PHX
         PHA
         LDX   $DE
         LDA   $DC
         JSL   LB5D5
         PLA
         PLX
         STX   $DE
         STA   $DC
         BRA   L03BA
L041C    PEI   $D2
         PEI   $D0
         LDX   $DE
         LDA   $DC
         PHA
         PEA   $0001
         PEI   $D6
         PEI   $D4
         JSL   LA2C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEI   $D2
         PEI   $D0
         JSL   LB296
         PLY
         PLY
         PEI   $DA
         PEI   $D8
         JSL   L0207
         PLY
         PLY
         LDX   $DA
         LDA   $D8
         LDY   #$0002
         PHA
         TXA
         STA   [$F9],Y
         PLA
         STA   [$F9]
         LDX   $E2
         LDA   $E0
         LDY   #$0002
         PHA
         TXA
         STA   [$FD],Y
         PLA
         STA   [$FD]
         LDA   $EA
L046A    TAY
         TDC
         CLC
         ADC   #$00EF
         TCS
         TYA
         PLD
         RTL

L0474    PHD
         TSC
         SEC
         SBC   #$00ED
         TCD
         ADC   #$00D6
         TCS
         LDA   #L0831
         LDX   #^L0831
         STX   $DA
         STA   $D8
         LDX   #$0000
         LDA   #$0020
         PHX
         PHA
         LDA   $FF
         LDX   #$0000
         SEC
         JSL   LB625
         LDX   #$0000
         LDA   #$066D
         SEC
         JSL   LB4DF
         PLY
         PLY
         LDY   #$0006
         STA   [$D8],Y
         LDX   $F5
         LDA   $F3
         LDY   #$0002
         PHA
         TXA
         STA   [$D8],Y
         PLA
         STA   [$D8]
         LDA   $FD
         AND   #$00FF
         SEP   #$20
         LDY   #$0010
         STA   [$D8],Y
         REP   #$20
         LDX   $F9
         LDA   $F7
         PHX
         PHA
         LDX   #$0000
         LDA   #$0100
         CLC
         JSL   LB4DF
         PLY
         PLY
         LDY   #$0004
         STA   [$D8],Y
         LDA   $FB
         BEQ   L04F8
         LDX   $DA
         LDA   $D8
         LDY   #$000E
         PHA
         TXA
         STA   [$D8],Y
         PLA
         LDY   #$000C
         STA   [$D8],Y
         BRA   L050B
L04F8    LDX   #$0000
         LDA   #$0000
         LDY   #$000E
         PHA
         TXA
         STA   [$D8],Y
         PLA
         LDY   #$000C
         STA   [$D8],Y
L050B    LDY   #$0004
         LDA   [$D8],Y
         CMP   #$0000
         BEQ   L0518
         BRL   L05FA
L0518    LDX   $F9
         LDA   $F7
         STA   $E4
         PEA   $0000
         PEA   $0000
         PEA   $0100
         JSL   L01A5
         PLY
         PLY
         PLY
         STX   L0801
         STA   L07FF
         STX   $EA
         ORA   $EA
         BNE   L053D
         BRL   L05F4
L053D    LDX   L0801
         LDA   L07FF
         PHX
         PHA
         JSL   L01DD
         PLY
         PLY
         STX   $E2
         STA   $E0
         LDA   #$0100
         STA   $E6
L0554    LDA   $E6
         SEC
         SBC   $E4
         BEQ   L05B2
         BVS   L0560
         EOR   #$8000
L0560    BPL   L05B2
         LDY   #$0002
         LDA   [$D8],Y
         TAX
         LDA   [$D8]
         STX   $DE
         STA   $DC
         STZ   $E8
         BRA   L059D
L0572    LDX   $DE
         LDA   $DC
         INC   $DC
         BNE   L057C
         INC   $DE
L057C    STA   $EA
         STX   $EC
         LDA   [$EA]
         AND   #$00FF
         PHA
         LDX   $E2
         LDA   $E0
         INC   $E0
         BNE   L0590
         INC   $E2
L0590    STA   $EA
         STX   $EC
         PLA
         SEP   #$20
         STA   [$EA]
         REP   #$20
         INC   $E8
L059D    LDA   $E8
         SEC
         SBC   $E4
         BVS   L05A7
         EOR   #$8000
L05A7    BPL   L0572
         LDA   $E6
         SEC
         SBC   $E4
         STA   $E6
         BRA   L0554
L05B2    LDA   $E6
         DEC   $E6
         TAY
         BEQ   L05D2
         LDX   $E2
         LDA   $E0
         INC   $E0
         BNE   L05C3
         INC   $E2
L05C3    STA   $EA
         STX   $EC
         LDA   #$0000
         SEP   #$20
         STA   [$EA]
         REP   #$20
         BRA   L05B2
L05D2    LDX   L0801
         LDA   L07FF
         PHX
         PHA
         JSL   L01DD
         PLY
         PLY
         LDY   #$0002
         PHA
         TXA
         STA   [$D8],Y
         PLA
         STA   [$D8]
         LDA   #$0001
         LDY   #$0004
         STA   [$D8],Y
         BRA   L05FA
L05F4    LDA   #$0000
         BRL   L067A
L05FA    LDA   #$0000
         LDY   #$0008
         STA   [$D8],Y
         LDAL  L080F
         LDY   #$000A
         STA   [$D8],Y
         PEA   $0001
         PEI   $DA
         PEI   $D8
         _FFStartSound
         STAL  L013C
         LDA   $FB
         BEQ   L0624
         BRL   L067A
L0624    PHA
         PEA   $0000
         _FFSoundDoneStatus
         STAL  L013C
         PLA
         TAY
         BNE   L0639
         BRA   L0624
L0639    PEA   $0001
         _FFStopSound
         STAL  L013C
         LDX   L0801
         LDA   L07FF
         STX   $EA
         ORA   $EA
         BEQ   L067A
         LDX   L0801
         LDA   L07FF
         PHX
         PHA
         JSL   L0207
         PLY
         PLY
         LDX   L0801
         LDA   L07FF
         PHX
         PHA
         _DisposeHandle
         STAL  L013C
         STZ   L07FF
         STZ   L0801
L067A    TAY
         TDC
         CLC
         ADC   #$00ED
         TCS
         TYA
         PLD
         RTL

L0684    PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F6
         TCS
         PEA   $0001
         _FFStopSound
         STAL  L013C
         LDX   L0801
         LDA   L07FF
         STX   $F8
         ORA   $F8
         BEQ   L06D0
         LDX   L0801
         LDA   L07FF
         PHX
         PHA
         JSL   L0207
         PLY
         PLY
         LDX   L0801
         LDA   L07FF
         PHX
         PHA
         _DisposeHandle
         STAL  L013C
         STZ   L07FF
         STZ   L0801
L06D0    _SoundShutDown
         STAL  L013C
         LDX   L07FD
         LDA   L07FB
         PHX
         PHA
         JSL   L01DD
         PLY
         PLY
         PHA
         _SoundStartUp
         STAL  L013C
         TDC
         CLC
         ADC   #$00FB
         TCS
         PLD
         RTL

L06FD    PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F6
         TCS
         JSL   GSOS
         DW    $0029      ; Quit
         ADRL  L0805
         BRK   $F0
         TDC
         CLC
         ADC   #$00FB
         TCS
         PLD
         RTL

L071C    PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00EA
         TCS
         PEI   $F7
         PEI   $F5
         JSL   L01DD
         PLY
         PLY
         PEI   $FF
         PEA   $00FF
         PEI   $FD
         PEI   $FB
         PEI   $F9
         LDY   #$0002
         LDA   [$F5],Y
         TAX
         LDA   [$F5]
         PHX
         PHA
         JSL   L0474
         TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
         PEI   $F7
         PEI   $F5
         JSL   L0207
         PLY
         PLY
         TDC
         CLC
         ADC   #$00EF
         TCS
         PLD
         RTL

L0764    PHD
         TSC
         SEC
         SBC   #$00EB
         TCD
         ADC   #$00E6
         TCS
         PEI   $FB
         PEI   $F9
         PEI   $F7
         PEI   $F5
         PEI   $F3
         PEI   $F1
         JSL   L02AA
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         STA   [$FD]
         TDC
         CLC
         ADC   #$00EB
         TCS
         PLD
         RTL

L0791    PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F4
         TCS
         LDA   $FF
         STA   L0803
         PEA   $C005
         PEA   $0000
         PEA   $0100
         JSL   L01A5
         PLY
         PLY
         PLY
         STX   L07FD
         STA   L07FB
         LDX   L07FD
         LDA   L07FB
         PHX
         PHA
         JSL   L01DD
         PLY
         PLY
         PHA
         _SoundStartUp
         STAL  L013C
         TDC
         CLC
         ADC   #$00F9
         TCS
         PLD
         RTL

L07D9    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         PEI   $FF
         PEI   $FD
         _DisposeHandle
         STAL  L013C
         TDC
         CLC
         ADC   #$00F7
         TCS
         PLD
         RTL

L07FB    DB    $00
         DB    $00
L07FD    DB    $00
         DB    $00
L07FF    DB    $00
         DB    $00
L0801    DB    $00
         DB    $00
L0803    DB    $00
         DB    $00
L0805    ADRL  $00000000  ;  path name
         DW    $0000      ;  flags
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L080F    DB    $2D
         DB    $00
         DB    $2D
         DB    $00
         DB    $2D
         DB    $00
         DB    $2D
         DB    $00
         DB    $24
         DB    $00
         DB    $24
         DB    $00
         DB    $24
         DB    $00
         DB    $24
         DB    $00
         DB    $1B
         DB    $00
         DB    $1B
         DB    $00
         DB    $1B
         DB    $00
         DB    $1B
         DB    $00
         DB    $1B
         DB    $00
         DB    $1B
         DB    $00
         DB    $1B
         DB    $00
L082D    DB    $72
         DB    $00
L082F    DB    $72
         DB    $00
L0831    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0842    REP   #$30
         SEP   #$20
         PLA
         STA   L0E5D
         REP   #$20
         PLA
         STA   L0E5E
         PHK
         PLB
         JSR   L090B
         BCS   L0888
*         LDA   L0E66
*         JSL   L69DD	; call protection
         LDA   L0E66
         PHA
         JSL   L0791
         PLA
         LDA   #L0EB2
         STA   L0EC6
         LDA   #^L0EB2
         STA   L0EC8
         JSR   L6E48
         LDA   #L0E92
         STA   L0EC6
         LDA   #^L0E92
         STA   L0EC8
         JSR   L7EA4
         JMP   L0A02

L0888    REP   #$30
         _FMShutDown
         _SoundShutDown
         _WindShutDown
         _CtlShutDown
         _DialogShutDown
         _EMShutDown
         _LEShutDown
         _QDShutDown
         _QDAuxShutDown
         _GrafOff
         _MTShutDown
         _TextShutDown
         LDA   L0E66
         PHA
         _DisposeAll
         LDA   L0E66
         PHA
         _MMShutDown
         _TLShutDown
         LDA   L0E5E
         PHA
         PHB
         LDA   L0E5D
         STA   $01,S
         RTL

L0906    JSL   L0842
         RTL

L090B    _TLStartUp
         PEA   $0000
         _MMStartUp
         PLA
         STA   L0E66
         _MTStartUp
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0800
         LDA   L0E66
         PHA
         PEA   $C005
         PEA   $0000
         PEA   $0000
         _NewHandle
         PLA
         STA   $00
         PLA
         STA   $02
         LDA   [$00]
         STA   $04
         PHA
         PEA   $0000
         PEA   $00A0
         LDA   L0E66
         PHA
         _QDStartUp
         LDA   $04
         CLC
         ADC   #$0300
         STA   $04
         PHA
         PEA   $0014
         PEA   $0000
         PEA   $0140
         PEA   $0000
         PEA   $00C8
         LDA   L0E66
         PHA
         _EMStartUp
         PEA   ^L0E68
         PEA   L0E68
         _LoadTools
         LDA   L0E66
         PHA
         _WindStartUp
         PEA   $0000
         PEA   $0000
         _RefreshDesktop
         LDA   L0E66
         PHA
         LDA   $04
         CLC
         ADC   #$0100
         STA   $04
         PHA
         _CtlStartUp
         LDA   L0E66
         PHA
         LDA   $04
         CLC
         ADC   #$0100
         STA   $04
         PHA
         _LEStartUp
         LDA   L0E66
         PHA
         _DialogStartUp
         _QDAuxStartUp
         LDA   L0E66
         PHA
         LDA   $04
         CLC
         ADC   #$0100
         STA   $04
         PHA
         _FMStartUp
         _TextStartUp
         CLC
         RTS

L0A02    LDA   #L0E92
         STA   L0EC6
         LDA   #^L0E92
         STA   L0EC8
         JSR   L7EA4
         LDA   #$0001
         STA   L0E60
         STZ   L0E62
         STZ   L0EC4
         JSR   L76F6
         LDA   L0EC6
         STA   L0D4A
         LDA   #$0000
         STA   L0EC6
         JSR   L7703
         JSR   L7092
         LDA   L0EC6
         STA   L1002
         LDA   L0EC8
         STA   L1004
         JSR   L6E79
         LDA   L0EC6
         STA   L1006
         LDA   L0EC8
         STA   L1008
         JSR   L75E3
         LDA   #L0F62
         STA   L0EC6
         LDA   #^L0F62
         STA   L0EC8
         JSR   L6E48
         LDA   #L0DCB
         STA   L0EC6
         LDA   #^L0DCB
         STA   L0EC8
         LDA   #$0001
         STA   L0ECA
         LDA   #$000E
         STA   L0ECE
         LDA   #L100A
         STA   L0ED2
         LDA   #^L100A
         STA   L0ED4
         JSR   L7C47
         LDA   #L0DD2
         STA   L0EC6
         LDA   #^L0DD2
         STA   L0EC8
         STZ   L0ECA
         LDA   #$0012
         STA   L0ECE
         LDA   #L100E
         STA   L0ED2
         LDA   #^L100E
         STA   L0ED4
         JSR   L7C47
         BRA   L0AAF
L0AAC    JMP   L0D3B

L0AAF    JSR   L7289
         JSR   L142C
         JSR   L71BA
         BCS   L0AAC
         LDA   L0EC6
         STA   L0F52
         LDA   L0EC8
         STA   L0F54
         LDA   L0ECA
         STA   L0FF2
         LDA   L0ECC
         STA   L0FF4
         JSR   L71BA
         BCS   L0AAC
         LDA   L0EC6
         STA   L0F56
         LDA   L0EC8
         STA   L0F58
         LDA   L0ECA
         STA   L0FF6
         LDA   L0ECC
         STA   L0FF8
         JSR   L71BA
         BCS   L0AAC
         LDA   L0EC6
         STA   L0F5A
         LDA   L0EC8
         STA   L0F5C
         LDA   L0ECA
         STA   L0FFA
         LDA   L0ECC
         STA   L0FFC
         JSR   L71BA
         BCS   L0B2B
         LDA   L0EC6
         STA   L0F5E
         LDA   L0EC8
         STA   L0F60
         LDA   L0ECA
         STA   L0FFE
         LDA   L0ECC
         STA   L1000
         BRA   L0B31
L0B2B    JSR   L6F56
         JMP   L0D3B

L0B31    LDA   #L0EF8
         STA   L0EC6
         LDA   #^L0EF8
         STA   L0EC8
         LDA   #L0EEE
         STA   L0ECA
         LDA   #^L0EEE
         STA   L0ECC
         LDA   #L0EF2
         STA   L0ECE
         LDA   #^L0EF2
         STA   L0ED0
         LDA   #L0EF6
         STA   L0ED2
         LDA   #^L0EF6
         STA   L0ED4
         JSR   L83E1
         LDA   #L0DF9
         STA   L0EC6
         LDA   #^L0DF9
         STA   L0EC8
         LDA   #L0DE5
         STA   L0ECA
         LDA   #^L0DE5
         STA   L0ECC
         LDA   #L0DE9
         STA   L0ECE
         LDA   #^L0DE9
         STA   L0ED0
         LDA   #L0DED
         STA   L0ED2
         LDA   #^L0DED
         STA   L0ED4
         JSR   L83E1
         LDA   #L0E37
         STA   L0EC6
         LDA   #^L0E37
         STA   L0EC8
         LDA   #L0DDB
         STA   L0ECA
         LDA   #^L0DDB
         STA   L0ECC
         LDA   #L0DDF
         STA   L0ECE
         LDA   #^L0DDF
         STA   L0ED0
         LDA   #L0DE3
         STA   L0ED2
         LDA   #^L0DE3
         STA   L0ED4
         JSR   L83E1
         LDA   #L0E18
         STA   L0EC6
         LDA   #^L0E18
         STA   L0EC8
         LDA   #L0DEF
         STA   L0ECA
         LDA   #^L0DEF
         STA   L0ECC
         LDA   #L0DF3
         STA   L0ECE
         LDA   #^L0DF3
         STA   L0ED0
         LDA   #L0DF7
         STA   L0ED2
         LDA   #^L0DF7
         STA   L0ED4
         JSR   L83E1
         LDA   #L0D97
         STA   L0EC6
         LDA   #^L0D97
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         LDA   #L0F72
         STA   L0ECE
         LDA   #^L0F72
         STA   L0ED0
         JSR   L72CD
         BCS   L0CA2
         LDA   #L0D4C
         STA   L0EC6
         LDA   #^L0D4C
         STA   L0EC8
         LDA   L0FF6
         STA   L0ECA
         LDA   L0FF8
         STA   L0ECC
         LDA   #L0F92
         STA   L0ECE
         LDA   #^L0F92
         STA   L0ED0
         JSR   L72CD
         BCS   L0CA2
         LDA   #L0D72
         STA   L0EC6
         LDA   #^L0D72
         STA   L0EC8
         LDA   L0FFA
         STA   L0ECA
         LDA   L0FFC
         STA   L0ECC
         LDA   #L0FB2
         STA   L0ECE
         LDA   #^L0FB2
         STA   L0ED0
         JSR   L72CD
         BCS   L0CA2
         LDA   L0EEE
         STA   L0EC6
         LDA   L0EF0
         STA   L0EC8
         LDA   L0EF2
         STA   L0ECA
         LDA   L0EF4
         STA   L0ECC
         LDA   #$0001
         STA   L0ECE
         LDA   L0EF6
         STA   L0ED2
         JSR   L840E
         JMP   L0CA5
L0CA2    JMP   L0D3B

L0CA5    LDA   #$0000
         STA   L0EC6
         LDA   #L0F72
         STA   L0ECA
         LDA   #^L0F72
         STA   L0ECC
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L7AAA
         LDA   #$0004
         STA   L0EC6
         JSR   L7859
         LDA   #$0000
         STA   L0EC6
         LDA   #L0F92
         STA   L0ECA
         LDA   #^L0F92
         STA   L0ECC
         LDA   L0FF6
         STA   L0ECE
         LDA   L0FF8
         STA   L0ED0
         JSR   L7AAA
         LDA   #$0004
         STA   L0EC6
         JSR   L7859
         LDA   #$0000
         STA   L0EC6
         LDA   #L0FB2
         STA   L0ECA
         LDA   #^L0FB2
         STA   L0ECC
         LDA   L0FFA
         STA   L0ECE
         LDA   L0FFC
         STA   L0ED0
         JSR   L7AAA
         LDA   #$0003
         STA   L0EC6
         JSR   L7859
         JSR   L8433
         LDA   L0EEE
         STA   L0EC6
         LDA   L0EF0
         STA   L0EC8
         JSR   L1380
         JSR   L14AE
         JMP   L1647

L0D3B    JSR   L72BB
         LDA   L0D4A
         STA   L0EC6
         JSR   L7703
         JMP   L0888

L0D4A    DW    $0000
L0D4C    STR   '1/magic.pics/appletit.pc1'
L0D72    STR   '1/magic.pics/credits.pc1'
L0D97    STR   '1/magic.pics/unicorn.pc1'
         ASC   'PLEASE WAIT...'00
L0DCB    STR   'Geneva'
L0DD2    STR   'New York'
L0DDB    DB    $00
         DB    $00
L0DDD    DB    $00
         DB    $00
L0DDF    DB    $00
         DB    $00
L0DE1    DB    $00
         DB    $00
L0DE3    DB    $00
         DB    $00
L0DE5    DB    $00
         DB    $00
L0DE7    DB    $00
         DB    $00
L0DE9    DB    $00
         DB    $00
L0DEB    DB    $00
         DB    $00
L0DED    DB    $00
         DB    $00
L0DEF    DB    $00
         DB    $00
L0DF1    DB    $00
         DB    $00
L0DF3    DB    $00
         DB    $00
L0DF5    DB    $00
         DB    $00
L0DF7    DB    $00
         DB    $00
L0DF9    ASC   '1/magic.snd/fsbell'00
L0E18    ASC   '1/magic.snd/fsgood'00
L0E37    ASC   '1/magic.snd/fsbad'00
L0E55    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $C8
         DB    $00
         DB    $40
         DB    $01
L0E5D    DB    $00
L0E5E    DB    $00
         DB    $00
L0E60    DB    $00
         DB    $00
L0E62    DB    $00
         DB    $00
         DB    $00
         DB    $00
L0E66    DW    $0000
L0E68    DW    $000A      ; number of tools
         DW    $0004      ; quickdraw II
         DW    $0100
         DW    $0006      ; event manager
         DW    $0100
         DW    $000E      ; window manager
         DW    $0100
         DW    $0010      ; control manager
         DW    $0100
         DW    $0015      ; dialog manager
         DW    $0100
         DW    $0012      ; quickdraw II aux
         DW    $0100
         DW    $0008      ; sound tool set
         DW    $0100
         DW    $0014      ; lineedit tool set
         DW    $0100
         DW    $001B      ; font manager
         DW    $0100
         DW    $000C      ; text tool set
         DW    $0100
L0E92    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0EB2    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0EC4    DB    $00
         DB    $00
L0EC6    DB    $00        ;  device name
         DB    $00
L0EC8    DB    $00        ;  ref num
         DB    $00
L0ECA    DB    $00        ;  volume name
         DB    $00
L0ECC    DB    $00        ;  file type
         DB    $00
L0ECE    DB    $00        ;  total blocks
         DB    $00
L0ED0    DB    $00        ;  transfer count
         DB    $00
L0ED2    DB    $00        ;  free blocks
         DB    $00
L0ED4    DB    $00        ;  creation date
         DB    $00
L0ED6    DB    $00        ;  file system
         DB    $00
L0ED8    DB    $00        ;  modification date
         DB    $00
L0EDA    DB    $00
         DB    $00
L0EDC    DB    $00        ;  blocks used
         DB    $00
L0EDE    DB    $00
         DB    $00
L0EE0    DB    $00
         DB    $00
L0EE2    DB    $00
         DB    $00
L0EE4    DB    $00
         DB    $00
L0EE6    DB    $00
         DB    $00
L0EE8    DB    $00
         DB    $00
L0EEA    DB    $00
         DB    $00
L0EEC    DB    $00
         DB    $00
L0EEE    DB    $00
         DB    $00
L0EF0    DB    $00
         DB    $00
L0EF2    DB    $00
         DB    $00
L0EF4    DB    $00
         DB    $00
L0EF6    DB    $00
         DB    $00
L0EF8    ASC   '1/magic.snd/song1'00
L0F16    DB    $00
         DB    $00
L0F18    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0F26    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0F48    DB    $00
         DB    $00
L0F4A    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0F52    DB    $00
         DB    $00
L0F54    DB    $00
         DB    $00
L0F56    DB    $00
         DB    $00
L0F58    DB    $00
         DB    $00
L0F5A    DB    $00
         DB    $00
L0F5C    DB    $00
         DB    $00
L0F5E    DB    $00
         DB    $00
L0F60    DB    $00
         DB    $00
L0F62    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0F72    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0F92    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0FB2    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0FD2    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0FF2    DB    $00
         DB    $00
L0FF4    DB    $00
         DB    $00
L0FF6    DB    $00
         DB    $00
L0FF8    DB    $00
         DB    $00
L0FFA    DB    $00
         DB    $00
L0FFC    DB    $00
         DB    $00
L0FFE    DB    $00
         DB    $00
L1000    DB    $00
         DB    $00
L1002    DB    $00
         DB    $00
L1004    DB    $00
         DB    $00
L1006    DB    $00
         DB    $00
L1008    DB    $00
         DB    $00
L100A    DB    $00
         DB    $00
         DB    $00
         DB    $00
L100E    DB    $00
         DB    $00
         DB    $00
         DB    $00
L1012    ASC   '  Mythology is a collection of stories '0D
         ASC   00
         ASC   'that man used a long, long time ago to '0D
         ASC   00
         ASC   'to explain the creation of the world   '0D
         ASC   00
         ASC   'and the reasons why things happened.   '0D
         ASC   00
         ASC   '   These days we have scientific       '0D
         ASC   00
         ASC   'explanations for most of life'27's        '0D
         ASC   00
         ASC   'mysteries, but years ago man didn'27't    '0D
         ASC   00
         ASC   'really know why the sun rose in the sky'0D
         ASC   00
         ASC   'each morning, why the seasons changed  '0D
         ASC   00
         ASC   'or why people died. In order to better '0D
         ASC   00
         ASC   'understand the world around him, he    '0D
         ASC   00
         ASC   'created a group of gods with superhuman'0D
         ASC   00
         ASC   'powers and came to believe that these  '0D
         ASC   00
         ASC   'ancient gods were responsible for the  '0D
         ASC   00
         ASC   'ways of the world.                     '0D
         ASC   00
         ASC   '   Stories about these gods are called '0D
         ASC   00
         ASC   'myths and different countries have     '0D
         ASC   00
         ASC   'different gods. This program deals with'0D
         ASC   00
         ASC   'ancient Greek Myths.                   '0D
         ASC   00
         ASC   '                                       '0D
         ASC   00
         ASC   '                                       '0D00
L136F    REP   #$30
         STZ   L0E62
         LDA   L0E60
         BEQ   L137F
         JSR   L83E1
         INC   L0E62
L137F    RTS

L1380    REP   #$30
         LDA   L0E62
         BEQ   L138A
         JSR   L843A
L138A    RTS

L138B    REP   #$30
         LDA   L0E62
         BEQ   L139E
         LDA   L0ECE
         STA   L0ED2
         STZ   L0ECE
         JSR   L840E
L139E    RTS

         REP   #$30
         LDA   L0E60
         BEQ   L13AA
         STZ   L0E60
         RTS

L13AA    INC   L0E60
         RTS

L13AE    REP   #$30
         JSR   L8433
         LDA   L0DDB
         STA   L0EC6
         LDA   L0DDD
         STA   L0EC8
         LDA   L0DDF
         STA   L0ECA
         LDA   L0DE1
         STA   L0ECC
         STZ   L0ECE
         LDA   L0DE3
         STA   L0ED2
         JSR   L840E
         RTS

L13D8    REP   #$30
         JSR   L8433
         LDA   L0DEF
         STA   L0EC6
         LDA   L0DF1
         STA   L0EC8
         LDA   L0DF3
         STA   L0ECA
         LDA   L0DF5
         STA   L0ECC
         STZ   L0ECE
         LDA   L0DF7
         STA   L0ED2
         JSR   L840E
         RTS

L1402    REP   #$30
         JSR   L8433
         LDA   L0DE5
         STA   L0EC6
         LDA   L0DE7
         STA   L0EC8
         LDA   L0DE9
         STA   L0ECA
         LDA   L0DEB
         STA   L0ECC
         STZ   L0ECE
         LDA   L0DED
         STA   L0ED2
         JSR   L840E
         RTS

L142C    JSR   L6EBC
         LDA   #$9999
         STA   L0EC6
         JSR   L70EF
         LDA   #$0004
         STA   L0EC6
         JSR   L76E8
         LDA   #$0007
         STA   L0EC6
         LDA   #$0009
         STA   L0ECA
         JSR   L7640
         LDA   #$0000
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         LDA   #$0004
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         JSR   L83C1
         JSR   L8397
         JSR   LA27C
         LDA   #L149F
         STA   L0EC6
         LDA   #^L149F
         STA   L0EC8
         LDA   #$0064
         STA   L0ECA
         JSR   L7590
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         JSR   L7C27
         RTS

L149F    ASC   'PLEASE WAIT...'00
L14AE    JSR   L6EBC
         LDA   #$0000
         STA   L278A
         LDA   #L1012
         STA   L2786
         LDA   #^L1012
         STA   L2788
         JSR   L764F
         LDA   L0EC6
         STA   L1538
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         LDA   #$0003
         STA   L0EC6
         JSR   L70EF
         LDA   #$000F
         STA   L0EC6
         JSR   L7574
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         LDA   #$2000
         STA   L0EC6
         LDA   #$00E1
         STA   L0EC8
         LDA   #$0014
         STA   L0ECA
         JSR   L1577
         LDA   #L155C
         STA   L0EC6
         LDA   #^L155C
         STA   L0EC8
         LDA   #$00BE
         STA   L0ECA
         JSR   L7590
         JSR   L7B06
         JSR   L6F56
         LDA   L1538
         STA   L0EC6
         JSR   L7574
         RTS

         DB    $00
         DB    $00
L1538    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L155C    ASC   'Press any key to continue.'00
L1577    LDA   L0ECA
         STA   L15F1
         LDA   L0ECC
         STA   L15F3
         JSR   L6E91
         LDA   L2786
         STA   $04
         LDA   L2788
         STA   $06
         LDX   #$000A
         LDY   L278A
         STX   L2798
L1599    LDX   #$0000
L159C    SEP   #$20
         LDA   [$04],Y
         INY
         CMP   #$0D
         BEQ   L15B5
         CMP   #$7E
         BEQ   L15AF
         STA   L15F3,X
         INX
         BRA   L159C
L15AF    REP   #$30
         STY   L278A
         RTS

L15B5    INY
         JSR   L15C1
         DEC   L15F1
         BNE   L1599
         JMP   L15AF

L15C1    STZ   L15F3,X
         REP   #$30
         PHY
         LDA   #$0006
         STA   L0EC6
         LDA   L2798
         STA   L0ECA
         JSR   L74DA
         LDA   #L15F3
         STA   L0EC6
         LDA   #^L15F3
         STA   L0EC8
         JSR   L7513
         LDA   #$0009
         CLC
         ADC   L2798
         STA   L2798
         PLY
         RTS

L15F1    DB    $00
         DB    $00
L15F3    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L1647    REP   #$30
L1649    JSR   L8433
         JSR   L2643
         LDA   #L26C5
         STA   L0EC6
         LDA   #^L26C5
         STA   L0EC8
         LDA   L0FFE
         STA   L0ECA
         LDA   L1000
         STA   L0ECC
         LDA   #L0FD2
         STA   L0ECE
         LDA   #^L0FD2
         STA   L0ED0
         JSR   L72CD
         LDA   #L8A45
         STA   L0EC6
         LDA   #^L8A45
         STA   L0EC8
         LDA   #L8A63
         STA   L0ECA
         LDA   #^L8A63
         STA   L0ECC
         LDA   #L8A67
         STA   L0ECE
         LDA   #^L8A67
         STA   L0ED0
         LDA   #L8A6B
         STA   L0ED2
         LDA   #^L8A6B
         STA   L0ED4
         JSR   L136F
         LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         LDA   L0FFE
         STA   L0ECE
         LDA   L1000
         STA   L0ED0
         JSR   L7AAA
         LDA   L8A63
         STA   L0EC6
         LDA   L8A65
         STA   L0EC8
         LDA   L8A67
         STA   L0ECA
         LDA   L8A69
         STA   L0ECC
         LDA   L8A6B
         STA   L0ECE
         JSR   L138B
         JSR   L70D1
         STZ   L273E
L16F1    JSR   L6F48
         CMP   #$001B
         BNE   L16FC
         JMP   L0D3B

L16FC    LDA   L0EC6
         BEQ   L16F1
         JSR   L6EE0
         LDA   #L2740
         STA   L0ECE
         LDA   #^L2740
         STA   L0ED0
         LDA   #$0005
         STA   L0ED2
         JSR   L7714
         LDA   L0ED6
         BEQ   L16F1
         STA   L273E
         JSR   L70DB
         LDA   L8A63
         STA   L0EC6
         LDA   L8A65
         STA   L0EC8
         JSR   L1380
         _CompactMem
         LDA   L273E
         DEC
         ASL
         TAX
         JMP   (L2768,X)
L1743    JMP   L1649

L1746    REP   #$30
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$7D00
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         LDA   #$0000
         STA   L0ECE
         JSR   L7107
         LDA   #$0000
         STA   L0EC6
         JSR   L70EF
         JSR   L6EBC
         RTS

L1776    REP   #$30
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$2000
         STA   L0ECA
         LDA   #$00E1
         STA   L0ECC
         JSR   L7080
         JSR   L6EBC
         RTS

L1797    REP   #$30
         JSR   L7B06
L179C    JSR   L6F48
         CMP   #$001B
         BNE   L17A7
         JMP   L17BA

L17A7    CMP   #$0000
         BEQ   L17B2
         ORA   #$0020
         JMP   L17BA

L17B2    LDA   L0EC6
         BNE   L17BA
         JMP   L179C
L17BA    RTS

L17BB    REP   #$30
         LDA   L0EC6
         STA   L1815
         LDA   L0ECA
         STA   L1817
         LDA   L0ECE
         STA   L1819
         JSR   L7B06
L17D2    JSR   L6F48
         CMP   #$001B
         BNE   L17DD
         JMP   L1814

L17DD    CMP   #$0000
         BEQ   L17E8
         ORA   #$0020
         JMP   L1814

L17E8    LDA   L0EC6
         BNE   L1811
         LDA   L1815
         STA   L0EC6
         LDA   L1817
         STA   L0ECA
         LDA   L1819
         STA   L0ECE
         LDA   #$0003
         STA   L0ED2
         LDA   #$0000
         STA   L0ED4
         JSR   L7804
         JMP   L17D2

L1811    LDA   #$0001
L1814    RTS

L1815    DW    $0000
L1817    DW    $0000
L1819    DW    $0000
L181B    REP   #$30
         LDA   #$2000
         STA   L0EC6
         LDA   #$00E1
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L7080
         RTS

L1839    REP   #$30
         LDA   L0EC6
         STA   L2772
         JSR   L7574
         RTS

L1845    REP   #$30
         LDA   L0ECA
         STA   L0ECE
         LDA   L0ECC
         STA   L0ED0
         LDA   #L279C
         STA   L0ECA
         LDA   #^L279C
         STA   L0ECC
         LDA   #L27BC
         STA   L0ED2
         LDA   #^L27BC
         STA   L0ED4
         LDA   #$0000
         STA   L0ED6
         JSR   L78BB
         RTS

L1875    REP   #$30
         LDA   L0ECA
         STA   L0ECE
         LDA   L0ECC
         STA   L0ED0
         LDA   #L27A4
         STA   L0ECA
         LDA   #^L27A4
         STA   L0ECC
         LDA   #L27BC
         STA   L0ED2
         LDA   #^L27BC
         STA   L0ED4
         LDA   #$0000
         STA   L0ED6
         JSR   L78BB
         RTS

L18A5    REP   #$30
         LDA   L0EC6
         STA   L198E
         JSR   L6EBC
         LDA   #$0000
         STA   L278A
         LDA   L2782
         STA   L2786
         LDA   L2784
         STA   L2788
         JSR   L764F
         LDA   L0EC6
         STA   L1990
         LDA   #$2000
         STA   L0EC6
         LDA   #$00E1
         STA   L0EC8
         LDA   L0FF6
         STA   L0ECA
         LDA   L0FF8
         STA   L0ECC
         JSR   L7080
         LDA   #$0000
         STA   L0EC6
         LDA   #L1992
         STA   L0ECA
         LDA   #^L1992
         STA   L0ECC
         JSR   L7150
L18FB    LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         LDA   #$0000
         STA   L0EC6
         JSR   L70EF
         LDA   #$0009
         STA   L0EC6
         JSR   L7574
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         LDA   #$2000
         STA   L0EC6
         LDA   #$00E1
         STA   L0EC8
         LDA   #$0014
         STA   L0ECA
         JSR   L20B8
         LDA   #L19B4
         STA   L0EC6
         LDA   #^L19B4
         STA   L0EC8
         LDA   #$00BE
         STA   L0ECA
         JSR   L7590
         JSR   L7B06
         JSR   L6F56
         DEC   L198E
         BEQ   L1963
         JMP   L18FB

L1963    LDA   #$0000
         STA   L0EC6
         LDA   #L1992
         STA   L0ECA
         LDA   #^L1992
         STA   L0ECC
         LDA   L0FF6
         STA   L0ECE
         LDA   L0FF8
         STA   L0ED0
         JSR   L7AAA
         LDA   L1990
         STA   L0EC6
         JSR   L7574
         RTS

L198E    DB    $00
         DB    $00
L1990    DB    $00
         DB    $00
L1992    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L19B4    ASC   'Press any key to continue.'00
L19CF    REP   #$30
         LDA   #L1A89
         STA   $00
         LDA   #^L1A89
         STA   $02
         LDA   L0EC6
         DEC
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L0EC6
         INY
         INY
         LDA   [$00],Y
         STA   L0EC8
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         JSR   L722C
         LDA   L0EEA
         STA   L0EC6
         LDA   L0EEC
         STA   L0EC8
         LDA   #$0200
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         JSR   L6F69
         LDA   L0ED0
         PHA
         LDA   L0ECE
         PHA
         LDA   L0ECE
         STA   L0EC6
         LDA   L0ED0
         STA   L0EC8
         LDA   #$C000
         STA   L0ECA
         JSR   L7166
         LDA   L0ECE
         STA   L2776
         LDA   L0ED0
         STA   L2778
         LDA   L0ED2
         STA   L277E
         LDA   L0ED4
         STA   L2780
         PLA
         STA   L0EEA
         PLA
         STA   L0EEC
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         JSR   L71ED
         LDA   L0ECA
         PHA
         LDA   L0ECA
         STA   L0EC6
         LDA   L277E
         STA   L0ECA
         LDA   L2780
         STA   L0ECC
         LDA   L0EEA
         STA   L0ECE
         LDA   L0EEC
         STA   L0ED0
         JSR   L720C
         PLA
         STA   L0EC6
         JSR   L721F
         RTS

L1A89    ADRL  L1AE5
         ADRL  L1B0A
         ADRL  L1B30
         ADRL  L1B55
         ADRL  L1B7A
         ADRL  L1BA0
         ADRL  L1BC5
         ADRL  L1BEA
         ADRL  L1C10
         ADRL  L1C35
         ADRL  L1C5A
         ADRL  L1C80
         ADRL  L1CA5
         ADRL  L1CC7
         ADRL  L1CE9
         ADRL  L1D0B
         ADRL  L1D2D
         ADRL  L1D50
         ADRL  L1D73
         ADRL  L1D96
         ADRL  L1DB8
         ADRL  L1DDA
         ADRL  L1DFC
L1AE5    STR   '1/magic.data/godsvoc.ant'
L1B0A    STR   '1/magic.data/midasvoc.ant'
L1B30    STR   '1/magic.data/pandvoc.ant'
L1B55    STR   '1/magic.data/godsvoc.fil'
L1B7A    STR   '1/magic.data/midasvoc.fil'
L1BA0    STR   '1/magic.data/pandvoc.fil'
L1BC5    STR   '1/magic.data/godsvoc.syn'
L1BEA    STR   '1/magic.data/midasvoc.syn'
L1C10    STR   '1/magic.data/pandvoc.syn'
L1C35    STR   '1/magic.data/godsvoc.wrd'
L1C5A    STR   '1/magic.data/midasvoc.wrd'
L1C80    STR   '1/magic.data/pandvoc.wrd'
L1CA5    STR   '1/magic.data/gods.des'
L1CC7    STR   '1/magic.data/gods.fil'
L1CE9    STR   '1/magic.data/gods.mth'
L1D0B    STR   '1/magic.data/gods.mul'
L1D2D    STR   '1/magic.data/midas.fil'
L1D50    STR   '1/magic.data/midas.mth'
L1D73    STR   '1/magic.data/midas.mul'
L1D96    STR   '1/magic.data/pand.fil'
L1DB8    STR   '1/magic.data/pand.mth'
L1DDA    STR   '1/magic.data/pand.mul'
L1DFC    STR   '1/magic.data/readme.doc'
L1E20    REP   #$30
         LDA   #L1EDA
         STA   $00
         LDA   #^L1EDA
         STA   $02
         LDA   L0EC6
         DEC
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L0EC6
         INY
         INY
         LDA   [$00],Y
         STA   L0EC8
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         JSR   L722C
         LDA   L0EEA
         STA   L0EC6
         LDA   L0EEC
         STA   L0EC8
         LDA   #$0200
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         JSR   L6F69
         LDA   L0ED0
         PHA
         LDA   L0ECE
         PHA
         LDA   L0ECE
         STA   L0EC6
         LDA   L0ED0
         STA   L0EC8
         LDA   #$C000
         STA   L0ECA
         JSR   L7166
         LDA   L0ECE
         STA   L277A
         LDA   L0ED0
         STA   L277C
         LDA   L0ED2
         STA   L2782
         LDA   L0ED4
         STA   L2784
         PLA
         STA   L0EEA
         PLA
         STA   L0EEC
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         JSR   L71ED
         LDA   L0ECA
         PHA
         LDA   L0ECA
         STA   L0EC6
         LDA   L2782
         STA   L0ECA
         LDA   L2784
         STA   L0ECC
         LDA   L0EEA
         STA   L0ECE
         LDA   L0EEC
         STA   L0ED0
         JSR   L720C
         PLA
         STA   L0EC6
         JSR   L721F
         RTS

L1EDA    ADRL  L1EE6
         ADRL  L1F0B
         ADRL  L1F31
L1EE6    STR   '1/magic.data/godsvoc.wrd'
L1F0B    STR   '1/magic.data/midasvoc.wrd'
L1F31    STR   '1/magic.data/pandvoc.wrd'
L1F56    REP   #$30
         LDA   L2776
         STA   L0EC6
         LDA   L2778
         STA   L0EC8
         JSR   L71A8
         RTS

L1F68    REP   #$30
         LDA   L277A
         STA   L0EC6
         LDA   L277C
         STA   L0EC8
         JSR   L71A8
         RTS

L1F7A    REP   #$30
         LDA   L0ECA
         PHA
         LDA   L0ECA
         PHA
         LDA   L0EC6
         PHA
         LDA   L0ECE
         STA   L0EC6
         LDA   L0ED0
         STA   L0EC8
         JSR   L6E91
         LDA   #L27B4
         STA   L0EC6
         LDA   #^L27B4
         STA   L0EC8
         PLA
         STA   L0ECA
         JSR   L70AA
         LDA   #L27AC
         STA   L0EC6
         LDA   #^L27AC
         STA   L0EC8
         PLA
         STA   L0ECA
         JSR   L70AA
         PLA
         STA   L0EC6
         LDA   L0EC6
         STA   L2774
         JSR   L7582
         RTS

L1FCB    REP   #$30
         JSR   L6E91
         LDA   #L27AC
         STA   L0EC6
         LDA   #^L27AC
         STA   L0EC8
         LDA   L2774
         STA   L0ECA
         JSR   L70AA
         RTS

L1FE6    REP   #$30
         LDA   L0ECA
         STA   L2062
         LDA   L0ECC
         STA   L2064
         JSR   L6E91
         LDA   L277E
         STA   $04
         LDA   L2780
         STA   $06
         LDX   #$000A
         LDY   L278E
         STX   L2798
L200A    LDX   #$0000
L200D    SEP   #$20
         LDA   [$04],Y
         INY
         CMP   #$0D
         BEQ   L2026
         CMP   #$7E
         BEQ   L2020
         STA   L2064,X
         INX
         BRA   L200D
L2020    REP   #$30
         STY   L278E
         RTS

L2026    INY
         JSR   L2032
         DEC   L2062
         BNE   L200A
         JMP   L2020

L2032    STZ   L2064,X
         REP   #$30
         PHY
         LDA   #$0006
         STA   L0EC6
         LDA   L2798
         STA   L0ECA
         JSR   L74DA
         LDA   #L2064
         STA   L0EC6
         LDA   #^L2064
         STA   L0EC8
         JSR   L7513
         LDA   #$0009
         CLC
         ADC   L2798
         STA   L2798
         PLY
         RTS

L2062    DB    $00
         DB    $00
L2064    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L20B8    REP   #$30
         LDA   L0ECA
         STA   L2134
         LDA   L0ECC
         STA   L2136
         JSR   L6E91
         LDA   L2786
         STA   $04
         LDA   L2788
         STA   $06
         LDX   #$000A
         LDY   L278A
         STX   L2798
L20DC    LDX   #$0000
L20DF    SEP   #$20
         LDA   [$04],Y
         INY
         CMP   #$0D
         BEQ   L20F8
         CMP   #$7E
         BEQ   L20F2
         STA   L2136,X
         INX
         BRA   L20DF
L20F2    REP   #$30
         STY   L278A
         RTS

L20F8    INY
         JSR   L2104
         DEC   L2134
         BNE   L20DC
         JMP   L20F2

L2104    STZ   L2136,X
         REP   #$30
         PHY
         LDA   #$000E
         STA   L0EC6
         LDA   L2798
         STA   L0ECA
         JSR   L74DA
         LDA   #L2136
         STA   L0EC6
         LDA   #^L2136
         STA   L0EC8
         JSR   L7513
         LDA   #$0009
         CLC
         ADC   L2798
         STA   L2798
         PLY
         RTS

L2134    DB    $00
         DB    $00
L2136    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L218A    REP   #$30
         JSR   L250C
         JSR   L1746
         LDA   #$000D
         STA   L0EC6
         JSR   L19CF
         LDA   #$0000
         STA   L278E
         LDA   #$000F
         STA   L0EC6
         JSR   L7574
         JSR   L23AA
         LDA   #$0003
         STA   L0EC6
         LDA   #$0001
         STA   L0ECA
         LDA   #$0003
         STA   L0ECE
         LDA   #$0005
         STA   L0ED2
         LDA   #$0003
         STA   L0ED6
         LDA   #$0009
         STA   L0EDA
         JSR   L23E3
         LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L7AAA
         JSR   L23AA
         LDA   #$0003
         STA   L0EC6
         LDA   #$0002
         STA   L0ECA
         LDA   #$0003
         STA   L0ECE
         LDA   #$0006
         STA   L0ED2
         LDA   #$0003
         STA   L0ED6
         LDA   #$000A
         STA   L0EDA
         JSR   L23E3
         JSR   L1797
         CMP   #$001B
         BNE   L222A
         JMP   L23A9

L222A    LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L7AAA
         JSR   L23AA
         LDA   #$0003
         STA   L0EC6
         LDA   #$0003
         STA   L0ECA
         LDA   #$0003
         STA   L0ECE
         LDA   #$0007
         STA   L0ED2
         LDA   #$0003
         STA   L0ED6
         LDA   #$000B
         STA   L0EDA
         JSR   L23E3
         JSR   L1797
         CMP   #$001B
         BNE   L2280
         JMP   L23A9

L2280    LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L7AAA
         JSR   L23AA
         LDA   #$0003
         STA   L0EC6
         LDA   #$0004
         STA   L0ECA
         LDA   #$0003
         STA   L0ECE
         LDA   #$0008
         STA   L0ED2
         LDA   #$0003
         STA   L0ED6
         LDA   #$000C
         STA   L0EDA
         JSR   L23E3
         JSR   L1797
         CMP   #$001B
         BNE   L22D6
         JMP   L23A9

L22D6    LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L7AAA
         JSR   L23AA
         LDA   #$0001
         STA   L0EC6
         LDA   #$0001
         STA   L0ECA
         LDA   #$0001
         STA   L0ECE
         LDA   #$0005
         STA   L0ED2
         LDA   #$0001
         STA   L0ED6
         LDA   #$0002
         STA   L0EDA
         JSR   L23E3
         JSR   L1797
         CMP   #$001B
         BNE   L232C
         JMP   L23A9

L232C    LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L7AAA
         JSR   L23AA
         LDA   #$0001
         STA   L0EC6
         LDA   #$0003
         STA   L0ECA
         LDA   #$0001
         STA   L0ECE
         LDA   #$0004
         STA   L0ED2
         LDA   #$0001
         STA   L0ED6
         LDA   #$0006
         STA   L0EDA
         JSR   L23E3
         JSR   L1797
         CMP   #$001B
         BNE   L2382
         JMP   L23A9

L2382    LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L7AAA
         JSR   L7B06
         JSR   L6F56
L23A9    RTS

L23AA    REP   #$30
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$7D00
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         LDA   #$0000
         STA   L0ECE
         JSR   L7107
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$0014
         STA   L0ECA
         JSR   L1FE6
         RTS

L23E3    REP   #$30
         LDA   L0EC6
         STA   L247F
         LDA   L0ECA
         STA   L2481
         LDA   L0ECE
         STA   L2483
         LDA   L0ED2
         STA   L2485
         LDA   L0ED6
         STA   L2487
         LDA   L0EDA
         STA   L2489
         LDA   L247F
         STA   L0EC6
         LDA   L2481
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         LDA   #L248B
         STA   L0ED2
         LDA   #^L248B
         STA   L0ED4
         JSR   L24A3
         LDA   L2483
         STA   L0EC6
         LDA   L2485
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         LDA   #L2493
         STA   L0ED2
         LDA   #^L2493
         STA   L0ED4
         JSR   L24A3
         LDA   L2487
         STA   L0EC6
         LDA   L2489
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         LDA   #L249B
         STA   L0ED2
         LDA   #^L249B
         STA   L0ED4
         JSR   L24A3
         RTS

L247F    DB    $00
         DB    $00
L2481    DB    $00
         DB    $00
L2483    DB    $00
         DB    $00
L2485    DB    $00
         DB    $00
L2487    DB    $00
         DB    $00
L2489    DB    $00
         DB    $00
L248B    DW    $000B
         DW    $0001
         DW    $0043
         DW    $004E
L2493    DW    $004B
         DW    $0001
         DW    $0083
         DW    $004E
L249B    DW    $008B
         DW    $0001
         DW    $00C3
         DW    $004E
L24A3    REP   #$30
         LDA   L0EC6
         STA   L0ED6
         LDA   L0FF6
         STA   L0EC6
         LDA   L0FF8
         STA   L0EC8
         LDA   L0ED6
         CMP   #$0001
         BEQ   L24DF
         LDA   L0FFA
         STA   L0EC6
         LDA   L0FFC
         STA   L0EC8
         LDA   L0ED6
         CMP   #$0002
         BEQ   L24DF
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
L24DF    LDA   #L488C
         STA   L0ED6
         LDA   #^L488C
         STA   L0ED8
         LDA   L0ECA
         DEC
         ASL
         ASL
         ASL
         CLC
         ADC   L0ED6
         STA   L0ECA
         LDA   #$0000
         ADC   L0ED8
         STA   L0ECC
         LDA   #$0000
         STA   L0ED6
         JSR   L78BB
         RTS

L250C    REP   #$30
         LDA   #L25AB
         STA   L0EC6
         LDA   #^L25AB
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         LDA   #L0F72
         STA   L0ECE
         LDA   #^L0F72
         STA   L0ED0
         JSR   L72CD
         LDA   #L25D1
         STA   L0EC6
         LDA   #^L25D1
         STA   L0EC8
         LDA   L0FF6
         STA   L0ECA
         LDA   L0FF8
         STA   L0ECC
         LDA   #L0F92
         STA   L0ECE
         LDA   #^L0F92
         STA   L0ED0
         JSR   L72CD
         LDA   #L25F7
         STA   L0EC6
         LDA   #^L25F7
         STA   L0EC8
         LDA   L0FFA
         STA   L0ECA
         LDA   L0FFC
         STA   L0ECC
         LDA   #L0FB2
         STA   L0ECE
         LDA   #^L0FB2
         STA   L0ED0
         JSR   L72CD
         LDA   #L261D
         STA   L0EC6
         LDA   #^L261D
         STA   L0EC8
         LDA   L0FFE
         STA   L0ECA
         LDA   L1000
         STA   L0ECC
         LDA   #L0FD2
         STA   L0ECE
         LDA   #^L0FD2
         STA   L0ED0
         JSR   L72CD
         RTS

L25AB    STR   '1/magic.pics/machfram.pc1'
L25D1    STR   '1/magic.pics/machpic1.pc1'
L25F7    STR   '1/magic.pics/machpic2.pc1'
L261D    STR   '1/magic.pics/machpic3.pc1'
L2643    REP   #$30
         LDA   #L269D
         STA   L0EC6
         LDA   #^L269D
         STA   L0EC8
         LDA   #L26E7
         STA   L0ECA
         LDA   #^L26E7
         STA   L0ECC
         JSR   L9446
         RTS

L2661    REP   #$30
         LDA   #L26AB
         STA   L0EC6
         LDA   #^L26AB
         STA   L0EC8
         LDA   #L2728
         STA   L0ECA
         LDA   #^L2728
         STA   L0ECC
         JSR   L9446
         RTS

         REP   #$30
         LDA   #L26B9
         STA   L0EC6
         LDA   #^L26B9
         STA   L0EC8
         LDA   #L270F
         STA   L0ECA
         LDA   #^L270F
         STA   L0ECC
         JSR   L9446
         RTS

L269D    STR   '/MAGICAL1.DSK'
L26AB    STR   '/MAGICAL2.DSK'
L26B9    STR   '/MAGIC.DATA'
L26C5    STR   '1/magic.pics/menu.pc1'
L26E7    ASC   'Magical Myths disk 1.'00
         ASC   'Player 1'00
         ASC   'Player 2'00
L270F    ASC   'Magical Myths data disk.'00
L2728    ASC   'Magical Myths disk 2.'00
L273E    DW    $0000
L2740    DW    $0000
         DW    $0000
         DW    $0063
         DW    $0069
         DW    $0000
         DW    $0069
         DW    $0063
         DW    $00D6
         DW    $0000
         DW    $00D6
         DW    $0063
         DW    $013F
         DW    $0063
         DW    $0000
         DW    $0095
         DW    $013F
         DW    $0095
         DW    $0000
         DW    $00C7
         DW    $013F
L2768    DA    L27F8
         DA    L38F2
         DA    L4015
         DA    L4F78
         DA    L4A24
L2772    DB    $00
         DB    $00
L2774    DB    $00
         DB    $00
L2776    DB    $00
         DB    $00
L2778    DB    $00
         DB    $00
L277A    DB    $00
         DB    $00
L277C    DB    $00
         DB    $00
L277E    DB    $00
         DB    $00
L2780    DB    $00
         DB    $00
L2782    DB    $00
         DB    $00
L2784    DB    $00
         DB    $00
L2786    DB    $00
         DB    $00
L2788    DB    $00
         DB    $00
L278A    DB    $00
         DB    $00
         DB    $00
         DB    $00
L278E    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L2798    DB    $00
         DB    $00
         DB    $00
         DB    $00
L279C    DW    $0008
         DW    $0002
         DW    $005D
         DW    $013E
L27A4    DW    $0062
         DW    $0002
         DW    $00B7
         DW    $013E
L27AC    DW    $0001
         DW    $0003
         DW    $0071
         DW    $013D
L27B4    DW    $0000
         DW    $0002
         DW    $0072
         DW    $013E
L27BC    DW    $0072
         DW    $0002
         DW    $00C7
         DW    $013E
         ASC   'M O R A L'00
         DW    $0000
         DW    $0F00
         DW    $0F0F
         DW    $0FF0
         DW    $0FFF
         DW    $0000
         DW    $0F00
         DW    $00F0
         DW    $000F
         DW    $0FF0
         DW    $0F0F
         DW    $00FF
         DW    $0AAA
         DW    $0666
         DW    $0A00
         DW    $0080
         DW    $0008
         DW    $0A82
         DW    $0F80
         DW    $0A4F
         DW    $0FFF
L27F8    REP   #$30
         JSR   L6EBC
         JSR   LA27C
L2800    JSR   L9610
         CMP   #$0001
         BNE   L280B
         JMP   L29AD

L280B    CMP   #$0002
         BNE   L2813
         JMP   L281B

L2813    CMP   #$001B
         BNE   L2800
         JMP   L2F3F

L281B    STZ   L8B33
         JSR   L2661
         JSR   L86DF
         JSR   L7B9B
         JSR   L8EC5
         LDA   #L8B46
         STA   L0EC6
         LDA   #^L8B46
         STA   L0EC8
         LDA   #L8B46
         STA   L0ECA
         LDA   #^L8B46
         STA   L0ECC
         LDA   #$0001
         STA   L0ECE
         JSR   L9226
         LDA   L8B37
         CMP   #$0002
         BNE   L2874
         LDA   #L8B5E
         STA   L0EC6
         LDA   #^L8B5E
         STA   L0EC8
         LDA   #L8B5E
         STA   L0ECA
         LDA   #^L8B5E
         STA   L0ECC
         LDA   #$0002
         STA   L0ECE
         JSR   L9226
L2874    JSR   L87B6
         LDA   #$0001
         STA   L0EC6
         JSR   L1E20
         LDA   #L2FE0
         STA   L0EC6
         LDA   #^L2FE0
         STA   L0EC8
         LDA   L0FFE
         STA   L0ECA
         LDA   L1000
         STA   L0ECC
         LDA   #L0FD2
         STA   L0ECE
         LDA   #^L0FD2
         STA   L0ED0
         JSR   L72CD
L28A7    JSR   L87F3
         JSR   L988C
         CMP   #$0001
         BNE   L28DE
         JSR   L9AB6
         CMP   #$0001
         BEQ   L28CC
         LDA   #$000E
         STA   L0EC6
         JSR   L19CF
         LDA   #$002F
         STA   L3008
         JMP   L2936

L28CC    LDA   #$0010
         STA   L0EC6
         JSR   L19CF
         LDA   #$0062
         STA   L3008
         JMP   L2936

L28DE    JSR   L9CD1
         CMP   #$0001
         BNE   L28F8
         LDA   #$0004
         STA   L0EC6
         JSR   L19CF
         LDA   #$0032
         STA   L3008
         JMP   L291E

L28F8    CMP   #$0002
         BNE   L290F
         LDA   #$0007
         STA   L0EC6
         JSR   L19CF
         LDA   #$001E
         STA   L3008
         JMP   L291E

L290F    LDA   #$0001
         STA   L0EC6
         JSR   L19CF
         LDA   #$001B
         STA   L3008
L291E    LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L7C27
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JSR   L142C
L2936    STZ   L300A
         LDA   #L300E
         STA   L0EC6
         LDA   #^L300E
         STA   L0EC8
         LDA   #$0064
         STA   L0ECA
         LDA   #$0000
         STA   L0ECE
         JSR   L7107
         JSR   L8864
         JSR   L857D
         JSR   L864F
         JSR   L1746
         JSR   L7C27
L2963    JSR   L6EBC
         JSR   L3170
         LDA   #$0000
         STA   L0EC6
         JSR   L35D3
         JSR   L36B2
         CMP   #$001B
         BEQ   L2990
         JSR   L7B6A
         LDA   L8B35
         CMP   #$0001
         BNE   L2963
         INC   L300A
         LDA   L300A
         CMP   #$000A
         BNE   L2963
L2990    JSR   L8621
         JSR   L86C0
         JSR   L1F56
         JSR   L8C76
         LDA   L0EC6
         CMP   #$0001
         BNE   L29A7
         JMP   L28A7

L29A7    JSR   L81F1
         JMP   L2F3F

L29AD    JSR   L7C27
         JSR   L2661
         LDA   #$0001
         STA   L0EC6
         JSR   L1E20
         LDA   #$000F
         STA   L0EC6
         JSR   L19CF
         LDA   #L2F48
         STA   L0EC6
         LDA   #^L2F48
         STA   L0EC8
         LDA   L0FFE
         STA   L0ECA
         LDA   L1000
         STA   L0ECC
         LDA   #L0FD2
         STA   L0ECE
         LDA   #^L0FD2
         STA   L0ED0
         JSR   L72CD
         LDA   #L2F6E
         STA   L0EC6
         LDA   #^L2F6E
         STA   L0EC8
         LDA   L0FFA
         STA   L0ECA
         LDA   L0FFC
         STA   L0ECC
         LDA   #L0FB2
         STA   L0ECE
         LDA   #^L0FB2
         STA   L0ED0
         JSR   L72CD
         LDA   #$0000
         STA   L278E
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L1746
         LDA   #$000F
         STA   L0EC6
         LDA   #$000B
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   #$000B
         STA   L2774
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1845
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         JSR   L7B06
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
         LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         JSR   L7971
         JSR   L1776
         JSR   L1402
         JSR   L181B
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         JSR   L1FCB
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L2AC4    JSR   L1797
         CMP   #$001B
         BNE   L2ACF
         JMP   L2800

L2ACF    CMP   #$0067
         BNE   L2AE0
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L2AC4

L2AE0    JSR   L1776
         JSR   L1402
         LDA   #L2F94
         STA   L0EC6
         LDA   #^L2F94
         STA   L0EC8
         LDA   L0FFE
         STA   L0ECA
         LDA   L1000
         STA   L0ECC
         LDA   #L0FD2
         STA   L0ECE
         LDA   #^L0FD2
         STA   L0ED0
         JSR   L72CD
         LDA   #$000F
         STA   L0EC6
         LDA   #$0006
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   #$0006
         STA   L2774
         LDA   L0FFA
         STA   L0EC6
         LDA   L0FFC
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1845
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         JSR   L7B06
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L2B6A    JSR   L1797
         CMP   #$001B
         BNE   L2B75
         JMP   L2800

L2B75    CMP   #$0067
         BNE   L2B86
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L2B6A

L2B86    LDA   #$0000
         STA   L0EC6
         LDA   #L0FB2
         STA   L0ECA
         LDA   #^L0FB2
         STA   L0ECC
         JSR   L713A
         JSR   L1776
         JSR   L1402
         LDA   #$0003
         STA   L3006
L2BA7    JSR   L181B
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         JSR   L1FCB
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L2BCE    LDA   #$0000
         STA   L0EC6
         LDA   #$000A
         STA   L0ECA
         LDA   #$0005
         STA   L0ECE
         JSR   L17BB
         CMP   #$001B
         BNE   L2BEB
         JMP   L2800

L2BEB    CMP   #$0067
         BNE   L2BFC
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L2BCE

L2BFC    JSR   L1776
         JSR   L1402
         DEC   L3006
         BEQ   L2C0A
         JMP   L2BA7

L2C0A    LDA   #$000F
         STA   L0EC6
         LDA   #$0006
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   #$0006
         STA   L2774
         LDA   L0FFA
         STA   L0EC6
         LDA   L0FFC
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1875
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         JSR   L7B06
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L2C67    LDA   #$0000
         STA   L0EC6
         LDA   #$000A
         STA   L0ECA
         LDA   #$0005
         STA   L0ECE
         JSR   L17BB
         CMP   #$001B
         BNE   L2C84
         JMP   L2800

L2C84    CMP   #$0067
         BNE   L2C95
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L2C67

L2C95    LDA   #$0000
         STA   L0EC6
         LDA   #L0FB2
         STA   L0ECA
         LDA   #^L0FB2
         STA   L0ECC
         JSR   L713A
         JSR   L1776
         JSR   L1402
         LDA   #$0004
         STA   L3006
L2CB6    JSR   L181B
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         JSR   L1FCB
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L2CDD    JSR   L1797
         CMP   #$001B
         BNE   L2CE8
         JMP   L2800

L2CE8    CMP   #$0067
         BNE   L2CF9
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L2CDD

L2CF9    JSR   L1776
         JSR   L1402
         DEC   L3006
         BEQ   L2D2E
         JMP   L2CB6

         LDA   #L2FBA
         STA   L0EC6
         LDA   #^L2FBA
         STA   L0EC8
         LDA   L0FFA
         STA   L0ECA
         LDA   L0FFC
         STA   L0ECC
         LDA   #L0FB2
         STA   L0ECE
         LDA   #^L0FB2
         STA   L0ED0
         JSR   L72CD
L2D2E    LDA   #L2FBA
         STA   L0EC6
         LDA   #^L2FBA
         STA   L0EC8
         LDA   L0FFA
         STA   L0ECA
         LDA   L0FFC
         STA   L0ECC
         LDA   #L0FB2
         STA   L0ECE
         LDA   #^L0FB2
         STA   L0ED0
         JSR   L72CD
         LDA   #$000F
         STA   L0EC6
         LDA   #$000C
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   #$000C
         STA   L2774
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1845
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         JSR   L7B06
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L2DB2    JSR   L1797
         CMP   #$001B
         BNE   L2DBD
         JMP   L2800

L2DBD    CMP   #$0067
         BNE   L2DCE
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L2DB2

L2DCE    LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         JSR   L713A
         JSR   L1776
         JSR   L1402
         JSR   L181B
         LDA   #$000A
         STA   L3006
L2DF2    LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1875
         LDA   #$0014
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         JSR   L7931
         JSR   L1776
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1845
         LDA   #$0014
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         JSR   L7931
         JSR   L1776
         DEC   L3006
         BNE   L2DF2
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1875
         LDA   #$0014
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         JSR   L7931
         JSR   L1776
         LDA   #$000F
         STA   L0EC6
         LDA   #$000B
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   #$000B
         STA   L2774
         LDA   L0FFA
         STA   L0EC6
         LDA   L0FFC
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1845
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         JSR   L7B06
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L2EDB    JSR   L1797
         CMP   #$001B
         BNE   L2EE6
         JMP   L2800

L2EE6    CMP   #$0067
         BNE   L2EF7
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L2EDB

L2EF7    LDA   #$0000
         STA   L0EC6
         LDA   #L0FB2
         STA   L0ECA
         LDA   #^L0FB2
         STA   L0ECC
         JSR   L713A
         JSR   L1776
         JSR   L1402
L2F12    JSR   L1797
         CMP   #$001B
         BNE   L2F1D
         JMP   L2800

L2F1D    CMP   #$0067
         BNE   L2F2E
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L2F12

L2F2E    JSR   L1F56
         JSR   L218A
         JSR   L90B3
         CMP   #$001B
         BEQ   L2F3F
         JMP   L281B

L2F3F    JSR   L1F56
         JSR   L1F68
         JMP   L1743

L2F48    STR   '1/magic.pics/grekgod1.pc1'
L2F6E    STR   '1/magic.pics/grekgod2.pc1'
L2F94    STR   '1/magic.pics/grekgod3.pc1'
L2FBA    STR   '1/magic.pics/grekgod4.pc1'
L2FE0    STR   '1/magic.pics/qandascr.pc1'
L3006    DB    $00
         DB    $00
L3008    DB    $00
         DB    $00
L300A    DB    $00
         DB    $00
         DB    $00
         DB    $00
L300E    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L30E0    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L3108    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L3130    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L313E    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L314C    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L315A    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L3162    DB    $00
         DB    $00
L3164    ADRL  L3130
         ADRL  L313E
         ADRL  L314C
L3170    REP   #$30
         LDA   #$0001
         STA   L0EC6
         LDA   L3008
         STA   L0ECA
         JSR   L6FAD
         TAX
         DEX
         SEP   #$20
         LDA   L300E,X
         BNE   L3170
         INC   L300E,X
         REP   #$30
         STX   L0EC6
         JSR   L3196
         RTS

L3196    REP   #$30
         LDA   L0EC6
         STA   L326C
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L7080
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         JSR   L6E91
         LDA   #L326E
         STA   L0EC6
         LDA   #^L326E
         STA   L0EC8
         LDA   #$0000
         STA   L0ECA
         JSR   L70AA
         LDA   L8B35
         CMP   #$0001
         BNE   L31F2
         LDA   #L8B46
         STA   $00
         LDA   #^L8B46
         STA   $02
         JMP   L31FC

L31F2    LDA   #L8B5E
         STA   $00
         LDA   #^L8B5E
         STA   $02
L31FC    LDA   #L3276+$10
         STA   $08
         LDA   #^L3276+$10
         STA   $0A
         LDY   #$0000
         SEP   #$20
L320B    LDA   [$00],Y
         BEQ   L3215
         STA   [$08],Y
         INY
         JMP   L320B

L3215    LDA   #$2E
         STA   [$08],Y
         INY
         LDA   #$00
         STA   [$08],Y
         REP   #$30
         LDA   #$000F
         STA   L0EC6
         JSR   L7574
         LDA   #L3276
         STA   L0EC6
         LDA   #^L3276
         STA   L0EC8
         LDA   #$00C4
         STA   L0ECA
         JSR   L7590
         JSR   L6EBC
         LDA   L326C
         STA   L0EC6
         JSR   L3295
         JSR   L32F1
         JSR   L349A
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   L0FF6
         STA   L0ECA
         LDA   L0FF8
         STA   L0ECC
         JSR   L7080
         RTS

L326C    DW    $0000
L326E    DW    $0064
         DW    $0000
         DW    $00C8
         DW    $0140
L3276    ASC   'It'27's your turn, '00
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
L3295    REP   #$30
         LDA   L0EC6
         STA   L32EF
         LDA   L277E
         STA   $00
         LDA   L2780
         STA   $02
         LDY   #$0000
         LDA   L32EF
         CMP   #$0000
         BNE   L32B5
         JMP   L32D1

L32B5    LDY   #$0000
L32B8    LDX   #$0005
         SEP   #$20
L32BD    LDA   [$00],Y
         INY
         CMP   #$0A
         BEQ   L32C7
         JMP   L32BD

L32C7    DEX
         BNE   L32BD
         REP   #$30
         DEC   L32EF
         BNE   L32B8
L32D1    LDA   L277E
         STA   L0EC6
         LDA   L2780
         STA   L0EC8
         TYA
         CLC
         ADC   L0EC6
         STA   L0EC6
         LDA   #$0000
         ADC   L0EC8
         STA   L0EC8
         RTS

L32EF    DW    $0000
L32F1    REP   #$30
         LDA   #L30E0
         STA   L0ECA
         LDA   #^L30E0
         STA   L0ECC
         JSR   L3459
         LDA   #L3108
         STA   L0ECA
         LDA   #^L3108
         STA   L0ECC
         JSR   L3459
         LDA   L0EC6
         STA   L3455
         LDA   L0EC8
         STA   L3457
         LDA   #L315A
         STA   L0EC6
         LDA   #^L315A
         STA   L0EC8
         LDA   #$0003
         STA   L0ECA
         LDA   #$0000
         STA   L0ECE
         JSR   L7107
         LDA   #L315A
         STA   $00
         LDA   #^L315A
         STA   $02
L3342    REP   #$30
         LDA   #$0000
         STA   L0EC6
         LDA   #$0002
         STA   L0ECA
         JSR   L6FAD
         TAY
         SEP   #$20
         LDA   [$00],Y
         BNE   L3342
         LDA   #$01
         STA   [$00],Y
         REP   #$30
         INY
         STY   L3162
         DEY
         LDA   L3455
         STA   L0EC6
         LDA   L3457
         STA   L0EC8
         LDA   #L3164
         STA   $00
         LDA   #^L3164
         STA   $02
         TYA
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L0ECA
         INY
         INY
         LDA   [$00],Y
         STA   L0ECC
         JSR   L3459
         LDA   L0EC6
         STA   L3455
         LDA   L0EC8
         STA   L3457
         LDA   #L315A
         STA   $00
         LDA   #^L315A
         STA   $02
L33A4    REP   #$30
         LDA   #$0000
         STA   L0EC6
         LDA   #$0002
         STA   L0ECA
         JSR   L6FAD
         TAY
         SEP   #$20
         LDA   [$00],Y
         BNE   L33A4
         LDA   #$01
         STA   [$00],Y
         REP   #$30
         LDA   L3455
         STA   L0EC6
         LDA   L3457
         STA   L0EC8
         LDA   #L3164
         STA   $00
         LDA   #^L3164
         STA   $02
         TYA
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L0ECA
         INY
         INY
         LDA   [$00],Y
         STA   L0ECC
         JSR   L3459
         LDA   L0EC6
         STA   L3455
         LDA   L0EC8
         STA   L3457
         LDA   #L315A
         STA   $00
         LDA   #^L315A
         STA   $02
L3401    REP   #$30
         LDA   #$0000
         STA   L0EC6
         LDA   #$0002
         STA   L0ECA
         JSR   L6FAD
         TAY
         SEP   #$20
         LDA   [$00],Y
         BNE   L3401
         LDA   #$01
         STA   [$00],Y
         REP   #$30
         LDA   L3455
         STA   L0EC6
         LDA   L3457
         STA   L0EC8
         LDA   #L3164
         STA   $00
         LDA   #^L3164
         STA   $02
         TYA
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L0ECA
         INY
         INY
         LDA   [$00],Y
         STA   L0ECC
         JSR   L3459
         LDA   L0EC6
         STA   L3455
         LDA   L0EC8
         STA   L3457
         RTS

L3455    DW    $0000
L3457    DW    $0000
L3459    REP   #$30
         LDA   L0EC6
         STA   $00
         LDA   L0EC8
         STA   $02
         LDA   L0ECA
         STA   $04
         LDA   L0ECC
         STA   $06
         LDY   #$0000
         SEP   #$20
L3474    LDA   [$00],Y
         CMP   #$0D
         BEQ   L3480
         STA   [$04],Y
         INY
         JMP   L3474

L3480    LDA   #$00
         STA   [$04],Y
         INY
         INY
         REP   #$30
         TYA
         CLC
         ADC   L0EC6
         STA   L0EC6
         LDA   #$0000
         ADC   L0EC8
         STA   L0EC8
         RTS

L349A    REP   #$30
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         JSR   L6E91
         LDA   #L30E0
         STA   L0EC6
         LDA   #^L30E0
         STA   L0EC8
         LDA   #$013F
         STA   L0ECA
         LDA   #$0000
         STA   L0ECE
         LDA   #$007D
         STA   L0ED2
         JSR   L355D
         LDA   #L3108
         STA   L0EC6
         LDA   #^L3108
         STA   L0EC8
         LDA   #$013F
         STA   L0ECA
         LDA   #$0000
         STA   L0ECE
         LDA   #$0091
         STA   L0ED2
         JSR   L355D
         LDA   #$000C
         STA   L0EC6
         JSR   L7574
         LDA   #L3130
         STA   L0EC6
         LDA   #^L3130
         STA   L0EC8
         LDA   #$0079
         STA   L0ECA
         LDA   #$00BE
         STA   L0ECE
         LDA   #$0014
         STA   L0ED2
         JSR   L355D
         LDA   #L313E
         STA   L0EC6
         LDA   #^L313E
         STA   L0EC8
         LDA   #$0079
         STA   L0ECA
         LDA   #$00BE
         STA   L0ECE
         LDA   #$002D
         STA   L0ED2
         JSR   L355D
         LDA   #L314C
         STA   L0EC6
         LDA   #^L314C
         STA   L0EC8
         LDA   #$0079
         STA   L0ECA
         LDA   #$00BE
         STA   L0ECE
         LDA   #$0046
         STA   L0ED2
         JSR   L355D
         JSR   L6EBC
         RTS

L355D    REP   #$30
         LDA   L0EC6
         STA   L35BB
         LDA   L0EC8
         STA   L35BD
         LDA   L0ECA
         STA   L35BF
         LDA   L0ECE
         STA   L35C1
         LDA   L0ED2
         STA   L35C3
         JSR   L6FE3
         LDA   L0ECA
         ASL
         ASL
         ASL
         STA   L0ECA
         LDA   #$0000
         STA   L0EC6
         LDA   L35BF
         STA   L0ECE
         JSR   L35C5
         LDA   L0EC6
         CLC
         ADC   L35C1
         STA   L0EC6
         LDA   L35C3
         STA   L0ECA
         JSR   L74DA
         LDA   L35BB
         STA   L0EC6
         LDA   L35BD
         STA   L0EC8
         JSR   L7513
         RTS

L35BB    DW    $0000
L35BD    DW    $0000
L35BF    DW    $0000
L35C1    DW    $0000
L35C3    DW    $0000
L35C5    REP   #$30
         LDA   L0ECE
         SEC
         SBC   L0ECA
         LSR
         STA   L0EC6
         RTS

L35D3    REP   #$30
         LDA   L0EC6
         STA   L3668
         LDA   L0FF6
         STA   L0EC6
         LDA   L0FF8
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L7080
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   #L366A
         STA   $00
         LDA   #^L366A
         STA   $02
         LDA   L3668
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L0ECA
         INY
         INY
         LDA   [$00],Y
         STA   L0ECC
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         LDA   #L3676
         STA   $00
         LDA   #^L3676
         STA   $02
         LDA   L3668
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L0ED2
         INY
         INY
         LDA   [$00],Y
         STA   L0ED4
         LDA   #$0000
         STA   L0ED6
         JSR   L78BB
         LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         JSR   L713A
         JSR   L1776
         RTS

L3668    DW    $0000
L366A    ADRL  L3682
         ADRL  L368A
         ADRL  L3692
L3676    ADRL  L369A
         ADRL  L36A2
         ADRL  L36AA
L3682    DW    $006C
         DW    $0000
         DW    $00AD
         DW    $006D
L368A    DW    $0068
         DW    $0072
         DW    $0094
         DW    $00E4
L3692    DW    $0099
         DW    $0074
         DW    $00C8
         DW    $00E1
L369A    DW    $000E
         DW    $0043
         DW    $004F
         DW    $00B0
L36A2    DW    $0024
         DW    $0043
         DW    $0050
         DW    $00B5
L36AA    DW    $002A
         DW    $0042
         DW    $0059
         DW    $00AF
L36B2    REP   #$30
         STZ   L3898
L36B7    JSR   L70E5
L36BA    LDA   #$0000
         STA   L0EC6
         LDA   #$0001
         STA   L0ECA
         LDA   #$0004
         STA   L0ECE
         JSR   L17BB
         CMP   #$0001
         BNE   L3709
         JSR   L6EE0
         LDA   #L389A
         STA   L0ECE
         LDA   #^L389A
         STA   L0ED0
         LDA   #$0003
         STA   L0ED2
         JSR   L7714
         LDA   L0ED6
         BEQ   L36BA
         CMP   L3898
         BEQ   L3717
         STA   L3898
         JSR   L70DB
         LDA   L3898
         DEC
         STA   L0EC6
         JSR   L35D3
         JMP   L36B7

L3709    CMP   #$001B
         BNE   L36BA
         JSR   L70DB
         LDA   #$001B
         JMP   L388F

L3717    JSR   L70DB
         LDA   L3898
         CMP   L3162
         BNE   L3725
         JMP   L380B

L3725    JSR   L7B52
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   #L38C6
         STA   L0ECA
         LDA   #^L38C6
         STA   L0ECC
         LDA   #$2000
         STA   L0ECE
         LDA   #$00E1
         STA   L0ED0
         LDA   #L38CE
         STA   L0ED2
         LDA   #^L38CE
         STA   L0ED4
         LDA   #$0000
         STA   L0ED6
         JSR   L78BB
         LDA   #L888F
         STA   L0EC6
         LDA   #^L888F
         STA   L0EC8
         JSR   L8451
         JSR   L13AE
         LDA   #L38B2
         STA   $00
         LDA   #^L38B2
         STA   $02
         LDA   L3162
         DEC
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L0EC6
         INY
         INY
         LDA   [$00],Y
         STA   L0EC8
         LDA   #$000F
         STA   L0ECA
         JSR   L70AA
         LDA   #$000C
         STA   L0EC6
         JSR   L7574
         LDA   #L3130
         STA   L0EC6
         LDA   #^L3130
         STA   L0EC8
         LDA   #$0079
         STA   L0ECA
         LDA   #$00BE
         STA   L0ECE
         LDA   #$0014
         STA   L0ED2
         JSR   L355D
         LDA   #L313E
         STA   L0EC6
         LDA   #^L313E
         STA   L0EC8
         LDA   #$0079
         STA   L0ECA
         LDA   #$00BE
         STA   L0ECE
         LDA   #$002D
         STA   L0ED2
         JSR   L355D
         LDA   #L314C
         STA   L0EC6
         LDA   #^L314C
         STA   L0EC8
         LDA   #$0079
         STA   L0ECA
         LDA   #$00BE
         STA   L0ECE
         LDA   #$0046
         STA   L0ED2
         JSR   L355D
         JSR   L84C0
         JMP   L385F

L380B    JSR   L7B3A
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   #L38BE
         STA   L0ECA
         LDA   #^L38BE
         STA   L0ECC
         LDA   #$2000
         STA   L0ECE
         LDA   #$00E1
         STA   L0ED0
         LDA   #L38CE
         STA   L0ED2
         LDA   #^L38CE
         STA   L0ED4
         LDA   #$0000
         STA   L0ED6
         JSR   L78BB
         JSR   L13D8
         LDA   #L8883
         STA   L0EC6
         LDA   #^L8883
         STA   L0EC8
         JSR   L8451
         JSR   L850D
         JMP   L388C

L385F    LDA   #L3890
         STA   L0EC6
         LDA   #^L3890
         STA   L0EC8
         STZ   L0ECA
         JSR   L70AA
         LDA   #L38D6
         STA   L0EC6
         LDA   #^L38D6
         STA   L0EC8
         LDA   #$00AF
         STA   L0ECA
         JSR   L7590
         JSR   L7B06
         JSR   L6F56
L388C    LDA   #$0000
L388F    RTS

L3890    DW    $00A0
         DW    $0000
         DW    $00B4
         DW    $0140
L3898    DW    $0000
L389A    DW    $0007
         DW    $00BF
         DW    $0017
         DW    $0139
L38A2    DW    $0020
         DW    $00BF
         DW    $0030
         DW    $0139
L38AA    DW    $0039
         DW    $00BF
         DW    $0049
         DW    $0139
L38B2    ADRL  L389A
         ADRL  L38A2
         ADRL  L38AA
L38BE    DW    $0065
         DW    $00E6
         DW    $0090
         DW    $0128
L38C6    DW    $0094
         DW    $00E6
         DW    $00BF
         DW    $0128
L38CE    DW    $0002
         DW    $0002
         DW    $002D
         DW    $0044
L38D6    ASC   'Press any key to continue.'00
         DB    $00
L38F2    REP   #$30
         JSR   L6EBC
         JSR   LA27C
L38FA    JSR   L9610
         CMP   #$0001
         BNE   L3905
         JMP   L3AA7

L3905    CMP   #$0002
         BNE   L390D
         JMP   L3915

L390D    CMP   #$001B
         BNE   L38FA
         JMP   L3F06

L3915    STZ   L8B33
         JSR   L2661
         LDA   #L2FE0
         STA   L0EC6
         LDA   #^L2FE0
         STA   L0EC8
         LDA   L0FFE
         STA   L0ECA
         LDA   L1000
         STA   L0ECC
         LDA   #L0FD2
         STA   L0ECE
         LDA   #^L0FD2
         STA   L0ED0
         JSR   L72CD
         JSR   L7B9B
         JSR   L86DF
         JSR   L8EC5
         LDA   #L8B46
         STA   L0EC6
         LDA   #^L8B46
         STA   L0EC8
         LDA   #L8B46
         STA   L0ECA
         LDA   #^L8B46
         STA   L0ECC
         LDA   #$0001
         STA   L0ECE
         JSR   L9226
         LDA   L8B37
         CMP   #$0002
         BNE   L3995
         LDA   #L8B5E
         STA   L0EC6
         LDA   #^L8B5E
         STA   L0EC8
         LDA   #L8B5E
         STA   L0ECA
         LDA   #^L8B5E
         STA   L0ECC
         LDA   #$0002
         STA   L0ECE
         JSR   L9226
L3995    JSR   L87B6
         LDA   #$0003
         STA   L0EC6
         JSR   L1E20
L39A1    JSR   L87F3
         JSR   L988C
         CMP   #$0001
         BNE   L39D8
         JSR   L9AB6
         CMP   #$0001
         BEQ   L39C6
         LDA   #$0014
         STA   L0EC6
         JSR   L19CF
         LDA   #$0025
         STA   L3008
         JMP   L3A30

L39C6    LDA   #$0016
         STA   L0EC6
         JSR   L19CF
         LDA   #$001D
         STA   L3008
         JMP   L3A30

L39D8    JSR   L9CD1
         CMP   #$0001
         BNE   L39F2
         LDA   #$0006
         STA   L0EC6
         JSR   L19CF
         LDA   #$002C
         STA   L3008
         JMP   L3A18

L39F2    CMP   #$0002
         BNE   L3A09
         LDA   #$0009
         STA   L0EC6
         JSR   L19CF
         LDA   #$0016
         STA   L3008
         JMP   L3A18

L3A09    LDA   #$0003
         STA   L0EC6
         JSR   L19CF
         LDA   #$0014
         STA   L3008
L3A18    LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L7C27
         LDA   #$0003
         STA   L0EC6
         JSR   L18A5
         JSR   L142C
L3A30    STZ   L300A
         LDA   #L300E
         STA   L0EC6
         LDA   #^L300E
         STA   L0EC8
         LDA   #$0064
         STA   L0ECA
         LDA   #$0000
         STA   L0ECE
         JSR   L7107
         JSR   L8864
         JSR   L857D
         JSR   L864F
         JSR   L1746
         JSR   L7C27
L3A5D    JSR   L6EBC
         JSR   L3170
         LDA   #$0000
         STA   L0EC6
         JSR   L35D3
         JSR   L36B2
         CMP   #$001B
         BEQ   L3A8A
         JSR   L7B6A
         LDA   L8B35
         CMP   #$0001
         BNE   L3A5D
         INC   L300A
         LDA   L300A
         CMP   #$000A
         BNE   L3A5D
L3A8A    JSR   L8621
         JSR   L86C0
         JSR   L1F56
         JSR   L8C76
         LDA   L0EC6
         CMP   #$0001
         BNE   L3AA1
         JMP   L39A1

L3AA1    JSR   L81F1
         JMP   L3F06

L3AA7    JSR   L7C27
         JSR   L2661
         LDA   #$0003
         STA   L0EC6
         JSR   L1E20
         LDA   #$0015
         STA   L0EC6
         JSR   L19CF
         LDA   #L3F0F
         STA   L0EC6
         LDA   #^L3F0F
         STA   L0EC8
         LDA   L0FFE
         STA   L0ECA
         LDA   L1000
         STA   L0ECC
         LDA   #L0FD2
         STA   L0ECE
         LDA   #^L0FD2
         STA   L0ED0
         JSR   L72CD
         LDA   #L3F35
         STA   L0EC6
         LDA   #^L3F35
         STA   L0EC8
         LDA   L0FFA
         STA   L0ECA
         LDA   L0FFC
         STA   L0ECC
         LDA   #L0FB2
         STA   L0ECE
         LDA   #^L0FB2
         STA   L0ED0
         JSR   L72CD
         LDA   #$0000
         STA   L278E
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L1746
         LDA   #$000F
         STA   L0EC6
         LDA   #$000B
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   #$000B
         STA   L2774
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1845
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         JSR   L7B06
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
         LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         JSR   L7971
         JSR   L1776
         JSR   L1402
         JSR   L181B
         LDA   #$000A
         STA   L3006
L3BA0    LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1875
         LDA   #$0014
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         JSR   L7931
         JSR   L1776
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1845
         LDA   #$0014
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         JSR   L7931
         JSR   L1776
         DEC   L3006
         BNE   L3BA0
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1875
         LDA   #$0014
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         JSR   L7931
         JSR   L1776
         LDA   #$000F
         STA   L0EC6
         LDA   #$0004
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   #$0004
         STA   L2774
         LDA   L0FFA
         STA   L0EC6
         LDA   L0FFC
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1845
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         JSR   L7B06
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L3C89    JSR   L1797
         CMP   #$001B
         BNE   L3C94
         JMP   L38FA

L3C94    CMP   #$0067
         BNE   L3CA5
         LDA   #$0003
         STA   L0EC6
         JSR   L18A5
         JMP   L3C89

L3CA5    LDA   #$0000
         STA   L0EC6
         LDA   #L0FB2
         STA   L0ECA
         LDA   #^L0FB2
         STA   L0ECC
         JSR   L713A
         JSR   L1776
         JSR   L1402
         LDA   #$0064
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         JSR   L7931
         JSR   L1776
         LDA   L0FFA
         STA   L0EC6
         LDA   L0FFC
         STA   L0EC8
         LDA   #L27A4
         STA   L0ECA
         LDA   #^L27A4
         STA   L0ECC
         LDA   #$2000
         STA   L0ECE
         LDA   #$00E1
         STA   L0ED0
         LDA   #L27BC
         STA   L0ED2
         LDA   #^L27BC
         STA   L0ED4
         LDA   #$0000
         STA   L0ED6
         JSR   L78BB
         LDA   #L3F5B
         STA   L0EC6
         LDA   #^L3F5B
         STA   L0EC8
         LDA   L0FFE
         STA   L0ECA
         LDA   L1000
         STA   L0ECC
         LDA   #L0FD2
         STA   L0ECE
         LDA   #^L0FD2
         STA   L0ED0
         JSR   L72CD
         LDA   #$000F
         STA   L0EC6
         LDA   #$0006
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   #$0006
         STA   L2774
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1845
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         JSR   L7B06
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L3D8F    JSR   L1797
         CMP   #$001B
         BNE   L3D9A
         JMP   L38FA

L3D9A    CMP   #$0067
         BNE   L3DAB
         LDA   #$0003
         STA   L0EC6
         JSR   L18A5
         JMP   L3D8F

L3DAB    JSR   L1776
         LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         JSR   L713A
         JSR   L1402
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1875
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         JSR   L7B06
         LDA   #$000F
         STA   L0EC6
         LDA   #$0006
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L3E1D    JSR   L1797
         CMP   #$001B
         BNE   L3E28
         JMP   L38FA

L3E28    CMP   #$0067
         BNE   L3E39
         LDA   #$0003
         STA   L0EC6
         JSR   L18A5
         JMP   L3E1D

L3E39    LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         JSR   L713A
         JSR   L1776
         JSR   L1402
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   #L3F81
         STA   L0ECA
         LDA   #^L3F81
         STA   L0ECC
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         LDA   #L3F89
         STA   L0ED2
         LDA   #^L3F89
         STA   L0ED4
         LDA   #$0000
         STA   L0ED6
         JSR   L78BB
         LDA   #$000F
         STA   L0EC6
         LDA   #$0006
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L3EBD    JSR   L1797
         CMP   #$001B
         BNE   L3EC8
         JMP   L38FA

L3EC8    CMP   #$0067
         BNE   L3ED9
         LDA   #$0003
         STA   L0EC6
         JSR   L18A5
         JMP   L3EBD

L3ED9    JSR   L1776
         JSR   L1402
L3EDF    JSR   L1797
         CMP   #$001B
         BNE   L3EEA
         JMP   L38FA

L3EEA    CMP   #$0067
         BNE   L3EFB
         LDA   #$0003
         STA   L0EC6
         JSR   L18A5
         JMP   L3EDF

L3EFB    JSR   L90B3
         CMP   #$001B
         BEQ   L3F06
         JMP   L3915

L3F06    JSR   L1F56
         JSR   L1F68
         JMP   L1743

L3F0F    STR   '1/magic.pics/pandora1.pc1'
L3F35    STR   '1/magic.pics/pandora2.pc1'
L3F5B    STR   '1/magic.pics/pandora3.pc1'
L3F81    DW    $0008
         DW    $0002
         DW    $005D
         DW    $0074
L3F89    DW    $0072
         DW    $0002
         DW    $00C7
         DW    $0074
L3F91    STR   '1/magic.pics/midas1.pc1'
L3FB5    STR   '1/magic.pics/midas2.pc1'
L3FD9    STR   '1/magic.pics/midas3.pc1'
L3FFD    DW    $0062
         DW    $0002
         DW    $0090
         DW    $0051
L4005    DW    $0008
         DW    $0002
         DW    $0036
         DW    $0051
L400D    DW    $0072
         DW    $0002
         DW    $00A0
         DW    $0051
L4015    REP   #$30
         JSR   L6EBC
         LDA   #$0002
         STA   L0EC6
         JSR   L1E20
L4023    JSR   L9610
         CMP   #$0001
         BNE   L402E
         JMP   L41D0

L402E    CMP   #$0002
         BNE   L4036
         JMP   L403E

L4036    CMP   #$001B
         BNE   L4023
         JMP   L4795

L403E    STZ   L8B33
         JSR   L2661
         LDA   #L2FE0
         STA   L0EC6
         LDA   #^L2FE0
         STA   L0EC8
         LDA   L0FFE
         STA   L0ECA
         LDA   L1000
         STA   L0ECC
         LDA   #L0FD2
         STA   L0ECE
         LDA   #^L0FD2
         STA   L0ED0
         JSR   L72CD
         JSR   L7B9B
         JSR   L86DF
         JSR   L8EC5
         LDA   #L8B46
         STA   L0EC6
         LDA   #^L8B46
         STA   L0EC8
         LDA   #L8B46
         STA   L0ECA
         LDA   #^L8B46
         STA   L0ECC
         LDA   #$0001
         STA   L0ECE
         JSR   L9226
         LDA   L8B37
         CMP   #$0002
         BNE   L40BE
         LDA   #L8B5E
         STA   L0EC6
         LDA   #^L8B5E
         STA   L0EC8
         LDA   #L8B5E
         STA   L0ECA
         LDA   #^L8B5E
         STA   L0ECC
         LDA   #$0002
         STA   L0ECE
         JSR   L9226
L40BE    JSR   L87B6
         LDA   #$0002
         STA   L0EC6
         JSR   L1E20
L40CA    JSR   L87F3
         JSR   L988C
         CMP   #$0001
         BNE   L4101
         JSR   L9AB6
         CMP   #$0001
         BEQ   L40EF
         LDA   #$0011
         STA   L0EC6
         JSR   L19CF
         LDA   #$004C
         STA   L3008
         JMP   L4159

L40EF    LDA   #$0013
         STA   L0EC6
         JSR   L19CF
         LDA   #$0042
         STA   L3008
         JMP   L4159

L4101    JSR   L9CD1
         CMP   #$0001
         BNE   L411B
         LDA   #$0005
         STA   L0EC6
         JSR   L19CF
         LDA   #$0049
         STA   L3008
         JMP   L4141

L411B    CMP   #$0002
         BNE   L4132
         LDA   #$0008
         STA   L0EC6
         JSR   L19CF
         LDA   #$0025
         STA   L3008
         JMP   L4141

L4132    LDA   #$0002
         STA   L0EC6
         JSR   L19CF
         LDA   #$0024
         STA   L3008
L4141    LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L7C27
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JSR   L142C
L4159    STZ   L300A
         LDA   #L300E
         STA   L0EC6
         LDA   #^L300E
         STA   L0EC8
         LDA   #$0064
         STA   L0ECA
         LDA   #$0000
         STA   L0ECE
         JSR   L7107
         JSR   L8864
         JSR   L857D
         JSR   L864F
         JSR   L1746
         JSR   L7C27
L4186    JSR   L6EBC
         JSR   L3170
         LDA   #$0000
         STA   L0EC6
         JSR   L35D3
         JSR   L36B2
         CMP   #$001B
         BEQ   L41B3
         JSR   L7B6A
         LDA   L8B35
         CMP   #$0001
         BNE   L4186
         INC   L300A
         LDA   L300A
         CMP   #$000A
         BNE   L4186
L41B3    JSR   L8621
         JSR   L86C0
         JSR   L1F56
         JSR   L8C76
         LDA   L0EC6
         CMP   #$0001
         BNE   L41CA
         JMP   L40CA

L41CA    JSR   L81F1
         JMP   L4795

L41D0    JSR   L7C27
         JSR   L2661
         LDA   #$0002
         STA   L0EC6
         JSR   L1E20
         LDA   #$0012
         STA   L0EC6
         JSR   L19CF
         LDA   #L3F91
         STA   L0EC6
         LDA   #^L3F91
         STA   L0EC8
         LDA   L0FFE
         STA   L0ECA
         LDA   L1000
         STA   L0ECC
         LDA   #L0FD2
         STA   L0ECE
         LDA   #^L0FD2
         STA   L0ED0
         JSR   L72CD
         LDA   #L3FB5
         STA   L0EC6
         LDA   #^L3FB5
         STA   L0EC8
         LDA   L0FFA
         STA   L0ECA
         LDA   L0FFC
         STA   L0ECC
         LDA   #L0FB2
         STA   L0ECE
         LDA   #^L0FB2
         STA   L0ED0
         JSR   L72CD
         LDA   #$0000
         STA   L278E
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L1746
         LDA   #$000F
         STA   L0EC6
         LDA   #$0008
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   #$0008
         STA   L2774
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1845
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         JSR   L7B06
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
         LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         JSR   L7971
         JSR   L1776
         JSR   L1402
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1875
         LDA   #$000F
         STA   L0EC6
         LDA   #$0008
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         JSR   L7B06
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L430E    JSR   L1797
         CMP   #$001B
         BNE   L4319
         JMP   L4023

L4319    CMP   #$0067
         BNE   L432A
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L430E

L432A    JSR   L1776
         JSR   L1402
         LDA   #$000F
         STA   L0EC6
         LDA   #$0008
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   #$0008
         STA   L2774
         LDA   L0FFA
         STA   L0EC6
         LDA   L0FFC
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1845
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         JSR   L7B06
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L438D    JSR   L1797
         CMP   #$001B
         BNE   L4398
         JMP   L4023

L4398    CMP   #$0067
         BNE   L43A9
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L438D

L43A9    JSR   L1776
         JSR   L1402
         LDA   #L3FD9
         STA   L0EC6
         LDA   #^L3FD9
         STA   L0EC8
         LDA   L0FFE
         STA   L0ECA
         LDA   L1000
         STA   L0ECC
         LDA   #L0FD2
         STA   L0ECE
         LDA   #^L0FD2
         STA   L0ED0
         JSR   L72CD
         LDA   #$0008
         STA   L3006
L43DC    LDA   L0FFA
         STA   L0EC6
         LDA   L0FFC
         STA   L0EC8
         LDA   #L3FFD
         STA   L0ECA
         LDA   #^L3FFD
         STA   L0ECC
         LDA   #$2000
         STA   L0ECE
         LDA   #$00E1
         STA   L0ED0
         LDA   #L400D
         STA   L0ED2
         LDA   #^L400D
         STA   L0ED4
         LDA   #$0000
         STA   L0ED6
         JSR   L78BB
         LDA   #$0014
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         JSR   L7931
         LDA   L0FFA
         STA   L0EC6
         LDA   L0FFC
         STA   L0EC8
         LDA   #L4005
         STA   L0ECA
         LDA   #^L4005
         STA   L0ECC
         LDA   #$2000
         STA   L0ECE
         LDA   #$00E1
         STA   L0ED0
         LDA   #L400D
         STA   L0ED2
         LDA   #^L400D
         STA   L0ED4
         LDA   #$0000
         STA   L0ED6
         JSR   L78BB
         LDA   #$0014
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         JSR   L7931
         DEC   L3006
         BEQ   L4474
         JMP   L43DC

L4474    JSR   L181B
         LDA   #$000F
         STA   L0EC6
         LDA   #$0008
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   #$0008
         STA   L2774
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         JSR   L7B06
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L44B9    JSR   L1797
         CMP   #$001B
         BNE   L44C4
         JMP   L4023

L44C4    CMP   #$0067
         BNE   L44D5
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L44B9

L44D5    JSR   L1776
         JSR   L1402
         JSR   L181B
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         JSR   L7B06
         LDA   #$000F
         STA   L0EC6
         LDA   #$0008
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L451A    JSR   L1797
         CMP   #$001B
         BNE   L4525
         JMP   L4023

L4525    CMP   #$0067
         BNE   L4536
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L451A

L4536    LDA   #$0000
         STA   L0EC6
         LDA   #L0FD2
         STA   L0ECA
         LDA   #^L0FD2
         STA   L0ECC
         JSR   L713A
         JSR   L1776
         JSR   L1402
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1845
         LDA   #$000F
         STA   L0EC6
         LDA   #$0008
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L459C    JSR   L1797
         CMP   #$001B
         BNE   L45A7
         JMP   L4023

L45A7    CMP   #$0067
         BNE   L45B8
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L459C

L45B8    JSR   L1776
         JSR   L1402
         JSR   L181B
         LDA   #$000F
         STA   L0EC6
         LDA   #$0008
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L45F1    JSR   L1797
         CMP   #$001B
         BNE   L45FC
         JMP   L4023

L45FC    CMP   #$0067
         BNE   L460D
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L45F1

L460D    JSR   L1776
         JSR   L1402
         JSR   L181B
         LDA   #$000F
         STA   L0EC6
         LDA   #$0008
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L4646    JSR   L1797
         CMP   #$001B
         BNE   L4651
         JMP   L4023

L4651    CMP   #$0067
         BNE   L4662
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L4646

L4662    LDA   #$000A
         STA   L3006
L4668    LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1845
         LDA   #$0014
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         JSR   L7931
         JSR   L1776
         LDA   L0FFE
         STA   L0EC6
         LDA   L1000
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         JSR   L1875
         LDA   #$0014
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         JSR   L7931
         JSR   L1776
         DEC   L3006
         BNE   L4668
         LDA   #$000F
         STA   L0EC6
         LDA   #$0008
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L46F7    JSR   L1797
         CMP   #$001B
         BNE   L4702
         JMP   L4023

L4702    CMP   #$0067
         BNE   L4713
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L46F7

L4713    JSR   L1776
         JSR   L1402
         JSR   L181B
         LDA   #$000F
         STA   L0EC6
         LDA   #$0008
         STA   L0ECA
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L1F7A
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #$000C
         STA   L0ECA
         JSR   L1FE6
L474C    JSR   L1797
         CMP   #$001B
         BNE   L4757
         JMP   L4023

L4757    CMP   #$0067
         BNE   L4768
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L474C

L4768    JSR   L1776
         JSR   L1402
L476E    JSR   L1797
         CMP   #$001B
         BNE   L4779
         JMP   L4023

L4779    CMP   #$0067
         BNE   L478A
         LDA   #$0004
         STA   L0EC6
         JSR   L18A5
         JMP   L476E

L478A    JSR   L90B3
         CMP   #$001B
         BEQ   L4795
         JMP   L403E

L4795    JSR   L1F56
         JSR   L1F68
         JMP   L1743

         DW    $000F
         DW    $0078
         DW    $003C
         DW    $00C8
         DW    $0069
         DW    $0003
         DW    $0087
         DW    $013D
         DW    $0069
         DW    $0003
         DW    $00BF
         DW    $013D
         DW    $0091
         DW    $0003
         DW    $00BF
         DW    $013D
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L47DE    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L47FE    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         ADRL  L490C
         ADRL  L4917
         ADRL  L4921
         ADRL  L4932
L4874    ADRL  L4940
         ADRL  L495F
         ADRL  L497E
         ADRL  L499C
L4884    DW    $00B2
         DW    $0002
         DW    $00C7
         DW    $013E
L488C    DW    $0001
         DW    $0001
         DW    $003A
         DW    $004F
         DW    $0001
         DW    $0051
         DW    $003A
         DW    $009F
         DW    $0001
         DW    $00A1
         DW    $003A
         DW    $00EF
         DW    $0001
         DW    $00F1
         DW    $003A
         DW    $013F
         DW    $003C
         DW    $0001
         DW    $0075
         DW    $004F
         DW    $003C
         DW    $0051
         DW    $0075
         DW    $009F
         DW    $003C
         DW    $00A1
         DW    $0075
         DW    $00EF
         DW    $003C
         DW    $00F1
         DW    $0075
         DW    $013F
         DW    $0077
         DW    $0001
         DW    $00B0
         DW    $004F
         DW    $0077
         DW    $0051
         DW    $00B0
         DW    $009F
         DW    $0077
         DW    $00A1
         DW    $00B0
         DW    $00EF
         DW    $0077
         DW    $00F1
         DW    $00B0
         DW    $013F
         DW    $0087
         DW    $0000
         DW    $00B4
         DW    $0050
         DW    $0087
         DW    $0050
         DW    $00B4
         DW    $00A0
         DW    $0087
         DW    $00A0
         DW    $00B4
         DW    $00F0
         DW    $0087
         DW    $00F0
         DW    $00B4
         DW    $0140
L490C    ASC   'Very good!'00
L4917    ASC   'Good job!'00
L4921    ASC   'You got a match!'00
L4932    ASC   'That'27's great!'00
L4940    ASC   'Whoops! Those two don'27't match.'00
L495F    ASC   'Whoops! Better luck next time.'00
L497E    ASC   'Sorry, those two don'27't match.'00
L499C    ASC   'Sorry, better luck next time.'00
L49BA    ASC   'It'27's your turn, '00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L49DE    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L49F4    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L49FA    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L4A24    REP   #$30
         JSR   L2661
         JSR   L250C
         JSR   L6EBC
         STZ   L8B33
         JSR   L7B9B
         JSR   L86DF
         JSR   L8EC5
         LDA   #L8B46
         STA   L0EC6
         LDA   #^L8B46
         STA   L0EC8
         LDA   #L8B46
         STA   L0ECA
         LDA   #^L8B46
         STA   L0ECC
         LDA   #$0001
         STA   L0ECE
         JSR   L9226
         LDA   L8B37
         CMP   #$0002
         BNE   L4A85
         LDA   #L8B5E
         STA   L0EC6
         LDA   #^L8B5E
         STA   L0EC8
         LDA   #L8B5E
         STA   L0ECA
         LDA   #^L8B5E
         STA   L0ECC
         LDA   #$0002
         STA   L0ECE
         JSR   L9226
L4A85    JSR   L87B6
         JSR   L857D
         JSR   L864F
L4A8E    JSR   L4E18
         STZ   L0EC6
         LDA   #$0005
         STA   L0ECA
         LDA   #L47FE
         STA   L0ECE
         LDA   #^L47FE
         STA   L0ED0
         JSR   L4DAA
         JSR   LA27C
         LDA   #$000B
         STA   L0EC6
         JSR   L7574
         LDA   #$0000
         STA   L0EC6
         LDA   #L0F72
         STA   L0ECA
         LDA   #^L0F72
         STA   L0ECC
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L7AAA
         STZ   L49DE
L4AD9    JSR   L4E9B
L4ADC    JSR   L4D21
         CMP   #$FFFF
         BEQ   L4AF7
         CMP   #$FFFE
         BNE   L4AEC
         JMP   L4BDD

L4AEC    STA   L49F4
         STA   L0EC6
         JSR   L4C4C
         BRA   L4AFD
L4AF7    JSR   L1402
         JMP   L4ADC

L4AFD    JSR   L4D21
         CMP   #$FFFF
         BEQ   L4B1D
         CMP   #$FFFE
         BNE   L4B0D
         JMP   L4BDD

L4B0D    CMP   L49F4
         BEQ   L4B1D
         STA   L49FA
         STA   L0EC6
         JSR   L4C4C
         BRA   L4B23
L4B1D    JSR   L1402
         JMP   L4AFD

L4B23    LDA   #L47FE
         STA   $04
         LDA   #^L47FE
         STA   $06
         LDA   L49FA
         ASL
         TAY
         LDA   [$04],Y
         STA   L0EC6
         LDA   L49F4
         ASL
         TAY
         LDA   [$04],Y
         CMP   L0EC6
         BEQ   L4B46
         JMP   L4B85

L4B46    JSR   L7B3A
         LDA   #L8883
         STA   L0EC6
         LDA   #^L8883
         STA   L0EC8
         JSR   L4BF7
         JSR   L850D
         LDA   #L47FE
         STA   $10
         LDA   #^L47FE
         STA   $12
         LDA   L49F4
         ASL
         TAY
         LDA   #$FFFF
         STA   [$10],Y
         STA   L49F4
         LDA   L49FA
         ASL
         TAY
         LDA   #$FFFF
         STA   [$10],Y
         STA   L49FA
         INC   L49DE
         JMP   L4BC9

L4B85    JSR   L7B52
         LDA   #L4874
         STA   L0EC6
         LDA   #^L4874
         STA   L0EC8
         JSR   L4BF7
         JSR   L13AE
         JSR   L84C0
         JSR   L7B06
         JSR   L6F56
         JSR   L7B06
         LDA   L49F4
         STA   L0EC6
         JSR   L4CB3
         LDA   L49FA
         STA   L0EC6
         JSR   L4CB3
         LDA   #$FFFF
         STA   L49F4
         LDA   #$FFFF
         STA   L49FA
         JSR   L7B6A
         BRA   L4BD2
L4BC9    JSR   L7B06
         JSR   L6F56
         JSR   L7B06
L4BD2    LDA   L49DE
         CMP   #$0006
         BEQ   L4BDD
         JMP   L4AD9

L4BDD    JSR   L8C76
         LDA   L0EC6
         CMP   #$0001
         BEQ   L4BF4
         JSR   L8621
         JSR   L86C0
         JSR   L81F1
         JMP   L1743
L4BF4    JMP   L4A8E

L4BF7    REP   #$30
L4BF9    JSR   L6F9F
         AND   #$0003
         CMP   #$0003
         BEQ   L4BF9
         STA   L8B31
         ASL
         ASL
         CLC
         ADC   L0EC6
         STA   L0EE2
         LDA   #$0000
         ADC   L0EC8
         STA   L0EE4
         LDA   #L4884
         STA   L0EC6
         LDA   #^L4884
         STA   L0EC8
         STZ   L0ECA
         JSR   L70AA
         LDA   L0EE2
         STA   $00
         LDA   L0EE4
         STA   $02
         LDA   [$00]
         STA   L0EC6
         LDY   #$0002
         LDA   [$00],Y
         STA   L0EC8
         LDA   #$00C1
         STA   L0ECA
         JSR   L7590
         RTS

L4C4C    REP   #$30
         LDA   L0EC6
         STA   L0EE6
         LDA   #L47FE
         STA   $04
         LDA   #^L47FE
         STA   $06
         LDA   L0EE6
         ASL
         TAY
         LDA   [$04],Y
         ASL
         ASL
         TAY
         LDA   #L47DE
         STA   $04
         LDA   #^L47DE
         STA   $06
         LDA   [$04],Y
         STA   L0EC6
         INY
         INY
         LDA   [$04],Y
         STA   L0ECA
         LDA   #$2000
         STA   L0ECE
         LDA   #$00E1
         STA   L0ED0
         LDA   #L488C
         STA   L0ED6
         LDA   #^L488C
         STA   L0ED8
         LDA   L0EE6
         ASL
         ASL
         ASL
         CLC
         ADC   L0ED6
         STA   L0ED2
         LDA   #$0000
         ADC   L0ED8
         STA   L0ED4
         JSR   L24A3
         JSR   L1402
         RTS

L4CB3    REP   #$30
         LDA   L0EC6
         STA   L0EE6
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         LDA   #L488C
         STA   L0ED6
         LDA   #^L488C
         STA   L0ED8
         LDA   L0EE6
         ASL
         ASL
         ASL
         CLC
         ADC   L0ED6
         STA   L0ECA
         LDA   #$0000
         ADC   L0ED8
         STA   L0ECC
         LDA   #$2000
         STA   L0ECE
         LDA   #$00E1
         STA   L0ED0
         LDA   #L488C
         STA   L0ED6
         LDA   #^L488C
         STA   L0ED8
         LDA   L0EE6
         ASL
         ASL
         ASL
         CLC
         ADC   L0ED6
         STA   L0ED2
         LDA   #$0000
         ADC   L0ED8
         STA   L0ED4
         LDA   #$0000
         STA   L0ED6
         JSR   L78BB
         RTS

L4D21    REP   #$30
         JSR   L70E5
L4D26    JSR   L6F28
         CMP   #$0000
         BEQ   L4D31
         JMP   L4D5A

L4D31    JSR   L6EE0
         LDA   L0ECE
         BEQ   L4D26
         LDA   #L488C
         STA   L0ECE
         LDA   #^L488C
         STA   L0ED0
         LDA   #$000C
         STA   L0ED2
         JSR   L7714
         LDA   L0ED6
         BNE   L4D56
         JMP   L4D97

L4D56    DEC
         JMP   L4D76

L4D5A    CMP   #$001B
         BNE   L4D62
         JMP   L4DA0

L4D62    ORA   #$0020
         CMP   #$0061
         BCS   L4D6D
L4D6A    JMP   L4D97

L4D6D    CMP   #$006D
         BCS   L4D6A
         SEC
         SBC   #$0061
L4D76    STA   L0EDE
         JSR   L70DB
         LDA   #L47FE
         STA   $00
         LDA   #^L47FE
         STA   $02
         LDA   L0EDE
         ASL
         TAY
         LDA   [$00],Y
         CMP   #$FFFF
         BNE   L4D93
         RTS

L4D93    LDA   L0EDE
         RTS

L4D97    JSR   L7764
         JSR   L1402
         JMP   L4D26

L4DA0    JSR   L7764
         JSR   L7B06
         LDA   #$FFFE
         RTS

L4DAA    REP   #$30
         LDA   L0ECA
         SEC
         SBC   L0EC6
         INC
         STA   L0EDA
         ASL
         DEC
         STA   L0ED6
         INC
         TAX
         LDA   L0ECE
         STA   $0C
         LDA   L0ED0
         STA   $0E
         LDA   L0EC6
         STA   L0EDE
         LDA   #$FFFF
         LDY   #$0000
L4DD4    STA   [$0C],Y
         INY
         INY
         DEX
         BNE   L4DD4
L4DDB    STZ   L0EC6
         LDA   L0ED6
         STA   L0ECA
         JSR   L6FAD
         ASL
         TAY
         LDA   [$0C],Y
         CMP   #$FFFF
         BNE   L4DDB
         LDA   L0EDE
         STA   [$0C],Y
L4DF5    STZ   L0EC6
         LDA   L0ED6
         STA   L0ECA
         JSR   L6FAD
         ASL
         TAY
         LDA   [$0C],Y
         CMP   #$FFFF
         BNE   L4DF5
         LDA   L0EDE
         STA   [$0C],Y
         INC   L0EDE
         DEC   L0EDA
         BNE   L4DDB
         RTS

L4E18    REP   #$30
         LDA   #L47DE
         STA   $00
         LDA   #^L47DE
         STA   $02
         STZ   L0EC6
         LDY   #$0000
L4E2A    PHY
         JSR   L6F9F
         PLY
         AND   #$0003
         BEQ   L4E2A
         STA   L0F48
         TAX
L4E38    PHY
         PHX
         JSR   L6F9F
         PLX
         PLY
         AND   #$000F
         CMP   #$000B
         BCS   L4E38
         INC
         STA   L0F4A
         TYX
         LDA   L0EC6
         BNE   L4E54
         JMP   L4E7D

L4E54    LDY   #$0000
         STZ   L0ECA
L4E5A    LDA   L0F48
         CMP   [$00],Y
         BNE   L4E6E
         INY
         INY
         LDA   L0F4A
         CMP   [$00],Y
         BNE   L4E70
         TXY
         JMP   L4E2A

L4E6E    INY
         INY
L4E70    INY
         INY
         INC   L0ECA
         LDA   L0ECA
         CMP   L0EC6
         BNE   L4E5A
L4E7D    TXY
         LDA   L0F48
         STA   [$00],Y
         INY
         INY
         LDA   L0F4A
         STA   [$00],Y
         INC   L0EC6
         LDA   L0EC6
         CMP   #$0006
         BEQ   L4E9A
         INY
         INY
         JMP   L4E2A
L4E9A    RTS

L4E9B    REP   #$30
         LDA   #L4884
         STA   L0EC6
         LDA   #^L4884
         STA   L0EC8
         STZ   L0ECA
         JSR   L70AA
         LDA   L8B35
         CMP   #$0001
         BNE   L4EC4
         LDA   #L8B46
         STA   $00
         LDA   #^L8B46
         STA   $02
         JMP   L4ECE

L4EC4    LDA   #L8B5E
         STA   $00
         LDA   #^L8B5E
         STA   $02
L4ECE    LDA   #L49BA+$10
         STA   $08
         LDA   #^L49BA+$10
         STA   $0A
         LDY   #$0000
         SEP   #$20
L4EDD    LDA   [$00],Y
         BEQ   L4EE7
         STA   [$08],Y
         INY
         JMP   L4EDD

L4EE7    LDA   #$2E
         STA   [$08],Y
         INY
         LDA   #$00
         STA   [$08],Y
         REP   #$30
         LDA   #L49BA
         STA   L0EC6
         LDA   #^L49BA
         STA   L0EC8
         LDA   #$00C1
         STA   L0ECA
         JSR   L7590
         RTS

         REP   #$30
         LDY   L8B31
         BNE   L4F30
         LDA   L8A8A
         STA   L0EC6
         LDA   L8A8C
         STA   L0EC8
         LDA   L8A8E
         STA   L0ECA
         LDA   L8A90
         STA   L0ECC
         LDA   L8A92
         STA   L0ECE
         JMP   L4F74

L4F30    CPY   #$0002
         BNE   L4F56
         LDA   L8AB1
         STA   L0EC6
         LDA   L8AB3
         STA   L0EC8
         LDA   L8AB5
         STA   L0ECA
         LDA   L8AB7
         STA   L0ECC
         LDA   L8AB9
         STA   L0ECE
         JMP   L4F74

L4F56    LDA   L8AD8
         STA   L0EC6
         LDA   L8ADA
         STA   L0EC8
         LDA   L8ADC
         STA   L0ECA
         LDA   L8ADE
         STA   L0ECC
         LDA   L8AE0
         STA   L0ECE
L4F74    JSR   L138B
         RTS

L4F78    REP   #$30
L4F7A    REP   #$30
         JSR   L6EBC
         _CompactMem
         JSR   L9F1C
         CMP   #$0005
         BEQ   L4FAE
         CMP   #$0004
         BNE   L4F96
         JMP   L4FB1

L4F96    CMP   #$0003
         BNE   L4F9E
         JMP   L511D

L4F9E    CMP   #$0002
         BNE   L4FA6
         JMP   L51BE

L4FA6    CMP   #$0001
         BNE   L4F7A
         JMP   L523B
L4FAE    JMP   L1743

L4FB1    REP   #$30
         JSR   L2661
         LDA   #L2FE0
         STA   L0EC6
         LDA   #^L2FE0
         STA   L0EC8
         LDA   L0FFE
         STA   L0ECA
         LDA   L1000
         STA   L0ECC
         LDA   #L0FD2
         STA   L0ECE
         LDA   #^L0FD2
         STA   L0ED0
         JSR   L72CD
         JSR   L86DF
         JSR   L7B9B
         JSR   L8EC5
         LDA   #L8B46
         STA   L0EC6
         LDA   #^L8B46
         STA   L0EC8
         LDA   #L8B46
         STA   L0ECA
         LDA   #^L8B46
         STA   L0ECC
         LDA   #$0001
         STA   L0ECE
         JSR   L9226
         LDA   L8B37
         CMP   #$0002
         BNE   L5030
         LDA   #L8B5E
         STA   L0EC6
         LDA   #^L8B5E
         STA   L0EC8
         LDA   #L8B5E
         STA   L0ECA
         LDA   #^L8B5E
         STA   L0ECC
         LDA   #$0002
         STA   L0ECE
         JSR   L9226
L5030    JSR   L87B6
L5033    REP   #$30
         JSR   L6EBC
         JSR   L5904
         CMP   #$0000
         BNE   L5043
         JMP   L5117

L5043    JSR   L5753
         JSR   L58AE
         CMP   #$0015
         BCS   L509C
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         LDA   #L6899+$11
         STA   L0EC6
         LDA   #^L6899+$11
         STA   L0EC8
         LDA   #$0028
         STA   L0ECA
         JSR   L7590
         LDA   #L68CC
         STA   L0EC6
         LDA   #^L68CC
         STA   L0EC8
         LDA   #$003C
         STA   L0ECA
         JSR   L7590
         JSR   L6F56
         JMP   L5033

L509C    DEC
         STA   L3008
         STZ   L8B33
         JSR   L2661
         STZ   L300A
         LDA   #L300E
         STA   L0EC6
         LDA   #^L300E
         STA   L0EC8
         LDA   #$0064
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         LDA   #$0000
         STA   L0ECE
         JSR   L7107
         JSR   L857D
         JSR   L864F
         JSR   L1746
L50D3    JSR   L6EBC
         JSR   L3170
         LDA   #$0000
         STA   L0EC6
         JSR   L35D3
         JSR   L36B2
         CMP   #$001B
         BEQ   L5100
         JSR   L7B6A
         LDA   L8B35
         CMP   #$0001
         BNE   L50D3
         INC   L300A
         LDA   L300A
         CMP   #$000A
         BNE   L50D3
L5100    JSR   L8621
         JSR   L86C0
         JSR   L1F56
         JSR   L8C76
         LDA   L0EC6
         CMP   #$0001
         BNE   L5117
         JMP   L5033

L5117    JSR   L81F1
         JMP   L4F7A

L511D    REP   #$30
         JSR   L6EBC
         JSR   L58EA
         CMP   #$0000
         BNE   L512D
         JMP   L4F7A

L512D    JSR   L5753
         JSR   L64AC
         LDA   #$0000
         STA   L68EE
         LDA   #$0001
         STA   L68EC
         LDA   #$0010
         STA   L68EA
         LDA   #$0000
         STA   L68FC
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         LDA   #$000F
         STA   L0EC6
         JSR   L1839
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
L5172    REP   #$30
         LDA   #$2000
         STA   L0EC6
         LDA   #$00E1
         STA   L0EC8
         LDA   #$7D00
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         LDA   #$0000
         STA   L0ECE
         JSR   L7107
         JSR   L532B
         JSR   L1402
         JSR   L1797
         CMP   #$001B
         BNE   L51A6
         JMP   L4F7A

L51A6    LDA   L68FC
         BNE   L51B3
         DEC   L68EA
         BEQ   L51B3
         JMP   L5172

L51B3    REP   #$30
         JSR   L1F56
         JSR   L7B06
         JMP   L4F7A

L51BE    REP   #$30
         JSR   L6EBC
         LDA   #L68DE
         STA   L6904
         LDA   #^L68DE
         STA   L6906
         LDA   #$00F3
         STA   L68E4
         LDA   #$2EB8
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         LDA   #$C000
         STA   L0ECA
         JSR   L7166
         LDA   L0ECE
         STA   L2776
         LDA   L0ED0
         STA   L2778
         LDA   L0ED2
         STA   L277E
         LDA   L0ED4
         STA   L2780
         JSR   L1746
         JSR   L594D
         JSR   L52DD
         JSR   L552A
         JSR   L52B8
L5211    JSR   L5C48
         CMP   #$001B
         BNE   L5211
         JSR   L5BB9
         LDA   L68FC
         BEQ   L5211
         JSR   L52B8
         JSR   L1F56
         PEA   $0092
         _WriteChar
         _GrafOn
         JMP   L4F7A

L523B    REP   #$30
         JSR   L6EBC
         LDA   #L68D8
         STA   L6904
         LDA   #^L68D8
         STA   L6906
         LDA   #$00F2
         STA   L68E4
         LDA   #$2EB8
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         LDA   #$C000
         STA   L0ECA
         JSR   L7166
         LDA   L0ECE
         STA   L2776
         LDA   L0ED0
         STA   L2778
         LDA   L0ED2
         STA   L277E
         LDA   L0ED4
         STA   L2780
         JSR   L1746
         JSR   L594D
         JSR   L52DD
         JSR   L552A
         JSR   L52B8
L528E    JSR   L5C48
         CMP   #$001B
         BNE   L528E
         JSR   L5BB9
         LDA   L68FC
         BEQ   L528E
         JSR   L52B8
         JSR   L1F56
         PEA   $0092
         _WriteChar
         _GrafOn
         JMP   L4F7A

L52B8    REP   #$30
         LDA   #$0001
         STA   L68EC
         LDA   #$0001
         STA   L68F0
         LDA   #$0001
         STA   L68EE
         JSR   L5475
         JSR   L5500
         PEA   $008C
         _WriteChar
         RTS

L52DD    REP   #$30
         LDA   L277E
         STA   L0EC6
         LDA   L2780
         STA   L0EC8
         LDA   #$2EB8
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         LDA   #$0020
         STA   L0ECE
         JSR   L7107
         LDA   L277E
         STA   L6908
         LDA   L2780
         STA   L690A
         LDA   #$0001
         STA   L68EC
         LDA   #$0001
         STA   L68EE
         LDA   #$0001
         STA   L68F0
         LDA   #$0001
         STA   L68F2
         LDA   #$0001
         STA   L68F6
         RTS

L532B    REP   #$30
         LDA   #$0016
         STA   L53BE
         LDA   #$000A
         STA   L2798
L5339    INC   L68EE
         JSR   L5475
         JSR   L5500
         LDA   #L69A8
         STA   $00
         LDA   #^L69A8
         STA   $02
         LDY   #$0000
         SEP   #$20
L5351    LDA   [$00],Y
         CMP   #$7E
         BEQ   L5360
         INY
         CPY   #$0028
         BNE   L5351
         JMP   L538B

L5360    LDA   #$20
         STA   [$00],Y
         REP   #$30
         LDA   #$0006
         STA   L0EC6
         LDA   L2798
         STA   L0ECA
         JSR   L74DA
         LDA   #L69A8
         STA   L0EC6
         LDA   #^L69A8
         STA   L0EC8
         JSR   L7513
         LDA   #$0001
         STA   L68FC
         RTS

L538B    REP   #$30
         LDA   #$0006
         STA   L0EC6
         LDA   L2798
         STA   L0ECA
         JSR   L74DA
         LDA   #L69A8
         STA   L0EC6
         LDA   #^L69A8
         STA   L0EC8
         JSR   L7513
         LDA   #$0009
         CLC
         ADC   L2798
         STA   L2798
         DEC   L53BE
         BEQ   L53BD
         JMP   L5339
L53BD    RTS

L53BE    DW    $0000
         DW    $0000
L53C2    REP   #$30
         JSR   L5887
         JSR   L52B8
         LDA   L277E
         STA   L0EC6
         LDA   L2780
         STA   L0EC8
         LDA   #$0028
         LDX   L68F2
         DEX
         BEQ   L53FA
         STX   L5473
L53E2    LDA   #$0028
         CLC
         ADC   L0EC6
         STA   L0EC6
         LDA   #$0000
         ADC   L0EC8
         STA   L0EC8
         DEC   L5473
         BNE   L53E2
L53FA    LDA   L0EC6
         STA   L690C
         LDA   L0EC8
         STA   L690E
         LDA   #$0016
         STA   L68F8
L540C    LDA   L690C
         STA   L0EC6
         LDA   L690E
         STA   L0EC8
         LDA   #L69A8
         STA   L0ECA
         LDA   #^L69A8
         STA   L0ECC
         LDA   #$0028
         STA   L0ECE
         LDA   #$0000
         STA   L0ED0
         JSR   L705E
         LDA   L690C
         STA   L0EC6
         LDA   L690E
         STA   L0EC8
         LDA   #$0028
         CLC
         ADC   L0EC6
         STA   L0EC6
         LDA   #$0000
         ADC   L0EC8
         STA   L0EC8
         LDA   L0EC6
         STA   L690C
         LDA   L0EC8
         STA   L690E
         JSR   L54B3
         INC   L68F0
         DEC   L68F8
         BNE   L540C
         JSR   L57FC
         JSR   L5475
         JSR   L5500
         RTS

L5473    DW    $0000
L5475    REP   #$30
         LDA   L277E
         STA   L0EC6
         LDA   L2780
         STA   L0EC8
         LDX   L68EE
         STX   L54B1
L5489    DEC   L54B1
         BEQ   L54A4
         LDA   #$0028
         CLC
         ADC   L0EC6
         STA   L0EC6
         LDA   #$0000
         ADC   L0EC8
         STA   L0EC8
         JMP   L5489

L54A4    LDA   L0EC6
         STA   L6908
         LDA   L0EC8
         STA   L690A
         RTS

L54B1    DW    $0000
L54B3    REP   #$30
         LDA   L68EC
         STA   L54FE
         LDA   #$0001
         STA   L68EC
         LDA   L68F0
         DEC
         DEC
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   L68EC
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L69A8
         STA   L0EC6
         LDA   #^L69A8
         STA   L0EC8
         JSR   L59BD
         LDA   L54FE
         STA   L68EC
         RTS

L54FE    DW    $0000
L5500    REP   #$30
         LDA   L6908
         STA   L0EC6
         LDA   L690A
         STA   L0EC8
         LDA   #L69A8
         STA   L0ECA
         LDA   #^L69A8
         STA   L0ECC
         LDA   #$0028
         STA   L0ECE
         LDA   #$0000
         STA   L0ED0
         JSR   L705E
         RTS

L552A    REP   #$30
         JSR   L5887
         JSR   L52B8
         LDA   #L6502
         STA   L690C
         LDA   #^L6502
         STA   L690E
         LDA   #$0016
         STA   L55AA
L5544    LDA   L690C
         STA   L0EC6
         LDA   L690E
         STA   L0EC8
         LDA   #L69A8
         STA   L0ECA
         LDA   #^L69A8
         STA   L0ECC
         LDA   #$0028
         STA   L0ECE
         LDA   #$0000
         STA   L0ED0
         JSR   L705E
         LDA   L690C
         STA   L0EC6
         LDA   L690E
         STA   L0EC8
         LDA   #$0028
         CLC
         ADC   L0EC6
         STA   L0EC6
         LDA   #$0000
         ADC   L0EC8
         STA   L0EC8
         LDA   L0EC6
         STA   L690C
         LDA   L0EC8
         STA   L690E
         JSR   L54B3
         INC   L68F0
         DEC   L55AA
         BNE   L5544
L55A1    JSR   L6F28
         BEQ   L55A1
         JSR   L57FC
         RTS

L55AA    DW    $0000
L55AC    REP   #$30
         JSR   L5843
         JSR   L59CF
         JSR   L5475
         JSR   L5500
         JSR   L54B3
         RTS

L55BE    REP   #$30
         LDA   #$0001
         STA   L68EC
         LDA   #$0001
         STA   L68EE
         LDA   #$0001
         STA   L68F0
         LDA   #$0001
         STA   L68F2
         JSR   L5475
         JSR   L53C2
         JSR   L5500
         RTS

L55E2    REP   #$30
         LDA   L68EC
         CMP   #$0001
         BNE   L55F2
         JSR   L1402
         JMP   L55F5

L55F2    DEC   L68EC
L55F5    RTS

L55F6    REP   #$30
         LDA   L68EC
         CMP   #$0026
         BEQ   L5603
         INC   L68EC
L5603    RTS

L5604    REP   #$30
         JSR   L5843
         JSR   L591E
         JSR   L5475
         JSR   L5500
         JSR   L54B3
         RTS

L5616    REP   #$30
         JSR   L5843
         JSR   L59CF
         JSR   L5475
         JSR   L5500
         JSR   L54B3
         LDA   #$0001
         STA   L68EC
         RTS

L562E    REP   #$30
         JSR   L5843
         LDA   L68EE
         CLC
         ADC   #$0016
         CMP   #$0115
         BCC   L5642
         LDA   #$0115
L5642    STA   L68EE
         STA   L68F2
         LDA   #$0001
         STA   L68EC
         LDA   #$0001
         STA   L68F0
         JSR   L5475
         JSR   L53C2
         JSR   L5500
         RTS

L565E    REP   #$30
         JSR   L5843
         LDA   L68EE
         CMP   #$0001
         BEQ   L5677
         SEC
         SBC   #$0016
         CMP   #$0001
         BPL   L5677
         LDA   #$0001
L5677    STA   L68EE
         STA   L68F2
         LDA   #$0001
         STA   L68EC
         LDA   #$0001
         STA   L68F0
         JSR   L5475
         JSR   L53C2
         JSR   L5500
         RTS

L5693    REP   #$30
         LDA   L68F0
         DEC
         DEC
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   L68EC
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         PEA   $008F
         _WriteChar
         LDA   #L69A8
         STA   $00
         LDA   #^L69A8
         STA   $02
         LDA   L0EC6
         AND   #$00FF
         LDY   L68EC
         DEY
         SEP   #$20
         LDA   [$00],Y
         REP   #$30
         PHA
         _WriteChar
         PEA   $008E
         _WriteChar
         PEA   $0088
         _WriteChar
         RTS

L56FD    REP   #$30
         LDA   L68EC
         CMP   #$0026
         BNE   L570D
         JSR   L1402
         JMP   L5721

L570D    LDA   L69DB
         PHA
         _WriteChar
         LDA   L69DB
         STA   L0EC6
         JSR   L5823
L5721    RTS

         DW    $0000
L5724    REP   #$30
         LDA   #L69A8
         STA   $00
         LDA   #^L69A8
         STA   $02
         LDA   L0EC6
         AND   #$00FF
         LDY   L68EC
         DEY
         SEP   #$20
         LDA   [$00],Y
         REP   #$30
         PHA
         _WriteChar
         PEA   $0088
         _WriteChar
         RTS

L5753    REP   #$30
         LDA   #L8B8C
         STA   L0EC6
         LDA   #^L8B8C
         STA   L0EC8
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         JSR   L722C
         LDA   L0EEA
         STA   L0EC6
         LDA   L0EEC
         STA   L0EC8
         LDA   #$0200
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         JSR   L6F69
         LDA   L0ED0
         PHA
         LDA   L0ECE
         PHA
         LDA   L0ECE
         STA   L0EC6
         LDA   L0ED0
         STA   L0EC8
         LDA   #$C000
         STA   L0ECA
         JSR   L7166
         LDA   L0ECE
         STA   L2776
         LDA   L0ED0
         STA   L2778
         LDA   L0ED2
         STA   L277E
         LDA   L0ED4
         STA   L2780
         PLA
         STA   L0EEA
         PLA
         STA   L0EEC
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         JSR   L71ED
         LDA   L0ECA
         PHA
         LDA   L0ECA
         STA   L0EC6
         LDA   L277E
         STA   L0ECA
         LDA   L2780
         STA   L0ECC
         LDA   L0EEA
         STA   L0ECE
         LDA   L0EEC
         STA   L0ED0
         JSR   L720C
         PLA
         STA   L0EC6
         JSR   L721F
         RTS

L57FC    REP   #$30
         LDA   L6918
         STA   L6908
         LDA   L691A
         STA   L690A
         LDA   L691C
         STA   L68EE
         LDA   L691E
         STA   L68EC
         LDA   L6920
         STA   L68F0
         LDA   L6922
         STA   L68F2
         RTS

L5823    REP   #$30
         LDA   #L69A8
         STA   $00
         LDA   #^L69A8
         STA   $02
         LDA   L0EC6
         AND   #$00FF
         LDY   L68EC
         DEY
         SEP   #$20
         STA   [$00],Y
         REP   #$30
         INC   L68EC
         RTS

L5843    REP   #$30
         LDA   #L69A8
         STA   $00
         LDA   #^L69A8
         STA   $02
         LDY   #$0026
         SEP   #$20
         LDA   #$0D
         STA   [$00],Y
         INY
         LDA   #$00
         STA   [$00],Y
         REP   #$30
         LDA   #L69A8
         STA   L0EC6
         LDA   #^L69A8
         STA   L0EC8
         LDA   L6908
         STA   L0ECA
         LDA   L690A
         STA   L0ECC
         LDA   #$0028
         STA   L0ECE
         LDA   #$0000
         STA   L0ED0
         JSR   L705E
         RTS

L5887    REP   #$30
         LDA   L6908
         STA   L6918
         LDA   L690A
         STA   L691A
         LDA   L68EE
         STA   L691C
         LDA   L68EC
         STA   L691E
         LDA   L68F0
         STA   L6920
         LDA   L68F2
         STA   L6922
         RTS

L58AE    REP   #$30
         LDA   L277E
         STA   $00
         LDA   L2780
         STA   $02
         LDX   #$0000
         LDY   #$0000
L58C0    REP   #$30
         LDA   #$0005
         STA   L0EC6
L58C8    SEP   #$20
         LDA   [$00],Y
         CMP   #$0D
         BEQ   L58DA
         CMP   #$7E
         BEQ   L58E6
         REP   #$30
         INY
         JMP   L58C8

L58DA    REP   #$30
         INY
         DEC   L0EC6
         BNE   L58C8
         INX
         JMP   L58C0

L58E6    REP   #$30
         TXA
         RTS

L58EA    REP   #$30
         JSR   L2643
         LDA   #L5902
         STA   L0EC6
         LDA   #^L5902
         STA   L0EC8
         JSR   L7C8B
         LDA   L8B76
         RTS

L5902    DB    $01        ; TYPE $F2
         DB    $F2
L5904    REP   #$30
         JSR   L2643
         LDA   #L591C
         STA   L0EC6
         LDA   #^L591C
         STA   L0EC8
         JSR   L7C8B
         LDA   L8B76
         RTS

L591C    DB    $01        ; TYPE $F3
         DB    $F3
L591E    REP   #$30
         LDA   L68EE
         CMP   #$0001
         BNE   L592E
         JSR   L1402
         JMP   L594C

L592E    DEC   L68EE
         LDA   L68F0
         CMP   #$0001
         BNE   L5949
         DEC   L68F2
         PEA   $0096
         _WriteChar
         JMP   L594C

L5949    DEC   L68F0
L594C    RTS

L594D    REP   #$30
         _GrafOff
         PEA   $0000
         PEA   $0000
         PEA   $0003
         _SetOutputDevice
         PEA   $0001
         _InitTextDev
         PEA   $0000
         PEA   $0000
         PEA   $0003
         _SetInputDevice
         PEA   $0000
         _InitTextDev
         PEA   $00FF
         PEA   $0080
         _SetOutGlobals
         PEA   $00FF
         PEA   $0080
         _SetInGlobals
         PEA   $0091
         _WriteChar
         RTS

         REP   #$30
         LDA   L0EC6
         PHA
         _WriteChar
         RTS

L59BD    REP   #$30
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         _WriteCString
         RTS

L59CF    REP   #$30
         LDA   L68EE
         CMP   #$012B
         BNE   L59DC
         JMP   L5A0C

L59DC    INC   L68EE
         LDA   L68F0
         CMP   #$0016
         BEQ   L59F7
         INC   L68F0
         PEA   $008D
         _WriteChar
         JMP   L5A0C

L59F7    LDA   L68F2
         CMP   #$0115
         BEQ   L5A0C
         INC   L68F2
         PEA   $0097
         _WriteChar
L5A0C    RTS

L5A0D    REP   #$30
         LDY   L68EC
         CPY   #$0001
         BNE   L5A1D
         JSR   L1402
         JMP   L5A38

L5A1D    LDA   #L69A8
         STA   $00
         LDA   #^L69A8
         STA   $02
         DEY
         DEY
         SEP   #$20
         LDA   #$20
         STA   [$00],Y
         REP   #$30
         INY
         STY   L68EC
         JSR   L54B3
L5A38    RTS

L5A39    REP   #$30
         JSR   L5843
         JSR   L5887
         LDA   #$0016
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   #$0001
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L6924
         STA   L0EC6
         LDA   #^L6924
         STA   L0EC8
         JSR   L59BD
         JSR   L5D5C
         BNE   L5A7D
         JMP   L5A84

L5A7D    JSR   L52DD
         JSR   L52B8
         RTS

L5A84    LDA   #$0016
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   #$0001
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L694D
         STA   L0EC6
         LDA   #^L694D
         STA   L0EC8
         JSR   L59BD
         JSR   L57FC
         JSR   L5475
         JSR   L5500
         RTS

L5AC2    REP   #$30
         JSR   L5887
         LDA   L277E
         STA   L0EC6
         LDA   L2780
         STA   L0EC8
         LDA   #$0028
         LDX   L68EE
         DEX
         BEQ   L5AF7
         STX   L699E
L5ADF    LDA   #$0028
         CLC
         ADC   L0EC6
         STA   L0EC6
         LDA   #$0000
         ADC   L0EC8
         STA   L0EC8
         DEC   L699E
         BNE   L5ADF
L5AF7    LDA   L0EC6
         STA   L69A4
         LDA   L0EC8
         STA   L69A6
         LDA   #$0028
         CLC
         ADC   L0EC6
         STA   L0EC6
         LDA   #$0000
         ADC   L0EC8
         STA   L0EC8
         LDA   L0EC6
         STA   L69A0
         LDA   L0EC8
         STA   L69A2
         LDA   #$012B
         SEC
         SBC   L68EE
         DEC
         STA   L68F8
L5B2D    LDA   L69A0
         STA   L0EC6
         LDA   L69A2
         STA   L0EC8
         LDA   L69A4
         STA   L0ECA
         LDA   L69A6
         STA   L0ECC
         LDA   #$0028
         STA   L0ECE
         LDA   #$0000
         STA   L0ED0
         JSR   L705E
         LDA   L69A0
         STA   L0EC6
         LDA   L69A2
         STA   L0EC8
         LDA   #$0028
         CLC
L5B64    ADC   L0EC6
         STA   L0EC6
         LDA   #$0000
         ADC   L0EC8
         STA   L0EC8
         LDA   L0EC6
         STA   L69A0
         LDA   L0EC8
         STA   L69A2
         LDA   L69A4
         STA   L0EC6
         LDA   L69A6
         STA   L0EC8
         LDA   #$0028
         CLC
         ADC   L0EC6
         STA   L0EC6
         LDA   #$0000
         ADC   L0EC8
         STA   L0EC8
         LDA   L0EC6
         STA   L69A4
         LDA   L0EC8
         STA   L69A6
         DEC   L68F8
         BEQ   L5BB2
         JMP   L5B2D

L5BB2    JSR   L57FC
         JSR   L53C2
         RTS

L5BB9    REP   #$30
         JSR   L5843
         JSR   L5887
         LDA   #$0016
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   #$0001
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L6975
         STA   L0EC6
         LDA   #^L6975
         STA   L0EC8
         JSR   L59BD
         JSR   L5D5C
         BNE   L5BFD
         JMP   L5C04

L5BFD    LDA   #$0001
         STA   L68FC
         RTS

L5C04    LDA   #$0016
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   #$0001
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L694D
         STA   L0EC6
         LDA   #^L694D
         STA   L0EC8
         JSR   L59BD
         JSR   L57FC
         JSR   L5475
         JSR   L5500
         LDA   #$0000
         STA   L68FC
         RTS

L5C48    REP   #$30
L5C4A    JSR   L5693
         JSR   L6F28
         BEQ   L5C4A
         STA   L69DB
         JSR   L5724
         LDA   L74B8
         AND   #$0800
         BEQ   L5C63
         JMP   L5CC0

L5C63    LDA   L69DB
         CMP   #$001B
         BNE   L5C6E
         JMP   L5D31

L5C6E    CMP   #$0020
         BMI   L5C7E
         CMP   #$007B
         BPL   L5C7E
         JSR   L56FD
         JMP   L5C4A

L5C7E    CMP   #$000D
         BNE   L5C89
         JSR   L5616
         JMP   L5C4A

L5C89    CMP   #$007F
         BNE   L5C94
         JSR   L5A0D
         JMP   L5C4A

L5C94    CMP   #$000B
         BNE   L5C9F
         JSR   L5604
         JMP   L5C4A

L5C9F    CMP   #$0008
         BNE   L5CAA
         JSR   L55E2
         JMP   L5C4A

L5CAA    CMP   #$0015
         BNE   L5CB5
         JSR   L55F6
         JMP   L5C4A

L5CB5    CMP   #$000A
         BNE   L5CBD
         JSR   L55AC
L5CBD    JMP   L5C4A

L5CC0    LDA   L69DB
         CMP   #$0075
         BNE   L5CCE
         JSR   L565E
         JMP   L5C4A

L5CCE    CMP   #$0064
         BNE   L5CD9
         JSR   L562E
         JMP   L5C4A

L5CD9    CMP   #$0074
         BNE   L5CE4
         JSR   L55BE
         JMP   L5C4A

L5CE4    CMP   #$0068
         BNE   L5CEF
         JSR   L60CD
         JMP   L5C4A

L5CEF    CMP   #$0063
         BNE   L5CFA
         JSR   L5A39
         JMP   L5C4A

L5CFA    CMP   #$007A
         BNE   L5D05
         JSR   L5AC2
         JMP   L5C4A

L5D05    CMP   #$0069
         BNE   L5D10
         JSR   L5E0A
         JMP   L5C4A

L5D10    CMP   #$006C
         BNE   L5D1B
         JSR   L5F8A
         JMP   L5C4A

L5D1B    CMP   #$0073
         BNE   L5D26
         JSR   L63B4
         JMP   L5C4A

L5D26    CMP   #$0070
         BNE   L5D2E
         JSR   L606A
L5D2E    JMP   L5C4A
L5D31    RTS

L5D32    REP   #$30
         JSR   L2643
         LDA   #L5D50
         STA   L0ECA
         LDA   #^L5D50
         STA   L0ECC
         LDA   #$000C
         STA   L0ECE
         JSR   L7D29
         LDA   L8B76
         RTS

L5D50    STR   'story01.mth'
L5D5C    REP   #$30
L5D5E    JSR   L6F28
         BEQ   L5D5E
         CMP   #$0059
         BNE   L5D6B
         JMP   L5DC2

L5D6B    CMP   #$0079
         BNE   L5D73
         JMP   L5DC2

L5D73    CMP   #$004E
         BNE   L5D7B
         JMP   L5D80

L5D7B    CMP   #$006E
         BNE   L5D5E
L5D80    PHA
         _WriteChar
         LDA   #$0000
         STA   L5E08
L5D8E    JSR   L6F28
         BEQ   L5D8E
         CMP   #$000D
         BNE   L5D9B
         JMP   L5E04

L5D9B    CMP   #$007F
         BNE   L5D8E
         PEA   $0088
         _WriteChar
         LDA   #$0020
         PHA
         _WriteChar
         PEA   $0088
         _WriteChar
         JMP   L5D5E

L5DC2    PHA
         _WriteChar
         LDA   #$0001
         STA   L5E08
L5DD0    JSR   L6F28
         BEQ   L5DD0
         CMP   #$000D
         BNE   L5DDD
         JMP   L5E04

L5DDD    CMP   #$007F
         BNE   L5DD0
         PEA   $0088
         _WriteChar
         LDA   #$0020
         PHA
         _WriteChar
         PEA   $0088
         _WriteChar
         JMP   L5D5E

L5E04    LDA   L5E08
         RTS

L5E08    DW    $0000
L5E0A    REP   #$30
         JSR   L5843
         JSR   L5887
         LDA   L277E
         STA   L0EC6
         LDA   L2780
         STA   L0EC8
         LDA   #$2E68
         CLC
         ADC   L0EC6
         STA   L0ECA
         LDA   #$0000
         ADC   L0EC8
         STA   L0ECC
         LDA   L0ECA
         STA   L69A0
         LDA   L0ECC
         STA   L69A2
         LDA   L277E
         STA   L0EC6
         LDA   L2780
         STA   L0EC8
         LDA   #$2E90
         CLC
         ADC   L0EC6
         STA   L0ECE
         LDA   #$0000
         ADC   L0EC8
         STA   L0ED0
         LDA   L0ECE
         STA   L69A4
         LDA   L0ED0
         STA   L69A6
         LDA   #$012B
         SEC
         SBC   L68EE
         BNE   L5E74
         JMP   L5F14

L5E74    STA   L68F8
L5E77    LDA   L69A0
         STA   L0EC6
         LDA   L69A2
         STA   L0EC8
         LDA   L69A4
         STA   L0ECA
         LDA   L69A6
         STA   L0ECC
         LDA   #$0028
         STA   L0ECE
         LDA   #$0000
         STA   L0ED0
         JSR   L705E
         LDA   L69A0
         STA   L0EC6
         LDA   L69A2
         STA   L0EC8
         LDA   #$0028
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         LDA   L0EC6
         SEC
         SBC   L0ECA
         STA   L0ECE
         LDA   L0EC8
         SBC   L0ECC
         STA   L0ED0
         LDA   L0ECE
         STA   L69A0
         LDA   L0ED0
         STA   L69A2
         LDA   L69A4
         STA   L0EC6
         LDA   L69A6
         STA   L0EC8
         LDA   #$0028
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         LDA   L0EC6
         SEC
         SBC   L0ECA
         STA   L0ECE
         LDA   L0EC8
         SBC   L0ECC
         STA   L0ED0
         LDA   L0ECE
         STA   L69A4
         LDA   L0ED0
         STA   L69A6
         DEC   L68F8
         BEQ   L5F14
         JMP   L5E77

L5F14    LDA   L277E
         STA   L0EC6
         LDA   L2780
         STA   L0EC8
         LDA   #$0028
         LDX   L68EE
         DEX
         BEQ   L5F44
         STX   L699E
L5F2C    LDA   #$0028
         CLC
         ADC   L0EC6
         STA   L0EC6
         LDA   #$0000
         ADC   L0EC8
         STA   L0EC8
         DEC   L699E
         BNE   L5F2C
L5F44    LDA   L0EC6
         STA   L69A4
         LDA   L0EC8
         STA   L69A6
         LDA   #L694D
         STA   L69A0
         LDA   #^L694D
         STA   L69A2
         LDA   L69A0
         STA   L0EC6
         LDA   L69A2
         STA   L0EC8
         LDA   L69A4
         STA   L0ECA
         LDA   L69A6
         STA   L0ECC
         LDA   #$0028
         STA   L0ECE
         LDA   #$0000
         STA   L0ED0
         JSR   L705E
         JSR   L57FC
         JSR   L53C2
         RTS

L5F8A    REP   #$30
         _GrafOn
         LDA   L68E4
         CMP   #$00F2
         BNE   L5FA6
         JSR   L58EA
         CMP   #$0000
         BNE   L5FB7
         JMP   L6047

L5FA6    JSR   L5904
         CMP   #$0000
         BNE   L5FB1
         JMP   L6047

L5FB1    JSR   L60DC
         JMP   L602F

L5FB7    JSR   L52DD
         LDA   #L8B8C
         STA   L0EC6
         LDA   #^L8B8C
         STA   L0EC8
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         JSR   L722C
         LDA   L0EEA
         STA   L0EC6
         LDA   L0EEC
         STA   L0EC8
         LDA   #$0200
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         JSR   L6F69
         LDA   L0ECE
         STA   L0EEA
         LDA   L0ED0
         STA   L0EEC
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         JSR   L71ED
         LDA   L0ECA
         PHA
         LDA   L0ECA
         STA   L0EC6
         LDA   L277E
         STA   L0ECA
         LDA   L2780
         STA   L0ECC
         LDA   L0EEA
         STA   L0ECE
         LDA   L0EEC
         STA   L0ED0
         JSR   L720C
         PLA
         STA   L0EC6
         JSR   L721F
L602F    JSR   L64AC
         LDY   L68E6
         LDA   L277E
         STA   $00
         LDA   L2780
         STA   $02
         SEP   #$20
         LDA   #$20
         STA   [$00],Y
         REP   #$30
L6047    _GrafOff
         LDA   #$0001
         STA   L68F2
         LDA   #$0001
         STA   L68F0
         LDA   #$0001
         STA   L68EC
         LDA   #$0001
         STA   L68EE
         JSR   L53C2
         RTS

L606A    REP   #$30
         JSR   L5843
         JSR   L64AC
         PEA   $0000
         PEA   $0000
         PEA   $0001
         _SetOutputDevice
         PEA   $0001
         _InitTextDev
         LDA   L68F6
         STA   L60CB
         LDA   #$0000
         STA   L68EE
L6098    INC   L68EE
         JSR   L5475
         JSR   L5500
         JSR   L54B3
         DEC   L60CB
         BEQ   L60AC
         JMP   L6098

L60AC    JSR   L594D
         LDA   #$0001
         STA   L68F2
         LDA   #$0001
         STA   L68F0
         LDA   #$0001
         STA   L68EC
         LDA   #$0001
         STA   L68EE
         JSR   L53C2
         RTS

L60CB    DW    $0000
L60CD    REP   #$30
         JSR   L5843
         JSR   L552A
         JSR   L53C2
         JSR   L5500
         RTS

L60DC    REP   #$30
         JSR   L52DD
         LDA   #L8B8C
         STA   L0EC6
         LDA   #^L8B8C
         STA   L0EC8
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         JSR   L722C
         LDA   L0EEA
         STA   L0EC6
         LDA   L0EEC
         STA   L0EC8
         LDA   #$0200
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         JSR   L6F69
         LDA   L0ED0
         PHA
         LDA   L0ECE
         PHA
         LDA   L0ECE
         STA   L0EC6
         LDA   L0ED0
         STA   L0EC8
         LDA   #$C000
         STA   L0ECA
         JSR   L7166
         LDA   L0ECE
         STA   L6910
         LDA   L0ED0
         STA   L6912
         LDA   L0ED2
         STA   L6914
         LDA   L0ED4
         STA   L6916
         PLA
         STA   L0EEA
         PLA
         STA   L0EEC
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         JSR   L71ED
         LDA   L0ECA
         PHA
         LDA   L0ECA
         STA   L0EC6
         LDA   L6914
         STA   L0ECA
         LDA   L6916
         STA   L0ECC
         LDA   L0EEA
         STA   L0ECE
         LDA   L0EEC
         STA   L0ED0
         JSR   L720C
         PLA
         STA   L0EC6
         JSR   L721F
         REP   #$30
         LDA   #$FFFF
         STA   L68FE
         LDA   #$0001
         STA   L68EE
         JSR   L5475
L6198    REP   #$30
         LDA   #$0001
         STA   L68EC
         LDA   #L69A8
         STA   L0EC6
         LDA   #^L69A8
         STA   L0EC8
         LDA   #$0028
         STA   L0ECA
         LDA   #$0000
         STA   L0ECC
         LDA   #$0020
         STA   L0ECE
         JSR   L7107
L61C1    REP   #$30
         INC   L68FE
         LDY   L68FE
         LDA   L6914
         STA   $04
         LDA   L6916
         STA   $06
         STZ   L69DB
         SEP   #$20
         LDA   [$04],Y
         CMP   #$7E
         BNE   L61E1
         JMP   L620F

L61E1    CMP   #$0D
         BEQ   L61FE
         STA   L69DB
         REP   #$30
         LDA   L69DB
         STA   L0EC6
         JSR   L5823
         LDA   L68EC
         CMP   #$0027
         BEQ   L61FE
         JMP   L61C1

L61FE    REP   #$30
         INC   L68FE
         JSR   L5843
         INC   L68EE
         JSR   L5475
         JMP   L6198

L620F    REP   #$30
         LDA   L6910
         STA   L0EC6
         LDA   L6912
         STA   L0EC8
         JSR   L71A8
         RTS

L6221    REP   #$30
         LDA   #L8B8C
         STA   L0EC6
         LDA   #^L8B8C
         STA   L0EC8
         LDA   #$00C3
         STA   L0ECA
         LDA   L68E4
         STA   L0ECC
         LDA   #$0000
         STA   L0ECE
         LDA   #$0000
         STA   L0ED0
         LDA   #$0001
         STA   L0ED2
         STZ   L0ED4
         STZ   L0ED6
         JSL   GSOS
         DW    $0001      ; Create
         ADRL  L0EC6
         LDA   #L8B8C
         STA   L0EC8
         LDA   #^L8B8C
         STA   L0ECA
         JSL   GSOS
         DW    $0010      ; Open
         ADRL  L0EC6
         LDA   L0EC6
         STA   L6902
         LDA   #$0000
         STA   L68EE
         LDA   #$0000
         STA   L68FC
L6285    INC   L68EE
         JSR   L5475
         JSR   L5500
         LDA   #$0025
         STA   L6900
         JSR   L6318
         LDA   L68FC
         BEQ   L629F
         JMP   L6307

L629F    INC   L68EE
         JSR   L5475
         JSR   L5500
         LDA   #$0025
         STA   L6900
         JSR   L6318
         LDA   L68FC
         BEQ   L62B9
         JMP   L6307

L62B9    INC   L68EE
         JSR   L5475
         JSR   L5500
         LDA   #$000C
         STA   L6900
         JSR   L6318
         LDA   L68FC
         BEQ   L62D3
         JMP   L6307

L62D3    INC   L68EE
         JSR   L5475
         JSR   L5500
         LDA   #$000C
         STA   L6900
         JSR   L6318
         LDA   L68FC
         BEQ   L62ED
         JMP   L6307

L62ED    INC   L68EE
         JSR   L5475
         JSR   L5500
         LDA   #$000C
         STA   L6900
         JSR   L6318
         LDA   L68FC
         BNE   L6307
         JMP   L6285

L6307    LDA   L6902
         STA   L0EC6
         JSL   GSOS
         DW    $0014      ; Close
         ADRL  L0EC6
         RTS

L6318    REP   #$30
         LDA   #L69A8
         STA   $00
         LDA   #^L69A8
         STA   $02
         LDY   L6900
         SEP   #$20
         LDA   L69A8
         CMP   #$7E
         BNE   L6361
         REP   #$30
         LDA   #$0001
         STA   L68FC
         LDA   L6902
         STA   L0EC6
         LDA   #L69A8
         STA   L0EC8
         LDA   #^L69A8
         STA   L0ECA
         LDA   #$0001
         STA   L0ECC
         LDA   #$0000
         STA   L0ECE
         JSL   GSOS
         DW    $0013      ; Write
         ADRL  L0EC6
         RTS

L6361    REP   #$30
         LDA   #L69A8
         STA   $00
         LDA   #^L69A8
         STA   $02
         SEP   #$20
         LDA   [$00],Y
         CMP   #$20
         BNE   L637E
         CPY   #$0000
         BEQ   L637E
         DEY
         JMP   L6361

L637E    INY
         LDA   #$0D
         STA   [$00],Y
         INY
         LDA   #$0A
         STA   [$00],Y
         INY
         REP   #$30
         LDA   #$0000
         STA   L68FC
         LDA   L6902
         STA   L0EC6
         LDA   #L69A8
         STA   L0EC8
         LDA   #^L69A8
         STA   L0ECA
         STY   L0ECC
         STZ   L0ECE
         JSL   GSOS
         DW    $0013      ; Write
         ADRL  L0EC6
         RTS

L63B4    REP   #$30
         JSR   L5843
         JSR   L64AC
         LDY   L68E6
         LDA   L277E
         STA   $00
         LDA   L2780
         STA   $02
         SEP   #$20
         LDA   #$7E
         STA   [$00],Y
         REP   #$30
         _GrafOn
         JSR   L5D32
         LDA   L68E4
         CMP   #$00F2
         BEQ   L63E9
         JSR   L6221
         JMP   L6471

L63E9    LDA   #L8B8C
         STA   L0EC6
         LDA   #^L8B8C
         STA   L0EC8
         LDA   #$00C3
         STA   L0ECA
         LDA   L68E4
         STA   L0ECC
         LDA   #$0000
         STA   L0ECE
         LDA   #$0000
         STA   L0ED0
         LDA   #$0001
         STA   L0ED2
         STZ   L0ED4
         STZ   L0ED6
         JSL   GSOS
         DW    $0001      ; Create
         ADRL  L0EC6
         LDA   #L8B8C
         STA   L0EC8
         LDA   #^L8B8C
         STA   L0ECA
         JSL   GSOS
         DW    $0010      ; Open
         ADRL  L0EC6
         LDA   L0EC6
         STA   L6902
         LDA   L277E
         STA   L0EC8
         LDA   L2780
         STA   L0ECA
         LDA   #$2EB8
         STA   L0ECC
         LDA   #$0000
         STA   L0ECE
         JSL   GSOS
         DW    $0013      ; Write
         ADRL  L0EC6
         LDA   L6902
         STA   L0EC6
         JSL   GSOS
         DW    $0014      ; Close
         ADRL  L0EC6
L6471    LDY   L68E6
         LDA   L277E
         STA   $00
         LDA   L2780
         STA   $02
         SEP   #$20
         LDA   #$20
         STA   [$00],Y
         REP   #$30
         _GrafOff
         LDA   #$0001
         STA   L68F2
         LDA   #$0001
         STA   L68F0
         LDA   #$0001
         STA   L68EC
         LDA   #$0001
         STA   L68EE
         JSR   L53C2
         LDA   #$0000
         RTS

L64AC    REP   #$30
         LDY   #$2EB7
         LDX   #$012B
L64B4    LDA   #$0028
         STA   L6500
L64BA    LDA   L277E
         STA   $00
         LDA   L2780
         STA   $02
         SEP   #$20
         LDA   [$00],Y
         BEQ   L64DD
         CMP   #$0A
         BEQ   L64DD
         CMP   #$0D
         BEQ   L64DD
         CMP   #$20
         BEQ   L64DD
         CMP   #$7E
         BEQ   L64DD
         JMP   L64E8

L64DD    REP   #$30
         DEY
         DEC   L6500
         BNE   L64BA
         DEX
         BNE   L64B4
L64E8    REP   #$30
         INX
         STX   L68F6
         LDA   #$0000
         DEX
L64F2    CLC
         ADC   #$0028
         DEX
         BNE   L64F2
         STA   L68E6
         STZ   L68E8
         RTS

L6500    DW    $0000
L6502    ASC   '     Magical Myth Editor Commands     '0D00
         ASC   '                                      '0D00
         ASC   '                                      '0D00
         ASC   ' < UP >  - go up one line.            '0D
         ASC   00
         ASC   ' < DN >  - go down one line.          '0D
         ASC   00
         ASC   ' ----->  - go right one space.        '0D
         ASC   00
         ASC   ' <-----  - go left one space.         '0D
         ASC   00
         ASC   ' <DEL>   - backup and erase 1 space.  '0D
         ASC   00
         ASC   ' <ESC>   - quit the word processor.   '0D
         ASC   00
         ASC   '                                      '0D
         ASC   00
         ASC   ' <OPT>t  - move to the beginning.     '0D
         ASC   00
         ASC   ' <OPT>u  - move up one page.          '0D
         ASC   00
         ASC   ' <OPT>d  - move down one page.        '0D
         ASC   00
         ASC   ' <OPT>c  - clear the workspace.       '0D
         ASC   00
         ASC   ' <OPT>z  - delete a line.             '0D
         ASC   00
         ASC   ' <OPT>i  - insert a blank line.       '0D
         ASC   00
         ASC   ' <OPT>l  - load a file.               '0D
         ASC   00
         ASC   ' <OPT>s  - save the file.             '0D
         ASC   00
         ASC   ' <OPT>h  - display the HELP screen.   '0D
         ASC   00
         ASC   ' <OPT>p  - print the document.        '0D
         ASC   00
         ASC   '                                      '0D00
         ASC   '      Press any key to continue.      '0D
         ASC   00
         ASC   19
         ASC   'Select a myth file (.mth)'1D
         ASC   'Select a que'
L6899    ASC   'stion file (.qes)There are not enough q'
         ASC   'uestions in'00
L68CC    ASC   'this file !'00
L68D8    ASC   '.mth'00
         DB    $00
L68DE    ASC   '.qes'00
         DB    $00
L68E4    DB    $00
         DB    $00
L68E6    DB    $00
         DB    $00
L68E8    DB    $00
         DB    $00
L68EA    DB    $00
         DB    $00
L68EC    DB    $00
         DB    $00
L68EE    DB    $00
         DB    $00
L68F0    DB    $00
         DB    $00
L68F2    DB    $00
         DB    $00
         DB    $00
         DB    $00
L68F6    DB    $00
         DB    $00
L68F8    DB    $00
         DB    $00
         DB    $00
         DB    $00
L68FC    DB    $00
         DB    $00
L68FE    DB    $00
         DB    $00
L6900    DB    $00
         DB    $00
L6902    DB    $00
         DB    $00
L6904    DB    $00
         DB    $00
L6906    DB    $00
         DB    $00
L6908    DB    $00
         DB    $00
L690A    DB    $00
         DB    $00
L690C    DB    $00
         DB    $00
L690E    DB    $00
         DB    $00
L6910    DB    $00
         DB    $00
L6912    DB    $00
         DB    $00
L6914    DB    $00
         DB    $00
L6916    DB    $00
         DB    $00
L6918    DB    $00
         DB    $00
L691A    DB    $00
         DB    $00
L691C    DB    $00
         DB    $00
L691E    DB    $00
         DB    $00
L6920    DB    $00
         DB    $00
L6922    DB    $00
         DB    $00
L6924    ASC   8F
         ASC   'Clear workspace...are you sure? (Y/N) '8E00
L694D    ASC   '                                       '00
L6975    ASC   8F
         ASC   'Exit the Editor...are you sure? (Y/N) '8E00
L699E    DB    $00
         DB    $00
L69A0    DB    $00
         DB    $00
L69A2    DB    $00
         DB    $00
L69A4    DB    $00
         DB    $00
L69A6    DB    $00
         DB    $00
L69A8    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L69DB    DW    $0000

*--- Here was the HLS protection code

L6E36    REP   #$30
         LDA   L0EC6
         PHA
         LDA   L0ECA
         PHA
         _LoadOneTool
         RTS

L6E48    REP   #$30
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         _GetPortLoc
         RTS

L6E5A    REP   #$30
         JSR   L6E48
         LDA   L0EC6
         STA   $00
         LDA   L0EC8
         STA   $02
         LDY   #$0002
         LDA   L0ECA
         STA   [$00],Y
         INY
         INY
         LDA   L0ECC
         STA   [$00],Y
         RTS

L6E79    REP   #$30
         PEA   $0000
         PEA   $0000
         _GetPort
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         RTS

L6E91    REP   #$30
         LDA   L0EC6
         STA   L0EEA
         LDA   L0EC8
         STA   L0EEC
         JSR   L6E79
         LDA   L0EC6
         STA   $00
         LDA   L0EC8
         STA   $02
         LDY   #$0002
         LDA   L0EEA
         STA   [$00],Y
         INY
         INY
         LDA   L0EEC
         STA   [$00],Y
         RTS

L6EBC    REP   #$30
         LDA   #$2000
         STA   L0EC6
         LDA   #$00E1
         STA   L0EC8
         JSR   L6E91
         RTS

         REP   #$30
         LDA   L0EC6
         PHA
         LDA   L0ECA
         PHA
         _PosMouse
         RTS

L6EE0    REP   #$30
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadMouse
         PLA
         AND   #$8000
         STA   L0ECE
         PLA
         STA   L0ECA
         PLA
         STA   L0EC6
         RTS

L6F02    REP   #$30
         JSR   L6EE0
         LDA   L0ECE
         AND   #$8000
         RTS

L6F0E    REP   #$30
         PEA   $0000
         LDA   L0EC6
         PHA
         LDA   L0ECC
         PHA
         LDA   L0ECA
         PHA
         _GetNextEvent
         PLA
         RTS

L6F28    REP   #$30
         LDA   #$0008
         STA   L0EC6
         LDA   #L74AA
         STA   L0ECA
         LDA   #^L74AA
         STA   L0ECC
         JSR   L6F0E
         LDA   L74AA
         BEQ   L6F47
         LDA   L74AC
L6F47    RTS

L6F48    REP   #$30
         JSR   L6F02
         PHA
         JSR   L6F28
         PLY
         STY   L0EC6
         RTS

L6F56    REP   #$30
L6F58    JSR   L6F48
         CMP   #$0000
         BNE   L6F68
         LDA   L0EC6
         BEQ   L6F58
         LDA   #$0000
L6F68    RTS

L6F69    REP   #$30
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         LDA   L0ECC
         PHA
         LDA   L0ECA
         PHA
         _LongMul
         PLA
         STA   L0ECE
         PLA
         STA   L0ED0
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         RTS

L6F9F    REP   #$30
         PEA   $0000
         _Random
         PLA
         RTS

L6FAD    REP   #$30
         LDA   L0ECA
         SEC
         SBC   L0EC6
         INC
         STA   L0ECA
L6FBA    PEA   $0000
         _Random
         PLA
         AND   #$EFFF
         BEQ   L6FBA
         PEA   $0000
         PEA   $0000
         PHA
         LDA   L0ECA
         PHA
         _UDivide
         PLA
         PLA
         CLC
         ADC   L0EC6
         RTS

L6FE3    REP   #$10
         LDA   L0EC6
         STA   $00
         LDA   L0EC8
         STA   $02
         LDY   #$0000
         SEP   #$20
L6FF4    LDA   [$00],Y
         BEQ   L6FFB
         INY
         BRA   L6FF4
L6FFB    STY   L0ECA
         REP   #$20
         RTS

L7001    REP   #$30
         LDA   L0ECA
         STA   $00
         LDA   L0ECC
         STA   $02
         LDA   #$0000
         STA   [$00]
         LDY   #$0002
         STA   [$00],Y
         LDX   #$0001
         LDA   L0EC6
         CMP   #$000A
         BCC   L7029
         INX
         CMP   #$0064
         BCC   L7029
         INX
L7029    PHA
         LDA   L0ECC
         PHA
         LDA   L0ECA
         PHA
         PHX
         PEA   $0000
         _Int2Dec
         RTS

         REP   #$30
         JSR   L6FE3
         PEA   $0000
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         LDA   L0ECA
         PHA
         PEA   $0000
         _Dec2Int
         PLA
         RTS

L705E    REP   #$30
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         LDA   L0ECC
         PHA
         LDA   L0ECA
         PHA
         LDA   L0ED0
         PHA
         LDA   L0ECE
         PHA
         _BlockMove
         RTS

L7080    REP   #$30
         LDA   #$7D00
         STA   L0ECE
         LDA   #$0000
         STA   L0ED0
         JSR   L705E
         RTS

L7092    REP   #$30
         PEA   $0000
         PEA   $0000
         _GetWMgrPort
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         RTS

L70AA    REP   #$30
         LDA   L0ECA
         PHA
         _SetSolidPenPat
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         _PaintRect
         RTS

         REP   #$30
         _ObscureCursor
         RTS

L70D1    REP   #$30
         _InitCursor
         RTS

L70DB    REP   #$30
         _HideCursor
         RTS

L70E5    REP   #$30
         _ShowCursor
         RTS

L70EF    REP   #$30
         LDA   L0EC6
         STA   L0ECA
         LDA   #L0E55
         STA   L0EC6
         LDA   #^L0E55
         STA   L0EC8
         JSR   L70AA
         RTS

L7107    REP   #$10
         LDA   L0EC6
         STA   $00
         LDA   L0EC8
         STA   $02
         LDY   L0ECA
         DEY
         LDA   L0ECE
         SEP   #$20
L711C    STA   [$00],Y
         DEY
         BPL   L711C
         REP   #$20
         RTS

         REP   #$30
         LDA   L0EC6
         PHA
         LDA   L0ECA
         PHA
         LDA   L0ECE
         PHA
         _SetColorEntry
         RTS

L713A    REP   #$30
         LDA   L0EC6
         PHA
         LDA   L0ECC
         PHA
         LDA   L0ECA
         PHA
         _SetColorTable
         RTS

L7150    REP   #$30
         LDA   L0EC6
         PHA
         LDA   L0ECC
         PHA
         LDA   L0ECA
         PHA
         _GetColorTable
         RTS

L7166    REP   #$30
         PEA   $0000
         PEA   $0000
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         LDA   L0E66
         PHA
         LDA   L0ECA
         PHA
         PEA   $0000
         PEA   $0000
         _NewHandle
         PLA
         STA   L0ECE
         STA   $00
         PLA
         STA   L0ED0
         STA   $02
         BCS   L71A7
         LDA   [$00]
         STA   L0ED2
         LDY   #$0002
         LDA   [$00],Y
         STA   L0ED4
         CLC
L71A7    RTS

L71A8    REP   #$30
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         _DisposeHandle
         RTS

L71BA    REP   #$30
         LDA   #$7D00
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         LDA   #$C000
         STA   L0ECA
         JSR   L7166
         BCS   L71EC
         LDA   L0ECE
         STA   L0EC6
         LDA   L0ED0
         STA   L0EC8
         LDA   L0ED2
         STA   L0ECA
         LDA   L0ED4
         STA   L0ECC
         CLC
L71EC    RTS

L71ED    REP   #$30
         LDA   L0EC6
         STA   L0ECA
         LDA   L0EC8
         STA   L0ECC
         JSL   GSOS
         DW    $0010      ; Open
         ADRL  L0EC8
         LDA   L0EC8
         STA   L0ECA
         RTS

L720C    REP   #$30
         LDA   L0EC6
         STA   L0EC8
         JSL   GSOS
         DW    $0012      ; Read
         ADRL  L0EC8
         RTS

L721F    REP   #$30
         JSL   GSOS
         DW    $0014      ; Close
         ADRL  L0EC6
         RTS

L722C    REP   #$30
         JSL   GSOS
         DW    $0006      ; GetFileInfo
         ADRL  L0EC6
         LDA   L0ECC
         PHA
         LDA   L0ED0
         PHA
         LDA   L0ECE
         PHA
         LDA   L0ED2
         PHA
         LDA   L0ED4
         PHA
         LDA   L0ED6
         PHA
         LDA   L0ED8
         PHA
         LDA   L0EDA
         PHA
         LDA   L0EDE
         PHA
         LDA   L0EDC
         PHA
         PLA
         STA   L0EEA
         PLA
         STA   L0EEC
         PLA
         STA   L0EE6
         PLA
         STA   L0EE2
         PLA
         STA   L0EDE
         PLA
         STA   L0EDA
         PLA
         STA   L0ED6
         PLA
         STA   L0ED2
         PLA
         STA   L0ED4
         PLA
         STA   L0ECE
         RTS

L7289    REP   #$30
         LDA   #$7D00
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         LDA   #$C000
         STA   L0ECA
         JSR   L7166
         BCS   L72BA
         LDA   L0ECE
         STA   L73FC
         LDA   L0ED0
         STA   L73FE
         LDA   L0ED2
         STA   L7400
         LDA   L0ED4
         STA   L7402
L72BA    RTS

L72BB    REP   #$30
         LDA   L73FE
         PHA
         LDA   L73FC
         PHA
         _DisposeHandle
         RTS

L72CD    REP   #$30
         LDA   L0ECA
         STA   L0EDE
         LDA   L0ECC
         STA   L0EE0
         LDA   L0ECE
         STA   L0EE2
         LDA   L0ED0
         STA   L0EE4
         JSR   L71ED
         BCC   L72F0
L72EC    REP   #$30
         SEC
         RTS

L72F0    LDA   L0ECA
         STA   L0EC6
         LDA   L7400
         STA   L0ECA
         LDA   L7402
         STA   L0ECC
         LDA   #$7D00
         STA   L0ECE
         LDA   #$0000
         STA   L0ED0
         JSR   L720C
         BCS   L72EC
         JSR   L721F
         BCS   L72EC
         LDA   L7400
         STA   $00
         LDA   L7402
         STA   $02
         LDA   [$00]
         CMP   #$0080
         BNE   L72EC
         LDA   L0EE2
         STA   $04
         LDA   L0EE4
         STA   $06
         LDY   #$0002
         LDX   #$0000
L7339    LDA   [$00],Y
         XBA
         ASL
         TXY
         STA   [$04],Y
         INY
         INY
         TYX
         INY
         INY
         CPY   #$0022
         BNE   L7339
         STZ   L74A8
         LDA   L0EDE
         STA   $04
         LDA   L0EE0
         STA   $06
         SEP   #$20
         LDA   #$C8
         STA   L74A7
         LDY   #$0022
L7361    LDX   #$0000
L7364    LDA   [$00],Y
         BPL   L7387
         CMP   #$80
         BEQ   L737F
         EOR   #$FF
         INC
         INC
         STA   L74A6
         INY
         LDA   [$00],Y
L7376    STA   L7404,X
         INX
         DEC   L74A6
         BNE   L7376
L737F    INY
L7380    CPX   #$00A0
         BNE   L7364
         BRA   L739A
L7387    INC
         STA   L74A6
         INY
L738C    LDA   [$00],Y
         STA   L7404,X
         INY
         INX
         DEC   L74A6
         BNE   L738C
         BRA   L7380
L739A    PHY
         LDX   #$0000
L739E    LDA   #$04
         STA   L74A5
L73A3    LDY   #$0002
         STZ   L74A4
L73A9    ASL   L74A4
         ASL   L747C,X
         BCC   L73B4
         INC   L74A4
L73B4    ASL   L74A4
         ASL   L7454,X
         BCC   L73BF
         INC   L74A4
L73BF    ASL   L74A4
         ASL   L742C,X
         BCC   L73CA
         INC   L74A4
L73CA    ASL   L74A4
         ASL   L7404,X
         BCC   L73D5
         INC   L74A4
L73D5    DEY
         BNE   L73A9
         LDA   L74A4
         LDY   L74A8
         STA   [$04],Y
         INY
         STY   L74A8
         DEC   L74A5
         BNE   L73A3
         INX
         CPX   #$0028
         BNE   L739E
         PLY
         DEC   L74A7
         BEQ   L73F8
         JMP   L7361

L73F8    REP   #$30
         CLC
         RTS

L73FC    DB    $00
         DB    $00
L73FE    DB    $00
         DB    $00
L7400    DB    $00
         DB    $00
L7402    DB    $00
         DB    $00
L7404    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L742C    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L7454    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L747C    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L74A4    DB    $00
L74A5    DB    $00
L74A6    DB    $00
L74A7    DB    $00
L74A8    DB    $00
         DB    $00
L74AA    DB    $00
         DB    $00
L74AC    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L74B8    DB    $00
         DB    $00
         REP   #$30
         LDA   L0EC6
         PHA
         LDA   L0ECA
         PHA
         _SetPenSize
         RTS

         REP   #$30
         LDA   L0EC6
         PHA
         _SetPenMode
         RTS

L74DA    REP   #$30
         LDA   L0EC6
         PHA
         LDA   L0ECA
         PHA
         _MoveTo
         RTS

L74EC    REP   #$30
         PEA   $0000
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         _CStringWidth
         PLA
         STA   L0ECA
         RTS

         REP   #$30
         LDA   L0EC6
         PHA
         _DrawChar
         RTS

L7513    REP   #$30
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         _DrawCString
         RTS

         REP   #$30
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         LDA   L0EC6
         STA   $00
         LDA   L0EC8
         STA   $02
         LDA   [$00]
         STA   L0EC6
         LDY   #$0002
         LDA   [$00],Y
         STA   L0ECA
         JSR   L74DA
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         LDA   #$0004
         CLC
         ADC   L0EC6
         STA   L0ECA
         LDA   #$0000
         ADC   L0EC8
         STA   L0ECC
         LDA   L0ECC
         PHA
         LDA   L0ECA
         PHA
         _DrawCString
         RTS

L7574    REP   #$30
         LDA   L0EC6
         PHA
         _SetForeColor
         RTS

L7582    REP   #$30
         LDA   L0EC6
         PHA
         _SetBackColor
         RTS

L7590    REP   #$30
         LDA   L0EC6
         STA   L0ECE
         LDA   L0EC8
         STA   L0ED0
         LDA   L0ECA
         STA   L0ED2
         JSR   L74EC
         LDA   #$0140
         SEC
         SBC   L0ECA
         LSR
         STA   L0EC6
         LDA   L0ED2
         STA   L0ECA
         JSR   L74DA
         LDA   L0ECE
         STA   L0EC6
         LDA   L0ED0
         STA   L0EC8
         JSR   L7513
         RTS

L75CB    REP   #$30
         PEA   $0000
         PEA   $0000
         _TickCount
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         RTS

L75E3    REP   #$30
         JSR   L75CB
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         _SetRandSeed
         RTS

         REP   #$30
         DEC   L0ECA
         LDA   L0ECA
         BNE   L760F
         LDA   L0EC6
         STA   L0ECE
         LDA   L0EC8
         STA   L0ED0
         RTS

L760F    LDA   L0EC6
         STA   $00
         LDA   L0EC8
         STA   $02
         LDY   #$0000
         SEP   #$20
L761E    LDA   [$00],Y
         INY
         CMP   #$00
         BNE   L761E
         DEC   L0ECA
         BNE   L761E
         REP   #$20
         TYA
         CLC
         ADC   L0EC6
         STA   L0ECE
         LDA   #$0000
         ADC   L0EC8
         STA   L0ED0
         REP   #$30
         RTS

L7640    REP   #$30
         JSR   L7574
         LDA   L0ECA
         STA   L0EC6
         JSR   L7582
         RTS

L764F    REP   #$30
         PEA   $0000
         _GetForeColor
         PLA
         STA   L0EC6
         RTS

         REP   #$30
         PEA   $0000
         _GetBackColor
         PLA
         STA   L0EC6
         RTS

         REP   #$30
         PEA   $0000
         PEA   $0000
         _GetFont
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         RTS

         REP   #$30
         PEA   $0000
         _GetFontFlags
         PLA
         STA   L0EC6
         RTS

         REP   #$30
         PEA   $0000
         PEA   $0000
         _GetFontID
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         RTS

         REP   #$30
         PEA   ^L0EC6
         PEA   L0EC6
         _GetPen
         RTS

         REP   #$30
         PEA   $0000
         PEA   $0000
         _GetSysFont
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         RTS

         REP   #$30
         LDA   L0EC6
         PHA
         _SetTextFace
         RTS

L76E8    REP   #$30
         LDA   L0EC6
         PHA
         _SetTextMode
         RTS

L76F6    REP   #$30
         LDAL  $E0C034
         AND   #$000F
         STA   L0EC6
         RTS

L7703    REP   #$30
         LDAL  $E0C034
         AND   #$FFF0
         ORA   L0EC6
         STAL  $E0C034
         RTS

L7714    REP   #$30
         LDA   L0ECE
         STA   $00
         LDA   L0ED0
         STA   $02
         STZ   L0ED6
         LDX   L0ED2
         LDY   #$0000
L7729    STY   L0EDA
         LDA   L0ECA
         CMP   [$00],Y
         BCC   L7752
         INY
         INY
         LDA   L0EC6
         CMP   [$00],Y
         BCC   L7752
         INY
         INY
         LDA   L0ECA
         CMP   [$00],Y
         BPL   L7752
         INY
         INY
         LDA   L0EC6
         CMP   [$00],Y
         BPL   L7752
         INC   L0ED6
         RTS

L7752    LDA   L0EDA
         CLC
         ADC   #$0008
         TAY
         INC   L0ED6
         DEX
         BNE   L7729
         STZ   L0ED6
         RTS

L7764    REP   #$30
L7766    JSR   L6F48
         LDA   L0EC6
         BNE   L7766
         RTS

         REP   #$30
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadTimeHex
         PLA
         PLY
         PLY
         PLY
         TAY
         XBA
         AND   #$00FF
         STA   L0EE2
         TYA
         AND   #$00FF
         STA   L0EE4
         CLC
         ADC   L0ED2
         CMP   #$003C
         BCC   L77A7
         SEC
         SBC   #$003C
         INC   L0EE2
L77A7    STA   L0EE4
         LDA   L0EE2
         XBA
         ORA   L0EE4
         STA   L0EE2
         LDA   L0EC6
         STA   L0ED8
         LDA   L0ECA
         STA   L0EDA
         LDA   L0ECE
         STA   L0EDC
L77C6    LDA   L0ED8
         STA   L0EC6
         LDA   L0EDA
         STA   L0ECA
         LDA   L0EDC
         STA   L0ECE
         LDA   #$0004
         STA   L0ED2
         LDA   #$0000
         STA   L0ED4
         JSR   L7804
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadTimeHex
         PLA
         PLY
         PLY
         PLY
         CMP   L0EE2
         BCC   L77C6
         RTS

L7804    REP   #$30
         LDA   L0ECA
         STA   L0EDE
         LDA   L0ECE
         STA   L0EE0
         LDA   #L0F16
         STA   L0ECA
         LDA   #^L0F16
         STA   L0ECC
         JSR   L7150
         LDA   L0EDE
         CLC
         ADC   L0EE0
         DEC
         DEC
         ASL
         TAY
         DEC   L0EE0
         LDA   L0F18,Y
         PHA
L7833    LDA   L0F16,Y
         STA   L0F18,Y
         DEC   L0EE0
         BEQ   L7842
         DEY
         DEY
         BRA   L7833
L7842    PLA
         STA   L0F16,Y
         JSR   L713A
         LDA   L0ED2
         STA   L0EC6
         LDA   L0ED4
         STA   L0EC8
         JSR   L7931
         RTS

L7859    REP   #$30
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadTimeHex
         PLA
         PLY
         PLY
         PLY
         TAY
         XBA
         AND   #$00FF
         STA   L0EE2
         TYA
         AND   #$00FF
         STA   L0EE4
         CLC
         ADC   L0EC6
         CMP   #$003C
         BCC   L7891
         SEC
         SBC   #$003C
         INC   L0EE2
L7891    STA   L0EE4
         LDA   L0EE2
         XBA
         ORA   L0EE4
         STA   L0EE2
L789E    PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadTimeHex
         PLA
         PLY
         PLY
         PLY
         CMP   L0EE2
         BCC   L789E
         RTS

L78BB    REP   #$30
         LDA   L0ECC
         PHA
         LDA   L0ECA
         PHA
         LDA   L0EC6
         STA   L0ECA
         LDA   L0EC8
         STA   L0ECC
         LDA   #L0F16
         STA   L0EC6
         LDA   #^L0F16
         STA   L0EC8
         JSR   L6E5A
         LDA   L0ECE
         STA   L0ECA
         LDA   L0ED0
         STA   L0ECC
         LDA   #L0F26
         STA   L0EC6
         LDA   #^L0F26
         STA   L0EC8
         JSR   L6E5A
         PLA
         STA   L0ECA
         PLA
         STA   L0ECC
         PEA   ^L0F16
         PEA   L0F16
         PEA   ^L0F26
         PEA   L0F26
         LDA   L0ECC
         PHA
         LDA   L0ECA
         PHA
         LDA   L0ED4
         PHA
         LDA   L0ED2
         PHA
         LDA   L0ED6
         PHA
         PEA   $0000
         PEA   $0000
         _CopyPixels
         RTS

L7931    REP   #$30
         LDA   L0EC6
         STA   L0ECA
         LDA   L0EC8
         STA   L0ECC
         JSR   L75CB
         LDA   L0EC6
         CLC
         ADC   L0ECA
         STA   L0ECE
         LDA   L0EC8
         ADC   L0ECC
         STA   L0ED0
L7955    JSR   L75CB
         LDA   L0ECE
         SEC
         SBC   L0EC6
         STA   L0ECA
         LDA   L0ED0
         SBC   L0EC8
         STA   L0ECC
         LDA   L0ECC
         BPL   L7955
         RTS

L7971    REP   #$30
         LDA   L0EC6
         STA   L0ED2
         LDA   L0ECA
         STA   L0ED6
         LDA   L0ECC
         STA   L0ED8
         LDA   #L0F16
         STA   L0ECA
         LDA   #^L0F16
         STA   L0ECC
         JSR   L7150
         LDA   L0ED6
         STA   $00
         LDA   L0ED8
         STA   $02
         LDX   #$0010
L79A1    LDY   #$001E
L79A4    LDA   [$00],Y
         XBA
         AND   #$000F
         STA   L0EDA
         LDA   L0F16,Y
         PHA
         PHA
         XBA
         AND   #$000F
         CMP   L0EDA
         BEQ   L79BC
         INC
L79BC    XBA
         STA   L0EE2
         LDA   [$00],Y
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         STA   L0EDA
         PLA
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         CMP   L0EDA
         BEQ   L79DA
         INC
L79DA    ASL
         ASL
         ASL
         ASL
         STA   L0EDE
         LDA   [$00],Y
         AND   #$000F
         STA   L0EDA
         PLA
         AND   #$000F
         CMP   L0EDA
         BEQ   L79F3
         INC
L79F3    ORA   L0EDE
         ORA   L0EE2
         STA   L0F16,Y
         DEY
         DEY
         BPL   L79A4
         PHX
         LDA   L0ED2
         STA   L0EC6
         LDA   #L0F16
         STA   L0ECA
         LDA   #^L0F16
         STA   L0ECC
         JSR   L713A
         LDA   #$0001
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         JSR   L7931
         PLX
         DEX
         BEQ   L7A2C
         JMP   L79A1
L7A2C    RTS

L7A2D    REP   #$30
         LDA   L0EC6
         STA   L0ED2
         LDA   #L0F16
         STA   L0ECA
         LDA   #^L0F16
         STA   L0ECC
         JSR   L7150
         LDY   #$0010
L7A47    LDX   #$001E
L7A4A    LDA   L0F16,X
         PHA
         PHA
         XBA
         AND   #$000F
         BEQ   L7A56
         DEC
L7A56    XBA
         STA   L0EE2
         PLA
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         BEQ   L7A69
         DEC
         ASL
         ASL
         ASL
         ASL
L7A69    STA   L0EDE
         PLA
         AND   #$000F
         BEQ   L7A73
         DEC
L7A73    ORA   L0EDE
         ORA   L0EE2
         STA   L0F16,X
         DEX
         DEX
         BPL   L7A4A
         PHY
         LDA   L0ED2
         STA   L0EC6
         LDA   #L0F16
         STA   L0ECA
         LDA   #^L0F16
         STA   L0ECC
         JSR   L713A
         LDA   #$0002
         STA   L0EC6
         LDA   #$0000
         STA   L0EC8
         JSR   L7931
         PLY
         DEY
         BNE   L7A47
         RTS

L7AAA    REP   #$30
         LDA   L0EC6
         PHA
         LDA   L0ECA
         STA   L0ED6
         LDA   L0ECC
         STA   L0ED8
         LDA   L0ECE
         STA   L0EDA
         LDA   L0ED0
         STA   L0EDC
         JSR   L7A2D
         LDA   L0EDA
         STA   L0EC6
         LDA   L0EDC
         STA   L0EC8
         LDA   #$2000
         STA   L0ECA
         LDA   #$00E1
         STA   L0ECC
         LDA   #$7D00
         STA   L0ECE
         LDA   #$0000
         STA   L0ED0
         JSR   L705E
         PLA
         STA   L0EC6
         LDA   L0ED6
         STA   L0ECA
         LDA   L0ED8
         STA   L0ECC
         JSR   L7971
         RTS

L7B06    REP   #$30
         PEA   $0000
         PEA   $FF6E
         PEA   $0000
         _FlushEvents
         PLA
         RTS

         REP   #$30
         LDA   #$0008
         STA   L0EC6
         LDA   #L74AA
         STA   L0ECA
         LDA   #^L74AA
         STA   L0ECC
L7B2E    JSR   L6F0E
         LDA   L74AA
         BEQ   L7B2E
         LDA   L74AC
         RTS

L7B3A    REP   #$30
         LDA   L8B39
         STA   $00
         LDA   L8B3B
         STA   $02
         LDY   #$0012
         LDA   #$0001
         CLC
         ADC   [$00],Y
         STA   [$00],Y
         RTS

L7B52    REP   #$30
         LDA   L8B39
         STA   $00
         LDA   L8B3B
         STA   $02
         LDY   #$0014
         LDA   #$0001
         CLC
         ADC   [$00],Y
         STA   [$00],Y
         RTS

L7B6A    REP   #$30
         LDA   #L8B46
         STA   L8B39
         LDA   #^L8B46
         STA   L8B3B
         LDA   L8B37
         CMP   #$0001
         BEQ   L7B9A
         LDA   #$0003
         EOR   L8B35
         STA   L8B35
         CMP   #$0002
         BNE   L7B9A
         LDA   #L8B5E
         STA   L8B39
         LDA   #^L8B5E
         STA   L8B3B
L7B9A    RTS

L7B9B    REP   #$30
         LDA   #L8B46
         STA   L0ECA
         LDA   #^L8B46
         STA   L0ECC
         JSR   L7BDF
         LDA   #L8B5E
         STA   L0ECA
         LDA   #^L8B5E
         STA   L0ECC
         JSR   L7BDF
         SEP   #$20
         LDY   #$0007
         LDA   #$01
         CLC
         ADC   [$00],Y
         STA   [$00],Y
         REP   #$20
         LDA   #$0001
         STA   L8B35
         STA   L8B37
         LDA   #L8B46
         STA   L8B39
         LDA   #^L8B46
         STA   L8B3B
         RTS

L7BDF    LDA   #L8B3D
         STA   L0EC6
         LDA   #^L8B3D
         STA   L0EC8
         LDA   #$0008
         STA   L0ECE
         LDA   #$0000
         STA   L0ED0
         JSR   L705E
         LDA   L0ECA
         STA   $00
         LDA   L0ECC
         STA   $02
         LDA   #$0001
         LDY   #$000E
         STA   [$00],Y
         LDA   #$0008
         LDY   #$0016
         STA   [$00],Y
         LDA   #$0000
         LDY   #$0010
         STA   [$00],Y
         LDY   #$0012
         STA   [$00],Y
         LDY   #$0014
         STA   [$00],Y
         RTS

L7C27    REP   #$30
         _LoadSysFont
         RTS

L7C31    REP   #$30
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         LDA   L0ECA
         PHA
         _InstallFont
         RTS

L7C47    REP   #$30
         LDA   L0ED2
         STA   $00
         LDA   L0ED4
         STA   $02
         PEA   $0000
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         _GetFamNum
         PLA
         CMP   #$FFFF
         BEQ   L7C80
         STA   [$00]
         LDY   #$0002
         SEP   #$20
         LDA   L0ECA
         STA   [$00],Y
         INY
         LDA   L0ECE
         STA   [$00],Y
         REP   #$20
         RTS

L7C80    LDA   #$0000
         STA   [$00]
         LDY   #$0002
         STA   [$00],Y
         RTS

L7C8B    REP   #$30
         LDA   L0EC6
         STA   L0EE6
         LDA   L0EC8
         STA   L0EE8
         STZ   L0EC6
         JSR   L7A2D
         LDA   #$000B
         STA   L0EC6
         JSR   L70EF
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         JSR   L7DC6
         JSR   L7E35
         JSR   L7B06
         JSR   L70E5
         PEA   $001E
         PEA   $0028
         PEA   ^L7D13
         PEA   L7D13
         PEA   $0000
         PEA   $0000
         LDA   L0EE8
         PHA
         LDA   L0EE6
         PHA
         PEA   ^L8B76
         PEA   L8B76
         _SFGetFile
         JSR   L70DB
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L7E87
         JSR   L7E18
         SEP   #$20
         LDX   #$00C7
         LDA   #$00
L7D09    STAL  $E19D00,X
         DEX
         BPL   L7D09
         REP   #$20
         RTS

L7D13    STR   'Please select a file.'
L7D29    REP   #$30
         LDA   L0ECA
         STA   L0EE6
         LDA   L0ECC
         STA   L0EE8
         LDA   L0ECE
         STA   L0EEA
         STZ   L0EC6
         JSR   L7A2D
         LDA   #$000B
         STA   L0EC6
         JSR   L70EF
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         JSR   L7DC6
         JSR   L7E35
         JSR   L7B06
         JSR   L70E5
         PEA   $001E
         PEA   $0028
         PEA   ^L7DB5
         PEA   L7DB5
         LDA   L0EE8
         PHA
         LDA   L0EE6
         PHA
         LDA   L0EEA
         PHA
         PEA   ^L8B76
         PEA   L8B76
         _SFPutFile
         JSR   L70DB
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L7E87
         JSR   L7E18
         SEP   #$20
         LDX   #$00C7
         LDA   #$00
L7DAB    STAL  $E19D00,X
         DEX
         BPL   L7DAB
         REP   #$20
         RTS

L7DB5    STR   'Enter a filename'
L7DC6    REP   #$30
         LDA   #$000F
         STA   L0EC6
         LDA   #$0100
         STA   L0ECA
         JSR   L6E36
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0100
         LDA   L0E66
         PHA
         PEA   $C005
         PEA   $0000
         PEA   $0000
         _NewHandle
         PLA
         STA   L7E31
         PLA
         STA   L7E31+2
         LDA   L7E31
         STA   $00
         LDA   L7E31+2
         STA   $02
         LDA   L0E66
         PHA
         LDA   [$00]
         PHA
         _MenuStartUp
         RTS

L7E18    REP   #$30
         _MenuShutDown
         LDA   L7E31+2
         PHA
         LDA   L7E31
         PHA
         _DisposeHandle
         RTS

L7E31    ADRL  $00000000
L7E35    REP   #$30
         LDA   #$0017
         STA   L0EC6
         LDA   #$0100
         STA   L0ECA
         JSR   L6E36
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0100
         LDA   L0E66
         PHA
         PEA   $C005
         PEA   $0000
         PEA   $0000
         _NewHandle
         PLA
         STA   L7EA0
         PLA
         STA   L7EA0+2
         LDA   L7EA0
         STA   $00
         LDA   L7EA0+2
         STA   $02
         LDA   L0E66
         PHA
         LDA   [$00]
         PHA
         _SFStartUp
         RTS

L7E87    REP   #$30
         _SFShutDown
         LDA   L7EA0+2
         PHA
         LDA   L7EA0
         PHA
         _DisposeHandle
         RTS

L7EA0    ADRL  $00000000
L7EA4    REP   #$30
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         _InitColorTable
         RTS

L7EB6    REP   #$30
	lda	#1
	sta	L0EC6
	rts
	
*         LDA   L0ECA
*         STA   L7F82
*         LDA   L0ECC
*         STA   L7F84
*         LDA   #L7F5E
*         STA   L7F86
*         LDA   #^L7F5E
*         STA   L7F88
*         LDA   #$0001
*         STA   L7F8A
*L7ED6    LDA   L7F86
*         STA   L0EC6
*         LDA   L7F88
*         STA   L0EC8
*         LDA   #L7F8C
*         STA   L0ECA
*         LDA   #^L7F8C
*         STA   L0ECC
*         JSL   GSOS
*         DW    $0008      ; Volume
*         ADRL  L0EC6
*         CMP   #$0011
*         BEQ   L7F50
*         LDA   L7F86
*         STA   L0EC6
*         LDA   L7F88
*         STA   L0EC8
*         LDA   #$0004
*         CLC
*         ADC   L0EC6
*         STA   L7F86
*         LDA   #$0000
*         ADC   L0EC8
*         STA   L7F88
*         LDA   L7F82
*         STA   L0EC6
*         LDA   L7F84
*         STA   L0EC8
*         LDA   #L7F8C
*         STA   L0ECA
*         LDA   #^L7F8C
*         STA   L0ECC
*         LDA   #$0000
*         STA   L0ECE
*         JSR   L80E9
*         LDA   L0ECE
*         BEQ   L7F57
*         INC   L7F8A
*         LDA   L7F8A
*         CMP   #$000A
*         BEQ   L7F50
*         JMP   L7ED6
*
*L7F50    LDA   #$0000
*         STA   L0EC6
*         RTS
*
*L7F57    LDA   L7F8A
*         STA   L0EC6
*         RTS
*
*L7F5E    STR   '.d1'
*         STR   '.d2'
*         STR   '.d3'
*         STR   '.d4'
*         STR   '.d5'
*         STR   '.d6'
*         STR   '.d7'
*         STR   '.d8'
*         STR   '.d9'
*L7F82    DB    $00
*         DB    $00
*L7F84    DB    $00
*         DB    $00
*L7F86    DB    $00
*         DB    $00
*L7F88    DB    $00
*         DB    $00
*L7F8A    DB    $00
*         DB    $00
*L7F8C    DS    $100

L808C    REP   #$30
         LDA   L0ECA
         STA   L80E1
         LDA   L0ECC
         STA   L80E3
         LDA   L0ECE
         STA   L80E5
L80A0    LDA   #$0000
         STA   L0EC6
         LDA   #$0000
         STA   L0ECA
         LDA   #$0000
         STA   L0ECE
         JSR   L6EE0
         LDA   L0ECE
         BEQ   L80A0
         LDA   L80E1
         STA   L0ECE
         LDA   L80E3
         STA   L0ED0
         LDA   L80E5
         STA   L0ED2
         LDA   #$0000
         STA   L0ED6
         JSR   L7714
         LDA   L0ED6
         BEQ   L80A0
         LDA   L0ED6
         STA   L0EC6
         RTS

L80E1    DW    $0000
L80E3    DW    $0000
L80E5    DW    $0000
         DW    $0000

L80E9    REP   #$30
         LDA   L0EC6
         STA   $00
         LDA   L0EC8
         STA   $02
         LDA   L0ECA
         STA   $04
         LDA   L0ECC
         STA   $06
         SEP   #$30
         LDY   #$00
         STY   L813C
         LDA   [$00],Y
         CMP   [$04],Y
         BNE   L8132
         CLC
         ADC   #$01
         STA   L813B
         INY
L8113    LDA   [$00],Y
         ORA   #$20
         STA   L813C
         LDA   [$04],Y
         ORA   #$20
         CMP   L813C
         BNE   L8132
         INY
         CPY   L813B
         BNE   L8113
         REP   #$30
         LDA   #$0000
         STA   L0ECE
         RTS

L8132    REP   #$30
         LDA   #$0001
         STA   L0ECE
         RTS

L813B    DB    $00
L813C    DB    $00

L813D    REP   #$30
         JSR   L70AA
         RTS

L8143    REP   #$30
         JSR   L70DB
         LDA   L0EC6
         STA   L81E5
         LDA   L0ECA
         STA   L81E7
         LDA   L0ECE
         STA   L81E9
         LDA   L0ED0
         STA   L81EB
         LDA   L0ECE
         STA   L81ED
         LDA   L0ED0
         STA   L81EF
L816C    LDA   L81E9
         STA   L0EC6
         LDA   L81EB
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L813D
         LDA   #$0008
         CLC
         ADC   L81E9
         STA   L0EC6
         LDA   #$0000
         ADC   L81EB
         STA   L0EC8
         LDA   L0EC6
         STA   L81E9
         LDA   L0EC8
         STA   L81EB
         DEC   L81E7
         BNE   L816C
         LDA   L81ED
         STA   L0EC6
         LDA   L81EF
         STA   L0EC8
L81B1    DEC   L81E5
         BEQ   L81D8
         LDA   #$0008
         CLC
         ADC   L0EC6
         STA   L0ECA
         LDA   #$0000
         ADC   L0EC8
         STA   L0ECC
         LDA   L0ECA
         STA   L0EC6
         LDA   L0ECC
         STA   L0EC8
         JMP   L81B1

L81D8    LDA   #$0007
         STA   L0ECA
         JSR   L813D
         JSR   L70E5
         RTS

L81E5    DW    $0000
L81E7    DW    $0000
L81E9    DW    $0000
L81EB    DW    $0000
L81ED    DW    $0000
L81EF    DW    $0000
L81F1    REP   #$30
         JSR   L2661
         LDA   #L8357
         STA   L0EC6
         LDA   #^L8357
         STA   L0EC8
         LDA   L0FF2
         STA   L0ECA
         LDA   L0FF4
         STA   L0ECC
         LDA   #L0F72
         STA   L0ECE
         LDA   #^L0F72
         STA   L0ED0
         JSR   L72CD
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         LDA   #$0000
         STA   L0EC6
         LDA   #L0F72
         STA   L0ECA
         LDA   #^L0F72
         STA   L0ECC
         LDA   L0FF2
         STA   L0ECE
         LDA   L0FF4
         STA   L0ED0
         JSR   L7AAA
         JSR   LA27C
         LDA   #$0004
         STA   L0EC6
         JSR   L76E8
         LDA   #$0001
         STA   L0EC6
         JSR   L7574
         LDA   #$0098
         STA   L0EC6
         LDA   #$0014
         STA   L0ECA
         JSR   L74DA
         LDA   #L837A
         STA   L0EC6
         LDA   #^L837A
         STA   L0EC8
         JSR   L7513
         LDA   #$0042
         STA   L0EC6
         LDA   #$0028
         STA   L0ECA
         JSR   L74DA
         LDA   #L8B46
         STA   L0EC6
         LDA   #^L8B46
         STA   L0EC8
         JSR   L7513
         LDA   #L8B46
         STA   L0EDE
         LDA   #^L8B46
         STA   L0EE0
         LDA   #$0028
         STA   L0EE2
         JSR   L82EF
         LDA   L8B37
         CMP   #$0002
         BEQ   L82B9
L82B5    JSR   L6F56
         RTS

L82B9    LDA   #$0042
         STA   L0EC6
         LDA   #$003C
         STA   L0ECA
         JSR   L74DA
         LDA   #L8B5E
         STA   L0EC6
         LDA   #^L8B5E
         STA   L0EC8
         JSR   L7513
         LDA   #L8B5E
         STA   L0EDE
         LDA   #^L8B5E
         STA   L0EE0
         LDA   #$003C
         STA   L0EE2
         JSR   L82EF
         JMP   L82B5

L82EF    LDA   L0EDE
         STA   $04
         LDA   L0EE0
         STA   $06
         LDY   #$0012
         LDA   #$00B0
         STA   L0ECE
         JSR   L830E
         LDY   #$0014
         LDA   #$0100
         STA   L0ECE
L830E    LDA   [$04],Y
         STA   L0EC6
         LDA   #L838D
         STA   L0ECA
         LDA   #^L838D
         STA   L0ECC
         JSR   L7001
         SEP   #$20
         LDA   L838D+1
         REP   #$30
         CMP   #$0000
         BNE   L8338
         LDA   #$0008
         CLC
         ADC   L0ECE
         STA   L0ECE
L8338    LDA   L0ECE
         STA   L0EC6
         LDA   L0EE2
         STA   L0ECA
         JSR   L74DA
         LDA   #L838D
         STA   L0EC6
         LDA   #^L838D
         STA   L0EC8
         JSR   L7513
         RTS

L8357    STR   '1/magic.pics/score.pc1'
L837A    ASC   'Correct  Incorrect'00
L838D    DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
L8397    REP   #$30
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         _SetSpaceExtra
         RTS

         REP   #$30
         PEA   $0000
         PEA   $0000
         _GetSpaceExtra
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         RTS

L83C1    REP   #$30
         PEA   $0000
         PEA   $0000
         LDA   L0ECC
         PHA
         LDA   L0ECA
         PHA
         _Long2Fix
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         RTS

L83E1    REP   #$30
         LDA   L0ED4
         PHA
         LDA   L0ED2
         PHA
         LDA   L0ED0
         PHA
         LDA   L0ECE
         PHA
         LDA   L0ECC
         PHA
         LDA   L0ECA
         PHA
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         JSL   L0764
         TSC
         CLC
         ADC   #$0010
         TCS
         RTS

L840E    REP   #$30
         LDA   L0ED2
         PHA
         LDA   L0ECE
         PHA
         LDA   L0ECC
         PHA
         LDA   L0ECA
         PHA
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         JSL   L071C
         TSC
         CLC
         ADC   #$000C
         TCS
         RTS

L8433    REP   #$30
         JSL   L0684
         RTS

L843A    REP   #$30
         LDA   L0EC8
         PHA
         LDA   L0EC6
         PHA
         JSL   L07D9
         PLA
         STA   L0EC6
         PLA
         STA   L0EC8
         RTS

L8451    REP   #$30
L8453    JSR   L6F9F
         AND   #$0003
         CMP   #$0003
         BEQ   L8453
         STA   L8B31
         ASL
         ASL
         CLC
         ADC   L0EC6
         STA   L0EE2
         LDA   #$0000
         ADC   L0EC8
         STA   L0EE4
         LDA   L0FF2
         STA   L0EC6
         LDA   L0FF4
         STA   L0EC8
         JSR   L6E91
         LDA   #L84B8
         STA   L0EC6
         LDA   #^L84B8
         STA   L0EC8
         STZ   L0ECA
         JSR   L70AA
         LDA   L0EE2
         STA   $00
         LDA   L0EE4
         STA   $02
         LDA   [$00]
         STA   L0EC6
         LDY   #$0002
         LDA   [$00],Y
         STA   L0EC8
         LDA   #$00AF
         STA   L0ECA
         JSR   L7590
         JSR   L1776
         RTS

L84B8    DW    $00A0
         DW    $0000
         DW    $00B4
         DW    $0140
L84C0    REP   #$30
         JSR   L6F9F
         AND   #$0001
         BEQ   L84EB
         LDA   L8AFF
         STA   L0EC6
         LDA   L8B01
         STA   L0EC8
         LDA   L8B03
         STA   L0ECA
         LDA   L8B05
         STA   L0ECC
         LDA   L8B07
         STA   L0ECE
         JSR   L138B
L84EB    LDA   L8B27
         STA   L0EC6
         LDA   L8B29
         STA   L0EC8
         LDA   L8B2B
         STA   L0ECA
         LDA   L8B2D
         STA   L0ECC
         LDA   L8B2F
         STA   L0ECE
         JSR   L138B
         RTS

L850D    REP   #$30
         LDY   L8B31
         BNE   L8535
         LDA   L8A8A
         STA   L0EC6
         LDA   L8A8C
         STA   L0EC8
         LDA   L8A8E
         STA   L0ECA
         LDA   L8A90
         STA   L0ECC
         LDA   L8A92
         STA   L0ECE
         JMP   L8579

L8535    CPY   #$0002
         BNE   L855B
         LDA   L8AB1
         STA   L0EC6
         LDA   L8AB3
         STA   L0EC8
         LDA   L8AB5
         STA   L0ECA
         LDA   L8AB7
         STA   L0ECC
         LDA   L8AB9
         STA   L0ECE
         JMP   L8579

L855B    LDA   L8AD8
         STA   L0EC6
         LDA   L8ADA
         STA   L0EC8
         LDA   L8ADC
         STA   L0ECA
         LDA   L8ADE
         STA   L0ECC
         LDA   L8AE0
         STA   L0ECE
L8579    JSR   L138B
         RTS

L857D    REP   #$30
         LDA   L0E60
         BEQ   L8587
         JSR   L2661
L8587    LDA   #L8A6D
         STA   L0EC6
         LDA   #^L8A6D
         STA   L0EC8
         LDA   #L8A8A
         STA   L0ECA
         LDA   #^L8A8A
         STA   L0ECC
         LDA   #L8A8E
         STA   L0ECE
         LDA   #^L8A8E
         STA   L0ED0
         LDA   #L8A92
         STA   L0ED2
         LDA   #^L8A92
         STA   L0ED4
         JSR   L136F
         LDA   #L8A94
         STA   L0EC6
         LDA   #^L8A94
         STA   L0EC8
         LDA   #L8AB1
         STA   L0ECA
         LDA   #^L8AB1
         STA   L0ECC
         LDA   #L8AB5
         STA   L0ECE
         LDA   #^L8AB5
         STA   L0ED0
         LDA   #L8AB9
         STA   L0ED2
         LDA   #^L8AB9
         STA   L0ED4
         JSR   L136F
         LDA   #L8ABB
         STA   L0EC6
         LDA   #^L8ABB
         STA   L0EC8
         LDA   #L8AD8
         STA   L0ECA
         LDA   #^L8AD8
         STA   L0ECC
         LDA   #L8ADC
         STA   L0ECE
         LDA   #^L8ADC
         STA   L0ED0
         LDA   #L8AE0
         STA   L0ED2
         LDA   #^L8AE0
         STA   L0ED4
         JSR   L136F
         RTS

L8621    LDA   L8A8A
         STA   L0EC6
         LDA   L8A8C
         STA   L0EC8
         JSR   L1380
         LDA   L8AB1
         STA   L0EC6
         LDA   L8AB3
         STA   L0EC8
         JSR   L1380
         LDA   L8AD8
         STA   L0EC6
         LDA   L8ADA
         STA   L0EC8
         JSR   L1380
         RTS

L864F    REP   #$30
         LDA   L0E60
         BEQ   L8659
         JSR   L2661
L8659    LDA   #L8AE2
         STA   L0EC6
         LDA   #^L8AE2
         STA   L0EC8
         LDA   #L8AFF
         STA   L0ECA
         LDA   #^L8AFF
         STA   L0ECC
         LDA   #L8B03
         STA   L0ECE
         LDA   #^L8B03
         STA   L0ED0
         LDA   #L8B07
         STA   L0ED2
         LDA   #^L8B07
         STA   L0ED4
         JSR   L136F
         LDA   #L8B09
         STA   L0EC6
         LDA   #^L8B09
         STA   L0EC8
         LDA   #L8B27
         STA   L0ECA
         LDA   #^L8B27
         STA   L0ECC
         LDA   #L8B2B
         STA   L0ECE
         LDA   #^L8B2B
         STA   L0ED0
         LDA   #L8B2F
         STA   L0ED2
         LDA   #^L8B2F
         STA   L0ED4
         JSR   L136F
         RTS

L86C0    LDA   L8AFF
         STA   L0EC6
         LDA   L8B01
         STA   L0EC8
         JSR   L1380
         LDA   L8B27
         STA   L0EC6
         LDA   L8B29
         STA   L0EC8
         JSR   L1380
         RTS

L86DF    REP   #$30
         LDA   L0E60
         BEQ   L86E9
         JSR   L2661
L86E9    LDA   #L892F
         STA   L0EC6
         LDA   #^L892F
         STA   L0EC8
         LDA   #L894D
         STA   L0ECA
         LDA   #^L894D
         STA   L0ECC
         LDA   #L8951
         STA   L0ECE
         LDA   #^L8951
         STA   L0ED0
         LDA   #L8955
         STA   L0ED2
         LDA   #^L8955
         STA   L0ED4
         JSR   L136F
         LDA   #L897F
         STA   L0EC6
         LDA   #^L897F
         STA   L0EC8
         LDA   #L899C
         STA   L0ECA
         LDA   #^L899C
         STA   L0ECC
         LDA   #L89A0
         STA   L0ECE
         LDA   #^L89A0
         STA   L0ED0
         LDA   #L89A4
         STA   L0ED2
         LDA   #^L89A4
         STA   L0ED4
         JSR   L136F
         LDA   #L89A6
         STA   L0EC6
         LDA   #^L89A6
         STA   L0EC8
         LDA   #L89C3
         STA   L0ECA
         LDA   #^L89C3
         STA   L0ECC
         LDA   #L89C7
         STA   L0ECE
         LDA   #^L89C7
         STA   L0ED0
         LDA   #L89CB
         STA   L0ED2
         LDA   #^L89CB
         STA   L0ED4
         JSR   L136F
         LDA   #L89CD
         STA   L0EC6
         LDA   #^L89CD
         STA   L0EC8
         LDA   #L89EC
         STA   L0ECA
         LDA   #^L89EC
         STA   L0ECC
         LDA   #L89F0
         STA   L0ECE
         LDA   #^L89F0
         STA   L0ED0
         LDA   #L89F4
         STA   L0ED2
         LDA   #^L89F4
         STA   L0ED4
         JSR   L136F
         RTS

L87B6    LDA   L894D
         STA   L0EC6
         LDA   L894F
         STA   L0EC8
         JSR   L1380
         LDA   L899C
         STA   L0EC6
         LDA   L899E
         STA   L0EC8
         JSR   L1380
         LDA   L89C3
         STA   L0EC6
         LDA   L89C5
         STA   L0EC8
         JSR   L1380
         LDA   L89EC
         STA   L0EC6
         LDA   L89EE
         STA   L0EC8
         JSR   L1380
         RTS

L87F3    REP   #$30
         LDA   L0E60
         BEQ   L87FD
         JSR   L2661
L87FD    LDA   #L89F6
         STA   L0EC6
         LDA   #^L89F6
         STA   L0EC8
         LDA   #L8A13
         STA   L0ECA
         LDA   #^L8A13
         STA   L0ECC
         LDA   #L8A17
         STA   L0ECE
         LDA   #^L8A17
         STA   L0ED0
         LDA   #L8A1B
         STA   L0ED2
         LDA   #^L8A1B
         STA   L0ED4
         JSR   L136F
         LDA   #L8A1D
         STA   L0EC6
         LDA   #^L8A1D
         STA   L0EC8
         LDA   #L8A3B
         STA   L0ECA
         LDA   #^L8A3B
         STA   L0ECC
         LDA   #L8A3F
         STA   L0ECE
         LDA   #^L8A3F
         STA   L0ED0
         LDA   #L8A43
         STA   L0ED2
         LDA   #^L8A43
         STA   L0ED4
         JSR   L136F
         RTS

L8864    LDA   L8A13
         STA   L0EC6
         LDA   L8A15
         STA   L0EC8
         JSR   L1380
         LDA   L8A3B
         STA   L0EC6
         LDA   L8A3D
         STA   L0EC8
         JSR   L1380
         RTS

L8883    ADRL  L889B
         ADRL  L88B3
         ADRL  L88A9
L888F    ADRL  L88BE
         ADRL  L88D7
         ADRL  L88EE
L889B    ASC   'That'27's right!'00
L88A9    ASC   'Good job!'00
L88B3    ASC   'Very good!'00
L88BE    ASC   'Sorry, that'27's incorrect.'00
L88D7    ASC   'Better luck next time.'00
L88EE    ASC   'Whoops, you missed it.'00
L8905    ASC   '1/magic.snd/fsagain'00
L8925    DW    $0000
L8927    DW    $0000
L8929    DW    $0000
L892B    DW    $0000
L892D    DW    $0000
L892F    ASC   '1/magic.snd/fshow'00
L894D    DW    $0000
L894F    DW    $0000
L8951    DW    $0000
L8953    DW    $0000
L8955    DW    $0000
L8957    ASC   '1/magic.snd/fsact'00
L8975    DW    $0000
L8977    DW    $0000
L8979    DW    $0000
L897B    DW    $0000
L897D    DW    $0000
L897F    ASC   '1/magic.snd/fsp1'00
L899C    DW    $0000
L899E    DW    $0000
L89A0    DW    $0000
L89A2    DW    $0000
L89A4    DW    $0000
L89A6    ASC   '1/magic.snd/fsp2'00
L89C3    DW    $0000
L89C5    DW    $0000
L89C7    DW    $0000
L89C9    DW    $0000
L89CB    DW    $0000
L89CD    ASC   '1/magic.snd/fsname'00
L89EC    DW    $0000
L89EE    DW    $0000
L89F0    DW    $0000
L89F2    DW    $0000
L89F4    DW    $0000
L89F6    ASC   '1/magic.snd/fsqt'00
L8A13    DW    $0000
L8A15    DW    $0000
L8A17    DW    $0000
L8A19    DW    $0000
L8A1B    DW    $0000
L8A1D    ASC   '1/magic.snd/fsopt'00
L8A3B    DW    $0000
L8A3D    DW    $0000
L8A3F    DW    $0000
         DW    $0000
L8A43    DW    $0000
L8A45    ASC   '1/magic.snd/fsopt'00
L8A63    DW    $0000
L8A65    DW    $0000
L8A67    DW    $0000
L8A69    DW    $0000
L8A6B    DW    $0000
L8A6D    ASC   '1/magic.snd/fstr'00
L8A8A    DW    $0000
L8A8C    DW    $0000
L8A8E    DW    $0000
L8A90    DW    $0000
L8A92    DW    $0000
L8A94    ASC   '1/magic.snd/fsgj'00
L8AB1    DW    $0000
L8AB3    DW    $0000
L8AB5    DW    $0000
L8AB7    DW    $0000
L8AB9    DW    $0000
L8ABB    ASC   '1/magic.snd/fsvg'00
L8AD8    DW    $0000
L8ADA    DW    $0000
L8ADC    DW    $0000
L8ADE    DW    $0000
L8AE0    DW    $0000
L8AE2    ASC   '1/magic.snd/fswh'00
L8AFF    DW    $0000
L8B01    DW    $0000
L8B03    DW    $0000
L8B05    DW    $0000
L8B07    DW    $0000
L8B09    ASC   '1/magic.snd/fsinc'00
L8B27    DB    $00
         DB    $00
L8B29    DB    $00
         DB    $00
L8B2B    DB    $00
         DB    $00
L8B2D    DB    $00
         DB    $00
L8B2F    DB    $00
         DB    $00
L8B31    DB    $00
         DB    $00
L8B33    DB    $00
         DB    $00
L8B35    DB    $00
         DB    $00
L8B37    DB    $00
         DB    $00
L8B39    DB    $00
         DB    $00
L8B3B    DB    $00
         DB    $00
L8B3D    ASC   'Player 1'00
L8B46    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L8B5E    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L8B76    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L8B8C    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L8C76    REP   #$30
         LDA   L0E60
         BEQ   L8C7D
L8C7D    LDA   #L8905
         STA   L0EC6
         LDA   #^L8905
         STA   L0EC8
         LDA   #L8925
         STA   L0ECA
         LDA   #^L8925
         STA   L0ECC
         LDA   #L8929
         STA   L0ECE
         LDA   #^L8929
         STA   L0ED0
         LDA   #L892D
         STA   L0ED2
         LDA   #^L892D
         STA   L0ED4
         JSR   L136F
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L6EBC
         JSR   LA27C
         LDA   #$0000
         STA   L0EC6
         JSR   L70EF
         LDA   #L8E9D
         STA   L0EC6
         LDA   #^L8E9D
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L8EA5
         STA   L0EC6
         LDA   #^L8EA5
         STA   L0EC8
         LDA   #$0000
         STA   L0ECA
         JSR   L70AA
         LDA   #L8EAD
         STA   L0EC6
         LDA   #^L8EAD
         STA   L0EC8
         LDA   #$0007
         STA   L0ECA
         JSR   L70AA
         LDA   #L8EB5
         STA   L0EC6
         LDA   #^L8EB5
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L8EBD
         STA   L0EC6
         LDA   #^L8EBD
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #$000D
         STA   L0EC6
         JSR   L7574
         LDA   #L8E6F
         STA   L0EC6
         LDA   #^L8E6F
         STA   L0EC8
         LDA   #$0028
         STA   L0ECA
         JSR   L7590
         LDA   #L8E81
         STA   L0EC6
         LDA   #^L8E81
         STA   L0EC8
         LDA   #$003C
         STA   L0ECA
         JSR   L7590
         LDA   #$00A0
         STA   L0EC6
         LDA   #$0074
         STA   L0ECA
         JSR   L74DA
         LDA   #L8E93
         STA   L0EC6
         LDA   #^L8E93
         STA   L0EC8
         JSR   L7513
         LDA   #$00A0
         STA   L0EC6
         LDA   #$008A
         STA   L0ECA
         JSR   L74DA
         LDA   #L8E97
         STA   L0EC6
         LDA   #^L8E97
         STA   L0EC8
         JSR   L7513
         LDA   #$0007
         STA   L0EC6
         JSR   L7574
         LDA   #$009B
         STA   L0EC6
         LDA   #$00AF
         STA   L0ECA
         JSR   L74DA
         LDA   #L8E9A
         STA   L0EC6
         LDA   #^L8E9A
         STA   L0EC8
         JSR   L7513
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         LDA   #$0001
         STA   L8E6D
         LDA   L8925
         STA   L0EC6
         LDA   L8927
         STA   L0EC8
         LDA   L8929
         STA   L0ECA
         LDA   L892B
         STA   L0ECC
         LDA   L892D
         STA   L0ECE
         JSR   L138B
         JSR   L70E5
L8E06    LDA   #$0000
         STA   L0EC6
         LDA   #L8EAD
         STA   L0ECA
         LDA   #^L8EAD
         STA   L0ECC
         LDA   #$0003
         STA   L0ECE
         JSR   L808C
         LDA   L0EC6
         BEQ   L8E06
         CMP   #$0003
         BEQ   L8E51
         CMP   L8E6D
         BEQ   L8E06
         STA   L8E6D
         LDA   L8E6D
         STA   L0EC6
         LDA   #$0002
         STA   L0ECA
         LDA   #L8EAD
         STA   L0ECE
         LDA   #^L8EAD
         STA   L0ED0
         JSR   L8143
         JMP   L8E06

L8E51    LDA   L8925
         STA   L0EC6
         LDA   L8927
         STA   L0EC8
         JSR   L1380
         LDA   L8E6D
         STA   L0EC6
         JSR   L70DB
         JSR   L7C27
         RTS

L8E6D    DW    $0000
L8E6F    ASC   'Would you like to'00
L8E81    ASC   'play again?'00
         ASC   '(Y/N)'00
L8E93    ASC   'Yes'00
L8E97    ASC   'No'00
L8E9A    ASC   'OK'00
L8E9D    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L8EA5    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L8EAD    DW    $0068
         DW    $008C
         DW    $0076
         DW    $009A
L8EB5    DW    $007E
         DW    $008C
         DW    $008C
         DW    $009A
L8EBD    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L8EC5    REP   #$30
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L6EBC
         JSR   LA27C
         LDA   #$0000
         STA   L0EC6
         JSR   L70EF
         LDA   #L908B
         STA   L0EC6
         LDA   #^L908B
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L9093
         STA   L0EC6
         LDA   #^L9093
         STA   L0EC8
         LDA   #$0000
         STA   L0ECA
         JSR   L70AA
         LDA   #L909B
         STA   L0EC6
         LDA   #^L909B
         STA   L0EC8
         LDA   #$0007
         STA   L0ECA
         JSR   L70AA
         LDA   #L90A3
         STA   L0EC6
         LDA   #^L90A3
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L90AB
         STA   L0EC6
         LDA   #^L90AB
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #$000D
         STA   L0EC6
         LDA   #$000E
         STA   L0ECA
         JSR   L7640
         LDA   #L906E
         STA   L0EC6
         LDA   #^L906E
         STA   L0EC8
         LDA   #$0028
         STA   L0ECA
         JSR   L7590
         LDA   #$00A0
         STA   L0EC6
         LDA   #$004C
         STA   L0ECA
         JSR   L74DA
         LDA   #L9080
         STA   L0EC6
         LDA   #^L9080
         STA   L0EC8
         JSR   L7513
         LDA   #$00A0
         STA   L0EC6
         LDA   #$0062
         STA   L0ECA
         JSR   L74DA
         LDA   #L9084
         STA   L0EC6
         LDA   #^L9084
         STA   L0EC8
         JSR   L7513
         LDA   #$0007
         STA   L0EC6
         LDA   #$0009
         STA   L0ECA
         JSR   L7640
         LDA   #$009B
         STA   L0EC6
         LDA   #$00AF
         STA   L0ECA
         JSR   L74DA
         LDA   #L9088
         STA   L0EC6
         LDA   #^L9088
         STA   L0EC8
         JSR   L7513
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         LDA   #$0001
         STA   L906C
         LDA   L894D
         STA   L0EC6
         LDA   L894F
         STA   L0EC8
         LDA   L8951
         STA   L0ECA
         LDA   L8953
         STA   L0ECC
         LDA   L8955
         STA   L0ECE
         JSR   L138B
         JSR   L70E5
L9014    LDA   #$0000
         STA   L0EC6
         LDA   #L909B
         STA   L0ECA
         LDA   #^L909B
         STA   L0ECC
         LDA   #$0003
         STA   L0ECE
         JSR   L808C
         LDA   L0EC6
         BEQ   L9014
         CMP   #$0003
         BEQ   L905F
         CMP   L906C
         BEQ   L9014
         STA   L906C
         LDA   L906C
         STA   L0EC6
         LDA   #$0002
         STA   L0ECA
         LDA   #L909B
         STA   L0ECE
         LDA   #^L909B
         STA   L0ED0
         JSR   L8143
         JMP   L9014

L905F    LDA   L906C
         STA   L8B37
         JSR   L7C27
         JSR   L70DB
         RTS

L906C    DW    $0000
L906E    ASC   'How many players?'00
L9080    ASC   'one'00
L9084    ASC   'two'00
L9088    ASC   'OK'00
L908B    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L9093    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L909B    DW    $0042
         DW    $008C
         DW    $0050
         DW    $009A
L90A3    DW    $0056
         DW    $008C
         DW    $0064
         DW    $009A
L90AB    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L90B3    REP   #$30
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L6EBC
         JSR   LA27C
         LDA   #$0000
         STA   L0EC6
         JSR   L70EF
         LDA   #L9216
         STA   L0EC6
         LDA   #^L9216
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L921E
         STA   L0EC6
         LDA   #^L921E
         STA   L0EC8
         LDA   #$0000
         STA   L0ECA
         JSR   L70AA
         LDA   #$000D
         STA   L0EC6
         JSR   L7574
         LDA   #L91B3
         STA   L0EC6
         LDA   #^L91B3
         STA   L0EC8
         LDA   #$001C
         STA   L0ECA
         JSR   L7590
         LDA   #L91C2
         STA   L0EC6
         LDA   #^L91C2
         STA   L0EC8
         LDA   #$0033
         STA   L0ECA
         JSR   L7590
         LDA   #L91D2
         STA   L0EC6
         LDA   #^L91D2
         STA   L0EC8
         LDA   #$004A
         STA   L0ECA
         JSR   L7590
         LDA   #L91E0
         STA   L0EC6
         LDA   #^L91E0
         STA   L0EC8
         LDA   #$0061
         STA   L0ECA
         JSR   L7590
         JSR   L7C27
         LDA   #$0007
         STA   L0EC6
         JSR   L7574
         LDA   #L91F0
         STA   L0EC6
         LDA   #^L91F0
         STA   L0EC8
         LDA   #$00AA
         STA   L0ECA
         JSR   L7590
         LDA   #L9204
         STA   L0EC6
         LDA   #^L9204
         STA   L0EC8
         LDA   #$00B4
         STA   L0ECA
         JSR   L7590
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         LDA   #$0001
         STA   L91B1
         JSR   L1797
         CMP   #$001B
         BEQ   L91B0
         LDA   #$0000
L91B0    RTS

L91B1    DW    $0000
L91B3    ASC   'Press a key or'00
L91C2    ASC   'click the mouse'00
L91D2    ASC   'to answer the'00
L91E0    ASC   'myth questions.'00
L91F0    ASC   'Press ESC to return'00
L9204    ASC   'to the main menu.'00
L9216    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L921E    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L9226    REP   #$30
         LDA   L0EC6
         STA   L93FC
         LDA   L0EC8
         STA   L93FE
         LDA   L0ECA
         STA   L9400
         LDA   L0ECC
         STA   L9402
         LDA   L0ECE
         STA   L9404
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L6EBC
         JSR   LA27C
         LDA   #$0000
         STA   L0EC6
         JSR   L70EF
         LDA   #$000D
         STA   L0EC6
         LDA   #$0000
         STA   L0ECA
         JSR   L7640
         LDA   L9400
         STA   L0EC6
         LDA   L9402
         STA   L0EC8
         LDA   #$0028
         STA   L0ECA
         JSR   L7590
         LDA   #L9408
         STA   L0EC6
         LDA   #^L9408
         STA   L0EC8
         LDA   #$0050
         STA   L0ECA
         JSR   L7590
         LDA   #$0007
         STA   L0EC6
         LDA   #$0000
         STA   L0ECA
         JSR   L7640
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         LDA   #$0000
         STA   L9406
         LDA   #L9438
         STA   $00
         LDA   #^L9438
         STA   $02
         LDA   L9404
         CMP   #$0001
         BNE   L92F7
         LDA   L899C
         STA   L0EC6
         LDA   L899E
         STA   L0EC8
         LDA   L89A0
         STA   L0ECA
         LDA   L89A2
         STA   L0ECC
         LDA   L89A4
         STA   L0ECE
         JSR   L138B
         JMP   L9318

L92F7    LDA   L89C3
         STA   L0EC6
         LDA   L89C5
         STA   L0EC8
         LDA   L89C7
         STA   L0ECA
         LDA   L89C9
         STA   L0ECC
         LDA   L89CB
         STA   L0ECE
         JSR   L138B
L9318    LDA   L89EC
         STA   L0EC6
         LDA   L89EE
         STA   L0EC8
         LDA   L89F0
         STA   L0ECA
         LDA   L89F2
         STA   L0ECC
         LDA   L89F4
         STA   L0ECE
         JSR   L138B
L9339    JSR   L6F56
         CMP   #$0000
         BEQ   L9339
         CMP   #$000D
         BNE   L9349
         JMP   L93C8

L9349    CMP   #$007F
         BEQ   L93AB
         LDY   L9406
         CPY   #$0008
         BEQ   L93C2
         ORA   #$0020
         CMP   #$0061
         BCC   L93C2
         CMP   #$007B
         BCS   L93C2
         CPY   #$0000
         BNE   L936B
         AND   #$00DF
L936B    SEP   #$20
         STA   [$00],Y
         INY
         LDA   #$00
         STA   [$00],Y
         REP   #$30
         STY   L9406
L9379    LDA   #L9430
         STA   L0EC6
         LDA   #^L9430
         STA   L0EC8
         LDA   #$0000
         STA   L0ECA
         JSR   L70AA
         LDY   L9406
         BEQ   L9339
         LDA   #L9438
         STA   L0EC6
         LDA   #^L9438
         STA   L0EC8
         LDA   #$0078
         STA   L0ECA
         JSR   L7590
         JMP   L9339

L93AB    LDY   L9406
         CPY   #$0000
         BEQ   L93C2
         DEY
         SEP   #$20
         LDA   #$00
         STA   [$00],Y
         REP   #$30
         STY   L9406
         JMP   L9379

L93C2    JSR   L1402
         JMP   L9339

L93C8    LDY   L9406
         CPY   #$0000
         BEQ   L93F8
         INY
         STY   L9406
         LDA   #L9438
         STA   L0EC6
         LDA   #^L9438
         STA   L0EC8
         LDA   L93FC
         STA   L0ECA
         LDA   L93FE
         STA   L0ECC
         LDA   L9406
         STA   L0ECE
         STZ   L0ED0
         JSR   L705E
L93F8    JSR   L7C27
         RTS

L93FC    DW    $0000
L93FE    DW    $0000
L9400    DW    $0000
L9402    DW    $0000
L9404    DW    $0000
L9406    DW    $0000
L9408    ASC   'Please enter your name.'00
         DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
         DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L9430    DW    $0064
         DW    $000A
         DW    $0082
         DW    $0136
L9438    DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
L9446    REP   #$30
         LDA   L0EC6
         STA   L95C1
         LDA   L0EC8
         STA   L95C3
         LDA   L0ECA
         STA   L95C5
         LDA   L0ECC
         STA   L95C7
         LDA   #$0000
         STA   L0EC6
         LDA   L95C1
         STA   L0ECA
         LDA   L95C3
         STA   L0ECC
         JSR   L7EB6
         LDA   L0EC6
         BEQ   L947D
         JMP   L95C0

L947D    LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L6EBC
         JSR   LA27C
         LDA   #$0000
         STA   L0EC6
         JSR   L70EF
         LDA   #L95F8
         STA   L0EC6
         LDA   #^L95F8
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L9600
         STA   L0EC6
         LDA   #^L9600
         STA   L0EC8
         LDA   #$000E
         STA   L0ECA
         JSR   L70AA
         LDA   #L9608
         STA   L0EC6
         LDA   #^L9608
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #$000D
         STA   L0EC6
         LDA   #$000E
         STA   L0ECA
         JSR   L7640
         LDA   #L95C9
         STA   L0EC6
         LDA   #^L95C9
         STA   L0EC8
         LDA   #$0028
         STA   L0ECA
         JSR   L7590
         LDA   L95C5
         STA   L0EC6
         LDA   L95C7
         STA   L0EC8
         LDA   #$0046
         STA   L0ECA
         JSR   L7590
         LDA   #$0007
         STA   L0EC6
         LDA   #$0009
         STA   L0ECA
         JSR   L7640
         LDA   #$009B
         STA   L0EC6
         LDA   #$00AF
         STA   L0ECA
         JSR   L74DA
         LDA   #L95D7
         STA   L0EC6
         LDA   #^L95D7
         STA   L0EC8
         JSR   L7513
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         JSR   L70E5
L9552    LDA   #$0000
         STA   L0EC6
         LDA   #L9608
         STA   L0ECA
         LDA   #^L9608
         STA   L0ECC
         LDA   #$0001
         STA   L0ECE
         JSR   L808C
         LDA   L0EC6
         BEQ   L9552
         CMP   #$0001
         BNE   L9552
         LDA   #$0000
         STA   L0EC6
         LDA   L95C1
         STA   L0ECA
         LDA   L95C3
         STA   L0ECC
         JSR   L7EB6
         LDA   L0EC6
         BNE   L95BA
         JSR   L1402
         LDA   #$0007
         STA   L0EC6
         LDA   #$000E
         STA   L0ECA
         JSR   L7640
         LDA   #L95DA
         STA   L0EC6
         LDA   #^L95DA
         STA   L0EC8
         LDA   #$0078
         STA   L0ECA
         JSR   L7590
         BRA   L9552
L95BA    JSR   L7C27
         JSR   L70DB
L95C0    RTS

L95C1    DW    $0000
L95C3    DW    $0000
L95C5    DW    $0000
L95C7    DW    $0000
L95C9    ASC   'Please insert'00
L95D7    ASC   'OK'00
L95DA    ASC   'Wrong disk, please try again!'00
L95F8    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L9600    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L9608    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L9610    REP   #$30
         JSR   L6EBC
         LDA   L0E60
         BEQ   L961D
         JSR   L2643
L961D    LDA   #L8957
         STA   L0EC6
         LDA   #^L8957
         STA   L0EC8
         LDA   #L8975
         STA   L0ECA
         LDA   #^L8975
         STA   L0ECC
         LDA   #L8979
         STA   L0ECE
         LDA   #^L8979
         STA   L0ED0
         LDA   #L897D
         STA   L0ED2
         LDA   #^L897D
         STA   L0ED4
         JSR   L136F
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   LA27C
         LDA   #$0000
         STA   L0EC6
         JSR   L70EF
         LDA   #L9864
         STA   L0EC6
         LDA   #^L9864
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L986C
         STA   L0EC6
         LDA   #^L986C
         STA   L0EC8
         LDA   #$0000
         STA   L0ECA
         JSR   L70AA
         LDA   #L9874
         STA   L0EC6
         LDA   #^L9874
         STA   L0EC8
         LDA   #$0007
         STA   L0ECA
         JSR   L70AA
         LDA   #L987C
         STA   L0EC6
         LDA   #^L987C
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L9884
         STA   L0EC6
         LDA   #^L9884
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #$000D
         STA   L0EC6
         LDA   #$000E
         STA   L0ECA
         JSR   L7640
         LDA   #L9822
         STA   L0EC6
         LDA   #^L9822
         STA   L0EC8
         LDA   #$0028
         STA   L0ECA
         JSR   L7590
         LDA   #L9830
         STA   L0EC6
         LDA   #^L9830
         STA   L0EC8
         LDA   #$003C
         STA   L0ECA
         JSR   L7590
         LDA   #$006E
         STA   L0EC6
         LDA   #$0060
         STA   L0ECA
         JSR   L74DA
         LDA   #L983E
         STA   L0EC6
         LDA   #^L983E
         STA   L0EC8
         JSR   L7513
         LDA   #$006E
         STA   L0EC6
         LDA   #$0076
         STA   L0ECA
         JSR   L74DA
         LDA   #L984C
         STA   L0EC6
         LDA   #^L984C
         STA   L0EC8
         JSR   L7513
         LDA   #$0007
         STA   L0EC6
         LDA   #$0009
         STA   L0ECA
         JSR   L7640
         LDA   #$009B
         STA   L0EC6
         LDA   #$00AF
         STA   L0ECA
         JSR   L74DA
         LDA   #L9861
         STA   L0EC6
         LDA   #^L9861
         STA   L0EC8
         JSR   L7513
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         LDA   #$0001
         STA   L9820
         LDA   L8975
         STA   L0EC6
         LDA   L8977
         STA   L0EC8
         LDA   L8979
         STA   L0ECA
         LDA   L897B
         STA   L0ECC
         LDA   L897D
         STA   L0ECE
         JSR   L138B
         JSR   L70E5
L97AF    JSR   L6F48
         CMP   #$001B
         BNE   L97BD
         STA   L9820
         JMP   L980A

L97BD    LDA   L0EC6
         BEQ   L97AF
         JSR   L6EE0
         LDA   #L9874
         STA   L0ECE
         LDA   #^L9874
         STA   L0ED0
         LDA   #$0003
         STA   L0ED2
         JSR   L7714
         LDA   L0ED6
         BEQ   L97AF
         CMP   #$0003
         BEQ   L980A
         CMP   L9820
         BEQ   L97AF
         STA   L9820
         LDA   L9820
         STA   L0EC6
         LDA   #$0002
         STA   L0ECA
         LDA   #L9874
         STA   L0ECE
         LDA   #^L9874
         STA   L0ED0
         JSR   L8143
         JMP   L97AF

L980A    LDA   L8975
         STA   L0EC6
         LDA   L8977
         STA   L0EC8
         JSR   L1380
         JSR   L70DB
         LDA   L9820
         RTS

L9820    DW    $0000
L9822    ASC   'Please select'00
L9830    ASC   'the activity.'00
L983E    ASC   'Read the myth'00
L984C    ASC   'Answer the questions'00
L9861    ASC   'OK'00
L9864    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L986C    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L9874    DW    $0054
         DW    $005A
         DW    $0062
         DW    $0068
L987C    DW    $006A
         DW    $005A
         DW    $0078
         DW    $0068
L9884    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L988C    REP   #$30
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   L6EBC
         JSR   LA27C
         LDA   #$0000
         STA   L0EC6
         JSR   L70EF
         LDA   #L9A8E
         STA   L0EC6
         LDA   #^L9A8E
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L9A96
         STA   L0EC6
         LDA   #^L9A96
         STA   L0EC8
         LDA   #$0000
         STA   L0ECA
         JSR   L70AA
         LDA   #L9A9E
         STA   L0EC6
         LDA   #^L9A9E
         STA   L0EC8
         LDA   #$0007
         STA   L0ECA
         JSR   L70AA
         LDA   #L9AA6
         STA   L0EC6
         LDA   #^L9AA6
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L9AAE
         STA   L0EC6
         LDA   #^L9AAE
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #$000D
         STA   L0EC6
         JSR   L7574
         LDA   #L9A47
         STA   L0EC6
         LDA   #^L9A47
         STA   L0EC8
         LDA   #$0028
         STA   L0ECA
         JSR   L7590
         LDA   #L9A59
         STA   L0EC6
         LDA   #^L9A59
         STA   L0EC8
         LDA   #$003C
         STA   L0ECA
         JSR   L7590
         LDA   #$0068
         STA   L0EC6
         LDA   #$0060
         STA   L0ECA
         JSR   L74DA
         LDA   #L9A68
         STA   L0EC6
         LDA   #^L9A68
         STA   L0EC8
         JSR   L7513
         LDA   #$0068
         STA   L0EC6
         LDA   #$0076
         STA   L0ECA
         JSR   L74DA
         LDA   #L9A77
         STA   L0EC6
         LDA   #^L9A77
         STA   L0EC8
         JSR   L7513
         LDA   #$0007
         STA   L0EC6
         JSR   L7574
         LDA   #$009B
         STA   L0EC6
         LDA   #$00AF
         STA   L0ECA
         JSR   L74DA
         LDA   #L9A8B
         STA   L0EC6
         LDA   #^L9A8B
         STA   L0EC8
         JSR   L7513
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         LDA   #$0001
         STA   L9A45
         LDA   L8A13
         STA   L0EC6
         LDA   L8A15
         STA   L0EC8
         LDA   L8A17
         STA   L0ECA
         LDA   L8A19
         STA   L0ECC
         LDA   L8A1B
         STA   L0ECE
         JSR   L138B
         JSR   L70E5
L99E4    LDA   #$0000
         STA   L0EC6
         LDA   #L9A9E
         STA   L0ECA
         LDA   #^L9A9E
         STA   L0ECC
         LDA   #$0003
         STA   L0ECE
         JSR   L808C
         LDA   L0EC6
         BEQ   L99E4
         CMP   #$0003
         BEQ   L9A2F
         CMP   L9A45
         BEQ   L99E4
         STA   L9A45
         LDA   L9A45
         STA   L0EC6
         LDA   #$0002
         STA   L0ECA
         LDA   #L9A9E
         STA   L0ECE
         LDA   #^L9A9E
         STA   L0ED0
         JSR   L8143
         JMP   L99E4

L9A2F    LDA   L8925
         STA   L0EC6
         LDA   L8927
         STA   L0EC8
         JSR   L1380
         JSR   L70DB
         LDA   L9A45
         RTS

L9A45    DW    $0000
L9A47    ASC   'Please select the'00
L9A59    ASC   'question type.'00
L9A68    ASC   'Reading Skills'00
L9A77    ASC   'Vocabulary Building'00
L9A8B    ASC   'OK'00
L9A8E    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L9A96    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L9A9E    DW    $0054
         DW    $0054
         DW    $0062
         DW    $0062
L9AA6    DW    $006A
         DW    $0054
         DW    $0078
         DW    $0062
L9AAE    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L9AB6    REP   #$30
         JSR   L6EBC
         JSR   LA27C
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         LDA   #$0000
         STA   L0EC6
         JSR   L70EF
         LDA   #L9CA9
         STA   L0EC6
         LDA   #^L9CA9
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L9CB1
         STA   L0EC6
         LDA   #^L9CB1
         STA   L0EC8
         LDA   #$0000
         STA   L0ECA
         JSR   L70AA
         LDA   #L9CB9
         STA   L0EC6
         LDA   #^L9CB9
         STA   L0EC8
         LDA   #$0007
         STA   L0ECA
         JSR   L70AA
         LDA   #L9CC1
         STA   L0EC6
         LDA   #^L9CC1
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L9CC9
         STA   L0EC6
         LDA   #^L9CC9
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #$000D
         STA   L0EC6
         JSR   L7574
         LDA   #L9C62
         STA   L0EC6
         LDA   #^L9C62
         STA   L0EC8
         LDA   #$0028
         STA   L0ECA
         JSR   L7590
         LDA   #L9C74
         STA   L0EC6
         LDA   #^L9C74
         STA   L0EC8
         LDA   #$003C
         STA   L0ECA
         JSR   L7590
         LDA   #$006E
         STA   L0EC6
         LDA   #$0060
         STA   L0ECA
         JSR   L74DA
         LDA   #L9C83
         STA   L0EC6
         LDA   #^L9C83
         STA   L0EC8
         JSR   L7513
         LDA   #$006E
         STA   L0EC6
         LDA   #$0076
         STA   L0ECA
         JSR   L74DA
         LDA   #L9C93
         STA   L0EC6
         LDA   #^L9C93
         STA   L0EC8
         JSR   L7513
         LDA   #$0007
         STA   L0EC6
         JSR   L7574
         LDA   #$009B
         STA   L0EC6
         LDA   #$00AF
         STA   L0ECA
         JSR   L74DA
         LDA   #L9CA6
         STA   L0EC6
         LDA   #^L9CA6
         STA   L0EC8
         JSR   L7513
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         LDA   #$0001
         STA   L9C60
         LDA   L8A13
         STA   L0EC6
         LDA   L8A15
         STA   L0EC8
         LDA   L8A17
         STA   L0ECA
         LDA   L8A19
         STA   L0ECC
         LDA   L8A1B
         STA   L0ECE
         JSR   L138B
         JSR   L70E5
L9C0E    LDA   #$0000
         STA   L0EC6
         LDA   #L9CB9
         STA   L0ECA
         LDA   #^L9CB9
         STA   L0ECC
         LDA   #$0003
         STA   L0ECE
         JSR   L808C
         LDA   L0EC6
         BEQ   L9C0E
         CMP   #$0003
         BEQ   L9C59
         CMP   L9C60
         BEQ   L9C0E
         STA   L9C60
         LDA   L9C60
         STA   L0EC6
         LDA   #$0002
         STA   L0ECA
         LDA   #L9CB9
         STA   L0ECE
         LDA   #^L9CB9
         STA   L0ED0
         JSR   L8143
         JMP   L9C0E

L9C59    JSR   L70DB
         LDA   L9C60
         RTS

L9C60    DW    $0000
L9C62    ASC   'Please select the'00
L9C74    ASC   'question type.'00
L9C83    ASC   'Multiple Choice'00
L9C93    ASC   'Fill-in the Blanks'00
L9CA6    ASC   'OK'00
L9CA9    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L9CB1    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L9CB9    DW    $0054
         DW    $005A
         DW    $0062
         DW    $0068
L9CC1    DW    $006A
         DW    $005A
         DW    $0078
         DW    $0068
L9CC9    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L9CD1    REP   #$30
         JSR   L6EBC
         JSR   LA27C
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         LDA   #$0000
         STA   L0EC6
         JSR   L70EF
         LDA   #L9EEC
         STA   L0EC6
         LDA   #^L9EEC
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L9EF4
         STA   L0EC6
         LDA   #^L9EF4
         STA   L0EC8
         LDA   #$0000
         STA   L0ECA
         JSR   L70AA
         LDA   #L9EFC
         STA   L0EC6
         LDA   #^L9EFC
         STA   L0EC8
         LDA   #$0007
         STA   L0ECA
         JSR   L70AA
         LDA   #L9F04
         STA   L0EC6
         LDA   #^L9F04
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L9F0C
         STA   L0EC6
         LDA   #^L9F0C
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #L9F14
         STA   L0EC6
         LDA   #^L9F14
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #$000D
         STA   L0EC6
         JSR   L7574
         LDA   #L9EB0
         STA   L0EC6
         LDA   #^L9EB0
         STA   L0EC8
         LDA   #$0028
         STA   L0ECA
         JSR   L7590
         LDA   #L9EC2
         STA   L0EC6
         LDA   #^L9EC2
         STA   L0EC8
         LDA   #$003C
         STA   L0ECA
         JSR   L7590
         LDA   #$008C
         STA   L0EC6
         LDA   #$0060
         STA   L0ECA
         JSR   L74DA
         LDA   #L9ED1
         STA   L0EC6
         LDA   #^L9ED1
         STA   L0EC8
         JSR   L7513
         LDA   #$008C
         STA   L0EC6
         LDA   #$0076
         STA   L0ECA
         JSR   L74DA
         LDA   #L9ED9
         STA   L0EC6
         LDA   #^L9ED9
         STA   L0EC8
         JSR   L7513
         LDA   #$008C
         STA   L0EC6
         LDA   #$008C
         STA   L0ECA
         JSR   L74DA
         LDA   #L9EE1
         STA   L0EC6
         LDA   #^L9EE1
         STA   L0EC8
         JSR   L7513
         LDA   #$0007
         STA   L0EC6
         JSR   L7574
         LDA   #$009B
         STA   L0EC6
         LDA   #$00AF
         STA   L0ECA
         JSR   L74DA
         LDA   #L9EE9
         STA   L0EC6
         LDA   #^L9EE9
         STA   L0EC8
         JSR   L7513
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         LDA   #$0001
         STA   L9EAE
         LDA   L8A13
         STA   L0EC6
         LDA   L8A15
         STA   L0EC8
         LDA   L8A17
         STA   L0ECA
         LDA   L8A19
         STA   L0ECC
         LDA   L8A1B
         STA   L0ECE
         JSR   L138B
         JSR   L70E5
L9E5C    LDA   #$0000
         STA   L0EC6
         LDA   #L9EFC
         STA   L0ECA
         LDA   #^L9EFC
         STA   L0ECC
         LDA   #$0004
         STA   L0ECE
         JSR   L808C
         LDA   L0EC6
         BEQ   L9E5C
         CMP   #$0004
         BEQ   L9EA7
         CMP   L9EAE
         BEQ   L9E5C
         STA   L9EAE
         LDA   L9EAE
         STA   L0EC6
         LDA   #$0003
         STA   L0ECA
         LDA   #L9EFC
         STA   L0ECE
         LDA   #^L9EFC
         STA   L0ED0
         JSR   L8143
         JMP   L9E5C

L9EA7    JSR   L70DB
         LDA   L9EAE
         RTS

L9EAE    DW    $0000
L9EB0    ASC   'Please select the'00
L9EC2    ASC   'question type.'00
L9ED1    ASC   'Fill-In'00
L9ED9    ASC   'Synonym'00
L9EE1    ASC   'Antonym'00
L9EE9    ASC   'OK'00
L9EEC    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L9EF4    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L9EFC    DW    $0054
         DW    $0078
         DW    $0062
         DW    $0086
L9F04    DW    $006A
         DW    $0078
         DW    $0078
         DW    $0086
L9F0C    DW    $0080
         DW    $0078
         DW    $008E
         DW    $0086
L9F14    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L9F1C    REP   #$30
         JSR   L6EBC
         JSR   LA27C
         JSR   L2643
         LDA   L0E60
         BEQ   L9F2C
L9F2C    LDA   #L8A45
         STA   L0EC6
         LDA   #^L8A45
         STA   L0EC8
         LDA   #L8A63
         STA   L0ECA
         LDA   #^L8A63
         STA   L0ECC
         LDA   #L8A67
         STA   L0ECE
         LDA   #^L8A67
         STA   L0ED0
         LDA   #L8A6B
         STA   L0ED2
         LDA   #^L8A6B
         STA   L0ED4
         JSR   L136F
         LDA   #$0000
         STA   L0EC6
         JSR   L7A2D
         JSR   LA27C
         LDA   #$0000
         STA   L0EC6
         JSR   L70EF
         LDA   #LA23C
         STA   L0EC6
         LDA   #^LA23C
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #LA244
         STA   L0EC6
         LDA   #^LA244
         STA   L0EC8
         LDA   #$0000
         STA   L0ECA
         JSR   L70AA
         LDA   #LA24C
         STA   L0EC6
         LDA   #^LA24C
         STA   L0EC8
         LDA   #$0007
         STA   L0ECA
         JSR   L70AA
         LDA   #LA254
         STA   L0EC6
         LDA   #^LA254
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #LA25C
         STA   L0EC6
         LDA   #^LA25C
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #LA264
         STA   L0EC6
         LDA   #^LA264
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #LA26C
         STA   L0EC6
         LDA   #^LA26C
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #LA274
         STA   L0EC6
         LDA   #^LA274
         STA   L0EC8
         LDA   #$0009
         STA   L0ECA
         JSR   L70AA
         LDA   #$000D
         STA   L0EC6
         JSR   L7574
         LDA   #LA1B1
         STA   L0EC6
         LDA   #^LA1B1
         STA   L0EC8
         LDA   #$0019
         STA   L0ECA
         JSR   L7590
         LDA   #LA1C3
         STA   L0EC6
         LDA   #^LA1C3
         STA   L0EC8
         LDA   #$002D
         STA   L0ECA
         JSR   L7590
         LDA   #$005A
         STA   L0EC6
         LDA   #$0046
         STA   L0ECA
         JSR   L74DA
         LDA   #LA1D6
         STA   L0EC6
         LDA   #^LA1D6
         STA   L0EC8
         JSR   L7513
         LDA   #$005A
         STA   L0EC6
         LDA   #$005C
         STA   L0ECA
         JSR   L74DA
         LDA   #LA1EA
         STA   L0EC6
         LDA   #^LA1EA
         STA   L0EC8
         JSR   L7513
         LDA   #$005A
         STA   L0EC6
         LDA   #$0072
         STA   L0ECA
         JSR   L74DA
         LDA   #LA201
         STA   L0EC6
         LDA   #^LA201
         STA   L0EC8
         JSR   L7513
         LDA   #$005A
         STA   L0EC6
         LDA   #$0088
         STA   L0ECA
         JSR   L74DA
         LDA   #LA20E
         STA   L0EC6
         LDA   #^LA20E
         STA   L0EC8
         JSR   L7513
         LDA   #$005A
         STA   L0EC6
         LDA   #$009E
         STA   L0ECA
         JSR   L74DA
         LDA   #LA224
         STA   L0EC6
         LDA   #^LA224
         STA   L0EC8
         JSR   L7513
         LDA   #$0007
         STA   L0EC6
         JSR   L7574
         LDA   #$009B
         STA   L0EC6
         LDA   #$00B9
         STA   L0ECA
         JSR   L74DA
         LDA   #LA239
         STA   L0EC6
         LDA   #^LA239
         STA   L0EC8
         JSR   L7513
         LDA   #$0000
         STA   L0EC6
         LDA   #L0E92
         STA   L0ECA
         LDA   #^L0E92
         STA   L0ECC
         JSR   L713A
         LDA   #$0001
         STA   LA1AF
         LDA   L8A63
         STA   L0EC6
         LDA   L8A65
         STA   L0EC8
         LDA   L8A67
         STA   L0ECA
         LDA   L8A69
         STA   L0ECC
         LDA   L8A6B
         STA   L0ECE
         JSR   L138B
         JSR   L70E5
LA14B    LDA   #$0000
         STA   L0EC6
         LDA   #LA24C
         STA   L0ECA
         LDA   #^LA24C
         STA   L0ECC
         LDA   #$0006
         STA   L0ECE
         JSR   L808C
         LDA   L0EC6
         BEQ   LA14B
         CMP   #$0006
         BEQ   LA196
         CMP   LA1AF
         BEQ   LA14B
         STA   LA1AF
         LDA   LA1AF
         STA   L0EC6
         LDA   #$0005
         STA   L0ECA
         LDA   #LA24C
         STA   L0ECE
         LDA   #^LA24C
         STA   L0ED0
         JSR   L8143
         JMP   LA14B

LA196    LDA   L8A63
         STA   L0EC6
         LDA   L8A65
         STA   L0EC8
         JSR   L1380
         JSR   L7C27
         JSR   L70DB
         LDA   LA1AF
         RTS

LA1AF    DW    $0000
LA1B1    ASC   'Please select the'00
LA1C3    ASC   'Myth Maker option.'00
LA1D6    ASC   'Create/Edit a myth.'00
LA1EA    ASC   'Create/Edit questions.'00
LA201    ASC   'Read a myth.'00
LA20E    ASC   'Answer the questions.'00
LA224    ASC   'Exit the Myth Maker.'00
LA239    ASC   'OK'00
LA23C    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
LA244    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
LA24C    DW    $003A
         DW    $0046
         DW    $0048
         DW    $0054
LA254    DW    $0050
         DW    $0046
         DW    $005E
         DW    $0054
LA25C    DW    $0066
         DW    $0046
         DW    $0074
         DW    $0054
LA264    DW    $007C
         DW    $0046
         DW    $008A
         DW    $0054
LA26C    DW    $0092
         DW    $0046
         DW    $00A0
         DW    $0054
LA274    DW    $00AA
         DW    $0096
         DW    $00BE
         DW    $00B4
LA27C    REP   #$30
         LDA   #LA2B8
         STA   L0EC6
         LDA   #^LA2B8
         STA   L0EC8
         LDA   #$0001
         STA   L0ECA
         LDA   #$000E
         STA   L0ECE
         LDA   #LA2BF
         STA   L0ED2
         LDA   #^LA2BF
         STA   L0ED4
         JSR   L7C47
         LDA   LA2BF
         STA   L0EC6
         LDA   LA2C1
         STA   L0EC8
         STZ   L0ECA
         JSR   L7C31
         RTS

LA2B8    STR   'Geneva'
LA2BF    DW    $0000
LA2C1    DW    $0000
LA2C3    PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00E6
         TCS
         LDA   $F9
         SEC
         SBC   #$0000
         BEQ   LA2EC
         BVS   LA2DB
         EOR   #$8000
LA2DB    BPL   LA2EC
         LDA   $FB
         SEC
         SBC   #$0000
         BEQ   LA2EC
         BVS   LA2EA
         EOR   #$8000
LA2EA    BMI   LA2F2
LA2EC    LDA   #$0000
         BRL   LA437
LA2F2    LDA   $FB
         PHA
         LDA   $F9
         SEC
         JSL   LB5E0
         PLA
         STA   $EA
LA2FF    LDA   [$FD]
         SEC
         SBC   #$0000
         BEQ   LA30E
         BVS   LA30C
         EOR   #$8000
LA30C    BMI   LA367
LA30E    PEI   $FF
         PEI   $FD
         JSL   LBC08
         PLY
         PLY
         CMP   #$FFFF
         BNE   LA33B
         LDA   $EA
         CLC
         ADC   $F9
         SEC
         SBC   #$0001
         PHA
         LDA   $F9
         CLC
         JSL   LB470
         PLY
         PHA
         LDA   $FB
         PLX
         STX   $EC
         SEC
         SBC   $EC
         BRL   LA437
LA33B    LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         SEC
         SBC   #$0001
         LDY   #$0002
         STA   [$FD],Y
         LDY   #$0004
         LDA   [$FD],Y
         SBC   #$0000
         LDY   #$0004
         STA   [$FD],Y
         PLA
         PLX
         LDA   [$FD]
         PHA
         INC
         STA   [$FD]
         PLA
LA367    LDA   [$FD]
         CMP   $EA
         BEQ   LA373
         BCC   LA373
         LDA   $EA
         BRA   LA375
LA373    LDA   [$FD]
LA375    STA   $E8
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   LA380
         DEX
LA380    PHX
         PHA
         PEI   $E8
         LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         PEI   $F7
         PEI   $F5
         JSL   LB415
         PLY
         PLY
         PLY
         PLY
         PLY
         JSL   LB28B
         PLA
         PLX
         STX   $F7
         STA   $F5
         LDA   [$FD]
         SEC
         SBC   $E8
         STA   [$FD]
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   LA3B8
         DEX
LA3B8    PHX
         PHA
         LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         JSL   LB28B
         PLA
         PLX
         LDY   #$0004
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0002
         STA   [$FD],Y
         LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         LDY   #$000C
         LDA   [$FD],Y
         TAX
         LDY   #$000A
         LDA   [$FD],Y
         JSL   LB5D5
         PLA
         PLX
         PHA
         LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   LA402
         EOR   #$8000
LA402    BMI   LA409
         LDA   #$0000
         BRA   LA40B
LA409    LDA   [$FD]
LA40B    PLX
         STX   $EC
         SEC
         SBC   $EC
         BEQ   LA424
         BVS   LA418
         EOR   #$8000
LA418    BPL   LA424
         PEI   $FF
         PEI   $FD
         JSL   LB075
         PLY
         PLY
LA424    LDA   $EA
         SEC
         SBC   $E8
         STA   $EA
         CMP   #$0000
         BNE   LA434
         LDA   $FB
         BRA   LA437
LA434    BRL   LA2FF
LA437    TAY
         TDC
         CLC
         ADC   #$00EF
         TCS
         TYA
         PLD
         RTL

LA441    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E6
         TCS
         LDY   #$0010
         LDA   [$F7],Y
         AND   #$FFEF
         LDY   #$0010
         STA   [$F7],Y
         LDY   #$0010
         LDA   [$F7],Y
         AND   #$0001
         TAY
         BNE   LA467
         BRL   LA60D
LA467    LDA   $FF
         SEC
         SBC   #$0002
         BVS   LA472
         EOR   #$8000
LA472    BPL   LA477
         BRL   LA5BE
LA477    LDY   #$0008
         LDA   [$F7],Y
         TAX
         LDY   #$0006
         LDA   [$F7],Y
         STX   $EE
         ORA   $EE
         BNE   LA48B
         BRL   LA5BE
LA48B    LDY   #$0010
         LDA   [$F7],Y
         AND   #$0004
         TAY
         BEQ   LA499
         BRL   LA5BE
LA499    LDA   [$F7]
         STA   $EC
         LDX   $FD
         LDA   $FB
         STX   $EA
         STA   $E8
         LDA   $FF
         CMP   #$0000
         BNE   LA4E2
         PEA   $0001
         PEA   $0000
         PEA   $0000
         LDY   #$0012
         LDA   [$F7],Y
         PHA
         JSL   LA68F
         PLY
         PLY
         PLY
         PLY
         PHX
         PHA
         LDA   $EC
         LDX   #$0000
         TAY
         BPL   LA4CE
         DEX
LA4CE    JSL   LB5D5
         LDX   $EA
         LDA   $E8
         JSL   LB28B
         PLA
         PLX
         STX   $EA
         STA   $E8
         BRA   LA4FB
LA4E2    LDA   $EC
         LDX   #$0000
         TAY
         BPL   LA4EB
         DEX
LA4EB    PHX
         PHA
         LDX   $FD
         LDA   $FB
         JSL   LB5D5
         PLA
         PLX
         STX   $FD
         STA   $FB
LA4FB    LDY   #$0010
         LDA   [$F7],Y
         AND   #$0080
         TAY
         BEQ   LA509
         BRL   LA5BE
LA509    LDA   $EC
         SEC
         SBC   #$0000
         BNE   LA514
         BRL   LA5BE
LA514    BVS   LA519
         EOR   #$8000
LA519    BMI   LA51E
         BRL   LA5BE
LA51E    LDA   $EC
         LDX   #$0000
         TAY
         BPL   LA527
         DEX
LA527    LDX   #$0000
         TAY
         BPL   LA52E
         DEX
LA52E    PHX
         PHA
         LDX   $EA
         LDA   $E8
         JSL   LBD97
         BVS   LA53D
         EOR   #$8000
LA53D    BPL   LA5BE
         LDY   #$0004
         LDA   [$F7],Y
         TAX
         LDY   #$0002
         LDA   [$F7],Y
         PHX
         PHA
         LDY   #$0008
         LDA   [$F7],Y
         TAX
         LDY   #$0006
         LDA   [$F7],Y
         JSL   LB5D5
         PLA
         PLX
         LDX   #$0000
         TAY
         BPL   LA564
         DEX
LA564    LDX   #$0000
         TAY
         BPL   LA56B
         DEX
LA56B    PHX
         PHA
         LDX   $EA
         LDA   $E8
         JSL   LBD97
         BEQ   LA57E
         BVS   LA57C
         EOR   #$8000
LA57C    BMI   LA5BE
LA57E    LDX   $EA
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   LA589
         DEX
LA589    PHX
         PHA
         LDY   #$0004
         LDA   [$F7],Y
         TAX
         LDY   #$0002
         LDA   [$F7],Y
         JSL   LB28B
         PLA
         PLX
         LDY   #$0004
         PHA
         TXA
         STA   [$F7],Y
         PLA
         LDY   #$0002
         STA   [$F7],Y
         LDX   $EA
         LDA   $E8
         PHA
         LDA   [$F7]
         PLX
         STX   $EE
         SEC
         SBC   $EE
         STA   [$F7]
         LDA   #$0000
         BRL   LA685
LA5BE    LDY   #$0010
         LDA   [$F7],Y
         AND   #$0080
         TAY
         BEQ   LA5EE
         LDY   #$0008
         LDA   [$F7],Y
         TAX
         LDY   #$0006
         LDA   [$F7],Y
         LDY   #$0004
         PHA
         TXA
         STA   [$F7],Y
         PLA
         LDY   #$0002
         STA   [$F7],Y
         LDY   #$0010
         LDA   [$F7],Y
         AND   #$FFFE
         LDY   #$0010
         STA   [$F7],Y
LA5EE    PEI   $FF
         PEI   $FD
         PEI   $FB
         LDY   #$0012
         LDA   [$F7],Y
         PHA
         JSL   LA68F
         PLY
         PLY
         PLY
         PLY
         STX   $EA
         STA   $E8
         LDA   #$0000
         STA   [$F7]
         BRA   LA66F
LA60D    LDY   #$0010
         LDA   [$F7],Y
         AND   #$0082
         TAY
         BEQ   LA66F
         PEI   $F9
         PEI   $F7
         JSL   LB37A
         PLY
         PLY
         LDY   #$0010
         LDA   [$F7],Y
         AND   #$0080
         TAY
         BEQ   LA657
         LDA   #$0000
         STA   [$F7]
         LDY   #$0010
         LDA   [$F7],Y
         AND   #$FFFD
         LDY   #$0010
         STA   [$F7],Y
         LDY   #$0008
         LDA   [$F7],Y
         TAX
         LDY   #$0006
         LDA   [$F7],Y
         LDY   #$0004
         PHA
         TXA
         STA   [$F7],Y
         PLA
         LDY   #$0002
         STA   [$F7],Y
LA657    PEI   $FF
         PEI   $FD
         PEI   $FB
         LDY   #$0012
         LDA   [$F7],Y
         PHA
         JSL   LA68F
         PLY
         PLY
         PLY
         PLY
         STX   $EA
         STA   $E8
LA66F    LDA   $E8
         CMP   #$FFFF
         BNE   LA682
         LDA   $EA
         CMP   #$FFFF
         BNE   LA682
         LDA   #$FFFF
         BRA   LA685
LA682    LDA   #$0000
LA685    TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

LA68F    PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E6
         TCS
         LDA   $FF
         STA   $EA
         LDX   $FD
         LDA   $FB
         STX   $EE
         STA   $EC
         PEA   $0000
         TDC
         CLC
         ADC   #$00EA
         PHA
         PEA   $6600
         PEI   $F9
         JSL   LA7FF
         PLY
         PLY
         PLY
         PLY
         STA   $E8
         LDA   $E8
         CMP   #$0000
         BNE   LA6CB
         LDX   $EE
         LDA   $EC
         BRA   LA6D1
LA6CB    LDX   #$FFFF
         LDA   #$FFFF
LA6D1    TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

LA6DB    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   LA6F1
         EOR   #$8000
LA6F1    BMI   LA6F8
         LDA   #$0000
         STA   [$FD]
LA6F8    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0001
         TAY
         BEQ   LA70D
         LDA   [$FD]
         EOR   #$FFFF
         INC
         STA   $EE
         BRA   LA771
LA70D    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0082
         TAY
         BEQ   LA765
         STZ   $EE
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0002
         TAY
         BEQ   LA763
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         STX   $F4
         ORA   $F4
         BEQ   LA763
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0004
         CMP   #$0000
         BNE   LA763
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         PHX
         PHA
         LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         JSL   LB5D5
         PLA
         PLX
         STA   $EE
LA763    BRA   LA771
LA765    LDA   #$FFFF
         LDX   #$0000
         TAY
         BPL   LA76F
         DEX
LA76F    BRA   LA7C6
LA771    PEA   $0001
         PEA   $0000
         PEA   $0000
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   LA68F
         PLY
         PLY
         PLY
         PLY
         STX   $F2
         STA   $F0
         SEC
         LDA   $F0
         SBC   #$0000
         BNE   LA79B
         LDA   $F2
         SBC   #$0000
         BRA   LA7A2
LA79B    LDA   $F2
         SBC   #$0000
         REP   #$02
LA7A2    BVS   LA7A7
         EOR   #$8000
LA7A7    BPL   LA7C2
         LDA   $EE
         LDX   #$0000
         TAY
         BPL   LA7B2
         DEX
LA7B2    PHX
         PHA
         LDX   $F2
         LDA   $F0
         JSL   LB28B
         PLA
         PLX
         STX   $F2
         STA   $F0
LA7C2    LDX   $F2
         LDA   $F0
LA7C6    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LA7D0    PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00EE
         TCS
         JSL   LB00E
         PHX
         PHA
         PEI   $FF
         PEI   $FD
         PEI   $FB
         PEI   $F9
         JSL   LAE6F
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

LA7FF    PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E0
         TCS
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   LA815
         EOR   #$8000
LA815    BMI   LA829
         PEA   $0000
         PEA   $0016
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
         BRL   LA99E
LA829    PEA   $0000
         TDC
         CLC
         ADC   #$00F9
         PHA
         JSL   LBE1C
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         JSL   LBD97
         BNE   LA854
         LDA   #$FFFF
         BRL   LA99E
LA854    LDA   $FB
         BRL   LA993
LA859    PEI   $FF
         PEI   $FD
         PEI   $FB
         PEI   $EE
         PEI   $EC
         LDY   #$0006
         LDA   [$EC],Y
         TAX
         LDY   #$0004
         LDA   [$EC],Y
         STA   $F0
         STX   $F2
         LDY   #$0016
         LDA   [$F0],Y
         TAX
         LDY   #$0014
         LDA   [$F0],Y
         STA   $F0
         STX   $F2
         LDA   $F0
         LDX   $F2
         JSL   LBAD5
         PLY
         PLY
         PLY
         PLY
         PLY
         STA   $E4
         LDA   $E4
         CMP   #$0000
         BNE   LA89D
         LDA   #$0000
         BRL   LA99E
LA89D    LDY   #$0002
         LDA   [$EC],Y
         PHA
         PEI   $E4
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
         BRL   LA99E
LA8B1    LDX   $FF
         LDA   $FD
         SEC
         SBC   #$0000
         BVS   LA8BE
         EOR   #$8000
LA8BE    BMI   LA8D2
         PEA   $0000
         PEA   $0009
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
         BRL   LA99E
LA8D2    LDX   $FF
         LDA   $FD
         PHA
         LDA   #$FFFF
         PLX
         STX   $F0
         SEC
         SBC   $F0
         STA   $E6
         PEA   $0000
         TDC
         CLC
         ADC   #$00E6
         PHA
         JSL   LBE1C
         PLY
         PLY
         STX   $EA
         STA   $E8
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EA
         LDA   $E8
         JSL   LBD97
         BNE   LA90D
         LDA   #$FFFF
         BRL   LA99E
LA90D    PEA   $0000
         TDC
         CLC
         ADC   #$00F9
         PHA
         JSL   LBE1C
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDA   $EC
         LDX   $EE
         PHX
         PHA
         LDA   $EA
         PHA
         LDA   $E8
         PHA
         PEA   $0012
         JSL   LBDC2
         PLA
         PLA
         PLA
         PLA
         PLX
         PEA   $0000
         PEA   $6601
         PEI   $EE
         PEI   $EC
         LDY   #$0006
         LDA   [$EC],Y
         TAX
         LDY   #$0004
         LDA   [$EC],Y
         STA   $F0
         STX   $F2
         LDY   #$0016
         LDA   [$F0],Y
         TAX
         LDY   #$0014
         LDA   [$F0],Y
         STA   $F0
         STX   $F2
         LDA   $F0
         LDX   $F2
         JSL   LBAD5
         PLY
         PLY
         PLY
         PLY
         STA   $E4
         LDA   $E4
         CMP   #$0000
         BEQ   LA98D
         LDA   #$0000
         STA   [$E8]
         LDY   #$0002
         LDA   [$EC],Y
         PHA
         PEI   $E4
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
         BRA   LA99E
LA98D    LDA   $E6
         BRA   LA99E
         BRA   LA99E
LA993    CMP   #$6601
         BNE   LA99B
         BRL   LA8B1
LA99B    JMP   LA859

LA99E    TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

LA9A8    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E1
         TCS
         STZ   $F1
         STZ   L0140
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   LBD97
         BNE   LA9D3
         LDA   #$0001
         STA   LC0B6
         BRL   LADE8
LA9D3    LDX   #$0000
         LDA   #$0008
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   LB28B
         PLA
         PLX
         STX   $EB
         STA   $E9
         LDA   [$E9]
         AND   #$00FF
         SEP   #$20
         STA   $F3
         REP   #$20
         LDA   #$0000
         SEP   #$20
         STA   [$E9]
         REP   #$20
         PEA   ^LAE22
         PEA   LAE22
         PEI   $FF
         PEI   $FD
         JSL   LB199
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   LAA23
         LDA   #$0001
         STA   LC0B6
         LDA   $F3
         SEP   #$20
         STA   [$E9]
         REP   #$20
         BRL   LADE8
LAA23    LDA   #$0001
         BEQ   LAA2D
         LDA   #$0000
         BRA   LAA30
LAA2D    LDA   #$0001
LAA30    STA   LC0B6
         LDA   $F3
         SEP   #$20
         STA   [$E9]
         REP   #$20
         PHX
         PHA
         PEA   $0000
         PEA   $0100
         LDA   L013E
         ORA   #$0F00
         PHA
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L013C
         PLA
         PLX
         STX   $EF
         STA   $ED
         LDA   L013C
         BEQ   LAA71
         PEA   $FFFF
         JSL   LBBA4
         PLY
LAA71    LDA   #$0100
         STA   $E3
LAA76    LDA   [$E9]
         AND   #$00FF
         CMP   #$0000
         BNE   LAA83
         BRL   LACDC
LAA83    INC   L0140
         LDA   [$E9]
         AND   #$00FF
         CMP   #$0022
         BEQ   LAA93
         BRL   LABB7
LAA93    INC   $E9
         BNE   LAA99
         INC   $EB
LAA99    LDA   [$E9]
         AND   #$00FF
         CMP   #$0000
         BNE   LAAA6
         BRL   LABB4
LAAA6    LDA   [$E9]
         AND   #$00FF
         CMP   #$0022
         BEQ   LAAB3
         BRL   LAB3D
LAAB3    INC   $E9
         BNE   LAAB9
         INC   $EB
LAAB9    LDA   [$E9]
         AND   #$00FF
         CMP   #$0022
         BNE   LAB39
         LDA   $F1
         CMP   $E3
         BNE   LAAFC
         LDA   $E3
         CLC
         ADC   #$0100
         LDX   #$0000
         TAY
         BPL   LAAD6
         DEX
LAAD6    PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L013C
         LDA   L013C
         BEQ   LAAF4
         PEA   $FFFF
         JSL   LBBA4
         PLY
LAAF4    LDA   $E3
         CLC
         ADC   #$0100
         STA   $E3
LAAFC    LDX   $EB
         LDA   $E9
         INC   $E9
         BNE   LAB06
         INC   $EB
LAB06    STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         PHA
         LDA   $F1
         INC   $F1
         PHA
         LDY   #$0002
         LDA   [$ED],Y
         TAX
         LDA   [$ED]
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LAB27
         DEC   $F6
LAB27    CLC
         ADC   $F4
         STA   $F4
         BCC   LAB30
         INC   $F6
LAB30    PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
         BRA   LAB3B
LAB39    BRA   LABB4
LAB3B    BRA   LABB1
LAB3D    LDA   $F1
         CMP   $E3
         BNE   LAB76
         LDA   $E3
         CLC
         ADC   #$0100
         LDX   #$0000
         TAY
         BPL   LAB50
         DEX
LAB50    PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L013C
         LDA   L013C
         BEQ   LAB6E
         PEA   $FFFF
         JSL   LBBA4
         PLY
LAB6E    LDA   $E3
         CLC
         ADC   #$0100
         STA   $E3
LAB76    LDX   $EB
         LDA   $E9
         INC   $E9
         BNE   LAB80
         INC   $EB
LAB80    STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         PHA
         LDA   $F1
         INC   $F1
         PHA
         LDY   #$0002
         LDA   [$ED],Y
         TAX
         LDA   [$ED]
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LABA1
         DEC   $F6
LABA1    CLC
         ADC   $F4
         STA   $F4
         BCC   LABAA
         INC   $F6
LABAA    PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
LABB1    BRL   LAA99
LABB4    BRL   LAC5B
LABB7    LDA   [$E9]
         AND   #$00FF
         SEP   #$20
         STA   $F3
         REP   #$20
         AND   #$00FF
         CMP   #$0020
         BNE   LABCD
         BRL   LAC5B
LABCD    LDA   $F3
         AND   #$00FF
         CMP   #$0000
         BNE   LABDA
         BRL   LAC5B
LABDA    LDA   $F3
         AND   #$00FF
         CMP   #$0009
         BEQ   LAC5B
         LDA   $F1
         CMP   $E3
         BNE   LAC1D
         LDA   $E3
         CLC
         ADC   #$0100
         LDX   #$0000
         TAY
         BPL   LABF7
         DEX
LABF7    PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L013C
         LDA   L013C
         BEQ   LAC15
         PEA   $FFFF
         JSL   LBBA4
         PLY
LAC15    LDA   $E3
         CLC
         ADC   #$0100
         STA   $E3
LAC1D    LDX   $EB
         LDA   $E9
         INC   $E9
         BNE   LAC27
         INC   $EB
LAC27    STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         PHA
         LDA   $F1
         INC   $F1
         PHA
         LDY   #$0002
         LDA   [$ED],Y
         TAX
         LDA   [$ED]
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LAC48
         DEC   $F6
LAC48    CLC
         ADC   $F4
         STA   $F4
         BCC   LAC51
         INC   $F6
LAC51    PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
         BRL   LABB7
LAC5B    LDA   $F1
         CMP   $E3
         BNE   LAC94
         LDA   $E3
         CLC
         ADC   #$0100
         LDX   #$0000
         TAY
         BPL   LAC6E
         DEX
LAC6E    PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L013C
         LDA   L013C
         BEQ   LAC8C
         PEA   $FFFF
         JSL   LBBA4
         PLY
LAC8C    LDA   $E3
         CLC
         ADC   #$0100
         STA   $E3
LAC94    LDA   $F1
         INC   $F1
         PHA
         LDY   #$0002
         LDA   [$ED],Y
         TAX
         LDA   [$ED]
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LACAB
         DEC   $F6
LACAB    CLC
         ADC   $F4
         STA   $F4
         BCC   LACB4
         INC   $F6
LACB4    LDA   #$0000
         SEP   #$20
         STA   [$F4]
         REP   #$20
LACBD    LDA   [$E9]
         AND   #$00FF
         CMP   #$0020
         BEQ   LACD1
         LDA   [$E9]
         AND   #$00FF
         CMP   #$0009
         BNE   LACD9
LACD1    INC   $E9
         BNE   LACD7
         INC   $EB
LACD7    BRA   LACBD
LACD9    BRL   LAA76
LACDC    LDA   $F1
         LDX   #$0000
         TAY
         BPL   LACE5
         DEX
LACE5    PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L013C
         PEI   $EF
         PEI   $ED
         _HLock
         STAL  L013C
         LDA   L0140
         CLC
         ADC   #$0001
         LDX   #$0000
         TAY
         BPL   LAD13
         DEX
LAD13    PHX
         PHA
         LDX   #$0000
         LDA   #$0004
         SEC
         JSL   LB625
         JSL   LB147
         PLY
         PLY
         STX   L0142+2
         STA   L0142
         LDY   #$0002
         LDA   [$ED],Y
         TAX
         LDA   [$ED]
         PHX
         PHA
         LDX   L0142+2
         LDA   L0142
         STA   $F4
         STX   $F6
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F4],Y
         PLA
         STA   [$F4]
         LDA   #$0001
         STA   $F1
         LDY   #$0002
         LDA   [$ED],Y
         TAX
         LDA   [$ED]
         STX   $E7
         STA   $E5
         BRA   LADA8
LAD5F    LDA   [$E5]
         AND   #$00FF
         BNE   LADA2
         LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDX   $E7
         LDA   $E5
         JSL   LB28B
         LDA   $F1
         INC   $F1
         ASL
         ASL
         PHA
         LDX   L0142+2
         LDA   L0142
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LAD8D
         DEC   $F6
LAD8D    CLC
         ADC   $F4
         STA   $F4
         BCC   LAD96
         INC   $F6
LAD96    PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F4],Y
         PLA
         STA   [$F4]
LADA2    INC   $E5
         BNE   LADA8
         INC   $E7
LADA8    LDA   $F1
         SEC
         SBC   L0140
         BVS   LADB3
         EOR   #$8000
LADB3    BPL   LAD5F
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDA   L0140
         ASL
         ASL
         PHA
         LDX   L0142+2
         LDA   L0142
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LADD3
         DEC   $F6
LADD3    CLC
         ADC   $F4
         STA   $F4
         BCC   LADDC
         INC   $F6
LADDC    PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F4],Y
         PLA
         STA   [$F4]
LADE8    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

         ASC   'HS'
LADF4    DW    $0000
LADF6    ADRL  LAE2B
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LAE00    DB    $00
         DB    $00
LAE02    DB    $00
         DB    $00
LAE04    ADRL  LAE37
LAE08    DB    $00
         DB    $00
LAE0A    DB    $00
         DB    $00
LAE0C    DB    $00
         DB    $00
LAE0E    DB    $00
         DB    $00
LAE10    DB    $00
         DB    $00
LAE12    DB    $00
         DB    $00
LAE14    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LAE22    ASC   'BYTEWRKS'
         DB    $00
LAE2B    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LAE37    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LAE5F    DB    $00
LAE60    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LAE6F    PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00E2
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   LBD97
         BNE   LAE9B
         LDA   #$0017
         STA   LC4F1
         LDX   #$0000
         LDA   #$0000
         BRL   LB004
LAE9B    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F7
         LDA   $F5
         JSL   LBD97
         BEQ   LAEB7
         LDA   [$F5]
         AND   #$00FF
         CMP   #$0000
         BNE   LAEC6
LAEB7    LDA   #$0016
         STA   LC4F1
         LDX   #$0000
         LDA   #$0000
         BRL   LB004
LAEC6    LDY   #$0001
         LDA   [$F9],Y
         AND   #$00FF
         CMP   #$002B
         BEQ   LAEE5
         LDY   #$0002
         LDA   [$F9],Y
         AND   #$00FF
         CMP   #$002B
         BEQ   LAEE5
         LDA   #$0000
         BRA   LAEE8
LAEE5    LDA   #$0001
LAEE8    STA   $EA
         LDY   #$0001
         LDA   [$F9],Y
         AND   #$00FF
         CMP   #$0062
         BEQ   LAF09
         LDY   #$0002
         LDA   [$F9],Y
         AND   #$00FF
         CMP   #$0062
         BEQ   LAF09
         LDA   #$0000
         BRA   LAF0C
LAF09    LDA   #$0001
LAF0C    STA   $E8
         LDA   [$F9]
         AND   #$00FF
         BRL   LAF60
LAF16    LDA   $EA
         BEQ   LAF1F
         LDA   #$0002
         BRA   LAF22
LAF1F    LDA   #$0001
LAF22    ORA   #$0200
         ORA   #$0100
         STA   $E6
         BRL   LAF72
LAF2D    LDA   $EA
         BEQ   LAF36
         LDA   #$0002
         BRA   LAF39
LAF36    LDA   #$0001
LAF39    ORA   #$0008
         ORA   #$0100
         STA   $E6
         BRL   LAF72
LAF44    LDA   $EA
         BEQ   LAF4D
         LDA   #$0002
         BRA   LAF50
LAF4D    LDA   #$0000
LAF50    STA   $E6
         BRL   LAF72
LAF55    LDX   #$0000
         LDA   #$0000
         BRL   LB004
         BRA   LAF72
LAF60    CMP   #$0061
         BEQ   LAF2D
         CMP   #$0072
         BEQ   LAF44
         CMP   #$0077
         BEQ   LAF16
         JMP   LAF55

LAF72    LDA   $E8
         BEQ   LAF7D
         LDA   $E6
         ORA   #$0020
         STA   $E6
LAF7D    PEI   $E6
         PEI   $F7
         PEI   $F5
         JSL   LBADD
         PLY
         PLY
         PLY
         STA   $E4
         SEC
         SBC   #$0000
         BVS   LAF95
         EOR   #$8000
LAF95    BMI   LAF9F
         LDX   #$0000
         LDA   #$0000
         BRA   LB004
LAF9F    LDA   #$0000
         STA   [$FD]
         LDA   $E4
         LDY   #$0012
         STA   [$FD],Y
         LDA   $EA
         BEQ   LAFB4
         LDA   #$0080
         BRA   LAFC6
LAFB4    LDA   [$F9]
         AND   #$00FF
         CMP   #$0072
         BNE   LAFC3
         LDA   #$0001
         BRA   LAFC6
LAFC3    LDA   #$0002
LAFC6    LDY   #$0010
         STA   [$FD],Y
         LDX   #$0000
         LDA   #$0000
         LDY   #$0004
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0002
         STA   [$FD],Y
         LDY   #$000C
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$000A
         STA   [$FD],Y
         LDY   #$0008
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0006
         STA   [$FD],Y
         LDA   #$0000
         LDY   #$000E
         STA   [$FD],Y
         LDX   $FF
         LDA   $FD
LB004    TAY
         TDC
         CLC
         ADC   #$00EF
         TCS
         TYA
         PLD
         RTL

LB00E    PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         LDA   #LB6AC
         LDX   #^LB6AC
         STX   $F6
         STA   $F4
         BRA   LB044
LB025    LDY   #$0010
         LDA   [$F4],Y
         AND   #$0083
         CMP   #$0000
         BNE   LB038
         LDX   $F6
         LDA   $F4
         BRA   LB067
LB038    LDA   $F4
         CLC
         ADC   #$0014
         STA   $F4
         BCC   LB044
         INC   $F6
LB044    SEC
         LDA   $F4
         SBC   LB071
         BNE   LB053
         LDA   $F6
         SBC   LB071+2
         BRA   LB05A
LB053    LDA   $F6
         SBC   LB071+2
         REP   #$02
LB05A    BVS   LB05F
         EOR   #$8000
LB05F    BPL   LB025
         LDX   #$0000
         LDA   #$0000
LB067    TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

LB071    ADRL  LB83C
LB075    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F0
         TCS
         LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         LDY   #$000C
         LDA   [$FD],Y
         TAX
         LDY   #$000A
         LDA   [$FD],Y
         JSL   LB5D5
         PLA
         PLX
         STA   $F2
         SEC
         SBC   #$0000
         BVS   LB0A9
         EOR   #$8000
LB0A9    BMI   LB0C5
         LDY   #$000C
         LDA   [$FD],Y
         TAX
         LDY   #$000A
         LDA   [$FD],Y
         LDY   #$0004
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0002
         STA   [$FD],Y
         BRA   LB0D7
LB0C5    LDA   [$FD]
         SEC
         SBC   $F2
         BEQ   LB0D7
         BVS   LB0D1
         EOR   #$8000
LB0D1    BPL   LB0D7
         LDA   $F2
         STA   [$FD]
LB0D7    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LB0E1    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E8
         TCS
         LDX   $FF
         LDA   $FD
         STX   $EC
         STA   $EA
         LDX   $FF
         LDA   $FD
         STX   $F4
         ORA   $F4
         BEQ   LB13F
LB0FE    LDA   [$FD]
         AND   #$00FF
         STA   $EE
         LDA   $F0
         PHA
         LDX   $FF
         LDA   $FD
         INC   $FD
         BNE   LB112
         INC   $FF
LB112    STA   $F4
         STX   $F6
         PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
         LDA   $EE
         STA   $F0
         LDA   $EE
         BNE   LB0FE
         LDX   $EC
         LDA   $EA
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   LB5D5
         PLA
         PLX
         SEC
         SBC   #$0001
         SEP   #$20
         STA   [$EA]
         REP   #$20
LB13F    TDC
         CLC
         ADC   #$00F7
         TCS
         PLD
         RTL

LB147    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EE
         TCS
         PHX
         PHA
         PEI   $FF
         PEI   $FD
         LDA   L013E
         ORA   #$0F00
         PHA
         PEA   $8300
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L013C
         PLA
         PLX
         STX   $F2
         STA   $F0
         STX   $F4
         ORA   $F4
         BEQ   LB189
         LDY   #$0002
         LDA   [$F0],Y
         TAX
         LDA   [$F0]
         BRA   LB18F
LB189    LDX   #$0000
         LDA   #$0000
LB18F    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LB199    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EC
         TCS
         BRL   LB26A
LB1A7    LDA   [$F7]
         AND   #$00FF
         PHA
         LDA   [$FB]
         AND   #$00FF
         PLX
         STX   $EE
         CMP   $EE
         BNE   LB1BF
         LDA   #$0001
         BRL   LB244
LB1BF    LDA   $FF
         BEQ   LB1C8
         LDA   #$0000
         BRA   LB244
LB1C8    LDA   [$F7]
         AND   #$00FF
         SEC
         SBC   #$0061
         BVS   LB1D6
         EOR   #$8000
LB1D6    BPL   LB1EA
         LDA   [$F7]
         AND   #$00FF
         SEC
         SBC   #$007A
         BEQ   LB1F1
         BVS   LB1E8
         EOR   #$8000
LB1E8    BPL   LB1F1
LB1EA    LDA   [$F7]
         AND   #$00FF
         BRA   LB1FE
LB1F1    LDA   [$F7]
         AND   #$00FF
         CLC
         ADC   #$0041
         SEC
         SBC   #$0061
LB1FE    PHA
         LDA   [$FB]
         AND   #$00FF
         SEC
         SBC   #$0061
         BVS   LB20D
         EOR   #$8000
LB20D    BPL   LB221
         LDA   [$FB]
         AND   #$00FF
         SEC
         SBC   #$007A
         BEQ   LB228
         BVS   LB21F
         EOR   #$8000
LB21F    BPL   LB228
LB221    LDA   [$FB]
         AND   #$00FF
         BRA   LB235
LB228    LDA   [$FB]
         AND   #$00FF
         CLC
         ADC   #$0041
         SEC
         SBC   #$0061
LB235    PLX
         STX   $EE
         CMP   $EE
         BEQ   LB241
         LDA   #$0000
         BRA   LB244
LB241    LDA   #$0001
LB244    TAY
         BNE   LB24C
         LDA   #$0000
         BRA   LB281
LB24C    LDX   $F9
         LDA   $F7
         INC   $F7
         BNE   LB256
         INC   $F9
LB256    STA   $EE
         STX   $F0
         LDX   $FD
         LDA   $FB
         INC   $FB
         BNE   LB264
         INC   $FD
LB264    STA   $EE
         STX   $F0
         LDA   [$EE]
LB26A    LDA   [$F7]
         AND   #$00FF
         BEQ   LB274
         BRL   LB1A7
LB274    LDA   [$FB]
         AND   #$00FF
         BEQ   LB27E
         BRL   LB1A7
LB27E    LDA   #$0001
LB281    TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

LB28B    CLC
         ADC   $04,S
         STA   $04,S
         TXA
         ADC   $06,S
         STA   $06,S
         RTL

LB296    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F0
         TCS
         LDA   #$FFFF
         STA   $F2
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   LBD97
         BNE   LB2BE
         LDA   #$FFFF
         BRL   LB370
LB2BE    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0083
         TAY
         BEQ   LB306
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0004
         TAY
         BEQ   LB2D9
         LDA   #$0000
         BRA   LB2E3
LB2D9    PEI   $FF
         PEI   $FD
         JSL   LB37A
         PLY
         PLY
LB2E3    STA   $F2
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   LC444
         PLY
         SEC
         SBC   #$0000
         BVS   LB2F9
         EOR   #$8000
LB2F9    BMI   LB306
         LDA   #$FFFF
         STA   $F2
         LDA   #$0002
         STA   LC4F1
LB306    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0008
         TAY
         BEQ   LB349
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         PHX
         PHA
         _FindHandle
         STAL  L013C
         _DisposeHandle
         STAL  L013C
         LDX   #$0000
         LDA   #$0000
         LDY   #$0008
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0006
         STA   [$FD],Y
LB349    LDA   #$0000
         LDY   #$0010
         STA   [$FD],Y
         LDA   #$0000
         STA   [$FD]
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         LDY   #$0004
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0002
         STA   [$FD],Y
         LDA   $F2
LB370    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LB37A    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0002
         TAY
         BNE   LB39A
         LDA   #$0000
         STA   [$FD]
         LDA   #$0000
         BRA   LB40B
LB39A    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0004
         TAY
         BNE   LB3F8
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0002
         TAY
         BEQ   LB3F8
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   LBD97
         BEQ   LB3F8
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         PHX
         PHA
         LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         JSL   LBD97
         BVS   LB3EA
         EOR   #$8000
LB3EA    BMI   LB3F8
         PEI   $FF
         PEI   $FD
         JSL   LC98D
         PLY
         PLY
         BRA   LB39A
LB3F8    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0020
         TAY
         BEQ   LB408
         LDA   #$FFFF
         BRA   LB40B
LB408    LDA   #$0000
LB40B    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LB415    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E8
         TCS
         LDX   $F9
         LDA   $F7
         STX   $EC
         STA   $EA
LB428    DEC   $FF
         LDA   $FF
         SEC
         SBC   #$0000
         BVS   LB435
         EOR   #$8000
LB435    BPL   LB462
         LDX   $FD
         LDA   $FB
         INC   $FB
         BNE   LB441
         INC   $FD
LB441    STA   $EE
         STX   $F0
         LDA   [$EE]
         AND   #$00FF
         PHA
         LDX   $F9
         LDA   $F7
         INC   $F7
         BNE   LB455
         INC   $F9
LB455    STA   $EE
         STX   $F0
         PLA
         SEP   #$20
         STA   [$EE]
         REP   #$20
         BRA   LB428
LB462    LDX   $EC
         LDA   $EA
         TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

LB470    PHD
         PHA
         PEA   $0001
         TSC
         TCD
         LDA   $03
         BEQ   LB4DB
         LDX   #$0000
         BCC   LB49B
         BIT   #$8000
         BEQ   LB48C
         EOR   #$FFFF
         INC
         STA   $03
         INX
LB48C    LDA   $0A
         BIT   #$8000
         BEQ   LB49B
         EOR   #$FFFF
         INC
         STA   $0A
         INX
         INX
LB49B    LDY   #$0000
         BRA   LB4A2
LB4A0    ASL   $01
LB4A2    ASL   $03
         BCC   LB4A0
         ROR   $03
LB4A8    LDA   $0A
         CMP   $03
         BCC   LB4B9
         LDA   $0A
         SEC
         SBC   $03
         STA   $0A
         TYA
         ORA   $01
         TAY
LB4B9    LSR   $03
         LSR   $01
         BCC   LB4A8
         TYA
         CPX   #$0000
         BEQ   LB4DB
         CPX   #$0003
         BEQ   LB4D3
         EOR   #$FFFF
         INC
         CPX   #$0001
         BEQ   LB4DB
LB4D3    TAY
         LDA   $0A
         EOR   #$FFFF
         INC
         TYA
LB4DB    PLY
         PLY
         PLD
         RTL

LB4DF    PHD
         PHX
         PHA
         PEA   $0000
         PEA   $0001
         PEA   $0000
         PEA   $0000
         TSC
         TCD
         LDA   $09
         ORA   $0B
         BNE   LB4FC
         LDX   #$0000
         BRL   LB5B0
LB4FC    LDX   #$0000
         BCC   LB534
         LDA   $0B
         BIT   #$8000
         BEQ   LB51A
         EOR   #$FFFF
         STA   $0B
         LDA   $09
         EOR   #$FFFF
         INC
         BNE   LB517
         INC   $0B
LB517    STA   $09
         INX
LB51A    LDA   $14
         BIT   #$8000
         BEQ   LB534
         EOR   #$FFFF
         STA   $14
         LDA   $12
         EOR   #$FFFF
         INC
         BNE   LB530
         INC   $14
LB530    STA   $12
         INX
         INX
LB534    BRA   LB53A
LB536    ASL   $05
         ROL   $07
LB53A    ASL   $09
         ROL   $0B
         BCC   LB536
         ROR   $0B
         ROR   $09
LB544    LDA   $14
         CMP   $0B
         BEQ   LB54E
         BCC   LB56D
         BRA   LB554
LB54E    LDA   $12
         CMP   $09
         BCC   LB56D
LB554    LDA   $12
         SEC
         SBC   $09
         STA   $12
         LDA   $14
         SBC   $0B
         STA   $14
         LDA   $01
         ORA   $05
         STA   $01
         LDA   $03
         ORA   $07
         STA   $03
LB56D    LSR   $0B
         ROR   $09
         LSR   $07
         ROR   $05
         BCC   LB544
         CPX   #$0000
         BEQ   LB5AC
         CPX   #$0003
         BEQ   LB599
         LDA   $01
         EOR   #$FFFF
         STA   $01
         LDA   $03
         EOR   #$FFFF
         INC   $01
         BNE   LB592
         INC
LB592    STA   $03
         CPX   #$0001
         BEQ   LB5AC
LB599    LDA   $12
         EOR   #$FFFF
         STA   $12
         LDA   $14
         EOR   #$FFFF
         INC   $12
         BNE   LB5AA
         INC
LB5AA    STA   $14
LB5AC    LDA   $01
         LDX   $03
LB5B0    PLY
         PLY
         PLY
         PLY
         PLY
         PLY
         PLD
         RTL

LB5B8    PHD
         TSC
         TCD
         STA   [$06]
         LDA   $01,S
         LDY   #$0002
         STA   [$06],Y
         LDA   $02,S
         INY
         INY
         STA   [$06],Y
         LDA   $04,S
         INY
         INY
         STA   [$06],Y
         PLD
         LDA   #$0000
         RTL

LB5D5    SEC
         SBC   $04,S
         STA   $04,S
         TXA
         SBC   $06,S
         STA   $06,S
         RTL

LB5E0    PHD
         PHA
         TSC
         TCD
         LDX   #$0000
         BCC   LB605
         LDA   $01
         BIT   #$8000
         BEQ   LB5F7
         EOR   #$FFFF
         INC
         STA   $01
         INX
LB5F7    LDA   $08
         BIT   #$8000
         BEQ   LB605
         EOR   #$FFFF
         INC
         STA   $08
         DEX
LB605    LDA   #$0000
         BRA   LB613
LB60A    LSR   $08
         BCC   LB611
         CLC
         ADC   $01
LB611    ASL   $01
LB613    LDY   $08
         BNE   LB60A
         CPX   #$0000
         BEQ   LB620
         EOR   #$FFFF
         INC
LB620    STA   $08
         PLY
         PLD
         RTL

LB625    PHD
         PHX
         PHA
         PEA   $0000
         PEA   $0000
         TSC
         TCD
         LDX   #$0000
         BCC   LB667
         LDA   $07
         BIT   #$8000
         BEQ   LB64E
         EOR   #$FFFF
         STA   $07
         LDA   $05
         EOR   #$FFFF
         INC
         BNE   LB64B
         INC   $07
LB64B    STA   $05
         INX
LB64E    LDA   $10
         BIT   #$8000
         BEQ   LB667
         EOR   #$FFFF
         STA   $10
         LDA   $0E
         EOR   #$FFFF
         INC
         BNE   LB664
         INC   $10
LB664    STA   $0E
         DEX
LB667    BRA   LB680
LB669    LSR   $10
         ROR   $0E
         BCC   LB67C
         LDA   $01
         CLC
         ADC   $05
         STA   $01
         LDA   $03
         ADC   $07
         STA   $03
LB67C    ASL   $05
         ROL   $07
LB680    LDA   $0E
         ORA   $10
         BNE   LB669
         CPX   #$0000
         BEQ   LB69E
         LDA   $01
         EOR   #$FFFF
         STA   $01
         LDA   $03
         EOR   #$FFFF
         INC   $01
         BNE   LB69C
         INC
LB69C    STA   $03
LB69E    LDA   $01
         STA   $0E
         LDA   $03
         STA   $10
         PLY
         PLY
         PLY
         PLY
         PLD
         RTL

LB6AC    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $05
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $42
         DB    $00
         DB    $01
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $42
         DB    $00
         DB    $02
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LB83C    PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$FFEC
         TCS
         LDA   #LC07A
         LDX   #^LC07A
         PHX
         PHA
         LDAL  LAE04+2
         TAX
         LDAL  LAE04
         STA   $F6
         STX   $F8
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
         LDA   LC0B6
         BNE   LB870
         BRL   LB9C3
LB870    LDX   #$0000
         TDC
         CLC
         ADC   #$FFEE
         PHA
         TXA
         STAL  LBBC4
         PLA
         STAL  LBBC2
         PEA   $0027
         PEA   ^LBBC2
         PEA   LBBC2
         JSL   LBA97
         LDAL  LBBC4
         TAX
         LDAL  LBBC2
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         STA   $F2
         STA   $F0
LB8A6    LDA   $F2
         LDX   #$0000
         TAY
         BPL   LB8AF
         DEX
LB8AF    PHX
         PHA
         LDAL  LBBC4
         TAX
         LDAL  LBBC2
         JSL   LB28B
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         CMP   #$002F
         BEQ   LB8E1
         LDA   $F2
         SEC
         SBC   #$0000
         BEQ   LB8E1
         BVS   LB8DB
         EOR   #$8000
LB8DB    BPL   LB8E1
         DEC   $F2
         BRA   LB8A6
LB8E1    LDA   $F0
         SEC
         SBC   $F2
         STA   $EE
         SEP   #$20
         STAL  LAE5F
         REP   #$20
         BRA   LB94A
LB8F2    LDA   $F0
         DEC   $F0
         LDX   #$0000
         TAY
         BPL   LB8FD
         DEX
LB8FD    PHX
         PHA
         LDAL  LBBC4
         TAX
         LDAL  LBBC2
         JSL   LB28B
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         PHA
         LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDA   $EE
         LDX   #$0000
         TAY
         BPL   LB929
         DEX
LB929    PHX
         PHA
         LDA   #LAE60
         LDX   #^LAE60
         JSL   LB28B
         PLA
         PLX
         JSL   LB5D5
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         SEP   #$20
         STA   [$F6]
         REP   #$20
         DEC   $EE
LB94A    LDA   $EE
         SEC
         SBC   #$0000
         BEQ   LB959
         BVS   LB957
         EOR   #$8000
LB957    BMI   LB8F2
LB959    LDA   #LAE5F
         LDX   #^LAE5F
         PHX
         PHA
         LDAL  LADF6+2
         TAX
         LDAL  LADF6
         STA   $F6
         STX   $F8
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
         LDA   $FF
         BNE   LB99B
         LDAL  LADF6+2
         TAX
         LDAL  LADF6
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         JSL   LCA77
         PLY
         PLY
LB99B    LDA   #$0001
         STA   L0140
         LDAL  LADF6+2
         TAX
         LDAL  LADF6
         STX   L0142+2
         STA   L0142
         PEA   $007F
         PEA   $0000
         _SetInGlobals
         STAL  L013C
         BRA   LB9DB
LB9C3    LDA   L0140
         STAL  LADF4
         LDX   L0142+2
         LDA   L0142
         PHA
         TXA
         STAL  LADF6+2
         PLA
         STAL  LADF6
LB9DB    TAY
         TDC
         CLC
         ADC   #$00F9
         TCS
         TYA
         PLD
         RTL

LB9E5    PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F0
         TCS
         LDAL  LAE04+2
         TAX
         LDAL  LAE04
         STA   $F6
         STX   $F8
         LDX   $F8
         LDA   #$0024
         CLC
         ADC   $F6
         BCC   LBA08
         INX
LBA08    STX   $F4
         STA   $F2
         BRA   LBA47
LBA0E    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         JSL   LBD97
         BEQ   LBA3B
         PEI   $FF
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         STA   $F6
         STX   $F8
         LDA   $F6
         LDX   $F8
         JSL   LBAD5
         PLY
LBA3B    LDA   $F2
         SEC
         SBC   #$0004
         STA   $F2
         BCS   LBA47
         DEC   $F4
LBA47    LDAL  LAE04+2
         TAX
         LDAL  LAE04
         STA   $F6
         STX   $F8
         LDA   $F6
         LDX   $F8
         PHX
         PHA
         LDX   $F4
         LDA   $F2
         JSL   LBD97
         BVS   LBA67
         EOR   #$8000
LBA67    BPL   LBA0E
         LDA   $FF
         STA   L014A
         LDAL  LAE04+2
         TAX
         LDAL  LAE04
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         STA   $F6
         STX   $F8
         LDA   $F6
         LDX   $F8
         JSL   LBAD5
         TDC
         CLC
         ADC   #$00F9
         TCS
         PLD
         RTL

LBA97    PHB
         PLA
         XBA
         STAL  LBAD2
         PLA
         STAL  LBAD2+1
         PLA
         STAL  LBAB8
         PLA
         STAL  LBAB8+2
         PLA
         STAL  LBAB6
         JSL   GSOS
LBAB6    DW    $0000
LBAB8    ADRL  $00000000
         BCS   LBAC1
         LDA   #$0000
LBAC1    STAL  L013C
         LDAL  LBAD2+1
         PHA
         PHB
         LDAL  LBAD2
         STA   $01,S
         RTL

LBAD2    HEX   000000
LBAD5    SEP   #$10
         PHX
         REP   #$10
         DEC
         PHA
         RTL

LBADD    PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00E4
         TCS
         LDA   #$FFFF
         STA   $E8
         PEA   $0000
         TDC
         CLC
         ADC   #$00E8
         PHA
         JSL   LBE1C
         PLY
         PLY
         STX   $EC
         STA   $EA
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EC
         LDA   $EA
         JSL   LBD97
         BNE   LBB18
         LDA   #$FFFF
         BRL   LBB9A
LBB18    LDA   $FF
         CLC
         ADC   #$0001
         STA   [$EA]
         LDA   #$0000
         LDY   #$0002
         STA   [$EA],Y
         LDX   #$0000
         LDA   #$0000
         LDY   #$0006
         PHA
         TXA
         STA   [$EA],Y
         PLA
         LDY   #$0004
         STA   [$EA],Y
         PEI   $EC
         PEI   $EA
         PEA   $6400
         PEI   $FD
         PEI   $FB
         PEA   $0000
         TDC
         CLC
         ADC   #$00EE
         PHA
         JSL   LC4F3
         TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
         STA   $E6
         LDA   $E6
         CMP   #$0000
         BEQ   LBB6E
         LDA   #$0000
         STA   [$EA]
         LDA   #$FFFF
         BRA   LBB9A
LBB6E    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0006
         LDA   [$EA],Y
         TAX
         LDY   #$0004
         LDA   [$EA],Y
         JSL   LBD97
         BNE   LBB98
         LDX   $F0
         LDA   $EE
         LDY   #$0006
         PHA
         TXA
         STA   [$EA],Y
         PLA
         LDY   #$0004
         STA   [$EA],Y
LBB98    LDA   $E8
LBB9A    TAY
         TDC
         CLC
         ADC   #$00F5
         TCS
         TYA
         PLD
         RTL

LBBA4    PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F4
         TCS
         LDA   $FF
         AND   #$FFFF
         PHA
         JSL   LB9E5
         PLY
         TDC
         CLC
         ADC   #$00F9
         TCS
         PLD
         RTL

LBBC2    DB    $00
         DB    $00
LBBC4    DB    $00
         DB    $00
LBBC6    DB    $00
         DB    $00
LBBC8    DB    $00
         DB    $00
LBBCA    DB    $00
         DB    $00
LBBCC    DB    $00
         DB    $00
LBBCE    DB    $00
         DB    $00
LBBD0    DB    $00
         DB    $00
LBBD2    DB    $00
         DB    $00
LBBD4    DB    $00
         DB    $00
         DB    $00
         DB    $00
LBBD8    DB    $00
         DB    $00
LBBDA    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LBBE4    DB    $00
         DB    $00
LBBE6    DB    $00
         DB    $00
LBBE8    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LBBEE    DB    $00
         DB    $00
LBBF0    DB    $00
         DB    $00
LBBF2    DB    $00
         DB    $00
LBBF4    DB    $00
         DB    $00
LBBF6    DB    $00
         DB    $00
LBBF8    DB    $00
         DB    $00
LBBFA    DB    $00
         DB    $00
LBBFC    DB    $00
         DB    $00
LBBFE    DB    $00
         DB    $00
LBC00    DB    $00
         DB    $00
LBC02    DB    $00
         DB    $00
LBC04    DB    $00
         DB    $00
LBC06    DB    $00
         DB    $00
LBC08    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EE
         TCS
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0081
         CMP   #$0000
         BNE   LBC26
         LDA   #$FFFF
         BRL   LBD8D
LBC26    LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0001
         LDY   #$0010
         STA   [$FD],Y
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0010
         TAY
         BEQ   LBC44
         LDA   #$FFFF
         BRL   LBD8D
LBC44    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   LBD97
         BNE   LBC67
         PEI   $FF
         PEI   $FD
         JSL   LC71C
         PLY
         PLY
LBC67    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0100
         TAY
         BNE   LBC75
         BRL   LBCBF
LBC75    LDA   #LB6AC
         LDX   #^LB6AC
         STX   $F2
         STA   $F0
         BRA   LBCA2
LBC81    LDY   #$0010
         LDA   [$F0],Y
         AND   #$0102
         TAY
         BEQ   LBC96
         PEI   $F2
         PEI   $F0
         JSL   LB37A
         PLY
         PLY
LBC96    LDA   $F0
         CLC
         ADC   #$0014
         STA   $F0
         BCC   LBCA2
         INC   $F2
LBCA2    SEC
         LDA   $F0
         SBC   LB071
         BNE   LBCB1
         LDA   $F2
         SBC   LB071+2
         BRA   LBCB8
LBCB1    LDA   $F2
         SBC   LB071+2
         REP   #$02
LBCB8    BVS   LBCBD
         EOR   #$8000
LBCBD    BPL   LBC81
LBCBF    LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         LDY   #$0004
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0002
         STA   [$FD],Y
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0004
         TAY
         BEQ   LBCE7
         LDA   #$0001
         BRA   LBCEC
LBCE7    LDY   #$000E
         LDA   [$FD],Y
LBCEC    PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         PHX
         PHA
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   LCCBB
         PLY
         PLY
         PLY
         PLY
         STA   [$FD]
         LDA   [$FD]
         DEC
         STA   [$FD]
         SEC
         SBC   #$0000
         BVS   LBD18
         EOR   #$8000
LBD18    BPL   LBD4A
         LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         CLC
         ADC   #$0001
         LDY   #$0002
         STA   [$FD],Y
         LDY   #$0004
         LDA   [$FD],Y
         BCC   LBD38
         INC
LBD38    LDY   #$0004
         STA   [$FD],Y
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         BRA   LBD8D
LBD4A    LDA   [$FD]
         CMP   #$FFFF
         BNE   LBD78
         LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0010
         LDY   #$0010
         STA   [$FD],Y
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0080
         TAY
         BEQ   LBD76
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$FFFE
         LDY   #$0010
         STA   [$FD],Y
LBD76    BRA   LBD85
LBD78    LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0020
         LDY   #$0010
         STA   [$FD],Y
LBD85    LDA   #$0000
         STA   [$FD]
         LDA   #$FFFF
LBD8D    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LBD97    PHX
         PHA
         LDA   $08,S
         TAX
         LDA   $0A,S
         TAY
         LDA   $06,S
         STA   $0A,S
         LDA   $04,S
         STA   $08,S
         TXA
         SEC
         SBC   $01,S
         BNE   LBDB2
         TYA
         SBC   $03,S
         BRA   LBDB7
LBDB2    TYA
         SBC   $03,S
         REP   #$02
LBDB7    PHP
         LDA   $00,S
         STA   $08,S
         PLY
         PLY
         PLY
         PLY
         PLP
         RTL

LBDC2    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E8
         TCS
         LDX   $FB
         LDA   $F9
         STX   $EC
         STA   $EA
LBDD5    LDA   $F7
         CMP   #$0001
         BEQ   LBE00
         BCC   LBE00
         LDA   [$FD]
         STA   [$F9]
         LDA   $F9
         CLC
         ADC   #$0002
         STA   $F9
         BCC   LBDEE
         INC   $FB
LBDEE    LDA   $FD
         CLC
         ADC   #$0002
         STA   $FD
         BCC   LBDFA
         INC   $FF
LBDFA    DEC   $F7
         DEC   $F7
         BRA   LBDD5
LBE00    LDA   $F7
         BEQ   LBE0C
         SEP   #$20
         LDA   [$FD]
         STA   [$F9]
         REP   #$20
LBE0C    LDX   $EC
         LDA   $EA
         STX   $FF
         STA   $FD
         TDC
         CLC
         ADC   #$00F1
         TCS
         PLD
         RTL

LBE1C    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E8
         TCS
         LDAL  LAE08
         CMP   #$0000
         BNE   LBE34
         JSL   LC115
LBE34    LDAL  LAE08
         PHA
         LDA   #$0012
         SEC
         JSL   LB470
         PLY
         SEC
         SBC   #$0001
         STA   $F2
         LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   LBE53
         EOR   #$8000
LBE53    BPL   LBE59
         LDA   [$FD]
         BRA   LBE65
LBE59    LDA   [$FD]
         PHA
         LDA   #$FFFF
         PLX
         STX   $F4
         SEC
         SBC   $F4
LBE65    SEC
         SBC   $F2
         BEQ   LBE86
         BVS   LBE6F
         EOR   #$8000
LBE6F    BPL   LBE86
         PEA   $0000
         PEA   $0016
         JSL   LC0EB
         PLY
         PLY
         LDX   #$0000
         LDA   #$0000
         BRL   LC070
LBE86    LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   LBE91
         EOR   #$8000
LBE91    BPL   LBEDC
         LDA   [$FD]
         PHA
         LDA   #$0012
         CLC
         JSL   LB5E0
         LDAL  LAE0C
         TAX
         LDAL  LAE0A
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LBEB1
         DEC   $F6
LBEB1    CLC
         ADC   $F4
         STA   $F4
         BCC   LBEBA
         INC   $F6
LBEBA    LDA   $F4
         LDX   $F6
         STX   $F0
         STA   $EE
         LDA   [$EE]
         CMP   #$0000
         BNE   LBED9
         PEA   $0000
         PEA   $0009
         JSL   LC0EB
         PLY
         PLY
         STZ   $EE
         STZ   $F0
LBED9    BRL   LC06C
LBEDC    LDA   [$FD]
         PHA
         LDA   #$FFFF
         PLX
         STX   $F4
         SEC
         SBC   $F4
         PHA
         LDA   #$0012
         CLC
         JSL   LB5E0
         LDAL  LAE0C
         TAX
         LDAL  LAE0A
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LBF04
         DEC   $F6
LBF04    CLC
         ADC   $F4
         STA   $F4
         BCC   LBF0D
         INC   $F6
LBF0D    LDA   $F4
         LDX   $F6
         STX   $F0
         STA   $EE
         BRA   LBF2C
LBF17    LDA   [$EE]
         CMP   #$0000
         BNE   LBF20
         BRA   LBF68
LBF20    LDA   $EE
         CLC
         ADC   #$0012
         STA   $EE
         BCC   LBF2C
         INC   $F0
LBF2C    LDA   $F2
         PHA
         LDA   #$0012
         CLC
         JSL   LB5E0
         LDAL  LAE0C
         TAX
         LDAL  LAE0A
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LBF4A
         DEC   $F6
LBF4A    CLC
         ADC   $F4
         STA   $F4
         BCC   LBF53
         INC   $F6
LBF53    LDA   $F4
         LDX   $F6
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   LBD97
         BVS   LBF66
         EOR   #$8000
LBF66    BMI   LBF17
LBF68    LDA   $F2
         PHA
         LDA   #$0012
         CLC
         JSL   LB5E0
         LDAL  LAE0C
         TAX
         LDAL  LAE0A
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LBF86
         DEC   $F6
LBF86    CLC
         ADC   $F4
         STA   $F4
         BCC   LBF8F
         INC   $F6
LBF8F    LDA   $F4
         LDX   $F6
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   LBD97
         BVS   LBFA2
         EOR   #$8000
LBFA2    BPL   LBFA7
         BRL   LC042
LBFA7    LDAL  LAE08
         CLC
         ADC   #$00B4
         LDX   #$0000
         TAY
         BPL   LBFB6
         DEX
LBFB6    PHX
         PHA
         LDAL  LAE0C
         TAX
         LDAL  LAE0A
         PHX
         PHA
         JSL   LCDE7
         PLY
         PLY
         PLY
         PLY
         STX   $EC
         STA   $EA
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EC
         LDA   $EA
         JSL   LBD97
         BNE   LBFF6
         PEA   $0000
         PEA   $0018
         JSL   LC0EB
         PLY
         PLY
         LDX   #$0000
         LDA   #$0000
         BRL   LC070
LBFF6    LDA   $F2
         PHA
         LDA   #$0012
         CLC
         JSL   LB5E0
         LDX   $EC
         LDA   $EA
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LC00F
         DEC   $F6
LC00F    CLC
         ADC   $F4
         STA   $F4
         BCC   LC018
         INC   $F6
LC018    LDX   $F6
         LDA   #$0012
         CLC
         ADC   $F4
         BCC   LC023
         INX
LC023    STX   $F0
         STA   $EE
         LDAL  LAE08
         CLC
         ADC   #$00B4
         STAL  LAE08
         LDX   $EC
         LDA   $EA
         PHA
         TXA
         STAL  LAE0C
         PLA
         STAL  LAE0A
LC042    LDAL  LAE0C
         TAX
         LDAL  LAE0A
         STA   $F4
         STX   $F6
         LDA   $F4
         LDX   $F6
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   LB5D5
         LDX   #$0000
         LDA   #$0012
         SEC
         JSL   LB4DF
         PLY
         PLY
         STA   [$FD]
LC06C    LDX   $F0
         LDA   $EE
LC070    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LC07A    PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F4
         TCS
         PEA   $0001
         PEA   ^L017C
         PEA   L017C
         JSL   LC0B8
         PLY
         PLY
         PLY
         TDC
         CLC
         ADC   #$00F9
         TCS
         PLD
         RTL

LC09D    LDA   $04,S
         STAL  LC0B1
         LDA   $06,S
         STAL  LC0B1+2
         LDA   $08,S
         JSL   GSOS
         DW    $0029
LC0B1    ADRL  $00000000
         RTL

LC0B6    BRK   $00
LC0B8    TSC
         TCD
         LDA   [$04]
         TAX
         LDA   $04,S
         TAY
         LDA   $06,S
         TCD
         LDA   $08,S
         TXS
         PHA
         PHA
         PHD
         PHY
         TSC
         TCD
         LDY   #$0002
         LDA   [$01],Y
         TAX
         INY
         INY
         LDA   [$01],Y
         STA   $08,S
         INY
         INY
         LDA   [$01],Y
         STA   $0A,S
         PLA
         PLA
         PLA
         PLY
         CMP   #$0000
         BNE   LC0E8
         INC
LC0E8    PHX
         PLD
         RTL

LC0EB    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDA   $FF
         CMP   #$0000
         BNE   LC101
         LDA   $FD
         BRA   LC108
LC101    PEI   $FF
         JSL   LCAE8
         PLY
LC108    STA   LC4F1
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LC115    PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F0
         TCS
         LDA   #$00B4
         STAL  LAE08
         PEA   $0000
         PEA   $00B4
         PEA   $0000
         PEA   $0000
         JSL   LCDE7
         PLY
         PLY
         PLY
         PLY
         PHA
         TXA
         STAL  LAE0C
         PLA
         STAL  LAE0A
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDAL  LAE14
         TAX
         LDAL  LAE12
         JSL   LBD97
         BNE   LC160
         BRL   LC220
LC160    LDAL  LAE14
         TAX
         LDAL  LAE12
         STA   $F8
         STX   $FA
         LDY   #$001A
         LDA   [$F8],Y
         TAX
         LDY   #$0018
         LDA   [$F8],Y
         PHX
         PHA
         LDAL  LAE0C
         TAX
         LDAL  LAE0A
         PHX
         PHA
         PEA   $0000
         PEA   $0036
         _BlockMove
         STAL  L013C
         LDAL  LAE0C
         TAX
         LDAL  LAE0A
         STA   $F8
         STX   $FA
         LDA   $F8
         LDX   $FA
         STX   $F6
         STA   $F4
         BRA   LC1F4
LC1AD    LDA   [$F4]
         CMP   #$0000
         BEQ   LC1E8
         PEA   $0000
         PEA   $6601
         PEI   $F6
         PEI   $F4
         LDY   #$0006
         LDA   [$F4],Y
         TAX
         LDY   #$0004
         LDA   [$F4],Y
         STA   $F8
         STX   $FA
         LDY   #$0016
         LDA   [$F8],Y
         TAX
         LDY   #$0014
         LDA   [$F8],Y
         STA   $F8
         STX   $FA
         LDA   $F8
         LDX   $FA
         JSL   LBAD5
         PLY
         PLY
         PLY
         PLY
LC1E8    LDA   $F4
         CLC
         ADC   #$0012
         STA   $F4
         BCC   LC1F4
         INC   $F6
LC1F4    LDAL  LAE0C
         TAX
         LDAL  LAE0A
         STA   $F8
         STX   $FA
         LDX   $FA
         LDA   #$0024
         CLC
         ADC   $F8
         BCC   LC20C
         INX
LC20C    PHX
         PHA
         LDX   $F6
         LDA   $F4
         JSL   LBD97
         BVS   LC21B
         EOR   #$8000
LC21B    BMI   LC1AD
         BRL   LC3EE
LC220    PEA   $0000
         PEA   ^LC91E
         PEA   LC91E
         JSL   LBADD
         PLY
         PLY
         PLY
         STA   $F2
         PEA   $0000
         TDC
         CLC
         ADC   #$00F2
         PHA
         JSL   LBE1C
         PLY
         PLY
         STX   $F6
         STA   $F4
         PHX
         PHA
         PEA   $0000
         PEA   $0004
         LDA   L013E
         ORA   #$0F00
         PHA
         PEA   $8300
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L013C
         PLA
         PLX
         LDY   #$000A
         PHA
         TXA
         STA   [$F4],Y
         PLA
         LDY   #$0008
         STA   [$F4],Y
         LDY   #$000A
         LDA   [$F4],Y
         TAX
         LDY   #$0008
         LDA   [$F4],Y
         STA   $F8
         STX   $FA
         LDY   #$0002
         LDA   [$F8],Y
         TAX
         LDA   [$F8]
         STA   $F8
         STX   $FA
         LDA   #$0000
         STA   [$F8]
         LDY   #$000A
         LDA   [$F4],Y
         TAX
         LDY   #$0008
         LDA   [$F4],Y
         STA   $F8
         STX   $FA
         LDY   #$0002
         LDA   [$F8],Y
         TAX
         LDA   [$F8]
         STA   $F8
         STX   $FA
         LDA   #$0000
         LDY   #$0002
         STA   [$F8],Y
         PEA   $0001
         PEA   ^LC927
         PEA   LC927
         JSL   LBADD
         PLY
         PLY
         PLY
         STA   $F2
         PEA   $0000
         TDC
         CLC
         ADC   #$00F2
         PHA
         JSL   LBE1C
         PLY
         PLY
         STX   $F6
         STA   $F4
         PHX
         PHA
         PEA   $0000
         PEA   $0004
         LDA   L013E
         ORA   #$0F00
         PHA
         PEA   $8300
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L013C
         PLA
         PLX
         LDY   #$000A
         PHA
         TXA
         STA   [$F4],Y
         PLA
         LDY   #$0008
         STA   [$F4],Y
         LDY   #$000A
         LDA   [$F4],Y
         TAX
         LDY   #$0008
         LDA   [$F4],Y
         STA   $F8
         STX   $FA
         LDY   #$0002
         LDA   [$F8],Y
         TAX
         LDA   [$F8]
         STA   $F8
         STX   $FA
         LDA   #$0000
         STA   [$F8]
         LDY   #$000A
         LDA   [$F4],Y
         TAX
         LDY   #$0008
         LDA   [$F4],Y
         STA   $F8
         STX   $FA
         LDY   #$0002
         LDA   [$F8],Y
         TAX
         LDA   [$F8]
         STA   $F8
         STX   $FA
         LDA   #$0001
         LDY   #$0002
         STA   [$F8],Y
         PEA   $0001
         PEA   ^LC930
         PEA   LC930
         JSL   LBADD
         PLY
         PLY
         PLY
         STA   $F2
         PEA   $0000
         TDC
         CLC
         ADC   #$00F2
         PHA
         JSL   LBE1C
         PLY
         PLY
         STX   $F6
         STA   $F4
         PHX
         PHA
         PEA   $0000
         PEA   $0004
         LDA   L013E
         ORA   #$0F00
         PHA
         PEA   $8300
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L013C
         PLA
         PLX
         LDY   #$000A
         PHA
         TXA
         STA   [$F4],Y
         PLA
         LDY   #$0008
         STA   [$F4],Y
         LDY   #$000A
         LDA   [$F4],Y
         TAX
         LDY   #$0008
         LDA   [$F4],Y
         STA   $F8
         STX   $FA
         LDY   #$0002
         LDA   [$F8],Y
         TAX
         LDA   [$F8]
         STA   $F8
         STX   $FA
         LDA   #$0000
         STA   [$F8]
         LDY   #$000A
         LDA   [$F4],Y
         TAX
         LDY   #$0008
         LDA   [$F4],Y
         STA   $F8
         STX   $FA
         LDY   #$0002
         LDA   [$F8],Y
         TAX
         LDA   [$F8]
         STA   $F8
         STX   $FA
         LDA   #$0002
         LDY   #$0002
         STA   [$F8],Y
LC3EE    LDA   #LC6D8
         LDX   #^LC6D8
         PHX
         PHA
         LDAL  LAE04+2
         TAX
         LDAL  LAE04
         STA   $F8
         STX   $FA
         PLA
         PLX
         LDY   #$000A
         PHA
         TXA
         STA   [$F8],Y
         PLA
         LDY   #$0008
         STA   [$F8],Y
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDAL  LAE02
         TAX
         LDAL  LAE00
         JSL   LBD97
         BNE   LC43A
         LDA   #LCDA1
         LDX   #^LCDA1
         PHA
         TXA
         STAL  LAE02
         PLA
         STAL  LAE00
LC43A    TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

LC444    PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EE
         TCS
         LDA   $FF
         SEC
         SBC   #$0000
         BVS   LC45A
         EOR   #$8000
LC45A    BMI   LC46D
         PEA   $0000
         PEA   $0016
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
         BRA   LC4E7
LC46D    PEA   $0000
         TDC
         CLC
         ADC   #$00FF
         PHA
         JSL   LBE1C
         PLY
         PLY
         STX   $F4
         STA   $F2
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F4
         LDA   $F2
         JSL   LBD97
         BNE   LC497
         LDA   #$FFFF
         BRA   LC4E7
LC497    PEI   $F4
         PEI   $F2
         LDY   #$0006
         LDA   [$F2],Y
         TAX
         LDY   #$0004
         LDA   [$F2],Y
         STA   $F6
         STX   $F8
         LDY   #$000A
         LDA   [$F6],Y
         TAX
         LDY   #$0008
         LDA   [$F6],Y
         STA   $F6
         STX   $F8
         LDA   $F6
         LDX   $F8
         JSL   LBAD5
         PLY
         PLY
         STA   $F0
         LDA   #$0000
         STA   [$F2]
         LDA   $F0
         CMP   #$0000
         BEQ   LC4E4
         LDY   #$0002
         LDA   [$F2],Y
         PHA
         PEI   $F0
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
         BRA   LC4E7
LC4E4    LDA   #$0000
LC4E7    TAY
         TDC
         CLC
         ADC   #$00F9
         TCS
         TYA
         PLD
         RTL

LC4F1    DW    $0000
LC4F3    PHD
         TSC
         SEC
         SBC   #$00ED
         TCD
         ADC   #$00E0
         TCS
         LDA   [$F7]
         AND   #$00FF
         CMP   #$0000
         BEQ   LC50D
         LDA   #$0000
         BRA   LC510
LC50D    LDA   #$0001
LC510    PHA
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F9
         LDA   $F7
         JSL   LBD97
         BEQ   LC528
         LDA   #$0000
         BRA   LC52B
LC528    LDA   #$0001
LC52B    PLX
         STX   $EA
         ORA   $EA
         TAY
         BEQ   LC545
         PEA   $0000
         PEA   $0016
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
         BRL   LC6CE
LC545    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDAL  LAE10
         TAX
         LDAL  LAE0E
         JSL   LBD97
         BNE   LC56D
         LDA   #LCFA6
         LDX   #^LCFA6
         PHA
         TXA
         STAL  LAE10
         PLA
         STAL  LAE0E
LC56D    LDAL  LAE10
         TAX
         LDAL  LAE0E
         STA   $EA
         STX   $EC
         LDA   $EA
         LDX   $EC
         STX   $E4
         STA   $E2
         BRA   LC5AB
LC584    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0006
         LDA   [$E2],Y
         TAX
         LDY   #$0004
         LDA   [$E2],Y
         JSL   LBD97
         BNE   LC59F
         BRA   LC5D6
LC59F    LDA   $E2
         CLC
         ADC   #$0018
         STA   $E2
         BCC   LC5AB
         INC   $E4
LC5AB    LDAL  LAE10
         TAX
         LDAL  LAE0E
         STA   $EA
         STX   $EC
         LDX   $EC
         LDA   #$0078
         CLC
         ADC   $EA
         BCC   LC5C3
         INX
LC5C3    PHX
         PHA
         LDX   $E4
         LDA   $E2
         JSL   LBD97
         BEQ   LC5D6
         BVS   LC5D4
         EOR   #$8000
LC5D4    BMI   LC584
LC5D6    LDA   #$4006
         STA   $E8
LC5DB    LDAL  LAE10
         TAX
         LDAL  LAE0E
         STA   $EA
         STX   $EC
         LDA   $EA
         LDX   $EC
         PHX
         PHA
         LDX   $E4
         LDA   $E2
         SEC
         SBC   #$0018
         STA   $E2
         PHA
         LDA   $E4
         SBC   #$0000
         TAX
         STA   $E4
         PLA
         JSL   LBD97
         BEQ   LC60F
         BVS   LC60D
         EOR   #$8000
LC60D    BMI   LC648
LC60F    PEI   $FF
         PEI   $FD
         PEI   $FB
         PEI   $F9
         PEI   $F7
         LDY   #$0006
         LDA   [$E2],Y
         TAX
         LDY   #$0004
         LDA   [$E2],Y
         STA   $EA
         STX   $EC
         LDA   $EA
         LDX   $EC
         JSL   LBAD5
         PLY
         PLY
         PLY
         PLY
         PLY
         STA   $E8
         LDA   $E8
         SEC
         SBC   #$0000
         BVS   LC642
         EOR   #$8000
LC642    BPL   LC646
         BRA   LC648
LC646    BRA   LC5DB
LC648    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F5
         LDA   $F3
         JSL   LBD97
         BEQ   LC68C
         LDAL  LAE10
         TAX
         LDAL  LAE0E
         STA   $EA
         STX   $EC
         LDA   $EA
         LDX   $EC
         PHX
         PHA
         LDX   $E4
         LDA   $E2
         JSL   LBD97
         BEQ   LC67E
         BVS   LC67C
         EOR   #$8000
LC67C    BMI   LC68C
LC67E    LDX   $E4
         LDA   $E2
         LDY   #$0002
         PHA
         TXA
         STA   [$F3],Y
         PLA
         STA   [$F3]
LC68C    LDA   $E8
         AND   #$4000
         CMP   #$0000
         BNE   LC69A
         LDA   $E8
         BRA   LC6CE
LC69A    LDA   $E8
         STA   $E6
         LDA   $E6
         AND   #$8000
         TAY
         BEQ   LC6B8
         LDA   $E6
         AND   #$BFFF
         STA   $E6
         LDA   $E6
         AND   #$7FFF
         STA   $E6
         STZ   $E8
         BRA   LC6C1
LC6B8    LDA   $E8
         AND   #$BFFF
         STA   $E8
         STZ   $E6
LC6C1    PEI   $E6
         PEI   $E8
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
LC6CE    TAY
         TDC
         CLC
         ADC   #$00ED
         TCS
         TYA
         PLD
         RTL

LC6D8    PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F0
         TCS
         LDAL  LAE08
         PHA
         LDA   #$0012
         SEC
         JSL   LB470
         PLY
         SEC
         SBC   #$0001
         STA   $F2
         STZ   $F4
         BRA   LC704
LC6FB    PEI   $F4
         JSL   LC444
         PLY
         INC   $F4
LC704    LDA   $F4
         SEC
         SBC   $F2
         BEQ   LC6FB
         BVS   LC710
         EOR   #$8000
LC710    BPL   LC6FB
         TAY
         TDC
         CLC
         ADC   #$00F9
         TCS
         TYA
         PLD
         RTL

LC71C    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDA   LC4F1
         STA   $F2
         LDA   L013C
         STA   $F0
         LDA   LCDE5
         BEQ   LC745
         STZ   LCDE5
         PEA   ^LC939
         PEA   LC939
         JSL   LCBFD
         PLY
         PLY
LC745    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0004
         TAY
         BEQ   LC76E
         LDA   #$0000
         LDY   #$000E
         STA   [$FD],Y
         LDX   #$0000
         LDA   #$0000
         LDY   #$0008
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0006
         STA   [$FD],Y
         BRL   LC89F
LC76E    LDY   #$000E
         LDA   [$FD],Y
         CMP   #$0000
         BNE   LC7D6
         LDX   #$0000
         LDA   #$0000
         LDY   #$0008
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0006
         STA   [$FD],Y
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0040
         TAY
         BEQ   LC7A0
         LDA   #$0064
         LDY   #$000E
         STA   [$FD],Y
         BRA   LC7D6
LC7A0    PEA   $0000
         TDC
         CLC
         ADC   #$00EE
         PHA
         PEA   $6603
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   LA7FF
         PLY
         PLY
         PLY
         PLY
         SEC
         SBC   #$0000
         BVS   LC7C3
         EOR   #$8000
LC7C3    BPL   LC7CE
         LDA   $EE
         LDY   #$000E
         STA   [$FD],Y
         BRA   LC7D6
LC7CE    LDA   #$0400
         LDY   #$000E
         STA   [$FD],Y
LC7D6    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   LBD97
         BEQ   LC7F2
         BRL   LC89F
LC7F2    LDY   #$000E
         LDA   [$FD],Y
         LDX   #$0000
         PHX
         PHA
         JSL   LB147
         PLY
         PLY
         LDY   #$0008
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0006
         STA   [$FD],Y
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   LBD97
         BNE   LC86A
         LDY   #$000E
         LDA   [$FD],Y
         CMP   #$0064
         BEQ   LC86A
         BCC   LC86A
         LDY   #$000E
         LDA   [$FD],Y
         CMP   #$0400
         BEQ   LC845
         BCC   LC845
         LDA   #$0400
         BRA   LC848
LC845    LDA   #$0064
LC848    LDY   #$000E
         STA   [$FD],Y
         LDY   #$000E
         LDA   [$FD],Y
         LDX   #$0000
         PHX
         PHA
         JSL   LB147
         PLY
         PLY
         LDY   #$0008
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0006
         STA   [$FD],Y
LC86A    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   LBD97
         BEQ   LC892
         LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0008
         LDY   #$0010
         STA   [$FD],Y
         BRA   LC89F
LC892    LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0004
         LDY   #$0010
         STA   [$FD],Y
LC89F    LDY   #$000E
         LDA   [$FD],Y
         LDX   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   LB28B
         PLA
         PLX
         LDY   #$000C
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$000A
         STA   [$FD],Y
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         LDY   #$0004
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0002
         STA   [$FD],Y
         PEA   $0000
         PEA   $6602
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   LA7FF
         PLY
         PLY
         PLY
         SEC
         SBC   #$0000
         BVS   LC8FB
         EOR   #$8000
LC8FB    BPL   LC90A
         LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0100
         LDY   #$0010
         STA   [$FD],Y
LC90A    LDA   $F2
         STA   LC4F1
         LDA   $F0
         STA   L013C
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LC91E    ASC   '.console'00
LC927    ASC   '.console'00
LC930    ASC   '.console'00
LC939    PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         LDA   #LB6AC
         LDX   #^LB6AC
         STX   $F6
         STA   $F4
         BRA   LC966
LC950    PEI   $F6
         PEI   $F4
         JSL   LB296
         PLY
         PLY
         LDA   $F4
         CLC
         ADC   #$0014
         STA   $F4
         BCC   LC966
         INC   $F6
LC966    SEC
         LDA   $F4
         SBC   LB071
         BNE   LC975
         LDA   $F6
         SBC   LB071+2
         BRA   LC97C
LC975    LDA   $F6
         SBC   LB071+2
         REP   #$02
LC97C    BVS   LC981
         EOR   #$8000
LC981    BPL   LC950
         TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

LC98D    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         STX   $F2
         STA   $F0
         PHX
         PHA
         LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         JSL   LB5D5
         PLA
         PLX
         STA   $EE
         LDX   $F2
         LDA   $F0
         LDY   #$0004
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0002
         STA   [$FD],Y
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0044
         TAY
         BEQ   LC9DD
         LDA   #$0000
         BRA   LC9E2
LC9DD    LDY   #$000E
         LDA   [$FD],Y
LC9E2    STA   [$FD]
         LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         LDY   #$000C
         LDA   [$FD],Y
         TAX
         LDY   #$000A
         LDA   [$FD],Y
         JSL   LB5D5
         PLA
         PLX
         PHA
         LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   LCA0E
         EOR   #$8000
LCA0E    BMI   LCA15
         LDA   #$0000
         BRA   LCA17
LCA15    LDA   [$FD]
LCA17    PLX
         STX   $F4
         SEC
         SBC   $F4
         BEQ   LCA30
         BVS   LCA24
         EOR   #$8000
LCA24    BPL   LCA30
         PEI   $FF
         PEI   $FD
         JSL   LB075
         PLY
         PLY
LCA30    LDA   $EE
         SEC
         SBC   #$0000
         BEQ   LCA6A
         BVS   LCA3D
         EOR   #$8000
LCA3D    BPL   LCA6A
         LDA   $EE
         PHA
         PEI   $F2
         PEI   $F0
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   LD036
         PLY
         PLY
         PLY
         PLY
         CMP   $EE
         BEQ   LCA6A
         LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0020
         LDY   #$0010
         STA   [$FD],Y
         LDA   #$FFFF
         BRA   LCA6D
LCA6A    LDA   #$0000
LCA6D    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LCA77    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDX   $FF
         LDA   $FD
         STX   $F4
         ORA   $F4
         BEQ   LCAE0
         LDX   $FF
         LDA   $FD
         INC   $FD
         BNE   LCA96
         INC   $FF
LCA96    STX   $F0
         STA   $EE
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         STA   $F2
         BRA   LCAD0
LCAA7    LDX   $FF
         LDA   $FD
         INC   $FD
         BNE   LCAB1
         INC   $FF
LCAB1    STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         PHA
         LDX   $F0
         LDA   $EE
         INC   $EE
         BNE   LCAC5
         INC   $F0
LCAC5    STA   $F4
         STX   $F6
         PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
LCAD0    LDA   $F2
         DEC   $F2
         TAY
         BNE   LCAA7
         LDA   #$0000
         SEP   #$20
         STA   [$EE]
         REP   #$20
LCAE0    TDC
         CLC
         ADC   #$00F7
         TCS
         PLD
         RTL

LCAE8    PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F2
         TCS
         STZ   $F4
         LDA   $FF
         BRL   LCBDE
LCAFA    BRL   LCBF1
LCAFD    LDA   #$0014
         STA   $F4
         BRL   LCBF1
LCB05    LDA   #$000E
         STA   $F4
         BRL   LCBF1
LCB0D    LDA   #$001C
         STA   $F4
         BRL   LCBF1
LCB15    LDA   #$0011
         STA   $F4
         BRL   LCBF1
LCB1D    LDA   #$0006
         STA   $F4
         BRL   LCBF1
LCB25    LDA   #$0006
         STA   $F4
         BRL   LCBF1
LCB2D    LDA   #$0010
         STA   $F4
         BRL   LCBF1
LCB35    LDA   #$0002
         STA   $F4
         BRL   LCBF1
LCB3D    LDA   #$0009
         STA   $F4
         BRL   LCBF1
LCB45    LDA   #$0005
         STA   $F4
         BRL   LCBF1
LCB4D    LDA   #$0017
         STA   $F4
         BRL   LCBF1
LCB55    LDA   #$000C
         STA   $F4
         BRL   LCBF1
LCB5D    LDA   #$001A
         STA   $F4
         BRL   LCBF1
LCB65    LDA   #$0016
         STA   $F4
         BRL   LCBF1
LCB6D    LDA   #$000D
         STA   $F4
         BRL   LCBF1
LCB75    LDA   #$001E
         STA   $F4
         BRL   LCBF1
         BRL   LCBF1
LCB80    DA    LCAFA
         DA    LCB45
         DA    LCB75
         DA    LCB05
         DA    LCB4D
         DA    LCB3D
         DA    LCB35
         DA    LCB25
         DA    LCB35
         DA    LCB15
         DA    LCB0D
         DA    LCB0D
         DA    LCAFD
         DA    LCB1D
         DA    LCB25
         DA    LCB6D
         DA    LCB5D
         DA    LCAFD
         DA    LCB65
         DA    LCB55
         DA    LCB2D
         DA    LCB25
         DA    LCB25
         DA    LCAFA
LCBB0    DW    $0000
         DW    $0027
         DW    $002B
         DW    $0040
         DW    $0042
         DW    $0043
         DW    $0044
         DW    $0045
         DW    $0046
         DW    $0047
         DW    $0048
         DW    $0049
         DW    $004B
         DW    $004C
         DW    $004D
         DW    $004E
         DW    $0050
         DW    $0052
         DW    $0053
         DW    $0054
         DW    $0057
         DW    $0058
         DW    $005A
LCBDE    TAX
         PEA   ^LCBB0
         PEA   LCBB0
         LDA   #$002C
         JSL   LDAE3
         PLA
         PLA
         JMP   (LCB80,X)

LCBF1    LDA   $F4
         TAY
         TDC
         CLC
         ADC   #$00F9
         TCS
         TYA
         PLD
         RTL

LCBFD    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EE
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDAL  LAE02
         TAX
         LDAL  LAE00
         JSL   LBD97
         BNE   LCC30
         LDA   #LCDA1
         LDX   #^LCDA1
         PHA
         TXA
         STAL  LAE02
         PLA
         STAL  LAE00
LCC30    LDAL  LAE04+2
         TAX
         LDAL  LAE04
         STA   $F4
         STX   $F6
         LDX   $F6
         LDA   #$0010
         CLC
         ADC   $F4
         BCC   LCC48
         INX
LCC48    STX   $F2
         STA   $F0
         BRA   LCC83
LCC4E    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0002
         LDA   [$F0],Y
         TAX
         LDA   [$F0]
         JSL   LBD97
         BNE   LCC77
         LDX   $FF
         LDA   $FD
         LDY   #$0002
         PHA
         TXA
         STA   [$F0],Y
         PLA
         STA   [$F0]
         LDA   #$0000
         BRA   LCCB1
LCC77    LDA   $F0
         CLC
         ADC   #$0004
         STA   $F0
         BCC   LCC83
         INC   $F2
LCC83    LDAL  LAE04+2
         TAX
         LDAL  LAE04
         STA   $F4
         STX   $F6
         LDX   $F6
         LDA   #$0028
         CLC
         ADC   $F4
         BCC   LCC9B
         INX
LCC9B    PHX
         PHA
         LDX   $F2
         LDA   $F0
         JSL   LBD97
         BEQ   LCCAE
         BVS   LCCAC
         EOR   #$8000
LCCAC    BMI   LCC4E
LCCAE    LDA   #$0001
LCCB1    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LCCBB    PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E8
         TCS
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   LCCD1
         EOR   #$8000
LCCD1    BMI   LCCE5
         PEA   $0000
         PEA   $0016
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
         BRL   LCD97
LCCE5    PEA   $0000
         TDC
         CLC
         ADC   #$00F9
         PHA
         JSL   LBE1C
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         JSL   LBD97
         BNE   LCD10
         LDA   #$FFFF
         BRL   LCD97
LCD10    LDA   [$EC]
         AND   #$0001
         TAY
         BNE   LCD29
         PEA   $0000
         PEA   $0009
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
         BRA   LCD97
LCD29    LDA   $FF
         LDY   #$000C
         STA   [$EC],Y
         LDX   $FD
         LDA   $FB
         LDY   #$0010
         PHA
         TXA
         STA   [$EC],Y
         PLA
         LDY   #$000E
         STA   [$EC],Y
         PEI   $EE
         PEI   $EC
         LDY   #$0006
         LDA   [$EC],Y
         TAX
         LDY   #$0004
         LDA   [$EC],Y
         STA   $F0
         STX   $F2
         LDY   #$000E
         LDA   [$F0],Y
         TAX
         LDY   #$000C
         LDA   [$F0],Y
         STA   $F0
         STX   $F2
         LDA   $F0
         LDX   $F2
         JSL   LBAD5
         PLY
         PLY
         STA   $EA
         LDA   $EA
         CMP   #$0000
         BEQ   LCD89
         LDY   #$0002
         LDA   [$EC],Y
         PHA
         PEI   $EA
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
         BRA   LCD97
LCD89    LDY   #$000C
         LDA   [$EC],Y
         PHA
         LDA   $FF
         PLX
         STX   $F0
         SEC
         SBC   $F0
LCD97    TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

LCDA1    DW    $0000
         DW    $FFFF
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
         ADRL  LD587
LCDE5    ORA   ($00,X)
LCDE7    PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00DE
         TCS
         STZ   $EC
         STZ   $EE
         STZ   $E8
         STZ   $EA
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $FB
         LDA   $F9
         JSL   LBD97
         BEQ   LCE8B
         PHX
         PHA
         PEI   $FB
         PEI   $F9
         _FindHandle
         STAL  L013C
         PLA
         PLX
         STX   $EE
         STA   $EC
         PHX
         PHA
         PEI   $EE
         PEI   $EC
         _GetHandleSize
         STAL  L013C
         PLA
         PLX
         STX   $EA
         STA   $E8
         SEC
         LDA   $FD
         SBC   $E8
         BNE   LCE47
         LDA   $FF
         SBC   $EA
         BRA   LCE4D
LCE47    LDA   $FF
         SBC   $EA
         REP   #$02
LCE4D    BVS   LCE52
         EOR   #$8000
LCE52    BMI   LCE7C
         PEI   $EE
         PEI   $EC
         PEI   $FF
         PEI   $FD
         _SetHandleSize
         STAL  L013C
         LDY   #$0002
         LDA   [$EC],Y
         TAX
         LDA   [$EC]
         AND   #$FFFF
         PHA
         TXA
         AND   #$00FF
         TAX
         PLA
         BRL   LCF9C
LCE7C    PEI   $EE
         PEI   $EC
         _HUnlock
         STAL  L013C
LCE8B    PHX
         PHA
         LDX   $FF
         LDA   $FD
         PHX
         PHA
         LDA   L013E
         ORA   #$0F00
         PHA
         PEA   $8300
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L013C
         PLA
         PLX
         STX   $E6
         STA   $E4
         LDA   L013C
         BEQ   LCEE3
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         JSL   LBD97
         BEQ   LCEDA
         PEI   $EE
         PEI   $EC
         _HLock
         STAL  L013C
LCEDA    LDX   #$0000
         LDA   #$0000
         BRL   LCF9C
LCEE3    PEI   $E6
         PEI   $E4
         _HLock
         STAL  L013C
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $FB
         LDA   $F9
         JSL   LBD97
         BEQ   LCF36
         LDY   #$0002
         LDA   [$EC],Y
         TAX
         LDA   [$EC]
         PHX
         PHA
         LDY   #$0002
         LDA   [$E4],Y
         TAX
         LDA   [$E4]
         PHX
         PHA
         PEI   $EA
         PEI   $E8
         _BlockMove
         STAL  L013C
         PEI   $EE
         PEI   $EC
         _DisposeHandle
         STAL  L013C
LCF36    LDX   $EA
         LDA   $E8
         PHX
         PHA
         LDY   #$0002
         LDA   [$E4],Y
         TAX
         LDA   [$E4]
         JSL   LB28B
         PLA
         PLX
         STX   $E2
         STA   $E0
LCF4E    LDX   $FF
         LDA   $FD
         PHX
         PHA
         LDY   #$0002
         LDA   [$E4],Y
         TAX
         LDA   [$E4]
         JSL   LB28B
         LDX   $E2
         LDA   $E0
         JSL   LBD97
         BEQ   LCF8A
         BVS   LCF6F
         EOR   #$8000
LCF6F    BPL   LCF8A
         LDX   $E2
         LDA   $E0
         INC   $E0
         BNE   LCF7B
         INC   $E2
LCF7B    STA   $F0
         STX   $F2
         LDA   #$0000
         SEP   #$20
         STA   [$F0]
         REP   #$20
         BRA   LCF4E
LCF8A    LDY   #$0002
         LDA   [$E4],Y
         TAX
         LDA   [$E4]
         AND   #$FFFF
         PHA
         TXA
         AND   #$00FF
         TAX
         PLA
LCF9C    TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

LCFA6    ASC   'SYSF'
         ADRL  LDDE2
         ADRL  LD134
         ADRL  LDC2D
         ADRL  LD75E
         ADRL  LD1DF
         ASC   'SNOC'
         ADRL  LDD83
         ADRL  LD01E
         ADRL  LDB38
         ADRL  LD5FF
         ADRL  LD11C
         ASC   'TSYS'
         ADRL  LDF68
         ADRL  LD746
         ADRL  LDD6B
         ADRL  LDA97
         ADRL  LD92C
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         MX    %00
LD01E    PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F6
         TCS
         LDA   #$0000
         TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

LD036    PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E8
         TCS
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   LD04C
         EOR   #$8000
LD04C    BMI   LD060
         PEA   $0000
         PEA   $0016
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
         BRL   LD112
LD060    PEA   $0000
         TDC
         CLC
         ADC   #$00F9
         PHA
         JSL   LBE1C
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         JSL   LBD97
         BNE   LD08B
         LDA   #$FFFF
         BRL   LD112
LD08B    LDA   [$EC]
         AND   #$0002
         TAY
         BNE   LD0A4
         PEA   $0000
         PEA   $0009
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
         BRA   LD112
LD0A4    LDA   $FF
         LDY   #$000C
         STA   [$EC],Y
         LDX   $FD
         LDA   $FB
         LDY   #$0010
         PHA
         TXA
         STA   [$EC],Y
         PLA
         LDY   #$000E
         STA   [$EC],Y
         PEI   $EE
         PEI   $EC
         LDY   #$0006
         LDA   [$EC],Y
         TAX
         LDY   #$0004
         LDA   [$EC],Y
         STA   $F0
         STX   $F2
         LDY   #$0012
         LDA   [$F0],Y
         TAX
         LDY   #$0010
         LDA   [$F0],Y
         STA   $F0
         STX   $F2
         LDA   $F0
         LDX   $F2
         JSL   LBAD5
         PLY
         PLY
         STA   $EA
         LDA   $EA
         CMP   #$0000
         BEQ   LD104
         LDY   #$0002
         LDA   [$EC],Y
         PHA
         PEI   $EA
         JSL   LC0EB
         PLY
         PLY
         LDA   #$FFFF
         BRA   LD112
LD104    LDY   #$000C
         LDA   [$EC],Y
         PHA
         LDA   $FF
         PLX
         STX   $F0
         SEC
         SBC   $F0
LD112    TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

LD11C    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EC
         TCS
         LDA   #$0000
         TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

LD134    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDY   #$000A
         LDA   [$FD],Y
         TAX
         LDY   #$0008
         LDA   [$FD],Y
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         TAX
         LDA   [$F4]
         STA   $F4
         STX   $F6
         LDA   [$F4]
         DEC
         STA   [$F4]
         SEC
         SBC   #$0000
         BEQ   LD16C
         BVS   LD16A
         EOR   #$8000
LD16A    BMI   LD1C5
LD16C    LDY   #$000A
         LDA   [$FD],Y
         TAX
         LDY   #$0008
         LDA   [$FD],Y
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         TAX
         LDA   [$F4]
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         STAL  LBBEE
         PEA   $0014
         PEA   ^LBBEE
         PEA   LBBEE
         JSL   LBA97
         LDA   L013C
         CMP   #$0000
         BEQ   LD1AD
         LDA   L013C
         LDY   #$0002
         STA   [$FD],Y
LD1AD    LDY   #$000A
         LDA   [$FD],Y
         TAX
         LDY   #$0008
         LDA   [$FD],Y
         PHX
         PHA
         _DisposeHandle
         STAL  L013C
LD1C5    LDA   L013C
         CMP   #$0000
         BNE   LD1D2
         LDA   #$0000
         BRA   LD1D5
LD1D2    LDA   #$0009
LD1D5    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LD1DF    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E8
         TCS
         LDA   $FB
         BRL   LD54C
LD1EF    LDA   #$0000
         LDY   #$0002
         STA   [$F7],Y
         LDA   #$0016
         BRL   LD57D
LD1FD    LDY   #$000A
         LDA   [$F7],Y
         TAX
         LDY   #$0008
         LDA   [$F7],Y
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         TAX
         LDA   [$EE]
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         STA   $EC
         LDA   $EC
         STAL  LBC02
         PEA   $0019
         PEA   ^LBC02
         PEA   LBC02
         JSL   LBA97
         LDA   L013C
         CMP   #$0000
         BEQ   LD240
         LDA   #$001D
         BRL   LD57D
LD240    LDA   $EC
         STAL  LBBFC
         LDA   [$FD]
         BRL   LD2E9
LD24B    LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHA
         TXA
         STAL  LBC00
         PLA
         STAL  LBBFE
         BRL   LD2F6
LD264    PEA   $0017
         PEA   ^LBBFC
         PEA   LBBFC
         JSL   LBA97
         LDA   L013C
         CMP   #$0000
         BEQ   LD27C
         BRL   LD2F6
LD27C    LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         LDAL  LBC00
         TAX
         LDAL  LBBFE
         JSL   LB28B
         PLA
         PLX
         PHA
         TXA
         STAL  LBC00
         PLA
         STAL  LBBFE
         BRL   LD2F6
LD2A6    LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         LDAL  LBC06
         TAX
         LDAL  LBC04
         JSL   LB28B
         PLA
         PLX
         PHA
         TXA
         STAL  LBC00
         PLA
         STAL  LBBFE
         BRL   LD2F6
LD2D0    LDA   #$0000
         LDY   #$0002
         STA   [$F7],Y
         LDA   #$0016
         BRL   LD57D
         BRL   LD2F6
LD2E1    DA    LD24B
         DA    LD264
         DA    LD2A6
         DA    LD2D0
LD2E9    CMP   #$0003
         BCC   LD2F1
         LDA   #$0003
LD2F1    ASL
         TAX
         JMP   (LD2E1,X)

LD2F6    LDA   L013C
         CMP   #$0000
         BEQ   LD308
         LDA   [$FD]
         CMP   #$0000
         BEQ   LD308
         BRL   LD39A
LD308    SEC
         LDAL  LBBFE
         SBCL  LBC04
         BNE   LD31D
         LDAL  LBC00
         SBCL  LBC06
         BRA   LD327
LD31D    LDAL  LBC00
         SBCL  LBC06
         REP   #$02
LD327    BNE   LD32C
         BRL   LD38D
LD32C    BVS   LD331
         EOR   #$8000
LD331    BMI   LD336
         BRL   LD38D
LD336    LDA   [$FD]
         CMP   #$0002
         BEQ   LD35E
         LDA   $EC
         STAL  LBC02
         PEA   $0019
         PEA   ^LBC02
         PEA   LBC02
         JSL   LBA97
         LDA   L013C
         CMP   #$0000
         BEQ   LD35E
         LDA   #$001D
         BRL   LD57D
LD35E    LDAL  LBC00
         TAX
         LDAL  LBBFE
         PHA
         TXA
         STAL  LBC06
         PLA
         STAL  LBC04
         PEA   $0018
         PEA   ^LBC02
         PEA   LBC02
         JSL   LBA97
         LDA   L013C
         CMP   #$0000
         BEQ   LD38D
         LDA   #$001D
         BRL   LD57D
LD38D    PEA   $0016
         PEA   ^LBBFC
         PEA   LBBFC
         JSL   LBA97
LD39A    LDA   L013C
         CMP   #$0000
         BEQ   LD3B0
         LDA   L013C
         LDY   #$0002
         STA   [$F7],Y
         LDA   #$001D
         BRL   LD57D
LD3B0    LDAL  LBC00
         TAX
         LDAL  LBBFE
         LDY   #$0004
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0002
         STA   [$FD],Y
         BRL   LD55D
LD3C9    LDY   #$000A
         LDA   [$F7],Y
         TAX
         LDY   #$0008
         LDA   [$F7],Y
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         TAX
         LDA   [$EE]
         STA   $EE
         STX   $F0
         LDA   [$EE]
         INC
         STA   [$EE]
         BRL   LD55D
LD3EC    LDA   #$0000
         LDY   #$0002
         STA   [$F7],Y
         LDA   #$0016
         BRL   LD57D
LD3FA    LDY   #$000A
         LDA   [$F7],Y
         TAX
         LDY   #$0008
         LDA   [$F7],Y
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         TAX
         LDA   [$EE]
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         STA   [$FD]
         BRL   LD55D
LD41F    LDY   #$000A
         LDA   [$F7],Y
         TAX
         LDY   #$0008
         LDA   [$F7],Y
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         TAX
         LDA   [$EE]
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         STAL  LBC02
         PEA   $0019
         PEA   ^LBC02
         PEA   LBC02
         JSL   LBA97
         LDAL  LBC06
         TAX
         LDAL  LBC04
         LDY   #$0002
         PHA
         TXA
         STA   [$FD],Y
         PLA
         STA   [$FD]
         BRL   LD55D
LD466    LDY   #$000A
         LDA   [$F7],Y
         TAX
         LDY   #$0008
         LDA   [$F7],Y
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         TAX
         LDA   [$EE]
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         STAL  LBC02
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBC06
         PLA
         STAL  LBC04
         PEA   $0018
         PEA   ^LBC02
         PEA   LBC02
         JSL   LBA97
         BRL   LD55D
LD4A9    LDY   #$000A
         LDA   [$F7],Y
         TAX
         LDY   #$0008
         LDA   [$F7],Y
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         TAX
         LDA   [$EE]
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         STAL  LBBFC
         PEA   $0017
         PEA   ^LBBFC
         PEA   LBBFC
         JSL   LBA97
         LDAL  LBC00
         TAX
         LDAL  LBBFE
         LDY   #$0002
         PHA
         TXA
         STA   [$FD],Y
         PLA
         STA   [$FD]
         BRL   LD55D
LD4F0    LDY   #$000A
         LDA   [$F7],Y
         TAX
         LDY   #$0008
         LDA   [$F7],Y
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         TAX
         LDA   [$EE]
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         STAL  LBBFC
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBC00
         PLA
         STAL  LBBFE
         PEA   $0016
         PEA   ^LBBFC
         PEA   LBBFC
         JSL   LBA97
         BRL   LD55D
         BRL   LD55D
LD536    DA    LD1FD
         DA    LD3C9
         DA    LD1EF
         DA    LD3EC
         DA    LD1EF
         DA    LD3FA
         DA    LD466
         DA    LD41F
         DA    LD4F0
         DA    LD4A9
         DA    LD1EF
LD54C    SEC
         SBC   #$6600
         CMP   #$000A
         BCC   LD558
         LDA   #$000A
LD558    ASL
         TAX
         JMP   (LD536,X)

LD55D    LDA   L013C
         CMP   #$0000
         BEQ   LD56D
         LDA   L013C
         LDY   #$0002
         STA   [$F7],Y
LD56D    LDA   L013C
         CMP   #$0000
         BNE   LD57A
         LDA   #$0000
         BRA   LD57D
LD57A    LDA   #$0016
LD57D    TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

LD587    PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EE
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDAL  LAE02
         TAX
         LDAL  LAE00
         JSL   LBD97
         BNE   LD5BA
         LDA   #LCDA1
         LDX   #^LCDA1
         PHA
         TXA
         STAL  LAE02
         PLA
         STAL  LAE00
LD5BA    LDAL  LAE02
         TAX
         LDAL  LAE00
         STA   $F2
         STX   $F4
         LDA   #$0000
         LDY   #$0002
         STA   [$F2],Y
         LDA   #$0001
         STA   $F0
         BRA   LD5DD
LD5D6    LDA   $FB
         LSR
         STA   $FB
         INC   $F0
LD5DD    LDA   $FB
         AND   #$0001
         CMP   #$0000
         BEQ   LD5D6
         LDA   $F0
         PHA
         LDA   #$0018
         CLC
         JSL   LDB29
         JSL   LB9E5
         PLY
         TDC
         CLC
         ADC   #$00F5
         TCS
         PLD
         RTL

LD5FF    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDY   #$000A
         LDA   [$FD],Y
         TAX
         LDY   #$0008
         LDA   [$FD],Y
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         TAX
         LDA   [$F4]
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         CMP   #$0002
         BNE   LD69B
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         PHX
         PHA
         PEA   $0000
         LDY   #$000C
         LDA   [$FD],Y
         PHA
         _ErrWriteBlock
         STAL  L013C
         LDY   #$000C
         LDA   [$FD],Y
         SEC
         SBC   #$0001
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LD66F
         DEC   $F6
LD66F    CLC
         ADC   $F4
         STA   $F4
         BCC   LD678
         INC   $F6
LD678    LDA   [$F4]
         AND   #$00FF
         CMP   #$000A
         BNE   LD699
         PEA   ^LD993
         PEA   LD993
         PEA   $0000
         PEA   $0001
         _ErrWriteBlock
         STAL  L013C
LD699    BRA   LD705
LD69B    LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         PHX
         PHA
         PEA   $0000
         LDY   #$000C
         LDA   [$FD],Y
         PHA
         _TextWriteBlock
         STAL  L013C
         LDY   #$000C
         LDA   [$FD],Y
         SEC
         SBC   #$0001
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LD6DB
         DEC   $F6
LD6DB    CLC
         ADC   $F4
         STA   $F4
         BCC   LD6E4
         INC   $F6
LD6E4    LDA   [$F4]
         AND   #$00FF
         CMP   #$000A
         BNE   LD705
         PEA   ^LD995
         PEA   LD995
         PEA   $0000
         PEA   $0001
         _TextWriteBlock
         STAL  L013C
LD705    LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   LD711
         DEX
LD711    PHX
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         JSL   LB28B
         PLA
         PLX
         LDY   #$0010
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$000E
         STA   [$FD],Y
         LDA   #$0000
         LDY   #$000C
         STA   [$FD],Y
         LDA   #$0000
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LD746    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDA   #$0000
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LD75E    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDA   [$FD]
         AND   #$0008
         TAY
         BNE   LD774
         BRL   LD80B
LD774    LDY   #$000A
         LDA   [$FD],Y
         TAX
         LDY   #$0008
         LDA   [$FD],Y
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         TAX
         LDA   [$F4]
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         STAL  LBC02
         PEA   $0019
         PEA   ^LBC02
         PEA   LBC02
         JSL   LBA97
         LDA   L013C
         CMP   #$0000
         BEQ   LD7B0
         BRL   LD80B
LD7B0    LDY   #$000A
         LDA   [$FD],Y
         TAX
         LDY   #$0008
         LDA   [$FD],Y
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         TAX
         LDA   [$F4]
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         STAL  LBBFC
         LDAL  LBC06
         TAX
         LDAL  LBC04
         PHA
         TXA
         STAL  LBC00
         PLA
         STAL  LBBFE
         PEA   $0016
         PEA   ^LBBFC
         PEA   LBBFC
         JSL   LBA97
         LDA   L013C
         CMP   #$0000
         BEQ   LD80B
         LDA   L013C
         LDY   #$0002
         STA   [$FD],Y
         LDA   #$001D
         BRL   LD922
LD80B    LDA   [$FD]
         AND   #$0020
         TAY
         BNE   LD85B
         LDY   #$000C
         LDA   [$FD],Y
         STA   $F2
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         STX   $F0
         STA   $EE
         BRA   LD84C
LD82B    LDA   [$EE]
         AND   #$00FF
         CMP   #$000A
         BNE   LD83E
         LDA   #$000D
         SEP   #$20
         STA   [$EE]
         REP   #$20
LD83E    LDA   $F2
         DEC   $F2
         LDX   $F0
         LDA   $EE
         INC   $EE
         BNE   LD84C
         INC   $F0
LD84C    LDA   $F2
         SEC
         SBC   #$0000
         BEQ   LD85B
         BVS   LD859
         EOR   #$8000
LD859    BMI   LD82B
LD85B    LDY   #$000A
         LDA   [$FD],Y
         TAX
         LDY   #$0008
         LDA   [$FD],Y
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         TAX
         LDA   [$F4]
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         STAL  LBBEE
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   LD88B
         DEX
LD88B    PHA
         TXA
         STAL  LBBF6
         PLA
         STAL  LBBF4
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         PHA
         TXA
         STAL  LBBF2
         PLA
         STAL  LBBF0
         PEA   $0013
         PEA   ^LBBEE
         PEA   LBBEE
         JSL   LBA97
         LDA   L013C
         CMP   #$0000
         BNE   LD90A
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   LD8CD
         DEX
LD8CD    SEC
         SBCL  LBBF8
         PHA
         TXA
         SBCL  LBBFA
         TAX
         PLA
         LDY   #$000C
         STA   [$FD],Y
         LDAL  LBBFA
         TAX
         LDAL  LBBF8
         PHX
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         JSL   LB28B
         PLA
         PLX
         LDY   #$0010
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$000E
         STA   [$FD],Y
         BRA   LD912
LD90A    LDA   L013C
         LDY   #$0002
         STA   [$FD],Y
LD912    LDA   L013C
         CMP   #$0000
         BNE   LD91F
         LDA   #$0000
         BRA   LD922
LD91F    LDA   #$0005
LD922    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LD92C    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EC
         TCS
         LDA   $FB
         BRL   LD96F
LD93C    LDA   #$0000
         STA   [$FD]
         LDX   #$0000
         LDA   #$0000
         LDY   #$0004
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0002
         STA   [$FD],Y
         LDA   #$0000
         BRL   LD980
LD95A    LDA   #$0000
         BRL   LD980
LD960    LDA   #$0016
         BRL   LD980
         BRL   LD980
LD969    DA    LD93C
         DA    LD95A
         DA    LD960
LD96F    SEC
         SBC   #$6600
         CMP   #$0002
         BCC   LD97B
         LDA   #$0002
LD97B    ASL
         TAX
         JMP   (LD969,X)

LD980    TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

LD98A    ASC   '.console'00
LD993    ASC   0D00
LD995    ASC   0D00
LD997    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LDA97    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   LDAAE
         DEX
LDAAE    PHX
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         JSL   LB28B
         PLA
         PLX
         LDY   #$0010
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$000E
         STA   [$FD],Y
         LDA   #$0000
         LDY   #$000C
         STA   [$FD],Y
         LDA   #$0000
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LDAE3    TAY
         PHB
         LDA   $06,S
         PHA
         PLB
         PLB
         PHY
         PHY
         PEA   $0000
         TXA
         CMP   ($0B,S),Y
         BEQ   LDB23
         LDY   #$0000
         CMP   ($0B,S),Y
         BEQ   LDB23
         BRA   LDB00
LDAFD    TYA
         STA   $03,S
LDB00    LDA   $03,S
         CMP   $01,S
         BEQ   LDB1E
         CLC
         ADC   $01,S
         LSR
         AND   #$00FE
         CMP   $01,S
         BEQ   LDB1E
         TAY
         TXA
         CMP   ($0B,S),Y
         BEQ   LDB23
         BCC   LDAFD
         TYA
         STA   $01,S
         BRA   LDB00
LDB1E    LDA   $05,S
         INC
         INC
         TAY
LDB23    TYX
         PLA
         PLA
         PLA
         PLB
         RTL

LDB29    CMP   #$0000
         BEQ   LDB37
         TAX
         LDA   $04,S
LDB31    ASL
         DEX
         BNE   LDB31
         STA   $04,S
LDB37    RTL

LDB38    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDA   LDF62
         SEC
         SBC   #$0000
         BEQ   LDB53
         BVS   LDB51
         EOR   #$8000
LDB51    BMI   LDB72
LDB53    PEA   $0100
         PEA   ^LD997
         PEA   LD997
         JSL   LE112
         PLY
         PLY
         PLY
         STA   LDF62
         LDA   #LD997
         LDX   #^LD997
         STX   LDF66
         STA   LDF64
LDB72    LDY   #$000C
         LDA   [$FD],Y
         SEC
         SBC   #$0000
         BNE   LDB80
         BRL   LDC20
LDB80    BVS   LDB85
         EOR   #$8000
LDB85    BMI   LDB8A
         BRL   LDC20
LDB8A    LDA   LDF62
         SEC
         SBC   #$0000
         BNE   LDB96
         BRL   LDC20
LDB96    BVS   LDB9B
         EOR   #$8000
LDB9B    BMI   LDBA0
         BRL   LDC20
LDBA0    LDX   LDF66
         LDA   LDF64
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         CMP   #$0000
         BNE   LDBB7
         BRL   LDC20
LDBB7    LDX   LDF66
         LDA   LDF64
         PHX
         PHA
         CLC
         ADC   #$0001
         STA   LDF64
         LDA   LDF66
         BCC   LDBCC
         INC
LDBCC    STA   LDF66
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         PHX
         PHA
         CLC
         ADC   #$0001
         LDY   #$000E
         STA   [$FD],Y
         LDY   #$0010
         LDA   [$FD],Y
         BCC   LDBF9
         INC
LDBF9    LDY   #$0010
         STA   [$FD],Y
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
         LDY   #$000C
         LDA   [$FD],Y
         DEC
         LDY   #$000C
         STA   [$FD],Y
         LDA   LDF62
         DEC
         STA   LDF62
         BRL   LDB72
LDC20    LDA   #$0000
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LDC2D    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EA
         TCS
         LDY   #$000A
         LDA   [$FD],Y
         TAX
         LDY   #$0008
         LDA   [$FD],Y
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         TAX
         LDA   [$F4]
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         STAL  LBBEE
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   LDC68
         DEX
LDC68    PHA
         TXA
         STAL  LBBF6
         PLA
         STAL  LBBF4
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         PHA
         TXA
         STAL  LBBF2
         PLA
         STAL  LBBF0
         PEA   $0012
         PEA   ^LBBEE
         PEA   LBBEE
         JSL   LBA97
         LDA   [$FD]
         AND   #$0020
         TAY
         BNE   LDCEA
         LDAL  LBBFA
         TAX
         LDAL  LBBF8
         STA   $F0
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         STX   $EE
         STA   $EC
         BRA   LDCDB
LDCBA    LDA   [$EC]
         AND   #$00FF
         CMP   #$000D
         BNE   LDCCD
         LDA   #$000A
         SEP   #$20
         STA   [$EC]
         REP   #$20
LDCCD    LDA   $F0
         DEC   $F0
         LDX   $EE
         LDA   $EC
         INC   $EC
         BNE   LDCDB
         INC   $EE
LDCDB    LDA   $F0
         SEC
         SBC   #$0000
         BEQ   LDCEA
         BVS   LDCE8
         EOR   #$8000
LDCE8    BMI   LDCBA
LDCEA    LDA   L013C
         CMP   #$004C
         BNE   LDCF6
         STZ   $F2
         BRA   LDCFB
LDCF6    LDA   L013C
         STA   $F2
LDCFB    LDA   $F2
         CMP   #$0000
         BNE   LDD4B
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   LDD0E
         DEX
LDD0E    SEC
         SBCL  LBBF8
         PHA
         TXA
         SBCL  LBBFA
         TAX
         PLA
         LDY   #$000C
         STA   [$FD],Y
         LDAL  LBBFA
         TAX
         LDAL  LBBF8
         PHX
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         JSL   LB28B
         PLA
         PLX
         LDY   #$0010
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$000E
         STA   [$FD],Y
         BRA   LDD52
LDD4B    LDA   $F2
         LDY   #$0002
         STA   [$FD],Y
LDD52    LDA   $F2
         CMP   #$0000
         BNE   LDD5E
         LDA   #$0000
         BRA   LDD61
LDD5E    LDA   #$0005
LDD61    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LDD6B    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDA   #$0000
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LDD83    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EC
         TCS
         LDA   #$0000
         BEQ   LDD98
         LDA   #$0000
         BRA   LDD9B
LDD98    LDA   #$0001
LDD9B    PHA
         PEA   $0000
         PEA   ^LD98A
         PEA   LD98A
         PEI   $F9
         PEI   $F7
         JSL   LB199
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BNE   LDDBE
         LDA   #$FFFF
         BRL   LDDD8
LDDBE    LDA   $FB
         BRL   LDDD0
LDDC3    LDA   #$4016
         BRL   LDDD8
LDDC9    LDA   #$0000
         BRA   LDDD8
         BRA   LDDD8
LDDD0    CMP   #$6400
         BEQ   LDDC9
         JMP   LDDC3

LDDD8    TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

LDDE2    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EC
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F9
         LDA   $F7
         JSL   LBD97
         BEQ   LDE09
         LDA   [$F7]
         AND   #$00FF
         CMP   #$0000
         BNE   LDE0F
LDE09    LDA   #$4016
         BRL   LDF58
LDE0F    LDA   $FB
         BRL   LDF25
LDE14    LDA   #$4016
         BRL   LDF58
LDE1A    PEI   $F9
         PEI   $F7
         PEI   $FF
         PEI   $FD
         JSL   LE272
         PLY
         PLY
         PLY
         PLY
         BRL   LDF58
LDE2D    PEI   $F9
         PEI   $F7
         JSL   LB0E1
         PLY
         PLY
         LDX   $F9
         LDA   $F7
         PHA
         TXA
         STAL  LBBC4
         PLA
         STAL  LBBC2
         PEA   $0002
         PEA   ^LBBC2
         PEA   LBBC2
         JSL   LBA97
         PEI   $F9
         PEI   $F7
         JSL   LCA77
         PLY
         PLY
         BRL   LDF36
LDE60    PEI   $F9
         PEI   $F7
         JSL   LB0E1
         PLY
         PLY
         PEI   $FF
         PEI   $FD
         JSL   LB0E1
         PLY
         PLY
         LDX   $F9
         LDA   $F7
         PHA
         TXA
         STAL  LBBC4
         PLA
         STAL  LBBC2
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBBC8
         PLA
         STAL  LBBC6
         PEA   $0004
         PEA   ^LBBC2
         PEA   LBBC2
         JSL   LBA97
         PEI   $F9
         PEI   $F7
         JSL   LCA77
         PLY
         PLY
         PEI   $FF
         PEI   $FD
         JSL   LCA77
         PLY
         PLY
         BRL   LDF36
LDEB6    PEI   $F9
         PEI   $F7
         JSL   LB0E1
         PLY
         PLY
         LDX   $F9
         LDA   $F7
         PHA
         TXA
         STAL  LBBCC
         PLA
         STAL  LBBCA
         PEA   $0006
         PEA   ^LBBCA
         PEA   LBBCA
         JSL   LBA97
         LDA   $FB
         CMP   #$6403
         BNE   LDEED
         LDX   $FF
         LDA   $FD
         STAL  LBBD0
         BRA   LDEFC
LDEED    LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBBD4
         PLA
         STAL  LBBD2
LDEFC    PEA   $0005
         PEA   ^LBBCA
         PEA   LBBCA
         JSL   LBA97
         PEI   $F9
         PEI   $F7
         JSL   LCA77
         PLY
         PLY
         BRL   LDF36
         BRL   LDF36
LDF19    DA    LDE1A
         DA    LDE2D
         DA    LDE60
         DA    LDEB6
         DA    LDEB6
         DA    LDE14
LDF25    SEC
         SBC   #$6400
         CMP   #$0005
         BCC   LDF31
         LDA   #$0005
LDF31    ASL
         TAX
         JMP   (LDF19,X)

LDF36    LDA   L013C
         CMP   #$0000
         BNE   LDF43
         LDA   #$0000
         BRA   LDF58
LDF43    LDA   L013C
         PHA
         LDA   #$8000
         PLX
         STX   $EE
         ORA   $EE
         PHA
         LDA   #$4000
         PLX
         STX   $EE
         ORA   $EE
LDF58    TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

LDF62    DW    $0000
LDF64    DW    $0000
LDF66    DW    $0000
LDF68    PHD              ; PHD TSC
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E6
         TCS
         LDA   #$0000
         BEQ   LDF7D
         LDA   #$0000
         BRA   LDF80
LDF7D    LDA   #$0001
LDF80    PHA
         PEA   $0000
         PEA   ^LE255
         PEA   LE255
         PEI   $F9
         PEI   $F7
         JSL   LB199
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BEQ   LDFA3
         LDA   #$0000
         BRL   LE108
LDFA3    LDA   #$0000
         BEQ   LDFAD
         LDA   #$0000
         BRA   LDFB0
LDFAD    LDA   #$0001
LDFB0    PHA
         PEA   $0000
         PEA   ^LE25B
         PEA   LE25B
         PEI   $F9
         PEI   $F7
         JSL   LB199
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BEQ   LDFD2
         STZ   $EC
         BRL   LE03A
LDFD2    LDA   #$0000
         BEQ   LDFDC
         LDA   #$0000
         BRA   LDFDF
LDFDC    LDA   #$0001
LDFDF    PHA
         PEA   $0000
         PEA   ^LE262
         PEA   LE262
         PEI   $F9
         PEI   $F7
         JSL   LB199
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BEQ   LE003
         LDA   #$0001
         STA   $EC
         BRA   LE03A
LE003    LDA   #$0000
         BEQ   LE00D
         LDA   #$0000
         BRA   LE010
LE00D    LDA   #$0001
LE010    PHA
         PEA   $0000
         PEA   ^LE26A
         PEA   LE26A
         PEI   $F9
         PEI   $F7
         JSL   LB199
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BEQ   LE034
         LDA   #$0002
         STA   $EC
         BRA   LE03A
LE034    LDA   #$FFFF
         BRL   LE108
LE03A    LDA   $FB
         CMP   #$6400
         BEQ   LE047
         LDA   #$4016
         BRL   LE108
LE047    LDA   [$FD]
         AND   #$0500
         CMP   #$0500
         BNE   LE057
         LDA   #$4011
         BRL   LE108
LE057    PEA   $0000
         TDC
         CLC
         ADC   #$00EC
         PHA
         JSL   LBE1C
         PLY
         PLY
         STX   $EA
         STA   $E8
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EA
         LDA   $E8
         JSL   LBD97
         BNE   LE082
         LDA   #$4009
         BRL   LE108
LE082    LDA   [$FD]
         PHA
         LDA   [$E8]
         PLX
         STX   $EE
         AND   $EE
         AND   #$0003
         PHA
         LDA   [$FD]
         AND   #$0003
         PLX
         STX   $EE
         CMP   $EE
         BEQ   LE0A1
         LDA   #$400D
         BRA   LE108
LE0A1    PEA   $0000
         PEA   $6601
         PEI   $EA
         PEI   $E8
         LDY   #$0006
         LDA   [$E8],Y
         TAX
         LDY   #$0004
         LDA   [$E8],Y
         STA   $EE
         STX   $F0
         LDY   #$0016
         LDA   [$EE],Y
         TAX
         LDY   #$0014
         LDA   [$EE],Y
         STA   $EE
         STX   $F0
         LDA   $EE
         LDX   $F0
         JSL   LBAD5
         PLY
         PLY
         PLY
         PLY
         LDY   #$0006
         LDA   [$E8],Y
         TAX
         LDY   #$0004
         LDA   [$E8],Y
         LDY   #$0006
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0004
         STA   [$FD],Y
         LDY   #$000A
         LDA   [$E8],Y
         TAX
         LDY   #$0008
         LDA   [$E8],Y
         LDY   #$000A
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0008
         STA   [$FD],Y
         LDA   #$0000
LE108    TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

LE112    PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00ED
         TCS
         STZ   $F0
LE11F    LDA   $F0
         SEC
         SBC   $FF
         BVS   LE129
         EOR   #$8000
LE129    BPL   LE12E
         BRL   LE249
LE12E    PHA
         PEA   $0001
         _ReadChar
         STAL  L013C
         PLA
         SEP   #$20
         STA   $EF
         REP   #$20
         AND   #$00FF
         PHA
         LDX   $FD
         LDA   $FB
         INC   $FB
         BNE   LE152
         INC   $FD
LE152    STA   $F2
         STX   $F4
         PLA
         SEP   #$20
         STA   [$F2]
         REP   #$20
         INC   $F0
         LDA   $EF
         AND   #$00FF
         CMP   #$000D
         BNE   LE199
         LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDX   $FD
         LDA   $FB
         JSL   LB5D5
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$000A
         SEP   #$20
         STA   [$F2]
         REP   #$20
         PEA   $000A
         _WriteChar
         STAL  L013C
         BRL   LE249
LE199    LDA   $EF
         AND   #$00FF
         CMP   #$0000
         BNE   LE1C2
         PEA   $000D
         _WriteChar
         STAL  L013C
         PEA   $000A
         _WriteChar
         STAL  L013C
         BRL   LE249
LE1C2    LDA   $EF
         AND   #$00FF
         CMP   #$007F
         BEQ   LE1CF
         BRL   LE246
LE1CF    LDA   $FB
         BNE   LE1D5
         DEC   $FD
LE1D5    DEC   $FB
         DEC   $F0
         PEA   $0008
         _WriteChar
         STAL  L013C
         PEA   $0020
         _WriteChar
         STAL  L013C
         PEA   $0008
         _WriteChar
         STAL  L013C
         LDA   $F0
         SEC
         SBC   #$0000
         BEQ   LE246
         BVS   LE210
         EOR   #$8000
LE210    BPL   LE246
         LDA   $FB
         BNE   LE218
         DEC   $FD
LE218    DEC   $FB
         DEC   $F0
         PEA   $0008
         _WriteChar
         STAL  L013C
         PEA   $0020
         _WriteChar
         STAL  L013C
         PEA   $0008
         _WriteChar
         STAL  L013C
LE246    BRL   LE11F
LE249    LDA   $F0
         TAY
         TDC
         CLC
         ADC   #$00F5
         TCS
         TYA
         PLD
         RTL

LE255    ASC   '.null'00
LE25B    ASC   '.stdin'00
LE262    ASC   '.stdout'00
LE26A    ASC   '.stderr'00
LE272    PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E8
         TCS
         STZ   $EC
         PEI   $FF
         PEI   $FD
         JSL   LB0E1
         PLY
         PLY
         LDA   [$F9]
         STA   $EE
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBBCC
         PLA
         STAL  LBBCA
         PEA   $0006
         PEA   ^LBBCA
         PEA   LBBCA
         JSL   LBA97
         LDA   L013C
         CMP   #$0000
         BEQ   LE2B4
         BRL   LE36A
LE2B4    LDA   $EE
         AND   #$0500
         CMP   #$0500
         BNE   LE2C6
         LDA   #$0011
         STA   $EC
         BRL   LE367
LE2C6    LDA   $EE
         AND   #$0001
         TAY
         BEQ   LE2D8
         LDAL  LBBCE
         AND   #$0001
         TAY
         BEQ   LE2EA
LE2D8    LDA   $EE
         AND   #$0002
         TAY
         BEQ   LE2F2
         LDAL  LBBCE
         AND   #$0002
         TAY
         BNE   LE2F2
LE2EA    LDA   #$000D
         STA   $EC
         BRL   LE367
LE2F2    LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBBE8
         PLA
         STAL  LBBE6
         PEA   $0010
         PEA   ^LBBE4
         PEA   LBBE4
         JSL   LBA97
         LDA   L013C
         CMP   #$0000
         BEQ   LE319
         BRL   LE367
LE319    LDA   $EE
         AND   #$0200
         TAY
         BNE   LE324
         BRL   LE367
LE324    LDX   #$0000
         LDA   #$0000
         PHA
         TXA
         STAL  LBC06
         PLA
         STAL  LBC04
         LDAL  LBBE4
         STAL  LBC02
         PEA   $0018
         PEA   ^LBC02
         PEA   LBC02
         JSL   LBA97
         LDA   L013C
         CMP   #$0000
         BEQ   LE367
         LDAL  LBBE4
         STAL  LBBEE
         PEA   $0014
         PEA   ^LBBEE
         PEA   LBBEE
         JSL   LBA97
LE367    BRL   LE410
LE36A    LDA   L013C
         CMP   #$0046
         BEQ   LE375
         BRL   LE410
LE375    LDA   $EE
         AND   #$0100
         TAY
         BNE   LE380
         BRL   LE410
LE380    LDAL  LBBCE
         ORA   #$00C3
         STAL  LBBCE
         LDA   $EE
         AND   #$0020
         TAY
         BEQ   LE39C
         LDA   #$0000
         STAL  LBBD0
         BRA   LE3A3
LE39C    LDA   #$0004
         STAL  LBBD0
LE3A3    LDA   #$0000
         STAL  LBBDA
         STAL  LBBD8
         PEA   $0001
         PEA   ^LBBCA
         PEA   LBBCA
         JSL   LBA97
         LDA   L013C
         CMP   #$0000
         BEQ   LE3C6
         BRL   LE410
LE3C6    LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBBE8
         PLA
         STAL  LBBE6
         PEA   $0010
         PEA   ^LBBE4
         PEA   LBBE4
         JSL   LBA97
         LDA   L013C
         STA   $EA
         LDA   L013C
         CMP   #$0000
         BEQ   LE410
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBBC4
         PLA
         STAL  LBBC2
         PEA   $0002
         PEA   ^LBBC2
         PEA   LBBC2
         JSL   LBA97
         LDA   $EA
         STA   L013C
LE410    PEI   $FF
         PEI   $FD
         JSL   LCA77
         PLY
         PLY
         LDA   L013C
         CMP   #$0000
         BEQ   LE43A
         LDA   L013C
         PHA
         LDA   #$8000
         PLX
         STX   $F0
         ORA   $F0
         STA   $EC
         LDA   L013C
         LDY   #$0002
         STA   [$F9],Y
         BRA   LE449
LE43A    LDA   $EC
         CMP   #$0000
         BEQ   LE449
         LDA   #$0000
         LDY   #$0002
         STA   [$F9],Y
LE449    LDA   $EC
         CMP   #$0000
         BNE   LE4C6
         PHX
         PHA
         PEA   $0000
         PEA   $000E
         LDA   L013E
         ORA   #$0F00
         PHA
         PEA   $8300
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L013C
         PLA
         PLX
         LDY   #$000A
         PHA
         TXA
         STA   [$F9],Y
         PLA
         LDY   #$0008
         STA   [$F9],Y
         LDY   #$000A
         LDA   [$F9],Y
         TAX
         LDY   #$0008
         LDA   [$F9],Y
         STA   $F0
         STX   $F2
         LDY   #$0002
         LDA   [$F0],Y
         TAX
         LDA   [$F0]
         STA   $F0
         STX   $F2
         LDAL  LBBE4
         LDY   #$0002
         STA   [$F0],Y
         LDY   #$000A
         LDA   [$F9],Y
         TAX
         LDY   #$0008
         LDA   [$F9],Y
         STA   $F0
         STX   $F2
         LDY   #$0002
         LDA   [$F0],Y
         TAX
         LDA   [$F0]
         STA   $F0
         STX   $F2
         LDA   #$0001
         STA   [$F0]
LE4C6    LDA   $EC
         CMP   #$0000
         BNE   LE4D2
         LDA   #$0000
         BRA   LE4DD
LE4D2    LDA   $EC
         PHA
         LDA   #$4000
         PLX
         STX   $F0
         ORA   $F0
LE4DD    TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

