*
* Tales from the Arabian nights
*
* (c) 1988, Unicorn Software
* (s) 2021, Antoine Vignau
*

	mx	%00
	rel
	dsk	ARABIAN.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   L0156
         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   L015A
         STA   L0158
         STX   $F8
         ORA   $F8
         BNE   L0071
         PEA   ^L015C
         PEA   L015C
         _WriteCString
         STAL  L013C
         BRL   L0130
L0071    LDX   L015A
         LDA   L0158
         STA   $F8
         STX   $FA
         LDY   #$0002
         LDA   [$F8],Y
         TAX
         LDA   [$F8]
         STA   $F6
         PEI   $F6
         _SANEStartUp
         LDX   L0156
         LDA   L0154
         PHX
         PHA
         JSL   LA9AA
         PLY
         PLY
         PEA   $0000
         LDA   LC0B8
         PHA
         JSL   LB83E
         PLY
         PLY
         PEA   ^L017C
         PEA   L017C
         JSL   LB5BA
         PLY
         PLY
         TAY
         BNE   L00D3
         LDX   L0144
         LDA   L0142
         PHX
         PHA
         LDA   L0140
         PHA
         JSL   L018A
         PLY
         PLY
         PLY
         PEA   $0000
         JSL   LB9E7
         PLY
L00D3    LDA   L013E
         ORA   #$0F00
         PHA
         _DisposeAll
         STAL  L013C
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   L014E
         LDA   L014C
         JSL   LBD99
         BEQ   L0107
         LDX   L014E
         LDA   L014C
         PHX
         PHA
         JSL   LB0E3
         PLY
         PLY
L0107    LDX   L014E
         LDA   L014C
         PHA
         TXA
         STAL  L0186
         PLA
         STAL  L0184
         LDA   L013A
         STAL  L0188
         LDA   L014A
         PHA
         PEA   ^L0184
         PEA   L0184
         JSL   LC09F
         PLY
         PLY
         PLY
L0130    TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

L013A    DB    $00
         DB    $00
L013C    DB    $00
         DB    $00
L013E    DB    $00
         DB    $00
L0140    DB    $00
         DB    $00
L0142    DB    $00
         DB    $00
L0144    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L014A    DB    $00
         DB    $00
L014C    DB    $00
         DB    $00
L014E    DB    $00
         DB    $00
L0150    DB    $00
         DB    $00
         DB    $00
         DB    $00
L0154    DB    $00
         DB    $00
L0156    DB    $00
         DB    $00
L0158    DB    $00
         DB    $00
L015A    DB    $00
         DB    $00
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   LA7D2
         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   LA443
         PLY
         PLY
         PLY
         PLY
         PLY
         PEI   $F2
         PEI   $F0
         JSL   LA6DD
         PLY
         PLY
         STX   $EE
         STA   $EC
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEI   $F2
         PEI   $F0
         JSL   LA443
         PLY
         PLY
         PLY
         PLY
         PLY
         PEI   $F2
         PEI   $F0
         JSL   LB298
         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   LA7D2
         PLY
         PLY
         PLY
         PLY
         STX   $D2
         STA   $D0
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $D2
         LDA   $D0
         JSL   LBD99
         BNE   L02F1
         LDA   #$0000
         BRL   L046A
L02F1    PEI   $D2
         PEI   $D0
         PEA   $0001
         PEA   $0004
         PEA   $0000
         TDC
         CLC
         ADC   #$00E0
         PHA
         JSL   LA2C5
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEI   $D2
         PEI   $D0
         PEA   $0001
         PEA   $0002
         PEA   $0000
         TDC
         CLC
         ADC   #$00EA
         PHA
         JSL   LA2C5
         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   LBD99
         BEQ   L0365
         PEI   $D2
         PEI   $D0
         JSL   LB298
         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   LBD99
         BNE   L038F
         LDA   #$0000
         BRL   L046A
L038F    LDA   $EA
         CMP   #$0064
         BCS   L03A4
         LDA   $EA
         PHA
         LDA   #$03E8
         CLC
         JSL   LB5E2
         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   LA2C5
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         STA   $E8
         LDA   $E8
         LDX   #$0000
         PHX
         PHA
         LDX   $D6
         LDA   $D4
         JSL   LB28D
         PLA
         PLX
         STX   $D6
         STA   $D4
         LDA   $E8
         LDX   #$0000
         PHX
         PHA
         LDX   $DE
         LDA   $DC
         JSL   LB5D7
         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   LA2C5
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEI   $D2
         PEI   $D0
         JSL   LB298
         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   LB627
         LDX   #$0000
         LDA   #$066D
         SEC
         JSL   LB4E1
         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   LB4E1
         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    DB    $00        ;  path name
         DB    $00
         DB    $00
         DB    $00
         DB    $00        ;  flags
         DB    $00
         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   L0FB4
         REP   #$20
         PLA
         STA   L0FB5
         PHK
         PLB
         JSR   L090B
         BCS   L0888
         LDA   L0FBD
*         JSL   L6A4D	; protection call
         LDA   L0FBD
         PHA
         JSL   L0791
         PLA
         LDA   #L1009
         STA   L101D
         LDA   #^L1009
         STA   L101F
         JSR   L6EB4
         LDA   #L0FE9
         STA   L101D
         LDA   #^L0FE9
         STA   L101F
         JSR   L7F10
         JMP   L0A02

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

L0906    JSL   L0842
         RTL

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

L0A02    LDA   #L0FE9
         STA   L101D
         LDA   #^L0FE9
         STA   L101F
         JSR   L7F10
         LDA   #$0001
         STA   L0FB7
         STZ   L0FB9
         STZ   L101B
         JSR   L7762
         LDA   L101D
         STA   L0E55
         LDA   #$0000
         STA   L101D
         JSR   L776F
         JSR   L70FE
         LDA   L101D
         STA   L1159
         LDA   L101F
         STA   L115B
         JSR   L6EE5
         LDA   L101D
         STA   L115D
         LDA   L101F
         STA   L115F
         JSR   L764F
         LDA   #L10B9
         STA   L101D
         LDA   #^L10B9
         STA   L101F
         JSR   L6EB4
         LDA   #L0F02
         STA   L101D
         LDA   #^L0F02
         STA   L101F
         LDA   #$0001
         STA   L1021
         LDA   #$000E
         STA   L1025
         LDA   #L1161
         STA   L1029
         LDA   #^L1161
         STA   L102B
         JSR   L7CB3
         LDA   #L0F09
         STA   L101D
         LDA   #^L0F09
         STA   L101F
         STZ   L1021
         LDA   #$0012
         STA   L1025
         LDA   #L1165
         STA   L1029
         LDA   #^L1165
         STA   L102B
         JSR   L7CB3
         BRA   L0AAF
L0AAC    JMP   L0E46

L0AAF    JSR   L72F5
         JSR   L1226
         JSR   L7226
         BCS   L0AAC
         LDA   L101D
         STA   L10A9
         LDA   L101F
         STA   L10AB
         LDA   L1021
         STA   L1149
         LDA   L1023
         STA   L114B
         JSR   L7226
         BCS   L0AAC
         LDA   L101D
         STA   L10AD
         LDA   L101F
         STA   L10AF
         LDA   L1021
         STA   L114D
         LDA   L1023
         STA   L114F
         JSR   L7226
         BCS   L0AAC
         LDA   L101D
         STA   L10B1
         LDA   L101F
         STA   L10B3
         LDA   L1021
         STA   L1151
         LDA   L1023
         STA   L1153
         JSR   L7226
         BCS   L0B2B
         LDA   L101D
         STA   L10B5
         LDA   L101F
         STA   L10B7
         LDA   L1021
         STA   L1155
         LDA   L1023
         STA   L1157
         BRA   L0B31
L0B2B    JSR   L6FC2
         JMP   L0E46

L0B31    LDA   #L104F
         STA   L101D
         LDA   #^L104F
         STA   L101F
         LDA   #L1045
         STA   L1021
         LDA   #^L1045
         STA   L1023
         LDA   #L1049
         STA   L1025
         LDA   #^L1049
         STA   L1027
         LDA   #L104D
         STA   L1029
         LDA   #^L104D
         STA   L102B
         JSR   L844C
         LDA   #L0F50
         STA   L101D
         LDA   #^L0F50
         STA   L101F
         LDA   #L0F3C
         STA   L1021
         LDA   #^L0F3C
         STA   L1023
         LDA   #L0F40
         STA   L1025
         LDA   #^L0F40
         STA   L1027
         LDA   #L0F44
         STA   L1029
         LDA   #^L0F44
         STA   L102B
         JSR   L844C
         LDA   #L0F8E
         STA   L101D
         LDA   #^L0F8E
         STA   L101F
         LDA   #L0F32
         STA   L1021
         LDA   #^L0F32
         STA   L1023
         LDA   #L0F36
         STA   L1025
         LDA   #^L0F36
         STA   L1027
         LDA   #L0F3A
         STA   L1029
         LDA   #^L0F3A
         STA   L102B
         JSR   L844C
         LDA   #L0F6F
         STA   L101D
         LDA   #^L0F6F
         STA   L101F
         LDA   #L0F46
         STA   L1021
         LDA   #^L0F46
         STA   L1023
         LDA   #L0F4A
         STA   L1025
         LDA   #^L0F4A
         STA   L1027
         LDA   #L0F4E
         STA   L1029
         LDA   #^L0F4E
         STA   L102B
         JSR   L844C
         LDA   #L0E9F
         STA   L101D
         LDA   #^L0E9F
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         LDA   #L10C9
         STA   L1025
         LDA   #^L10C9
         STA   L1027
         JSR   L7339
         LDA   #L0E57
         STA   L101D
         LDA   #^L0E57
         STA   L101F
         LDA   L114D
         STA   L1021
         LDA   L114F
         STA   L1023
         LDA   #L10E9
         STA   L1025
         LDA   #^L10E9
         STA   L1027
         JSR   L7339
         LDA   #L0E7B
         STA   L101D
         LDA   #^L0E7B
         STA   L101F
         LDA   L1151
         STA   L1021
         LDA   L1153
         STA   L1023
         LDA   #L1109
         STA   L1025
         LDA   #^L1109
         STA   L1027
         JSR   L7339
         LDA   #L0EC3
         STA   L101D
         LDA   #^L0EC3
         STA   L101F
         LDA   L1155
         STA   L1021
         LDA   L1157
         STA   L1023
         LDA   #L1129
         STA   L1025
         LDA   #^L1129
         STA   L1027
         JSR   L7339
         LDA   L1045
         STA   L101D
         LDA   L1047
         STA   L101F
         LDA   L1049
         STA   L1021
         LDA   L104B
         STA   L1023
         LDA   #$0001
         STA   L1025
         LDA   L104D
         STA   L1029
         JSR   L8479
         JMP   L0CC6
         JMP   L0E46

L0CC6    LDA   #$0000
         STA   L101D
         LDA   #L10C9
         STA   L1021
         LDA   #^L10C9
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L7B16
         LDA   #$0003
         STA   L101D
         JSR   L78C5
         LDA   L114D
         STA   L101D
         LDA   L114F
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L70EC
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   #L0F12
         STA   L1021
         LDA   #^L0F12
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         LDA   #L0F22
         STA   L1029
         LDA   #^L0F22
         STA   L102B
         LDA   #$0000
         STA   L102D
         JSR   L7927
         LDA   #$0000
         STA   L101D
         LDA   #L10E9
         STA   L1021
         LDA   #^L10E9
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L7B16
         LDA   L114D
         STA   L101D
         LDA   L114F
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L70EC
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   #L0F1A
         STA   L1021
         LDA   #^L0F1A
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         LDA   #L0F2A
         STA   L1029
         LDA   #^L0F2A
         STA   L102B
         LDA   #$0000
         STA   L102D
         JSR   L7927
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$2000
         STA   L1021
         LDA   #$00E1
         STA   L1023
         JSR   L70EC
         LDA   #$0003
         STA   L101D
         JSR   L78C5
         LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         LDA   L1151
         STA   L1025
         LDA   L1153
         STA   L1027
         JSR   L7B16
         LDA   #$0003
         STA   L101D
         JSR   L78C5
         JSR   L849E
         LDA   L1045
         STA   L101D
         LDA   L1047
         STA   L101F
         JSR   L117A
         LDA   #L0EE2
         STA   L101D
         LDA   #^L0EE2
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         LDA   #L10C9
         STA   L1025
         LDA   #^L10C9
         STA   L1027
         JSR   L7339
         JSR   L1378
         JMP   L16AF

L0E46    JSR   L7327
         LDA   L0E55
         STA   L101D
         JSR   L776F
         JMP   L0888

L0E55    DW    $0000
L0E57    STR   '1/arab.pics/artitle.pc1'
L0E7B    STR   '1/arab.pics/credits.pc1'
L0E9F    STR   '1/arab.pics/unicorn.pc1'
L0EC3    STR   '1/arab.pics/th.pc1'
L0EE2    STR   '1/arab.pics/map.pc1'
L0F02    STR   'Geneva'
L0F09    STR   'New York'
L0F12    DW    $0019
         DW    $0012
         DW    $0092
         DW    $00AF
L0F1A    DW    $000D
         DW    $00BA
         DW    $009B
         DW    $0134
L0F22    DW    $004F
         DW    $00A3
         DW    $00C8
         DW    $0140
L0F2A    DW    $003A
         DW    $00C6
         DW    $00C8
         DW    $0140
L0F32    DB    $00
         DB    $00
L0F34    DB    $00
         DB    $00
L0F36    DB    $00
         DB    $00
L0F38    DB    $00
         DB    $00
L0F3A    DB    $00
         DB    $00
L0F3C    DB    $00
         DB    $00
L0F3E    DB    $00
         DB    $00
L0F40    DB    $00
         DB    $00
L0F42    DB    $00
         DB    $00
L0F44    DB    $00
         DB    $00
L0F46    DB    $00
         DB    $00
L0F48    DB    $00
         DB    $00
L0F4A    DB    $00
         DB    $00
L0F4C    DB    $00
         DB    $00
L0F4E    DB    $00
         DB    $00
L0F50    ASC   '1/magic.snd/fsbell'00
L0F6F    ASC   '1/magic.snd/fsgood'00
L0F8E    ASC   '1/magic.snd/fsbad'00
L0FAC    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $C8
         DB    $00
         DB    $40
         DB    $01
L0FB4    DB    $00
L0FB5    DB    $00
         DB    $00
L0FB7    DB    $00
         DB    $00
L0FB9    DB    $00
         DB    $00
         DB    $00
         DB    $00
L0FBD    DW    $0000
L0FBF    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
L0FE9    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L1009    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L101B    DB    $00
         DB    $00
L101D    DB    $00        ;  device name
         DB    $00
L101F    DB    $00        ;  ref num
         DB    $00
L1021    DB    $00        ;  volume name
         DB    $00
L1023    DB    $00        ;  file type
         DB    $00
L1025    DB    $00        ;  total blocks
         DB    $00
L1027    DB    $00        ;  transfer count
         DB    $00
L1029    DB    $00        ;  free blocks
         DB    $00
L102B    DB    $00        ;  creation date
         DB    $00
L102D    DB    $00        ;  file system
         DB    $00
L102F    DB    $00        ;  modification date
         DB    $00
L1031    DB    $00
         DB    $00
L1033    DB    $00        ;  blocks used
         DB    $00
L1035    DB    $00
         DB    $00
L1037    DB    $00
         DB    $00
L1039    DB    $00
         DB    $00
L103B    DB    $00
         DB    $00
L103D    DB    $00
         DB    $00
L103F    DB    $00
         DB    $00
L1041    DB    $00
         DB    $00
L1043    DB    $00
         DB    $00
L1045    DB    $00
         DB    $00
L1047    DB    $00
         DB    $00
L1049    DB    $00
         DB    $00
L104B    DB    $00
         DB    $00
L104D    DB    $00
         DB    $00
L104F    ASC   '1/magic.snd/song1'00
L106D    DB    $00
         DB    $00
L106F    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L107D    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L109F    DB    $00
         DB    $00
L10A1    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L10A9    DB    $00
         DB    $00
L10AB    DB    $00
         DB    $00
L10AD    DB    $00
         DB    $00
L10AF    DB    $00
         DB    $00
L10B1    DB    $00
         DB    $00
L10B3    DB    $00
         DB    $00
L10B5    DB    $00
         DB    $00
L10B7    DB    $00
         DB    $00
L10B9    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L10C9    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L10E9    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L1109    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L1129    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L1149    DB    $00
         DB    $00
L114B    DB    $00
         DB    $00
L114D    DB    $00
         DB    $00
L114F    DB    $00
         DB    $00
L1151    DB    $00
         DB    $00
L1153    DB    $00
         DB    $00
L1155    DB    $00
         DB    $00
L1157    DB    $00
         DB    $00
L1159    DB    $00
         DB    $00
L115B    DB    $00
         DB    $00
L115D    DB    $00
         DB    $00
L115F    DB    $00
         DB    $00
L1161    DB    $00
         DB    $00
         DB    $00
         DB    $00
L1165    DB    $00
         DB    $00
         DB    $00
         DB    $00
L1169    REP   #$30
         STZ   L0FB9
         LDA   L0FB7
         BEQ   L1179
         JSR   L844C
         INC   L0FB9
L1179    RTS

L117A    REP   #$30
         LDA   L0FB9
         BEQ   L1184
         JSR   L84A5
L1184    RTS

L1185    REP   #$30
         LDA   L0FB9
         BEQ   L1198
         LDA   L1025
         STA   L1029
         STZ   L1025
         JSR   L8479
L1198    RTS

         REP   #$30
         LDA   L0FB7
         BEQ   L11A4
         STZ   L0FB7
         RTS

L11A4    INC   L0FB7
         RTS

L11A8    REP   #$30
         JSR   L849E
         LDA   L0F32
         STA   L101D
         LDA   L0F34
         STA   L101F
         LDA   L0F36
         STA   L1021
         LDA   L0F38
         STA   L1023
         STZ   L1025
         LDA   L0F3A
         STA   L1029
         JSR   L8479
         RTS

L11D2    REP   #$30
         JSR   L849E
         LDA   L0F46
         STA   L101D
         LDA   L0F48
         STA   L101F
         LDA   L0F4A
         STA   L1021
         LDA   L0F4C
         STA   L1023
         STZ   L1025
         LDA   L0F4E
         STA   L1029
         JSR   L8479
         RTS

L11FC    REP   #$30
         JSR   L849E
         LDA   L0F3C
         STA   L101D
         LDA   L0F3E
         STA   L101F
         LDA   L0F40
         STA   L1021
         LDA   L0F42
         STA   L1023
         STZ   L1025
         LDA   L0F44
         STA   L1029
         JSR   L8479
         RTS

L1226    JSR   L6F28
         LDA   #$9999
         STA   L101D
         JSR   L715B
         LDA   #$0004
         STA   L101D
         JSR   L7754
         LDA   #$0007
         STA   L101D
         LDA   #$0009
         STA   L1021
         JSR   L76AC
         LDA   #$0000
         STA   L101D
         LDA   #$0000
         STA   L101F
         LDA   #$0004
         STA   L1021
         LDA   #$0000
         STA   L1023
         JSR   L842C
         JSR   L8402
         JSR   LA27E
         LDA   #L1299
         STA   L101D
         LDA   #^L1299
         STA   L101F
         LDA   #$0064
         STA   L1021
         JSR   L75FC
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         JSR   L7C93
         RTS

L1299    ASC   'PLEASE WAIT...'00
L12A8    LDA   L1021
         STA   L1322
         LDA   L1023
         STA   L1324
         JSR   L6EFD
         LDA   L2600
         STA   $04
         LDA   L2602
         STA   $06
         LDX   #$001A
         LDY   L2604
         STX   L2612
L12CA    LDX   #$0000
L12CD    SEP   #$20
         LDA   [$04],Y
         INY
         CMP   #$0D
         BEQ   L12E6
         CMP   #$7E
         BEQ   L12E0
         STA   L1324,X
         INX
         BRA   L12CD
L12E0    REP   #$30
         STY   L2604
         RTS

L12E6    INY
         JSR   L12F2
         DEC   L1322
         BNE   L12CA
         JMP   L12E0

L12F2    STZ   L1324,X
         REP   #$30
         PHY
         LDA   #$0004
         STA   L101D
         LDA   L2612
         STA   L1021
         JSR   L7546
         LDA   #L1324
         STA   L101D
         LDA   #^L1324
         STA   L101F
         JSR   L757F
         LDA   #$0009
         CLC
         ADC   L2612
         STA   L2612
         PLY
         RTS

L1322    DB    $00
         DB    $00
L1324    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L1378    JSR   L6F28
         LDA   #$0000
         STA   L2604
         LDA   #L1492
         STA   L2600
         LDA   #^L1492
         STA   L2602
         JSR   L76BB
         LDA   L101D
         STA   L1453
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$2000
         STA   L1021
         LDA   #$00E1
         STA   L1023
         JSR   L70EC
         LDA   #$0001
         STA   L101D
         JSR   L75E0
         LDA   #$2000
         STA   L101D
         LDA   #$00E1
         STA   L101F
         LDA   #$0010
         STA   L1021
         JSR   L12A8
         LDA   #$0000
         STA   L101D
         LDA   #L10C9
         STA   L1021
         LDA   #^L10C9
         STA   L1023
         JSR   L71A6
         JSR   L7B72
         JSR   L6FC2
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$2000
         STA   L1021
         LDA   #$00E1
         STA   L1023
         JSR   L70EC
         LDA   #$2000
         STA   L101D
         LDA   #$00E1
         STA   L101F
         LDA   #$000D
         STA   L1021
         JSR   L12A8
         LDA   #$0000
         STA   L101D
         LDA   #L10C9
         STA   L1021
         LDA   #^L10C9
         STA   L1023
         JSR   L71A6
         JSR   L7B72
         JSR   L6FC2
         LDA   L1453
         STA   L101D
         JSR   L75E0
         RTS

         DB    $00
         DB    $00
L1453    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         ASC   'Press any key to continue.'00
L1492    ASC   'Hundreds of years'0D
         ASC   00
         ASC   'ago, travelers to'0D
         ASC   00
         ASC   'the Middle East  '0D
         ASC   00
         ASC   'brought fascinat-'0D00
         ASC   'ing tales back to'0D
         ASC   00
         ASC   'the west. No one '0D
         ASC   00
         ASC   'knows who really '0D
         ASC   00
         ASC   'authored these   '0D
         ASC   00
         ASC   'stories, but     '0D
         ASC   00
         ASC   'people for many  '0D
         ASC   00
         ASC   'generations have '0D
         ASC   00
         ASC   'enjoyed them. The'0D
         ASC   00
         ASC   'Middle East is   '0D
         ASC   00
         ASC   'comprised of many'0D
         ASC   00
         ASC   'countries that   '0D
         ASC   00
         ASC   'include:         '0D
         ASC   00
         ASC   'Iraq, Iran, Saudi'0D
         ASC   00
         ASC   'Arabia, Yemen,   '0D
         ASC   00
         ASC   'Syria, Turkey,   '0D
         ASC   00
         ASC   'Qatar, Pakistan  '0D
         ASC   00
         ASC   'Afghanistan,     '0D
         ASC   00
         ASC   'Oman, Kuwait,    '0D
         ASC   00
         ASC   'Lebanon, Israel  '0D
         ASC   00
         ASC   'and Jordan. This '0D
         ASC   00
         ASC   'collection of    '0D
         ASC   00
         ASC   'stories is known '0D
         ASC   00
         ASC   'as the Tales from'0D00
         ASC   'the Arabian      '0D00
         ASC   'Nights.'0D00
L16AF    REP   #$30
L16B1    JSR   L849E
         JSR   L214E
         LDA   #L253C
         STA   L101D
         LDA   #^L253C
         STA   L101F
         LDA   L1155
         STA   L1021
         LDA   L1157
         STA   L1023
         LDA   #L1129
         STA   L1025
         LDA   #^L1129
         STA   L1027
         JSR   L7339
         LDA   #L8A41
         STA   L101D
         LDA   #^L8A41
         STA   L101F
         LDA   #L8A5F
         STA   L1021
         LDA   #^L8A5F
         STA   L1023
         LDA   #L8A63
         STA   L1025
         LDA   #^L8A63
         STA   L1027
         LDA   #L8A67
         STA   L1029
         LDA   #^L8A67
         STA   L102B
         JSR   L1169
         LDA   #$0000
         STA   L101D
         LDA   #L1129
         STA   L1021
         LDA   #^L1129
         STA   L1023
         LDA   L1155
         STA   L1025
         LDA   L1157
         STA   L1027
         JSR   L7B16
         LDA   L8A5F
         STA   L101D
         LDA   L8A61
         STA   L101F
         LDA   L8A63
         STA   L1021
         LDA   L8A65
         STA   L1023
         LDA   L8A67
         STA   L1025
         JSR   L1185
         JSR   L713D
         STZ   L25B8
L1759    JSR   L6FB4
         CMP   #$001B
         BNE   L1764
         JMP   L0E46

L1764    LDA   L101D
         BEQ   L1759
         JSR   L6F4C
         LDA   #L25BA
         STA   L1025
         LDA   #^L25BA
         STA   L1027
         LDA   #$0005
         STA   L1029
         JSR   L7780
         LDA   L102D
         BEQ   L1759
         STA   L25B8
         JSR   L7147
         LDA   L8A5F
         STA   L101D
         LDA   L8A61
         STA   L101F
         JSR   L117A
         _CompactMem
         LDA   L25B8
         DEC
         ASL
         TAX
         JMP   (L25E2,X)
L17AB    JMP   L16B1

L17AE    REP   #$30
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$7D00
         STA   L1021
         LDA   #$0000
         STA   L1023
         LDA   #$0000
         STA   L1025
         JSR   L7173
         LDA   #$0000
         STA   L101D
         JSR   L715B
         JSR   L6F28
         RTS

L17DE    REP   #$30
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$2000
         STA   L1021
         LDA   #$00E1
         STA   L1023
         JSR   L70EC
         JSR   L6F28
         RTS

L17FF    REP   #$30
         JSR   L7B72
L1804    JSR   L6FB4
         CMP   #$001B
         BNE   L180F
         JMP   L1822

L180F    CMP   #$0000
         BEQ   L181A
         ORA   #$0020
         JMP   L1822

L181A    LDA   L101D
         BNE   L1822
         JMP   L1804
L1822    RTS

L1823    REP   #$30
         LDA   L101D
         STA   L25EC
         JSR   L75E0
         RTS

L182F    REP   #$30
         LDA   L1021
         STA   L1025
         LDA   L1023
         STA   L1027
         LDA   #L2616
         STA   L1021
         LDA   #^L2616
         STA   L1023
         LDA   #L2636
         STA   L1029
         LDA   #^L2636
         STA   L102B
         LDA   #$0000
         STA   L102D
         JSR   L7927
         RTS

L185F    REP   #$30
         LDA   L1021
         STA   L1025
         LDA   L1023
         STA   L1027
         LDA   #L261E
         STA   L1021
         LDA   #^L261E
         STA   L1023
         LDA   #L2636
         STA   L1029
         LDA   #^L2636
         STA   L102B
         LDA   #$0000
         STA   L102D
         JSR   L7927
         RTS

L188F    REP   #$30
         LDA   L101D
         STA   L1978
         JSR   L6F28
         LDA   #$0000
         STA   L2604
         LDA   L25FC
         STA   L2600
         LDA   L25FE
         STA   L2602
         JSR   L76BB
         LDA   L101D
         STA   L197A
         LDA   #$2000
         STA   L101D
         LDA   #$00E1
         STA   L101F
         LDA   L114D
         STA   L1021
         LDA   L114F
         STA   L1023
         JSR   L70EC
         LDA   #$0000
         STA   L101D
         LDA   #L197C
         STA   L1021
         LDA   #^L197C
         STA   L1023
         JSR   L71BC
L18E5    LDA   #$0000
         STA   L101D
         JSR   L7A99
         LDA   #$0000
         STA   L101D
         JSR   L715B
         LDA   #$0009
         STA   L101D
         JSR   L75E0
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         LDA   #$2000
         STA   L101D
         LDA   #$00E1
         STA   L101F
         LDA   #$0014
         STA   L1021
         JSR   L207C
         LDA   #L199E
         STA   L101D
         LDA   #^L199E
         STA   L101F
         LDA   #$00BE
         STA   L1021
         JSR   L75FC
         JSR   L7B72
         JSR   L6FC2
         DEC   L1978
         BEQ   L194D
         JMP   L18E5

L194D    LDA   #$0000
         STA   L101D
         LDA   #L197C
         STA   L1021
         LDA   #^L197C
         STA   L1023
         LDA   L114D
         STA   L1025
         LDA   L114F
         STA   L1027
         JSR   L7B16
         LDA   L197A
         STA   L101D
         JSR   L75E0
         RTS

L1978    DB    $00
         DB    $00
L197A    DB    $00
         DB    $00
L197C    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L199E    ASC   'Press any key to continue.'00
L19B9    REP   #$30
         LDA   #L1A73
         STA   $00
         LDA   #^L1A73
         STA   $02
         LDA   L101D
         DEC
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L101D
         INY
         INY
         LDA   [$00],Y
         STA   L101F
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         JSR   L7298
         LDA   L1041
         STA   L101D
         LDA   L1043
         STA   L101F
         LDA   #$0200
         STA   L1021
         LDA   #$0000
         STA   L1023
         JSR   L6FD5
         LDA   L1027
         PHA
         LDA   L1025
         PHA
         LDA   L1025
         STA   L101D
         LDA   L1027
         STA   L101F
         LDA   #$C000
         STA   L1021
         JSR   L71D2
         LDA   L1025
         STA   L25F0
         LDA   L1027
         STA   L25F2
         LDA   L1029
         STA   L25F8
         LDA   L102B
         STA   L25FA
         PLA
         STA   L1041
         PLA
         STA   L1043
         PLA
         STA   L101D
         PLA
         STA   L101F
         JSR   L7259
         LDA   L1021
         PHA
         LDA   L1021
         STA   L101D
         LDA   L25F8
         STA   L1021
         LDA   L25FA
         STA   L1023
         LDA   L1041
         STA   L1025
         LDA   L1043
         STA   L1027
         JSR   L7278
         PLA
         STA   L101D
         JSR   L728B
         RTS

L1A73    ADRL  L1ACF
         ADRL  L1AF4
         ADRL  L1B19
         ADRL  L1B3E
         ADRL  L1B63
         ADRL  L1B88
         ADRL  L1BAD
         ADRL  L1BD2
         ADRL  L1BF7
         ADRL  L1C1C
         ADRL  L1C3F
         ADRL  L1C62
         ADRL  L1C85
         ADRL  L1CA8
         ADRL  L1CCB
         ADRL  L1CEE
         ADRL  L1D11
         ADRL  L1D34
         ADRL  L1D57
         ADRL  L1D7A
         ADRL  L1D9D
         ADRL  L1DC0
         ADRL  L1DE3
L1ACF    STR   '1/arab.data/stor1voc.ant'
L1AF4    STR   '1/arab.data/stor3voc.ant'
L1B19    STR   '1/arab.data/stor2voc.ant'
L1B3E    STR   '1/arab.data/stor1voc.fil'
L1B63    STR   '1/arab.data/stor3voc.fil'
L1B88    STR   '1/arab.data/stor2voc.fil'
L1BAD    STR   '1/arab.data/stor1voc.syn'
L1BD2    STR   '1/arab.data/stor3voc.syn'
L1BF7    STR   '1/arab.data/stor2voc.syn'
L1C1C    STR   '1/arab.data/story1.wrd'
L1C3F    STR   '1/arab.data/story3.wrd'
L1C62    STR   '1/arab.data/story2.wrd'
L1C85    STR   '1/arab.data/story1.wrd'
L1CA8    STR   '1/arab.data/story1.fil'
L1CCB    STR   '1/arab.data/story1.mth'
L1CEE    STR   '1/arab.data/story1.mul'
L1D11    STR   '1/arab.data/story3.fil'
L1D34    STR   '1/arab.data/story3.mth'
L1D57    STR   '1/arab.data/story3.mul'
L1D7A    STR   '1/arab.data/story2.fil'
L1D9D    STR   '1/arab.data/story2.mth'
L1DC0    STR   '1/arab.data/story2.mul'
L1DE3    STR   '1/arab.data/readme.doc'
L1E06    REP   #$30
         LDA   #L1EC0
         STA   $00
         LDA   #^L1EC0
         STA   $02
         LDA   L101D
         DEC
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L101D
         INY
         INY
         LDA   [$00],Y
         STA   L101F
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         JSR   L7298
         LDA   L1041
         STA   L101D
         LDA   L1043
         STA   L101F
         LDA   #$0200
         STA   L1021
         LDA   #$0000
         STA   L1023
         JSR   L6FD5
         LDA   L1027
         PHA
         LDA   L1025
         PHA
         LDA   L1025
         STA   L101D
         LDA   L1027
         STA   L101F
         LDA   #$C000
         STA   L1021
         JSR   L71D2
         LDA   L1025
         STA   L25F4
         LDA   L1027
         STA   L25F6
         LDA   L1029
         STA   L25FC
         LDA   L102B
         STA   L25FE
         PLA
         STA   L1041
         PLA
         STA   L1043
         PLA
         STA   L101D
         PLA
         STA   L101F
         JSR   L7259
         LDA   L1021
         PHA
         LDA   L1021
         STA   L101D
         LDA   L25FC
         STA   L1021
         LDA   L25FE
         STA   L1023
         LDA   L1041
         STA   L1025
         LDA   L1043
         STA   L1027
         JSR   L7278
         PLA
         STA   L101D
         JSR   L728B
         RTS

L1EC0    ADRL  L1ECC
         ADRL  L1EEF
         ADRL  L1F12
L1ECC    STR   '1/arab.data/story1.wrd'
L1EEF    STR   '1/arab.data/story3.wrd'
L1F12    STR   '1/arab.data/story2.wrd'
L1F35    REP   #$30
         LDA   L25F0
         STA   L101D
         LDA   L25F2
         STA   L101F
         JSR   L7214
         RTS

L1F47    REP   #$30
         LDA   L25F4
         STA   L101D
         LDA   L25F6
         STA   L101F
         JSR   L7214
         RTS

L1F59    REP   #$30
         LDA   L1021
         PHA
         LDA   L1021
         PHA
         LDA   L101D
         PHA
         LDA   L1025
         STA   L101D
         LDA   L1027
         STA   L101F
         JSR   L6EFD
         LDA   #L262E
         STA   L101D
         LDA   #^L262E
         STA   L101F
         PLA
         STA   L1021
         JSR   L7116
         LDA   #L2626
         STA   L101D
         LDA   #^L2626
         STA   L101F
         PLA
         STA   L1021
         JSR   L7116
         PLA
         STA   L101D
         LDA   L101D
         STA   L25EE
         JSR   L75EE
         RTS

L1FAA    REP   #$30
         LDA   L1021
         STA   L2026
         LDA   L1023
         STA   L2028
         JSR   L6EFD
         LDA   L25F8
         STA   $04
         LDA   L25FA
         STA   $06
         LDX   #$000A
         LDY   L2608
         STX   L2612
L1FCE    LDX   #$0000
L1FD1    SEP   #$20
         LDA   [$04],Y
         INY
         CMP   #$0D
         BEQ   L1FEA
         CMP   #$7E
         BEQ   L1FE4
         STA   L2028,X
         INX
         BRA   L1FD1
L1FE4    REP   #$30
         STY   L2608
         RTS

L1FEA    INY
         JSR   L1FF6
         DEC   L2026
         BNE   L1FCE
         JMP   L1FE4

L1FF6    STZ   L2028,X
         REP   #$30
         PHY
         LDA   #$0006
         STA   L101D
         LDA   L2612
         STA   L1021
         JSR   L7546
         LDA   #L2028
         STA   L101D
         LDA   #^L2028
         STA   L101F
         JSR   L757F
         LDA   #$0009
         CLC
         ADC   L2612
         STA   L2612
         PLY
         RTS

L2026    DB    $00
         DB    $00
L2028    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L207C    REP   #$30
         LDA   L1021
         STA   L20F8
         LDA   L1023
         STA   L20FA
         JSR   L6EFD
         LDA   L2600
         STA   $04
         LDA   L2602
         STA   $06
         LDX   #$000A
         LDY   L2604
         STX   L2612
L20A0    LDX   #$0000
L20A3    SEP   #$20
         LDA   [$04],Y
         INY
         CMP   #$0D
         BEQ   L20BC
         CMP   #$7E
         BEQ   L20B6
         STA   L20FA,X
         INX
         BRA   L20A3
L20B6    REP   #$30
         STY   L2604
         RTS

L20BC    INY
         JSR   L20C8
         DEC   L20F8
         BNE   L20A0
         JMP   L20B6

L20C8    STZ   L20FA,X
         REP   #$30
         PHY
         LDA   #$000E
         STA   L101D
         LDA   L2612
         STA   L1021
         JSR   L7546
         LDA   #L20FA
         STA   L101D
         LDA   #^L20FA
         STA   L101F
         JSR   L757F
         LDA   #$0009
         CLC
         ADC   L2612
         STA   L2612
         PLY
         RTS

L20F8    DB    $00
         DB    $00
L20FA    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L214E    REP   #$30
         LDA   #L2515
         STA   L101D
         LDA   #^L2515
         STA   L101F
         LDA   #L255E
         STA   L1021
         LDA   #^L255E
         STA   L1023
         JSR   L9448
         RTS

L216C    REP   #$30
         LDA   #L2523
         STA   L101D
         LDA   #^L2523
         STA   L101F
         LDA   #L25A1
         STA   L1021
         LDA   #^L25A1
         STA   L1023
         JSR   L9448
         RTS

L218A    REP   #$30
         LDA   L101D
         STA   L21E8
         LDA   L101F
         STA   L21EA
         LDA   L1021
         STA   L21EC
         LDA   L1025
         STA   L21EE
         LDA   L1029
         STA   L21F0
         JSR   L704F
         LDA   L1021
         ASL
         ASL
         ASL
         STA   L1021
         LDA   #$0000
         STA   L101D
         LDA   L21EC
         STA   L1025
         JSR   L21F2
         LDA   L101D
         CLC
         ADC   L21EE
         STA   L101D
         LDA   L21F0
         STA   L1021
         JSR   L7546
         LDA   L21E8
         STA   L101D
         LDA   L21EA
         STA   L101F
         JSR   L757F
         RTS

L21E8    DW    $0000
L21EA    DW    $0000
L21EC    DW    $0000
L21EE    DW    $0000
L21F0    DW    $0000
L21F2    REP   #$30
         LDA   L1025
         SEC
         SBC   L1021
         LSR
         STA   L101D
         RTS

L2200    REP   #$30
         LDA   L101D
         STA   L2295
         LDA   L114D
         STA   L101D
         LDA   L114F
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L70EC
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   #L2297
         STA   $00
         LDA   #^L2297
         STA   $02
         LDA   L2295
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L1021
         INY
         INY
         LDA   [$00],Y
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         LDA   #L22A3
         STA   $00
         LDA   #^L22A3
         STA   $02
         LDA   L2295
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L1029
         INY
         INY
         LDA   [$00],Y
         STA   L102B
         LDA   #$0000
         STA   L102D
         JSR   L7927
         LDA   #$0000
         STA   L101D
         LDA   #L1129
         STA   L1021
         LDA   #^L1129
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         RTS

L2295    DW    $0000
L2297    ADRL  L22AF
         ADRL  L22B7
         ADRL  L22BF
L22A3    ADRL  L22C7
         ADRL  L22CF
         ADRL  L22D7
L22AF    DW    $0000
         DW    $0000
         DW    $0054
         DW    $0085
L22B7    DW    $0000
         DW    $0098
         DW    $0054
         DW    $011D
L22BF    DW    $005D
         DW    $0000
         DW    $00B1
         DW    $0085
L22C7    DW    $0000
         DW    $0000
         DW    $0054
         DW    $0085
L22CF    DW    $0000
         DW    $0000
         DW    $0054
         DW    $0085
L22D7    DW    $0000
         DW    $0000
         DW    $0054
         DW    $0085
L22DF    REP   #$30
         STZ   L24BB
L22E4    JSR   L7151
L22E7    JSR   L17FF
         CMP   #$001B
         BNE   L22F2
         JMP   L232C

L22F2    LDA   L101D
         BEQ   L22E7
         JSR   L6F4C
         LDA   #L24BD
         STA   L1025
         LDA   #^L24BD
         STA   L1027
         LDA   #$0003
         STA   L1029
         JSR   L7780
         LDA   L102D
         BEQ   L22E7
         CMP   L24BB
         BEQ   L233A
         STA   L24BB
         JSR   L7147
         LDA   L24BB
         DEC
         STA   L101D
         JSR   L2200
         JMP   L22E4

L232C    CMP   #$001B
         BNE   L22E7
         JSR   L7147
         LDA   #$001B
         JMP   L24B2

L233A    JSR   L7147
         LDA   L24BB
         CMP   L32C5
         BNE   L2348
         JMP   L242E

L2348    JSR   L7BBE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   #L24E1
         STA   L1021
         LDA   #^L24E1
         STA   L1023
         LDA   #$2000
         STA   L1025
         LDA   #$00E1
         STA   L1027
         LDA   #L24F1
         STA   L1029
         LDA   #^L24F1
         STA   L102B
         LDA   #$0000
         STA   L102D
         JSR   L7927
         LDA   #L88B3
         STA   L101D
         LDA   #^L88B3
         STA   L101F
         JSR   L84BC
         JSR   L11A8
         LDA   #L24D5
         STA   $00
         LDA   #^L24D5
         STA   $02
         LDA   L32C5
         DEC
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L101D
         INY
         INY
         LDA   [$00],Y
         STA   L101F
         LDA   #$000F
         STA   L1021
         JSR   L7116
         LDA   #$0001
         STA   L101D
         JSR   L75E0
         LDA   #L3293
         STA   L101D
         LDA   #^L3293
         STA   L101F
         LDA   #$0098
         STA   L1021
         LDA   #$0086
         STA   L1025
         LDA   #$0010
         STA   L1029
         JSR   L218A
         LDA   #L32A1
         STA   L101D
         LDA   #^L32A1
         STA   L101F
         LDA   #$0098
         STA   L1021
         LDA   #$0086
         STA   L1025
         LDA   #$002C
         STA   L1029
         JSR   L218A
         LDA   #L32AF
         STA   L101D
         LDA   #^L32AF
         STA   L101F
         LDA   #$0098
         STA   L1021
         LDA   #$0086
         STA   L1025
         LDA   #$0048
         STA   L1029
         JSR   L218A
         JSR   L852B
         JMP   L2482

L242E    JSR   L7BA6
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   #L24E9
         STA   L1021
         LDA   #^L24E9
         STA   L1023
         LDA   #$2000
         STA   L1025
         LDA   #$00E1
         STA   L1027
         LDA   #L24F1
         STA   L1029
         LDA   #^L24F1
         STA   L102B
         LDA   #$0000
         STA   L102D
         JSR   L7927
         JSR   L11D2
         LDA   #L88A7
         STA   L101D
         LDA   #^L88A7
         STA   L101F
         JSR   L84BC
         JSR   L8578
         JMP   L24AF

L2482    LDA   #L24B3
         STA   L101D
         LDA   #^L24B3
         STA   L101F
         STZ   L1021
         JSR   L7116
         LDA   #L24F9
         STA   L101D
         LDA   #^L24F9
         STA   L101F
         LDA   #$00AF
         STA   L1021
         JSR   L75FC
         JSR   L7B72
         JSR   L6FC2
L24AF    LDA   #$0000
L24B2    RTS

L24B3    DW    $00A0
         DW    $0000
         DW    $00B4
         DW    $0140
L24BB    DW    $0000
L24BD    DW    $0003
         DW    $0086
         DW    $0015
         DW    $011F
L24C5    DW    $001F
         DW    $0086
         DW    $0031
         DW    $011F
L24CD    DW    $003B
         DW    $0086
         DW    $004D
         DW    $011F
L24D5    ADRL  L24BD
         ADRL  L24C5
         ADRL  L24CD
L24E1    DW    $0061
         DW    $009A
         DW    $0090
         DW    $00CF
L24E9    DW    $0061
         DW    $00D9
         DW    $0090
         DW    $010E
L24F1    DW    $0000
         DW    $0000
         DW    $002F
         DW    $0035
L24F9    ASC   'Press any key to continue.'00
         DB    $00
L2515    STR   '/ARABIAN1.DSK'
L2523    STR   '/ARABIAN2.DSK'
         STR   '/ARAB.DATA'
L253C    STR   '1/arab.pics/mmenu.pc1'
L255E    ASC   'Arabian Nights disk 1.'00
         ASC   'Player 1'00
         ASC   'Player 2'00
         ASC   'Arabian Nights data disk.'00
L25A1    ASC   'Arabian Nights disk 2.'00
L25B8    DW    $0000
L25BA    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
L25E2    DA    L2668
         DA    L36AB
         DA    L40A6
         DA    L4FBE
         DA    L46C9
L25EC    DB    $00
         DB    $00
L25EE    DB    $00
         DB    $00
L25F0    DB    $00
         DB    $00
L25F2    DB    $00
         DB    $00
L25F4    DB    $00
         DB    $00
L25F6    DB    $00
         DB    $00
L25F8    DB    $00
         DB    $00
L25FA    DB    $00
         DB    $00
L25FC    DB    $00
         DB    $00
L25FE    DB    $00
         DB    $00
L2600    DB    $00
         DB    $00
L2602    DB    $00
         DB    $00
L2604    DB    $00
         DB    $00
         DB    $00
         DB    $00
L2608    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L2612    DB    $00
         DB    $00
         DB    $00
         DB    $00
L2616    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DW    $0064
         DW    $0140
L261E    DW    $0064
         DW    $0000
         DW    $00C8
         DW    $0140
L2626    DW    $0001
         DW    $0001
         DW    $0063
         DW    $013F
L262E    DW    $0000
         DW    $0000
         DW    $0064
         DW    $0140
L2636    DW    $0064
         DW    $0000
         DW    $00C8
         DW    $0140
         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
L2668    REP   #$30
         JSR   L6F28
         JSR   LA27E
L2670    JSR   L9612
         CMP   #$0001
         BNE   L267B
         JMP   L2847

L267B    CMP   #$0002
         BNE   L2683
         JMP   L268B

L2683    CMP   #$001B
         BNE   L2670
         JMP   L303C

L268B    STZ   L8B2F
         JSR   L216C
         JSR   L874A
         JSR   L7C07
         JSR   L8EC7
         LDA   #L8B48
         STA   L101D
         LDA   #^L8B48
         STA   L101F
         LDA   #L8B48
         STA   L1021
         LDA   #^L8B48
         STA   L1023
         LDA   #$0001
         STA   L1025
         JSR   L9228
         LDA   L8B39
         CMP   #$0002
         BNE   L26E4
         LDA   #L8B60
         STA   L101D
         LDA   #^L8B60
         STA   L101F
         LDA   #L8B60
         STA   L1021
         LDA   #^L8B60
         STA   L1023
         LDA   #$0002
         STA   L1025
         JSR   L9228
L26E4    JSR   L881C
         LDA   #L3123
         STA   L101D
         LDA   #^L3123
         STA   L101F
         LDA   L1151
         STA   L1021
         LDA   L1153
         STA   L1023
         LDA   #L1109
         STA   L1025
         LDA   #^L1109
         STA   L1027
         JSR   L7339
         LDA   #L3147
         STA   L101D
         LDA   #^L3147
         STA   L101F
         LDA   L1155
         STA   L1021
         LDA   L1157
         STA   L1023
         LDA   #L1129
         STA   L1025
         LDA   #^L1129
         STA   L1027
         JSR   L7339
L2735    JSR   L8859
         JSR   L988E
         CMP   #$0001
         BNE   L276C
         JSR   L9AB8
         CMP   #$0001
         BEQ   L275A
         LDA   #$000E
         STA   L101D
         JSR   L19B9
         LDA   #$0046
         STA   L316B
         JMP   L27CD

L275A    LDA   #$0010
         STA   L101D
         JSR   L19B9
         LDA   #$003F
         STA   L316B
         JMP   L27CD

L276C    JSR   L9CD3
         CMP   #$0001
         BNE   L2786
         LDA   #$0004
         STA   L101D
         JSR   L19B9
         LDA   #$0053
         STA   L316B
         JMP   L27AC

L2786    CMP   #$0002
         BNE   L279D
         LDA   #$0007
         STA   L101D
         JSR   L19B9
         LDA   #$003B
         STA   L316B
         JMP   L27AC

L279D    LDA   #$0001
         STA   L101D
         JSR   L19B9
         LDA   #$0021
         STA   L316B
L27AC    LDA   #$0001
         STA   L101D
         JSR   L1E06
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L7C93
         LDA   #$0007
         STA   L101D
         JSR   L188F
         JSR   L1226
L27CD    STZ   L316D
         LDA   #L3171
         STA   L101D
         LDA   #^L3171
         STA   L101F
         LDA   #$0064
         STA   L1021
         LDA   #$0000
         STA   L1025
         JSR   L7173
         JSR   L8897
         JSR   L85E8
         JSR   L86BA
         JSR   L17AE
         JSR   L7C93
L27FA    JSR   L6F28
         JSR   L32D3
         LDA   #$0000
         STA   L101D
         JSR   L2200
         JSR   L22DF
         CMP   #$001B
         BEQ   L2827
         JSR   L7BD6
         LDA   L8B37
         CMP   #$0001
         BNE   L27FA
         INC   L316D
         LDA   L316D
         CMP   #$000A
         BNE   L27FA
L2827    JSR   L868C
         JSR   L872B
         JSR   L1F35
         JSR   L1F47
         JSR   L8C78
         LDA   L101D
         CMP   #$0001
         BNE   L2841
         JMP   L2735

L2841    JSR   L825D
         JMP   L303C

L2847    JSR   L7C93
         JSR   L216C
         LDA   #$0001
         STA   L101D
         JSR   L1E06
         LDA   #$000F
         STA   L101D
         JSR   L19B9
         LDA   #L303F
         STA   L101D
         LDA   #^L303F
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         LDA   #L10C9
         STA   L1025
         LDA   #^L10C9
         STA   L1027
         JSR   L7339
         LDA   #$0000
         STA   L101D
         LDA   #L10C9
         STA   L1021
         LDA   #^L10C9
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L7B16
         LDA   #L3063
         STA   L101D
         LDA   #^L3063
         STA   L101F
         LDA   L1151
         STA   L1021
         LDA   L1153
         STA   L1023
         LDA   #L1109
         STA   L1025
         LDA   #^L1109
         STA   L1027
         JSR   L7339
         LDA   #L3083
         STA   L101D
         LDA   #^L3083
         STA   L101F
         LDA   L1155
         STA   L1021
         LDA   L1157
         STA   L1023
         LDA   #L1129
         STA   L1025
         LDA   #^L1129
         STA   L1027
         JSR   L7339
         LDA   #$0000
         STA   L2608
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L17AE
         LDA   #$0001
         STA   L101D
         LDA   #$0008
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0008
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
         LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L7B16
         LDA   #$0001
         STA   L3169
L2988    LDA   #$0001
         STA   L101D
         LDA   #$0008
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0008
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L29E2    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L29F0
         JMP   L2670

L29F0    CMP   #$0067
         BNE   L2A01
         LDA   #$0007
         STA   L101D
         JSR   L188F
         JMP   L29E2

L2A01    LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L2A24
         JMP   L2988

L2A24    LDA   #L30A3
         STA   L101D
         LDA   #^L30A3
         STA   L101F
         LDA   L1151
         STA   L1021
         LDA   L1153
         STA   L1023
         LDA   #L1109
         STA   L1025
         LDA   #^L1109
         STA   L1027
         JSR   L7339
         LDA   #$0001
         STA   L3169
L2A51    LDA   #$0001
         STA   L101D
         LDA   #$000A
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$000A
         STA   L25EE
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L2AA2    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L2AB0
         JMP   L2670

L2AB0    CMP   #$0067
         BNE   L2AC1
         LDA   #$0007
         STA   L101D
         JSR   L188F
         JMP   L2AA2

L2AC1    LDA   #$0000
         STA   L101D
         LDA   #L1129
         STA   L1021
         LDA   #^L1129
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L2AE4
         JMP   L2A51

L2AE4    LDA   #$0001
         STA   L3169
L2AEA    LDA   #$0001
         STA   L101D
         LDA   #$000A
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$000A
         STA   L25EE
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L185F
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L2B3B    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L2B49
         JMP   L2670

L2B49    CMP   #$0067
         BNE   L2B5A
         LDA   #$0007
         STA   L101D
         JSR   L188F
         JMP   L2B3B

L2B5A    JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L2B68
         JMP   L2AEA

L2B68    LDA   #$0002
         STA   L3169
L2B6E    LDA   #$0001
         STA   L101D
         LDA   #$0008
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0008
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L2BBF    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L2BCD
         JMP   L2670

L2BCD    CMP   #$0067
         BNE   L2BDE
         LDA   #$0007
         STA   L101D
         JSR   L188F
         JMP   L2BBF

L2BDE    LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L2C01
         JMP   L2B6E

L2C01    LDA   #$0002
         STA   L3169
L2C07    LDA   #$0001
         STA   L101D
         LDA   #$0008
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0008
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L185F
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L2C58    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L2C66
         JMP   L2670

L2C66    CMP   #$0067
         BNE   L2C77
         LDA   #$0007
         STA   L101D
         JSR   L188F
         JMP   L2C58

L2C77    LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L2C9A
         JMP   L2C07

L2C9A    LDA   #L30C3
         STA   L101D
         LDA   #^L30C3
         STA   L101F
         LDA   L1151
         STA   L1021
         LDA   L1153
         STA   L1023
         LDA   #L1109
         STA   L1025
         LDA   #^L1109
         STA   L1027
         JSR   L7339
         LDA   #$0004
         STA   L3169
L2CC7    LDA   #$0001
         STA   L101D
         LDA   #$000A
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$000A
         STA   L25EE
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L185F
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L2D18    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L2D26
         JMP   L2670

L2D26    CMP   #$0067
         BNE   L2D37
         LDA   #$0007
         STA   L101D
         JSR   L188F
         JMP   L2D18

L2D37    LDA   #$0000
         STA   L101D
         LDA   #L1129
         STA   L1021
         LDA   #^L1129
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L2D5A
         JMP   L2CC7

L2D5A    LDA   #L30E3
         STA   L101D
         LDA   #^L30E3
         STA   L101F
         LDA   L1155
         STA   L1021
         LDA   L1157
         STA   L1023
         LDA   #L1129
         STA   L1025
         LDA   #^L1129
         STA   L1027
         JSR   L7339
         LDA   #$0003
         STA   L3169
L2D87    LDA   #$0001
         STA   L101D
         LDA   #$0005
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0005
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L2DD8    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L2DE6
         JMP   L2670

L2DE6    CMP   #$0067
         BNE   L2DF7
         LDA   #$0007
         STA   L101D
         JSR   L188F
         JMP   L2DD8

L2DF7    LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L2E1A
         JMP   L2D87

L2E1A    LDA   #$0001
         STA   L3169
L2E20    LDA   #$0001
         STA   L101D
         LDA   #$0005
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0005
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L185F
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L2E71    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L2E7F
         JMP   L2670

L2E7F    CMP   #$0067
         BNE   L2E90
         LDA   #$0007
         STA   L101D
         JSR   L188F
         JMP   L2E71

L2E90    LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L2EB3
         JMP   L2E20

L2EB3    LDA   #L3103
         STA   L101D
         LDA   #^L3103
         STA   L101F
         LDA   L1151
         STA   L1021
         LDA   L1153
         STA   L1023
         LDA   #L1109
         STA   L1025
         LDA   #^L1109
         STA   L1027
         JSR   L7339
         LDA   #$0001
         STA   L3169
L2EE0    LDA   #$0001
         STA   L101D
         LDA   #$0005
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0005
         STA   L25EE
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L2F31    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L2F3F
         JMP   L2670

L2F3F    CMP   #$0067
         BNE   L2F50
         LDA   #$0007
         STA   L101D
         JSR   L188F
         JMP   L2F31

L2F50    LDA   #$0000
         STA   L101D
         LDA   #L1129
         STA   L1021
         LDA   #^L1129
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L2F73
         JMP   L2EE0

L2F73    LDA   #$0006
         STA   L3169
L2F79    LDA   #$0001
         STA   L101D
         LDA   #$0008
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0008
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L2FCA    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L2FD8
         JMP   L2670

L2FD8    CMP   #$0067
         BNE   L2FE9
         LDA   #$0007
         STA   L101D
         JSR   L188F
         JMP   L2FCA

L2FE9    LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L300C
         JMP   L2F79

L300C    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L301A
         JMP   L2670

L301A    CMP   #$0067
         BNE   L302B
         LDA   #$0007
         STA   L101D
         JSR   L188F
         JMP   L300C

L302B    JSR   L1F35
         JSR   L1F47
         JSR   L90B5
         CMP   #$001B
         BEQ   L303C
         JMP   L268B
L303C    JMP   L17AB

L303F    STR   '1/arab.pics/alintro.pc1'
L3063    STR   '1/arab.pics/al1.pc1'
L3083    STR   '1/arab.pics/al2.pc1'
L30A3    STR   '1/arab.pics/al3.pc1'
L30C3    STR   '1/arab.pics/al4.pc1'
L30E3    STR   '1/arab.pics/al5.pc1'
L3103    STR   '1/arab.pics/al6.pc1'
L3123    STR   '1/arab.pics/qastuff.pc1'
L3147    STR   '1/arab.pics/qascr.pc1'
L3169    DB    $00
         DB    $00
L316B    DB    $00
         DB    $00
L316D    DB    $00
         DB    $00
         DB    $00
         DB    $00
L3171    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L3243    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L326B    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L3293    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L32A1    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L32AF    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L32BD    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L32C5    DB    $00
         DB    $00
L32C7    ADRL  L3293
         ADRL  L32A1
         ADRL  L32AF
L32D3    REP   #$30
         LDA   #$0001
         STA   L101D
         LDA   L316B
         STA   L1021
         JSR   L7019
         TAX
         DEX
         SEP   #$20
         LDA   L3171,X
         BNE   L32D3
         INC   L3171,X
         REP   #$30
         STX   L101D
         JSR   L32F9
         RTS

L32F9    REP   #$30
         LDA   L101D
         STA   L33BA
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L70EC
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         JSR   L6EFD
         LDA   L8B37
         CMP   #$0001
         BNE   L3340
         LDA   #L8B48
         STA   $00
         LDA   #^L8B48
         STA   $02
         JMP   L334A

L3340    LDA   #L8B60
         STA   $00
         LDA   #^L8B60
         STA   $02
L334A    LDA   #L33C4+$10
         STA   $08
         LDA   #^L33C4+$10
         STA   $0A
         LDY   #$0000
         SEP   #$20
L3359    LDA   [$00],Y
         BEQ   L3363
         STA   [$08],Y
         INY
         JMP   L3359

L3363    LDA   #$2E
         STA   [$08],Y
         INY
         LDA   #$00
         STA   [$08],Y
         REP   #$30
         LDA   #$0001
         STA   L101D
         JSR   L75E0
         LDA   #L33C4
         STA   L101D
         LDA   #^L33C4
         STA   L101F
         LDA   #$00C4
         STA   L1021
         JSR   L75FC
         JSR   L6F28
         LDA   L33BA
         STA   L101D
         JSR   L33E3
         JSR   L343F
         JSR   L35E8
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   L114D
         STA   L1021
         LDA   L114F
         STA   L1023
         JSR   L70EC
         RTS

L33BA    DW    $0000
         DW    $0064
         DW    $0000
         DW    $00C8
         DW    $0140
L33C4    ASC   'It'27's your turn, '00
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
L33E3    REP   #$30
         LDA   L101D
         STA   L343D
         LDA   L25F8
         STA   $00
         LDA   L25FA
         STA   $02
         LDY   #$0000
         LDA   L343D
         CMP   #$0000
         BNE   L3403
         JMP   L341F

L3403    LDY   #$0000
L3406    LDX   #$0005
         SEP   #$20
L340B    LDA   [$00],Y
         INY
         CMP   #$0A
         BEQ   L3415
         JMP   L340B

L3415    DEX
         BNE   L340B
         REP   #$30
         DEC   L343D
         BNE   L3406
L341F    LDA   L25F8
         STA   L101D
         LDA   L25FA
         STA   L101F
         TYA
         CLC
         ADC   L101D
         STA   L101D
         LDA   #$0000
         ADC   L101F
         STA   L101F
         RTS

L343D    DW    $0000
L343F    REP   #$30
         LDA   #L3243
         STA   L1021
         LDA   #^L3243
         STA   L1023
         JSR   L35A7
         LDA   #L326B
         STA   L1021
         LDA   #^L326B
         STA   L1023
         JSR   L35A7
         LDA   L101D
         STA   L35A3
         LDA   L101F
         STA   L35A5
         LDA   #L32BD
         STA   L101D
         LDA   #^L32BD
         STA   L101F
         LDA   #$0003
         STA   L1021
         LDA   #$0000
         STA   L1025
         JSR   L7173
         LDA   #L32BD
         STA   $00
         LDA   #^L32BD
         STA   $02
L3490    REP   #$30
         LDA   #$0000
         STA   L101D
         LDA   #$0002
         STA   L1021
         JSR   L7019
         TAY
         SEP   #$20
         LDA   [$00],Y
         BNE   L3490
         LDA   #$01
         STA   [$00],Y
         REP   #$30
         INY
         STY   L32C5
         DEY
         LDA   L35A3
         STA   L101D
         LDA   L35A5
         STA   L101F
         LDA   #L32C7
         STA   $00
         LDA   #^L32C7
         STA   $02
         TYA
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L1021
         INY
         INY
         LDA   [$00],Y
         STA   L1023
         JSR   L35A7
         LDA   L101D
         STA   L35A3
         LDA   L101F
         STA   L35A5
         LDA   #L32BD
         STA   $00
         LDA   #^L32BD
         STA   $02
L34F2    REP   #$30
         LDA   #$0000
         STA   L101D
         LDA   #$0002
         STA   L1021
         JSR   L7019
         TAY
         SEP   #$20
         LDA   [$00],Y
         BNE   L34F2
         LDA   #$01
         STA   [$00],Y
         REP   #$30
         LDA   L35A3
         STA   L101D
         LDA   L35A5
         STA   L101F
         LDA   #L32C7
         STA   $00
         LDA   #^L32C7
         STA   $02
         TYA
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L1021
         INY
         INY
         LDA   [$00],Y
         STA   L1023
         JSR   L35A7
         LDA   L101D
         STA   L35A3
         LDA   L101F
         STA   L35A5
         LDA   #L32BD
         STA   $00
         LDA   #^L32BD
         STA   $02
L354F    REP   #$30
         LDA   #$0000
         STA   L101D
         LDA   #$0002
         STA   L1021
         JSR   L7019
         TAY
         SEP   #$20
         LDA   [$00],Y
         BNE   L354F
         LDA   #$01
         STA   [$00],Y
         REP   #$30
         LDA   L35A3
         STA   L101D
         LDA   L35A5
         STA   L101F
         LDA   #L32C7
         STA   $00
         LDA   #^L32C7
         STA   $02
         TYA
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L1021
         INY
         INY
         LDA   [$00],Y
         STA   L1023
         JSR   L35A7
         LDA   L101D
         STA   L35A3
         LDA   L101F
         STA   L35A5
         RTS

L35A3    DW    $0000
L35A5    DW    $0000
L35A7    REP   #$30
         LDA   L101D
         STA   $00
         LDA   L101F
         STA   $02
         LDA   L1021
         STA   $04
         LDA   L1023
         STA   $06
         LDY   #$0000
         SEP   #$20
L35C2    LDA   [$00],Y
         CMP   #$0D
         BEQ   L35CE
         STA   [$04],Y
         INY
         JMP   L35C2

L35CE    LDA   #$00
         STA   [$04],Y
         INY
         INY
         REP   #$30
         TYA
         CLC
         ADC   L101D
         STA   L101D
         LDA   #$0000
         ADC   L101F
         STA   L101F
         RTS

L35E8    REP   #$30
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         JSR   L6EFD
         LDA   #L3243
         STA   L101D
         LDA   #^L3243
         STA   L101F
         LDA   #$013F
         STA   L1021
         LDA   #$0000
         STA   L1025
         LDA   #$008B
         STA   L1029
         JSR   L218A
         LDA   #L326B
         STA   L101D
         LDA   #^L326B
         STA   L101F
         LDA   #$013F
         STA   L1021
         LDA   #$0000
         STA   L1025
         LDA   #$0098
         STA   L1029
         JSR   L218A
         LDA   #$0001
         STA   L101D
         JSR   L75E0
         LDA   #L3293
         STA   L101D
         LDA   #^L3293
         STA   L101F
         LDA   #$0098
         STA   L1021
         LDA   #$0086
         STA   L1025
         LDA   #$0010
         STA   L1029
         JSR   L218A
         LDA   #L32A1
         STA   L101D
         LDA   #^L32A1
         STA   L101F
         LDA   #$0098
         STA   L1021
         LDA   #$0086
         STA   L1025
         LDA   #$002C
         STA   L1029
         JSR   L218A
         LDA   #L32AF
         STA   L101D
         LDA   #^L32AF
         STA   L101F
         LDA   #$0098
         STA   L1021
         LDA   #$0086
         STA   L1025
         LDA   #$0048
         STA   L1029
         JSR   L218A
         JSR   L6F28
         RTS

L36AB    REP   #$30
         JSR   L6F28
         JSR   LA27E
L36B3    JSR   L9612
         CMP   #$0001
         BNE   L36BE
         JMP   L388A

L36BE    CMP   #$0002
         BNE   L36C6
         JMP   L36CE

L36C6    CMP   #$001B
         BNE   L36B3
         JMP   L3F23

L36CE    STZ   L8B2F
         JSR   L216C
         JSR   L7C07
         JSR   L874A
         JSR   L8EC7
         LDA   #L8B48
         STA   L101D
         LDA   #^L8B48
         STA   L101F
         LDA   #L8B48
         STA   L1021
         LDA   #^L8B48
         STA   L1023
         LDA   #$0001
         STA   L1025
         JSR   L9228
         LDA   L8B39
         CMP   #$0002
         BNE   L3727
         LDA   #L8B60
         STA   L101D
         LDA   #^L8B60
         STA   L101F
         LDA   #L8B60
         STA   L1021
         LDA   #^L8B60
         STA   L1023
         LDA   #$0002
         STA   L1025
         JSR   L9228
L3727    JSR   L881C
         LDA   #L3123
         STA   L101D
         LDA   #^L3123
         STA   L101F
         LDA   L1151
         STA   L1021
         LDA   L1153
         STA   L1023
         LDA   #L1109
         STA   L1025
         LDA   #^L1109
         STA   L1027
         JSR   L7339
         LDA   #L3147
         STA   L101D
         LDA   #^L3147
         STA   L101F
         LDA   L1155
         STA   L1021
         LDA   L1157
         STA   L1023
         LDA   #L1129
         STA   L1025
         LDA   #^L1129
         STA   L1027
         JSR   L7339
L3778    JSR   L8859
         JSR   L988E
         CMP   #$0001
         BNE   L37AF
         JSR   L9AB8
         CMP   #$0001
         BEQ   L379D
         LDA   #$0014
         STA   L101D
         JSR   L19B9
         LDA   #$0023
         STA   L316B
         JMP   L3810

L379D    LDA   #$0016
         STA   L101D
         JSR   L19B9
         LDA   #$0026
         STA   L316B
         JMP   L3810

L37AF    JSR   L9CD3
         CMP   #$0001
         BNE   L37C9
         LDA   #$0006
         STA   L101D
         JSR   L19B9
         LDA   #$0031
         STA   L316B
         JMP   L37EF

L37C9    CMP   #$0002
         BNE   L37E0
         LDA   #$0009
         STA   L101D
         JSR   L19B9
         LDA   #$001B
         STA   L316B
         JMP   L37EF

L37E0    LDA   #$0003
         STA   L101D
         JSR   L19B9
         LDA   #$0014
         STA   L316B
L37EF    LDA   #$0003
         STA   L101D
         JSR   L1E06
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L7C93
         LDA   #$0004
         STA   L101D
         JSR   L188F
         JSR   L1226
L3810    STZ   L316D
         LDA   #L3171
         STA   L101D
         LDA   #^L3171
         STA   L101F
         LDA   #$0064
         STA   L1021
         LDA   #$0000
         STA   L1025
         JSR   L7173
         JSR   L8897
         JSR   L85E8
         JSR   L86BA
         JSR   L17AE
         JSR   L7C93
L383D    JSR   L6F28
         JSR   L32D3
         LDA   #$0000
         STA   L101D
         JSR   L2200
         JSR   L22DF
         CMP   #$001B
         BEQ   L386A
         JSR   L7BD6
         LDA   L8B37
         CMP   #$0001
         BNE   L383D
         INC   L316D
         LDA   L316D
         CMP   #$000A
         BNE   L383D
L386A    JSR   L868C
         JSR   L872B
         JSR   L1F35
         JSR   L1F47
         JSR   L8C78
         LDA   L101D
         CMP   #$0001
         BNE   L3884
         JMP   L3778

L3884    JSR   L825D
         JMP   L3F23

L388A    JSR   L7C93
         JSR   L216C
         LDA   #$0003
         STA   L101D
         JSR   L1E06
         LDA   #$0015
         STA   L101D
         JSR   L19B9
         LDA   #L3F26
         STA   L101D
         LDA   #^L3F26
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         LDA   #L10C9
         STA   L1025
         LDA   #^L10C9
         STA   L1027
         JSR   L7339
         LDA   #$0000
         STA   L101D
         LDA   #L10C9
         STA   L1021
         LDA   #^L10C9
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L7B16
         LDA   #L3F4A
         STA   L101D
         LDA   #^L3F4A
         STA   L101F
         LDA   L1151
         STA   L1021
         LDA   L1153
         STA   L1023
         LDA   #L1109
         STA   L1025
         LDA   #^L1109
         STA   L1027
         JSR   L7339
         LDA   #L3F6A
         STA   L101D
         LDA   #^L3F6A
         STA   L101F
         LDA   L1155
         STA   L1021
         LDA   L1157
         STA   L1023
         LDA   #L1129
         STA   L1025
         LDA   #^L1129
         STA   L1027
         JSR   L7339
         LDA   #$0000
         STA   L2608
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L17AE
         LDA   #$0001
         STA   L101D
         LDA   #$0002
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0002
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
         LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L7B16
         LDA   #$0002
         STA   L3169
L39CB    LDA   #$0001
         STA   L101D
         LDA   #$0002
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0002
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L185F
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L3A25    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L3A33
         JMP   L36B3

L3A33    CMP   #$0067
         BNE   L3A44
         LDA   #$0004
         STA   L101D
         JSR   L188F
         JMP   L3A25

L3A44    LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L3A67
         JMP   L39CB

L3A67    LDA   #L3F8A
         STA   L101D
         LDA   #^L3F8A
         STA   L101F
         LDA   L1151
         STA   L1021
         LDA   L1153
         STA   L1023
         LDA   #L1109
         STA   L1025
         LDA   #^L1109
         STA   L1027
         JSR   L7339
         LDA   #$0001
         STA   L3169
L3A94    LDA   #$0001
         STA   L101D
         LDA   #$0009
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0009
         STA   L25EE
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   #L3FDA
         STA   L1021
         LDA   #^L3FDA
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         LDA   #L3FE2
         STA   L1029
         LDA   #^L3FE2
         STA   L102B
         LDA   #$0000
         STA   L102D
         JSR   L7927
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L3B27    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L3B35
         JMP   L36B3

L3B35    CMP   #$0067
         BNE   L3B46
         LDA   #$0004
         STA   L101D
         JSR   L188F
         JMP   L3B27

L3B46    LDA   #$0000
         STA   L101D
         LDA   #L1129
         STA   L1021
         LDA   #^L1129
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L3B69
         JMP   L3A94

L3B69    LDA   #$0004
         STA   L3169
L3B6F    LDA   #$0001
         STA   L101D
         LDA   #$0009
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0009
         STA   L25EE
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   #L3FCA
         STA   L1021
         LDA   #^L3FCA
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         LDA   #L3FD2
         STA   L1029
         LDA   #^L3FD2
         STA   L102B
         LDA   #$0000
         STA   L102D
         JSR   L7927
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L3C02    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L3C10
         JMP   L36B3

L3C10    CMP   #$0067
         BNE   L3C21
         LDA   #$0004
         STA   L101D
         JSR   L188F
         JMP   L3C02

L3C21    LDA   #$0000
         STA   L101D
         LDA   #L1129
         STA   L1021
         LDA   #^L1129
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L3C44
         JMP   L3B6F

L3C44    LDA   #L3FAA
         STA   L101D
         LDA   #^L3FAA
         STA   L101F
         LDA   L1155
         STA   L1021
         LDA   L1157
         STA   L1023
         LDA   #L1129
         STA   L1025
         LDA   #^L1129
         STA   L1027
         JSR   L7339
         LDA   #$0002
         STA   L3169
L3C71    LDA   #$0001
         STA   L101D
         LDA   #$0005
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0005
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L3CCB    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L3CD9
         JMP   L36B3

L3CD9    CMP   #$0067
         BNE   L3CEA
         LDA   #$0004
         STA   L101D
         JSR   L188F
         JMP   L3CCB

L3CEA    LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L3D0D
         JMP   L3C71

L3D0D    LDA   #$0002
         STA   L3169
L3D13    LDA   #$0001
         STA   L101D
         LDA   #$0005
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0005
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L185F
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L3D6D    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L3D7B
         JMP   L36B3

L3D7B    CMP   #$0067
         BNE   L3D8C
         LDA   #$0004
         STA   L101D
         JSR   L188F
         JMP   L3D6D

L3D8C    LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L3DAF
         JMP   L3D13

L3DAF    LDA   #$0001
         STA   L3169
L3DB5    LDA   #$0001
         STA   L101D
         LDA   #$0006
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0006
         STA   L25EE
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L3E0F    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L3E1D
         JMP   L36B3

L3E1D    CMP   #$0067
         BNE   L3E2E
         LDA   #$0004
         STA   L101D
         JSR   L188F
         JMP   L3E0F

L3E2E    LDA   #$0000
         STA   L101D
         LDA   #L1129
         STA   L1021
         LDA   #^L1129
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L3E51
         JMP   L3DB5

L3E51    LDA   #$0003
         STA   L3169
L3E57    LDA   #$0001
         STA   L101D
         LDA   #$0006
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$0006
         STA   L25EE
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L185F
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L3EB1    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L3EBF
         JMP   L36B3

L3EBF    CMP   #$0067
         BNE   L3ED0
         LDA   #$0004
         STA   L101D
         JSR   L188F
         JMP   L3EB1

L3ED0    LDA   #$0000
         STA   L101D
         LDA   #L1129
         STA   L1021
         LDA   #^L1129
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L3EF3
         JMP   L3E57

L3EF3    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L3F01
         JMP   L36B3

L3F01    CMP   #$0067
         BNE   L3F12
         LDA   #$0004
         STA   L101D
         JSR   L188F
         JMP   L3EF3

L3F12    JSR   L1F35
         JSR   L1F47
         JSR   L90B5
         CMP   #$001B
         BEQ   L3F23
         JMP   L36CE
L3F23    JMP   L17AB

L3F26    STR   '1/arab.pics/abintro.pc1'
L3F4A    STR   '1/arab.pics/ab1.pc1'
L3F6A    STR   '1/arab.pics/ab2.pc1'
L3F8A    STR   '1/arab.pics/ab3.pc1'
L3FAA    STR   '1/arab.pics/ab4.pc1'
L3FCA    DW    $0064
         DW    $0058
         DW    $00C8
         DW    $00BD
L3FD2    DW    $0064
         DW    $00A5
         DW    $00C8
         DW    $010A
L3FDA    DW    $0064
         DW    $0000
         DW    $00C8
         DW    $0053
L3FE2    DW    $0064
         DW    $0079
         DW    $00C8
         DW    $00CC
L3FEA    STR   '1/arab.pics/ebintro.pc1'
L400E    STR   '1/arab.pics/eb1.pc1'
L402E    STR   '1/arab.pics/eb2.pc1'
L404E    STR   '1/arab.pics/eb3.pc1'
L406E    STR   '1/arab.pics/eb4.pc1'
         DW    $0062
         DW    $0002
         DW    $0090
         DW    $0051
         DW    $0008
         DW    $0002
         DW    $0036
         DW    $0051
         DW    $0072
         DW    $0002
         DW    $00A0
         DW    $0051
L40A6    REP   #$30
         JSR   L6F28
         JSR   LA27E
L40AE    JSR   L9612
         CMP   #$0001
         BNE   L40B9
         JMP   L4285

L40B9    CMP   #$0002
         BNE   L40C1
         JMP   L40C9

L40C1    CMP   #$001B
         BNE   L40AE
         JMP   L46C6

L40C9    STZ   L8B2F
         JSR   L216C
         JSR   L7C07
         JSR   L874A
         JSR   L8EC7
         LDA   #L8B48
         STA   L101D
         LDA   #^L8B48
         STA   L101F
         LDA   #L8B48
         STA   L1021
         LDA   #^L8B48
         STA   L1023
         LDA   #$0001
         STA   L1025
         JSR   L9228
         LDA   L8B39
         CMP   #$0002
         BNE   L4122
         LDA   #L8B60
         STA   L101D
         LDA   #^L8B60
         STA   L101F
         LDA   #L8B60
         STA   L1021
         LDA   #^L8B60
         STA   L1023
         LDA   #$0002
         STA   L1025
         JSR   L9228
L4122    JSR   L881C
         LDA   #L3123
         STA   L101D
         LDA   #^L3123
         STA   L101F
         LDA   L1151
         STA   L1021
         LDA   L1153
         STA   L1023
         LDA   #L1109
         STA   L1025
         LDA   #^L1109
         STA   L1027
         JSR   L7339
         LDA   #L3147
         STA   L101D
         LDA   #^L3147
         STA   L101F
         LDA   L1155
         STA   L1021
         LDA   L1157
         STA   L1023
         LDA   #L1129
         STA   L1025
         LDA   #^L1129
         STA   L1027
         JSR   L7339
L4173    JSR   L8859
         JSR   L988E
         CMP   #$0001
         BNE   L41AA
         JSR   L9AB8
         CMP   #$0001
         BEQ   L4198
         LDA   #$0011
         STA   L101D
         JSR   L19B9
         LDA   #$002A
         STA   L316B
         JMP   L420B

L4198    LDA   #$0013
         STA   L101D
         JSR   L19B9
         LDA   #$0023
         STA   L316B
         JMP   L420B

L41AA    JSR   L9CD3
         CMP   #$0001
         BNE   L41C4
         LDA   #$0005
         STA   L101D
         JSR   L19B9
         LDA   #$001E
         STA   L316B
         JMP   L41EA

L41C4    CMP   #$0002
         BNE   L41DB
         LDA   #$0008
         STA   L101D
         JSR   L19B9
         LDA   #$0014
         STA   L316B
         JMP   L41EA

L41DB    LDA   #$0002
         STA   L101D
         JSR   L19B9
         LDA   #$0015
         STA   L316B
L41EA    LDA   #$0002
         STA   L101D
         JSR   L1E06
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L7C93
         LDA   #$0003
         STA   L101D
         JSR   L188F
         JSR   L1226
L420B    STZ   L316D
         LDA   #L3171
         STA   L101D
         LDA   #^L3171
         STA   L101F
         LDA   #$0064
         STA   L1021
         LDA   #$0000
         STA   L1025
         JSR   L7173
         JSR   L8897
         JSR   L85E8
         JSR   L86BA
         JSR   L17AE
         JSR   L7C93
L4238    JSR   L6F28
         JSR   L32D3
         LDA   #$0000
         STA   L101D
         JSR   L2200
         JSR   L22DF
         CMP   #$001B
         BEQ   L4265
         JSR   L7BD6
         LDA   L8B37
         CMP   #$0001
         BNE   L4238
         INC   L316D
         LDA   L316D
         CMP   #$000A
         BNE   L4238
L4265    JSR   L868C
         JSR   L872B
         JSR   L1F35
         JSR   L1F47
         JSR   L8C78
         LDA   L101D
         CMP   #$0001
         BNE   L427F
         JMP   L4173

L427F    JSR   L825D
         JMP   L46C6

L4285    JSR   L7C93
         JSR   L216C
         LDA   #$0002
         STA   L101D
         JSR   L1E06
         LDA   #$0012
         STA   L101D
         JSR   L19B9
         LDA   #L3FEA
         STA   L101D
         LDA   #^L3FEA
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         LDA   #L10C9
         STA   L1025
         LDA   #^L10C9
         STA   L1027
         JSR   L7339
         LDA   #$0000
         STA   L101D
         LDA   #L10C9
         STA   L1021
         LDA   #^L10C9
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L7B16
         LDA   #L400E
         STA   L101D
         LDA   #^L400E
         STA   L101F
         LDA   L1151
         STA   L1021
         LDA   L1153
         STA   L1023
         LDA   #L1109
         STA   L1025
         LDA   #^L1109
         STA   L1027
         JSR   L7339
         LDA   #L402E
         STA   L101D
         LDA   #^L402E
         STA   L101F
         LDA   L1155
         STA   L1021
         LDA   L1157
         STA   L1023
         LDA   #L1129
         STA   L1025
         LDA   #^L1129
         STA   L1027
         JSR   L7339
         LDA   #$0000
         STA   L2608
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L17AE
         LDA   #$0001
         STA   L101D
         LDA   #$000B
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$000B
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   #$0001
         STA   L101D
         JSR   L1823
         JSR   L7B72
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
         LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L7B16
         LDA   #L404E
         STA   L101D
         LDA   #^L404E
         STA   L101F
         LDA   L1151
         STA   L1021
         LDA   L1153
         STA   L1023
         LDA   #L1109
         STA   L1025
         LDA   #^L1109
         STA   L1027
         JSR   L7339
         LDA   #$0002
         STA   L3169
L43F0    LDA   #$0001
         STA   L101D
         LDA   #$000B
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$000B
         STA   L25EE
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L444A    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L4458
         JMP   L40AE

L4458    CMP   #$0067
         BNE   L4469
         LDA   #$0003
         STA   L101D
         JSR   L188F
         JMP   L444A

L4469    LDA   #$0000
         STA   L101D
         LDA   #L1129
         STA   L1021
         LDA   #^L1129
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L448C
         JMP   L43F0

L448C    LDA   #L406E
         STA   L101D
         LDA   #^L406E
         STA   L101F
         LDA   L1155
         STA   L1021
         LDA   L1157
         STA   L1023
         LDA   #L1129
         STA   L1025
         LDA   #^L1129
         STA   L1027
         JSR   L7339
         LDA   #$0003
         STA   L3169
L44B9    LDA   #$0001
         STA   L101D
         LDA   #$000B
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$000B
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L4513    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L4521
         JMP   L40AE

L4521    CMP   #$0067
         BNE   L4532
         LDA   #$0003
         STA   L101D
         JSR   L188F
         JMP   L4513

L4532    LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L4555
         JMP   L44B9

L4555    LDA   #$0004
         STA   L3169
L455B    LDA   #$0001
         STA   L101D
         LDA   #$000B
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$000B
         STA   L25EE
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L45B5    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L45C3
         JMP   L40AE

L45C3    CMP   #$0067
         BNE   L45D4
         LDA   #$0003
         STA   L101D
         JSR   L188F
         JMP   L45B5

L45D4    LDA   #$0000
         STA   L101D
         LDA   #L1129
         STA   L1021
         LDA   #^L1129
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L45F7
         JMP   L455B

L45F7    LDA   #$0001
         STA   L3169
L45FD    LDA   #$0001
         STA   L101D
         LDA   #$000B
         STA   L1021
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L1F59
         LDA   #$000B
         STA   L25EE
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         JSR   L182F
         LDA   #$0001
         STA   L101D
         JSR   L1823
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #$000A
         STA   L1021
         JSR   L1FAA
L4657    JSR   L7B72
         JSR   L17FF
         CMP   #$001B
         BNE   L4665
         JMP   L40AE

L4665    CMP   #$0067
         BNE   L4676
         LDA   #$0003
         STA   L101D
         JSR   L188F
         JMP   L4657

L4676    LDA   #$0000
         STA   L101D
         LDA   #L1109
         STA   L1021
         LDA   #^L1109
         STA   L1023
         JSR   L71A6
         JSR   L17DE
         JSR   L11FC
         DEC   L3169
         BEQ   L4699
         JMP   L45FD

L4699    JSR   L17FF
         CMP   #$001B
         BNE   L46A4
         JMP   L40AE

L46A4    CMP   #$0067
         BNE   L46B5
         LDA   #$0003
         STA   L101D
         JSR   L188F
         JMP   L4699

L46B5    JSR   L1F35
         JSR   L1F47
         JSR   L90B5
         CMP   #$001B
         BEQ   L46C6
         JMP   L40C9
L46C6    JMP   L17AB

L46C9    REP   #$30
         JSR   L216C
         JSR   L4C8C
         JSR   L6F28
         STZ   L8B2F
         JSR   L7C07
         JSR   L874A
         JSR   L8EC7
         LDA   #L8B48
         STA   L101D
         LDA   #^L8B48
         STA   L101F
         LDA   #L8B48
         STA   L1021
         LDA   #^L8B48
         STA   L1023
         LDA   #$0001
         STA   L1025
         JSR   L9228
         LDA   L8B39
         CMP   #$0002
         BNE   L472A
         LDA   #L8B60
         STA   L101D
         LDA   #^L8B60
         STA   L101F
         LDA   #L8B60
         STA   L1021
         LDA   #^L8B60
         STA   L1023
         LDA   #$0002
         STA   L1025
         JSR   L9228
L472A    JSR   L881C
L472D    JSR   L85E8
         JSR   L86BA
         JSR   L4AC0
         STZ   L101D
         LDA   #$0007
         STA   L1021
         LDA   #L4D7B
         STA   L1025
         LDA   #^L4D7B
         STA   L1027
         JSR   L4A52
         JSR   LA27E
         LDA   #$0001
         STA   L101D
         JSR   L75E0
         LDA   #$0000
         STA   L101D
         LDA   #L10C9
         STA   L1021
         LDA   #^L10C9
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L7B16
         JSR   L11FC
         STZ   L4F78
L4781    JSR   L4B46
L4784    JSR   L49C9
         CMP   #$FFFF
         BEQ   L479F
         CMP   #$FFFE
         BNE   L4794
         JMP   L4885

L4794    STA   L4F8E
         STA   L101D
         JSR   L48F4
         BRA   L47A5
L479F    JSR   L11FC
         JMP   L4784

L47A5    JSR   L49C9
         CMP   #$FFFF
         BEQ   L47C5
         CMP   #$FFFE
         BNE   L47B5
         JMP   L4885

L47B5    CMP   L4F8E
         BEQ   L47C5
         STA   L4F94
         STA   L101D
         JSR   L48F4
         BRA   L47CB
L47C5    JSR   L11FC
         JMP   L47A5

L47CB    LDA   #L4D7B
         STA   $04
         LDA   #^L4D7B
         STA   $06
         LDA   L4F94
         ASL
         TAY
         LDA   [$04],Y
         STA   L101D
         LDA   L4F8E
         ASL
         TAY
         LDA   [$04],Y
         CMP   L101D
         BEQ   L47EE
         JMP   L482D

L47EE    JSR   L7BA6
         LDA   #L88A7
         STA   L101D
         LDA   #^L88A7
         STA   L101F
         JSR   L489F
         JSR   L8578
         LDA   #L4D7B
         STA   $10
         LDA   #^L4D7B
         STA   $12
         LDA   L4F8E
         ASL
         TAY
         LDA   #$FFFF
         STA   [$10],Y
         STA   L4F8E
         LDA   L4F94
         ASL
         TAY
         LDA   #$FFFF
         STA   [$10],Y
         STA   L4F94
         INC   L4F78
         JMP   L4871

L482D    JSR   L7BBE
         LDA   #L4DF1
         STA   L101D
         LDA   #^L4DF1
         STA   L101F
         JSR   L489F
         JSR   L11A8
         JSR   L852B
         JSR   L7B72
         JSR   L6FC2
         JSR   L7B72
         LDA   L4F8E
         STA   L101D
         JSR   L495B
         LDA   L4F94
         STA   L101D
         JSR   L495B
         LDA   #$FFFF
         STA   L4F8E
         LDA   #$FFFF
         STA   L4F94
         JSR   L7BD6
         BRA   L487A
L4871    JSR   L7B72
         JSR   L6FC2
         JSR   L7B72
L487A    LDA   L4F78
         CMP   #$0008
         BEQ   L4885
         JMP   L4781

L4885    JSR   L868C
         JSR   L872B
         JSR   L8C78
         LDA   L101D
         CMP   #$0001
         BEQ   L489C
         JSR   L825D
         JMP   L17AB
L489C    JMP   L472D

L489F    REP   #$30
L48A1    JSR   L700B
         AND   #$0003
         CMP   #$0003
         BEQ   L48A1
         STA   L8B2D
         ASL
         ASL
         CLC
         ADC   L101D
         STA   L1039
         LDA   #$0000
         ADC   L101F
         STA   L103B
         LDA   #L4E01
         STA   L101D
         LDA   #^L4E01
         STA   L101F
         STZ   L1021
         JSR   L7116
         LDA   L1039
         STA   $00
         LDA   L103B
         STA   $02
         LDA   [$00]
         STA   L101D
         LDY   #$0002
         LDA   [$00],Y
         STA   L101F
         LDA   #$00C1
         STA   L1021
         JSR   L75FC
         RTS

L48F4    REP   #$30
         LDA   L101D
         STA   L103D
         LDA   #L4D7B
         STA   $04
         LDA   #^L4D7B
         STA   $06
         LDA   L103D
         ASL
         TAY
         LDA   [$04],Y
         ASL
         ASL
         TAY
         LDA   #L4D5B
         STA   $04
         LDA   #^L4D5B
         STA   $06
         LDA   [$04],Y
         STA   L101D
         INY
         INY
         LDA   [$04],Y
         STA   L1021
         LDA   #$2000
         STA   L1025
         LDA   #$00E1
         STA   L1027
         LDA   #L4E09
         STA   L102D
         LDA   #^L4E09
         STA   L102F
         LDA   L103D
         ASL
         ASL
         ASL
         CLC
         ADC   L102D
         STA   L1029
         LDA   #$0000
         ADC   L102F
         STA   L102B
         JSR   L4C23
         JSR   L11FC
         RTS

L495B    REP   #$30
         LDA   L101D
         STA   L103D
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         LDA   #L4E09
         STA   L102D
         LDA   #^L4E09
         STA   L102F
         LDA   L103D
         ASL
         ASL
         ASL
         CLC
         ADC   L102D
         STA   L1021
         LDA   #$0000
         ADC   L102F
         STA   L1023
         LDA   #$2000
         STA   L1025
         LDA   #$00E1
         STA   L1027
         LDA   #L4E09
         STA   L102D
         LDA   #^L4E09
         STA   L102F
         LDA   L103D
         ASL
         ASL
         ASL
         CLC
         ADC   L102D
         STA   L1029
         LDA   #$0000
         ADC   L102F
         STA   L102B
         LDA   #$0000
         STA   L102D
         JSR   L7927
         RTS

L49C9    REP   #$30
         JSR   L7151
L49CE    JSR   L6F94
         CMP   #$0000
         BEQ   L49D9
         JMP   L4A02

L49D9    JSR   L6F4C
         LDA   L1025
         BEQ   L49CE
         LDA   #L4E09
         STA   L1025
         LDA   #^L4E09
         STA   L1027
         LDA   #$0010
         STA   L1029
         JSR   L7780
         LDA   L102D
         BNE   L49FE
         JMP   L4A3F

L49FE    DEC
         JMP   L4A1E

L4A02    CMP   #$001B
         BNE   L4A0A
         JMP   L4A48

L4A0A    ORA   #$0020
         CMP   #$0061
         BCS   L4A15
L4A12    JMP   L4A3F

L4A15    CMP   #$0071
         BCS   L4A12
         SEC
         SBC   #$0061
L4A1E    STA   L1035
         JSR   L7147
         LDA   #L4D7B
         STA   $00
         LDA   #^L4D7B
         STA   $02
         LDA   L1035
         ASL
         TAY
         LDA   [$00],Y
         CMP   #$FFFF
         BNE   L4A3B
         RTS

L4A3B    LDA   L1035
         RTS

L4A3F    JSR   L77D0
         JSR   L11FC
         JMP   L49CE

L4A48    JSR   L77D0
         JSR   L7B72
         LDA   #$FFFE
         RTS

L4A52    REP   #$30
         LDA   L1021
         SEC
         SBC   L101D
         INC
         STA   L1031
         ASL
         DEC
         STA   L102D
         INC
         TAX
         LDA   L1025
         STA   $0C
         LDA   L1027
         STA   $0E
         LDA   L101D
         STA   L1035
         LDA   #$FFFF
         LDY   #$0000
L4A7C    STA   [$0C],Y
         INY
         INY
         DEX
         BNE   L4A7C
L4A83    STZ   L101D
         LDA   L102D
         STA   L1021
         JSR   L7019
         ASL
         TAY
         LDA   [$0C],Y
         CMP   #$FFFF
         BNE   L4A83
         LDA   L1035
         STA   [$0C],Y
L4A9D    STZ   L101D
         LDA   L102D
         STA   L1021
         JSR   L7019
         ASL
         TAY
         LDA   [$0C],Y
         CMP   #$FFFF
         BNE   L4A9D
         LDA   L1035
         STA   [$0C],Y
         INC   L1035
         DEC   L1031
         BNE   L4A83
         RTS

L4AC0    REP   #$30
         LDA   #L4D5B
         STA   $00
         LDA   #^L4D5B
         STA   $02
         STZ   L101D
         LDY   #$0000
L4AD2    PHY
         JSR   L700B
         PLY
         AND   #$0003
         BEQ   L4AD2
         LDA   #$0001
         STA   L109F
         TAX
L4AE3    PHY
         PHX
         JSR   L700B
         PLX
         PLY
         AND   #$001F
         CMP   #$0013
         BCS   L4AE3
         INC
         STA   L10A1
         TYX
         LDA   L101D
         BNE   L4AFF
         JMP   L4B28

L4AFF    LDY   #$0000
         STZ   L1021
L4B05    LDA   L109F
         CMP   [$00],Y
         BNE   L4B19
         INY
         INY
         LDA   L10A1
         CMP   [$00],Y
         BNE   L4B1B
         TXY
         JMP   L4AD2

L4B19    INY
         INY
L4B1B    INY
         INY
         INC   L1021
         LDA   L1021
         CMP   L101D
         BNE   L4B05
L4B28    TXY
         LDA   L109F
         STA   [$00],Y
         INY
         INY
         LDA   L10A1
         STA   [$00],Y
         INC   L101D
         LDA   L101D
         CMP   #$0008
         BEQ   L4B45
         INY
         INY
         JMP   L4AD2
L4B45    RTS

L4B46    REP   #$30
         LDA   #L4E01
         STA   L101D
         LDA   #^L4E01
         STA   L101F
         STZ   L1021
         JSR   L7116
         LDA   L8B37
         CMP   #$0001
         BNE   L4B6F
         LDA   #L8B48
         STA   $00
         LDA   #^L8B48
         STA   $02
         JMP   L4B79

L4B6F    LDA   #L8B60
         STA   $00
         LDA   #^L8B60
         STA   $02
L4B79    LDA   #L4F54+$10
         STA   $08
         LDA   #^L4F54+$10
         STA   $0A
         LDY   #$0000
         SEP   #$20
L4B88    LDA   [$00],Y
         BEQ   L4B92
         STA   [$08],Y
         INY
         JMP   L4B88

L4B92    LDA   #$2E
         STA   [$08],Y
         INY
         LDA   #$00
         STA   [$08],Y
         REP   #$30
         LDA   #L4F54
         STA   L101D
         LDA   #^L4F54
         STA   L101F
         LDA   #$00C1
         STA   L1021
         JSR   L75FC
         RTS

         REP   #$30
         LDY   L8B2D
         BNE   L4BDB
         LDA   L8A86
         STA   L101D
         LDA   L8A88
         STA   L101F
         LDA   L8A8A
         STA   L1021
         LDA   L8A8C
         STA   L1023
         LDA   L8A8E
         STA   L1025
         JMP   L4C1F

L4BDB    CPY   #$0002
         BNE   L4C01
         LDA   L8AAD
         STA   L101D
         LDA   L8AAF
         STA   L101F
         LDA   L8AB1
         STA   L1021
         LDA   L8AB3
         STA   L1023
         LDA   L8AB5
         STA   L1025
         JMP   L4C1F

L4C01    LDA   L8AD4
         STA   L101D
         LDA   L8AD6
         STA   L101F
         LDA   L8AD8
         STA   L1021
         LDA   L8ADA
         STA   L1023
         LDA   L8ADC
         STA   L1025
L4C1F    JSR   L1185
         RTS

L4C23    REP   #$30
         LDA   L101D
         STA   L102D
         LDA   L114D
         STA   L101D
         LDA   L114F
         STA   L101F
         LDA   L102D
         CMP   #$0001
         BEQ   L4C5F
         LDA   L1151
         STA   L101D
         LDA   L1153
         STA   L101F
         LDA   L102D
         CMP   #$0002
         BEQ   L4C5F
         LDA   L1155
         STA   L101D
         LDA   L1157
         STA   L101F
L4C5F    LDA   #L4E09
         STA   L102D
         LDA   #^L4E09
         STA   L102F
         LDA   L1021
         DEC
         ASL
         ASL
         ASL
         CLC
         ADC   L102D
         STA   L1021
         LDA   #$0000
         ADC   L102F
         STA   L1023
         LDA   #$0000
         STA   L102D
         JSR   L7927
         RTS

L4C8C    REP   #$30
         LDA   #L4CDD
         STA   L101D
         LDA   #^L4CDD
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         LDA   #L10C9
         STA   L1025
         LDA   #^L10C9
         STA   L1027
         JSR   L7339
         LDA   #L4CFC
         STA   L101D
         LDA   #^L4CFC
         STA   L101F
         LDA   L114D
         STA   L1021
         LDA   L114F
         STA   L1023
         LDA   #L10E9
         STA   L1025
         LDA   #^L10E9
         STA   L1027
         JSR   L7339
         RTS

L4CDD    STR   '1/arab.pics/mf.pc1'
L4CFC    STR   '1/arab.pics/mp.pc1'
         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
L4D5B    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L4D7B    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         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  L4EA9
         ADRL  L4EB7
         ADRL  L4EC2
         ADRL  L4ECC
L4DF1    ADRL  L4EDA
         ADRL  L4EF9
         ADRL  L4F18
         ADRL  L4F36
L4E01    DW    $00B2
         DW    $0002
         DW    $00C7
         DW    $013E
L4E09    DW    $0000
         DW    $0000
         DW    $0028
         DW    $0050
         DW    $0000
         DW    $0050
         DW    $0028
         DW    $00A0
         DW    $0000
         DW    $00A0
         DW    $0028
         DW    $00F0
         DW    $0000
         DW    $00F0
         DW    $0028
         DW    $0140
         DW    $0028
         DW    $0000
         DW    $0050
         DW    $0050
         DW    $0028
         DW    $0050
         DW    $0050
         DW    $00A0
         DW    $0028
         DW    $00A0
         DW    $0050
         DW    $00F0
         DW    $0028
         DW    $00F0
         DW    $0050
         DW    $0140
         DW    $0050
         DW    $0000
         DW    $0078
         DW    $0050
         DW    $0050
         DW    $0050
         DW    $0078
         DW    $00A0
         DW    $0050
         DW    $00A0
         DW    $0078
         DW    $00F0
         DW    $0050
         DW    $00F0
         DW    $0078
         DW    $0140
         DW    $0078
         DW    $0000
         DW    $00A0
         DW    $0050
         DW    $0078
         DW    $0050
         DW    $00A0
         DW    $00A0
         DW    $0078
         DW    $00A0
         DW    $00A0
         DW    $00F0
         DW    $0078
         DW    $00F0
         DW    $00A0
         DW    $0140
         DW    $00A0
         DW    $0000
         DW    $00C8
         DW    $0050
         DW    $00A0
         DW    $0050
         DW    $00C8
         DW    $00A0
         DW    $00A0
         DW    $00A0
         DW    $00C8
         DW    $00F0
         DW    $00A0
         DW    $00F0
         DW    $00C8
         DW    $0140
L4EA9    ASC   'That'27's right!'00
L4EB7    ASC   'Very good!'00
L4EC2    ASC   'Good job!'00
L4ECC    ASC   'That'27's great!'00
L4EDA    ASC   'Whoops! Those two don'27't match.'00
L4EF9    ASC   'Whoops! Better luck next time.'00
L4F18    ASC   'Sorry, those two don'27't match.'00
L4F36    ASC   'Sorry, better luck next time.'00
L4F54    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
L4F78    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L4F8E    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L4F94    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L4FBE    REP   #$30
L4FC0    REP   #$30
         JSR   L6F28
         _CompactMem
         JSR   L9F1E
         CMP   #$0005
         BEQ   L4FF4
         CMP   #$0004
         BNE   L4FDC
         JMP   L4FF7

L4FDC    CMP   #$0003
         BNE   L4FE4
         JMP   L518D

L4FE4    CMP   #$0002
         BNE   L4FEC
         JMP   L522E

L4FEC    CMP   #$0001
         BNE   L4FC0
         JMP   L52AB
L4FF4    JMP   L17AB

L4FF7    REP   #$30
         JSR   L216C
         JSR   L874A
         JSR   L7C07
         JSR   L8EC7
         LDA   #L8B48
         STA   L101D
         LDA   #^L8B48
         STA   L101F
         LDA   #L8B48
         STA   L1021
         LDA   #^L8B48
         STA   L1023
         LDA   #$0001
         STA   L1025
         JSR   L9228
         LDA   L8B39
         CMP   #$0002
         BNE   L504F
         LDA   #L8B60
         STA   L101D
         LDA   #^L8B60
         STA   L101F
         LDA   #L8B60
         STA   L1021
         LDA   #^L8B60
         STA   L1023
         LDA   #$0002
         STA   L1025
         JSR   L9228
L504F    JSR   L881C
         LDA   #L3123
         STA   L101D
         LDA   #^L3123
         STA   L101F
         LDA   L1151
         STA   L1021
         LDA   L1153
         STA   L1023
         LDA   #L1109
         STA   L1025
         LDA   #^L1109
         STA   L1027
         JSR   L7339
         LDA   #L3147
         STA   L101D
         LDA   #^L3147
         STA   L101F
         LDA   L1155
         STA   L1021
         LDA   L1157
         STA   L1023
         LDA   #L1129
         STA   L1025
         LDA   #^L1129
         STA   L1027
         JSR   L7339
L50A0    REP   #$30
         JSR   L6F28
         JSR   L5974
         CMP   #$0000
         BNE   L50B0
         JMP   L5187

L50B0    JSR   L57C3
         JSR   L591E
         CMP   #$0015
         BCS   L510C
         LDA   #$000F
         STA   L101D
         JSR   L1823
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         LDA   #L691A
         STA   L101D
         LDA   #^L691A
         STA   L101F
         LDA   #$0028
         STA   L1021
         JSR   L75FC
         LDA   #L693C
         STA   L101D
         LDA   #^L693C
         STA   L101F
         LDA   #$003C
         STA   L1021
         JSR   L75FC
         JSR   L6FC2
         JSR   L1F35
         JMP   L50A0

L510C    DEC
         STA   L316B
         STZ   L8B2F
         JSR   L216C
         STZ   L316D
         LDA   #L3171
         STA   L101D
         LDA   #^L3171
         STA   L101F
         LDA   #$0064
         STA   L1021
         LDA   #$0000
         STA   L1023
         LDA   #$0000
         STA   L1025
         JSR   L7173
         JSR   L85E8
         JSR   L86BA
         JSR   L17AE
L5143    JSR   L6F28
         JSR   L32D3
         LDA   #$0000
         STA   L101D
         JSR   L2200
         JSR   L22DF
         CMP   #$001B
         BEQ   L5170
         JSR   L7BD6
         LDA   L8B37
         CMP   #$0001
         BNE   L5143
         INC   L316D
         LDA   L316D
         CMP   #$000A
         BNE   L5143
L5170    JSR   L868C
         JSR   L872B
         JSR   L1F35
         JSR   L8C78
         LDA   L101D
         CMP   #$0001
         BNE   L5187
         JMP   L50A0

L5187    JSR   L825D
         JMP   L4FC0

L518D    REP   #$30
         JSR   L6F28
         JSR   L595A
         CMP   #$0000
         BNE   L519D
         JMP   L4FC0

L519D    JSR   L57C3
         JSR   L651C
         LDA   #$0000
         STA   L695E
         LDA   #$0001
         STA   L695C
         LDA   #$0010
         STA   L695A
         LDA   #$0000
         STA   L696C
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         LDA   #$000F
         STA   L101D
         JSR   L1823
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
L51E2    REP   #$30
         LDA   #$2000
         STA   L101D
         LDA   #$00E1
         STA   L101F
         LDA   #$7D00
         STA   L1021
         LDA   #$0000
         STA   L1023
         LDA   #$0000
         STA   L1025
         JSR   L7173
         JSR   L539B
         JSR   L11FC
         JSR   L17FF
         CMP   #$001B
         BNE   L5216
         JMP   L4FC0

L5216    LDA   L696C
         BNE   L5223
         DEC   L695A
         BEQ   L5223
         JMP   L51E2

L5223    REP   #$30
         JSR   L1F35
         JSR   L7B72
         JMP   L4FC0

L522E    REP   #$30
         JSR   L6F28
         LDA   #L694E
         STA   L6974
         LDA   #^L694E
         STA   L6976
         LDA   #$00F3
         STA   L6954
         LDA   #$2EB8
         STA   L101D
         LDA   #$0000
         STA   L101F
         LDA   #$C000
         STA   L1021
         JSR   L71D2
         LDA   L1025
         STA   L25F0
         LDA   L1027
         STA   L25F2
         LDA   L1029
         STA   L25F8
         LDA   L102B
         STA   L25FA
         JSR   L17AE
         JSR   L59BD
         JSR   L534D
         JSR   L559A
         JSR   L5328
L5281    JSR   L5CB8
         CMP   #$001B
         BNE   L5281
         JSR   L5C29
         LDA   L696C
         BEQ   L5281
         JSR   L5328
         JSR   L1F35
         PEA   $0092
         _WriteChar
         _GrafOn
         JMP   L4FC0

L52AB    REP   #$30
         JSR   L6F28
         LDA   #L6948
         STA   L6974
         LDA   #^L6948
         STA   L6976
         LDA   #$00F2
         STA   L6954
         LDA   #$2EB8
         STA   L101D
         LDA   #$0000
         STA   L101F
         LDA   #$C000
         STA   L1021
         JSR   L71D2
         LDA   L1025
         STA   L25F0
         LDA   L1027
         STA   L25F2
         LDA   L1029
         STA   L25F8
         LDA   L102B
         STA   L25FA
         JSR   L17AE
         JSR   L59BD
         JSR   L534D
         JSR   L559A
         JSR   L5328
L52FE    JSR   L5CB8
         CMP   #$001B
         BNE   L52FE
         JSR   L5C29
         LDA   L696C
         BEQ   L52FE
         JSR   L5328
         JSR   L1F35
         PEA   $0092
         _WriteChar
         _GrafOn
         JMP   L4FC0

L5328    REP   #$30
         LDA   #$0001
         STA   L695C
         LDA   #$0001
         STA   L6960
         LDA   #$0001
         STA   L695E
         JSR   L54E5
         JSR   L5570
         PEA   $008C
         _WriteChar
         RTS

L534D    REP   #$30
         LDA   L25F8
         STA   L101D
         LDA   L25FA
         STA   L101F
         LDA   #$2EB8
         STA   L1021
         LDA   #$0000
         STA   L1023
         LDA   #$0020
         STA   L1025
         JSR   L7173
         LDA   L25F8
         STA   L6978
         LDA   L25FA
         STA   L697A
         LDA   #$0001
         STA   L695C
         LDA   #$0001
         STA   L695E
         LDA   #$0001
         STA   L6960
         LDA   #$0001
         STA   L6962
         LDA   #$0001
         STA   L6966
         RTS

L539B    REP   #$30
         LDA   #$0016
         STA   L542E
         LDA   #$000A
         STA   L2612
L53A9    INC   L695E
         JSR   L54E5
         JSR   L5570
         LDA   #L6A18
         STA   $00
         LDA   #^L6A18
         STA   $02
         LDY   #$0000
         SEP   #$20
L53C1    LDA   [$00],Y
         CMP   #$7E
         BEQ   L53D0
         INY
         CPY   #$0028
         BNE   L53C1
         JMP   L53FB

L53D0    LDA   #$20
         STA   [$00],Y
         REP   #$30
         LDA   #$0006
         STA   L101D
         LDA   L2612
         STA   L1021
         JSR   L7546
         LDA   #L6A18
         STA   L101D
         LDA   #^L6A18
         STA   L101F
         JSR   L757F
         LDA   #$0001
         STA   L696C
         RTS

L53FB    REP   #$30
         LDA   #$0006
         STA   L101D
         LDA   L2612
         STA   L1021
         JSR   L7546
         LDA   #L6A18
         STA   L101D
         LDA   #^L6A18
         STA   L101F
         JSR   L757F
         LDA   #$0009
         CLC
         ADC   L2612
         STA   L2612
         DEC   L542E
         BEQ   L542D
         JMP   L53A9
L542D    RTS

L542E    DW    $0000
         DW    $0000
L5432    REP   #$30
         JSR   L58F7
         JSR   L5328
         LDA   L25F8
         STA   L101D
         LDA   L25FA
         STA   L101F
         LDA   #$0028
         LDX   L6962
         DEX
         BEQ   L546A
         STX   L54E3
L5452    LDA   #$0028
         CLC
         ADC   L101D
         STA   L101D
         LDA   #$0000
         ADC   L101F
         STA   L101F
         DEC   L54E3
         BNE   L5452
L546A    LDA   L101D
         STA   L697C
         LDA   L101F
         STA   L697E
         LDA   #$0016
         STA   L6968
L547C    LDA   L697C
         STA   L101D
         LDA   L697E
         STA   L101F
         LDA   #L6A18
         STA   L1021
         LDA   #^L6A18
         STA   L1023
         LDA   #$0028
         STA   L1025
         LDA   #$0000
         STA   L1027
         JSR   L70CA
         LDA   L697C
         STA   L101D
         LDA   L697E
         STA   L101F
         LDA   #$0028
         CLC
         ADC   L101D
         STA   L101D
         LDA   #$0000
         ADC   L101F
         STA   L101F
         LDA   L101D
         STA   L697C
         LDA   L101F
         STA   L697E
         JSR   L5523
         INC   L6960
         DEC   L6968
         BNE   L547C
         JSR   L586C
         JSR   L54E5
         JSR   L5570
         RTS

L54E3    DW    $0000
L54E5    REP   #$30
         LDA   L25F8
         STA   L101D
         LDA   L25FA
         STA   L101F
         LDX   L695E
         STX   L5521
L54F9    DEC   L5521
         BEQ   L5514
         LDA   #$0028
         CLC
         ADC   L101D
         STA   L101D
         LDA   #$0000
         ADC   L101F
         STA   L101F
         JMP   L54F9

L5514    LDA   L101D
         STA   L6978
         LDA   L101F
         STA   L697A
         RTS

L5521    DW    $0000
L5523    REP   #$30
         LDA   L695C
         STA   L556E
         LDA   #$0001
         STA   L695C
         LDA   L6960
         DEC
         DEC
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   L695C
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L6A18
         STA   L101D
         LDA   #^L6A18
         STA   L101F
         JSR   L5A2D
         LDA   L556E
         STA   L695C
         RTS

L556E    DW    $0000
L5570    REP   #$30
         LDA   L6978
         STA   L101D
         LDA   L697A
         STA   L101F
         LDA   #L6A18
         STA   L1021
         LDA   #^L6A18
         STA   L1023
         LDA   #$0028
         STA   L1025
         LDA   #$0000
         STA   L1027
         JSR   L70CA
         RTS

L559A    REP   #$30
         JSR   L58F7
         JSR   L5328
         LDA   #L6572
         STA   L697C
         LDA   #^L6572
         STA   L697E
         LDA   #$0016
         STA   L561A
L55B4    LDA   L697C
         STA   L101D
         LDA   L697E
         STA   L101F
         LDA   #L6A18
         STA   L1021
         LDA   #^L6A18
         STA   L1023
         LDA   #$0028
         STA   L1025
         LDA   #$0000
         STA   L1027
         JSR   L70CA
         LDA   L697C
         STA   L101D
         LDA   L697E
         STA   L101F
         LDA   #$0028
         CLC
         ADC   L101D
         STA   L101D
         LDA   #$0000
         ADC   L101F
         STA   L101F
         LDA   L101D
         STA   L697C
         LDA   L101F
         STA   L697E
         JSR   L5523
         INC   L6960
         DEC   L561A
         BNE   L55B4
L5611    JSR   L6F94
         BEQ   L5611
         JSR   L586C
         RTS

L561A    DW    $0000
L561C    REP   #$30
         JSR   L58B3
         JSR   L5A3F
         JSR   L54E5
         JSR   L5570
         JSR   L5523
         RTS

L562E    REP   #$30
         LDA   #$0001
         STA   L695C
         LDA   #$0001
         STA   L695E
         LDA   #$0001
         STA   L6960
         LDA   #$0001
         STA   L6962
         JSR   L54E5
         JSR   L5432
         JSR   L5570
         RTS

L5652    REP   #$30
         LDA   L695C
         CMP   #$0001
         BNE   L5662
         JSR   L11FC
         JMP   L5665

L5662    DEC   L695C
L5665    RTS

L5666    REP   #$30
         LDA   L695C
         CMP   #$0026
         BEQ   L5673
         INC   L695C
L5673    RTS

L5674    REP   #$30
         JSR   L58B3
         JSR   L598E
         JSR   L54E5
         JSR   L5570
         JSR   L5523
         RTS

L5686    REP   #$30
         JSR   L58B3
         JSR   L5A3F
         JSR   L54E5
         JSR   L5570
         JSR   L5523
         LDA   #$0001
         STA   L695C
         RTS

L569E    REP   #$30
         JSR   L58B3
         LDA   L695E
         CLC
         ADC   #$0016
         CMP   #$0115
         BCC   L56B2
         LDA   #$0115
L56B2    STA   L695E
         STA   L6962
         LDA   #$0001
         STA   L695C
         LDA   #$0001
         STA   L6960
         JSR   L54E5
         JSR   L5432
         JSR   L5570
         RTS

L56CE    REP   #$30
         JSR   L58B3
         LDA   L695E
         CMP   #$0001
         BEQ   L56E7
         SEC
         SBC   #$0016
         CMP   #$0001
         BPL   L56E7
         LDA   #$0001
L56E7    STA   L695E
         STA   L6962
         LDA   #$0001
         STA   L695C
         LDA   #$0001
         STA   L6960
         JSR   L54E5
         JSR   L5432
         JSR   L5570
         RTS

L5703    REP   #$30
         LDA   L6960
         DEC
         DEC
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   L695C
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         PEA   $008F
         _WriteChar
         LDA   #L6A18
         STA   $00
         LDA   #^L6A18
         STA   $02
         LDA   L101D
         AND   #$00FF
         LDY   L695C
         DEY
         SEP   #$20
         LDA   [$00],Y
         REP   #$30
         PHA
         _WriteChar
         PEA   $008E
         _WriteChar
         PEA   $0088
         _WriteChar
         RTS

L576D    REP   #$30
         LDA   L695C
         CMP   #$0026
         BNE   L577D
         JSR   L11FC
         JMP   L5791

L577D    LDA   L6A4B
         PHA
         _WriteChar
         LDA   L6A4B
         STA   L101D
         JSR   L5893
L5791    RTS

         DW    $0000
L5794    REP   #$30
         LDA   #L6A18
         STA   $00
         LDA   #^L6A18
         STA   $02
         LDA   L101D
         AND   #$00FF
         LDY   L695C
         DEY
         SEP   #$20
         LDA   [$00],Y
         REP   #$30
         PHA
         _WriteChar
         PEA   $0088
         _WriteChar
         RTS

L57C3    REP   #$30
         LDA   #L8B8E
         STA   L101D
         LDA   #^L8B8E
         STA   L101F
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         JSR   L7298
         LDA   L1041
         STA   L101D
         LDA   L1043
         STA   L101F
         LDA   #$0200
         STA   L1021
         LDA   #$0000
         STA   L1023
         JSR   L6FD5
         LDA   L1027
         PHA
         LDA   L1025
         PHA
         LDA   L1025
         STA   L101D
         LDA   L1027
         STA   L101F
         LDA   #$C000
         STA   L1021
         JSR   L71D2
         LDA   L1025
         STA   L25F0
         LDA   L1027
         STA   L25F2
         LDA   L1029
         STA   L25F8
         LDA   L102B
         STA   L25FA
         PLA
         STA   L1041
         PLA
         STA   L1043
         PLA
         STA   L101D
         PLA
         STA   L101F
         JSR   L7259
         LDA   L1021
         PHA
         LDA   L1021
         STA   L101D
         LDA   L25F8
         STA   L1021
         LDA   L25FA
         STA   L1023
         LDA   L1041
         STA   L1025
         LDA   L1043
         STA   L1027
         JSR   L7278
         PLA
         STA   L101D
         JSR   L728B
         RTS

L586C    REP   #$30
         LDA   L6988
         STA   L6978
         LDA   L698A
         STA   L697A
         LDA   L698C
         STA   L695E
         LDA   L698E
         STA   L695C
         LDA   L6990
         STA   L6960
         LDA   L6992
         STA   L6962
         RTS

L5893    REP   #$30
         LDA   #L6A18
         STA   $00
         LDA   #^L6A18
         STA   $02
         LDA   L101D
         AND   #$00FF
         LDY   L695C
         DEY
         SEP   #$20
         STA   [$00],Y
         REP   #$30
         INC   L695C
         RTS

L58B3    REP   #$30
         LDA   #L6A18
         STA   $00
         LDA   #^L6A18
         STA   $02
         LDY   #$0026
         SEP   #$20
         LDA   #$0D
         STA   [$00],Y
         INY
         LDA   #$00
         STA   [$00],Y
         REP   #$30
         LDA   #L6A18
         STA   L101D
         LDA   #^L6A18
         STA   L101F
         LDA   L6978
         STA   L1021
         LDA   L697A
         STA   L1023
         LDA   #$0028
         STA   L1025
         LDA   #$0000
         STA   L1027
         JSR   L70CA
         RTS

L58F7    REP   #$30
         LDA   L6978
         STA   L6988
         LDA   L697A
         STA   L698A
         LDA   L695E
         STA   L698C
         LDA   L695C
         STA   L698E
         LDA   L6960
         STA   L6990
         LDA   L6962
         STA   L6992
         RTS

L591E    REP   #$30
         LDA   L25F8
         STA   $00
         LDA   L25FA
         STA   $02
         LDX   #$0000
         LDY   #$0000
L5930    REP   #$30
         LDA   #$0005
         STA   L101D
L5938    SEP   #$20
         LDA   [$00],Y
         CMP   #$0D
         BEQ   L594A
         CMP   #$7E
         BEQ   L5956
         REP   #$30
         INY
         JMP   L5938

L594A    REP   #$30
         INY
         DEC   L101D
         BNE   L5938
         INX
         JMP   L5930

L5956    REP   #$30
         TXA
         RTS

L595A    REP   #$30
         JSR   L214E
         LDA   #L5972
         STA   L101D
         LDA   #^L5972
         STA   L101F
         JSR   L7CF7
         LDA   L8B78
         RTS

L5972    DB    $01
         DB    $F2
L5974    REP   #$30
         JSR   L214E
         LDA   #L598C
         STA   L101D
         LDA   #^L598C
         STA   L101F
         JSR   L7CF7
         LDA   L8B78
         RTS

L598C    DB    $01
         DB    $F3
L598E    REP   #$30
         LDA   L695E
         CMP   #$0001
         BNE   L599E
         JSR   L11FC
         JMP   L59BC

L599E    DEC   L695E
         LDA   L6960
         CMP   #$0001
         BNE   L59B9
         DEC   L6962
         PEA   $0096
         _WriteChar
         JMP   L59BC

L59B9    DEC   L6960
L59BC    RTS

L59BD    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   L101D
         PHA
         _WriteChar
         RTS

L5A2D    REP   #$30
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         _WriteCString
         RTS

L5A3F    REP   #$30
         LDA   L695E
         CMP   #$012B
         BNE   L5A4C
         JMP   L5A7C

L5A4C    INC   L695E
         LDA   L6960
         CMP   #$0016
         BEQ   L5A67
         INC   L6960
         PEA   $008D
         _WriteChar
         JMP   L5A7C

L5A67    LDA   L6962
         CMP   #$0115
         BEQ   L5A7C
         INC   L6962
         PEA   $0097
         _WriteChar
L5A7C    RTS

L5A7D    REP   #$30
         LDY   L695C
         CPY   #$0001
         BNE   L5A8D
         JSR   L11FC
         JMP   L5AA8

L5A8D    LDA   #L6A18
         STA   $00
         LDA   #^L6A18
         STA   $02
         DEY
         DEY
         SEP   #$20
         LDA   #$20
         STA   [$00],Y
         REP   #$30
         INY
         STY   L695C
         JSR   L5523
L5AA8    RTS

L5AA9    REP   #$30
         JSR   L58B3
         JSR   L58F7
         LDA   #$0016
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   #$0001
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L6994
         STA   L101D
         LDA   #^L6994
         STA   L101F
         JSR   L5A2D
         JSR   L5DCC
         BNE   L5AED
         JMP   L5AF4

L5AED    JSR   L534D
         JSR   L5328
         RTS

L5AF4    LDA   #$0016
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   #$0001
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L69BD
         STA   L101D
         LDA   #^L69BD
         STA   L101F
         JSR   L5A2D
         JSR   L586C
         JSR   L54E5
         JSR   L5570
         RTS

L5B32    REP   #$30
         JSR   L58F7
         LDA   L25F8
         STA   L101D
         LDA   L25FA
         STA   L101F
         LDA   #$0028
         LDX   L695E
         DEX
         BEQ   L5B67
         STX   L6A0E
L5B4F    LDA   #$0028
         CLC
         ADC   L101D
         STA   L101D
         LDA   #$0000
         ADC   L101F
         STA   L101F
         DEC   L6A0E
         BNE   L5B4F
L5B67    LDA   L101D
         STA   L6A14
         LDA   L101F
         STA   L6A16
         LDA   #$0028
         CLC
         ADC   L101D
         STA   L101D
         LDA   #$0000
         ADC   L101F
         STA   L101F
         LDA   L101D
         STA   L6A10
         LDA   L101F
         STA   L6A12
         LDA   #$012B
         SEC
         SBC   L695E
         DEC
         STA   L6968
L5B9D    LDA   L6A10
         STA   L101D
         LDA   L6A12
         STA   L101F
         LDA   L6A14
         STA   L1021
         LDA   L6A16
         STA   L1023
         LDA   #$0028
         STA   L1025
         LDA   #$0000
         STA   L1027
         JSR   L70CA
         LDA   L6A10
         STA   L101D
         LDA   L6A12
         STA   L101F
L5BD0    LDA   #$0028
         CLC
         ADC   L101D
         STA   L101D
         LDA   #$0000
         ADC   L101F
         STA   L101F
         LDA   L101D
         STA   L6A10
         LDA   L101F
         STA   L6A12
         LDA   L6A14
         STA   L101D
         LDA   L6A16
         STA   L101F
         LDA   #$0028
         CLC
         ADC   L101D
         STA   L101D
         LDA   #$0000
         ADC   L101F
         STA   L101F
         LDA   L101D
         STA   L6A14
         LDA   L101F
         STA   L6A16
         DEC   L6968
         BEQ   L5C22
         JMP   L5B9D

L5C22    JSR   L586C
         JSR   L5432
         RTS

L5C29    REP   #$30
         JSR   L58B3
         JSR   L58F7
         LDA   #$0016
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   #$0001
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L69E5
         STA   L101D
         LDA   #^L69E5
         STA   L101F
         JSR   L5A2D
         JSR   L5DCC
         BNE   L5C6D
         JMP   L5C74

L5C6D    LDA   #$0001
         STA   L696C
         RTS

L5C74    LDA   #$0016
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   #$0001
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L69BD
         STA   L101D
         LDA   #^L69BD
         STA   L101F
         JSR   L5A2D
         JSR   L586C
         JSR   L54E5
         JSR   L5570
         LDA   #$0000
         STA   L696C
         RTS

L5CB8    REP   #$30
L5CBA    JSR   L5703
         JSR   L6F94
         BEQ   L5CBA
         STA   L6A4B
         JSR   L5794
         LDA   L7524
         AND   #$0800
         BEQ   L5CD3
         JMP   L5D30

L5CD3    LDA   L6A4B
         CMP   #$001B
         BNE   L5CDE
         JMP   L5DA1

L5CDE    CMP   #$0020
         BMI   L5CEE
         CMP   #$007B
         BPL   L5CEE
         JSR   L576D
         JMP   L5CBA

L5CEE    CMP   #$000D
         BNE   L5CF9
         JSR   L5686
         JMP   L5CBA

L5CF9    CMP   #$007F
         BNE   L5D04
         JSR   L5A7D
         JMP   L5CBA

L5D04    CMP   #$000B
         BNE   L5D0F
         JSR   L5674
         JMP   L5CBA

L5D0F    CMP   #$0008
         BNE   L5D1A
         JSR   L5652
         JMP   L5CBA

L5D1A    CMP   #$0015
         BNE   L5D25
         JSR   L5666
         JMP   L5CBA

L5D25    CMP   #$000A
         BNE   L5D2D
         JSR   L561C
L5D2D    JMP   L5CBA

L5D30    LDA   L6A4B
         CMP   #$0075
         BNE   L5D3E
         JSR   L56CE
         JMP   L5CBA

L5D3E    CMP   #$0064
         BNE   L5D49
         JSR   L569E
         JMP   L5CBA

L5D49    CMP   #$0074
         BNE   L5D54
         JSR   L562E
         JMP   L5CBA

L5D54    CMP   #$0068
         BNE   L5D5F
         JSR   L613D
         JMP   L5CBA

L5D5F    CMP   #$0063
         BNE   L5D6A
         JSR   L5AA9
         JMP   L5CBA

L5D6A    CMP   #$007A
         BNE   L5D75
         JSR   L5B32
         JMP   L5CBA

L5D75    CMP   #$0069
         BNE   L5D80
         JSR   L5E7A
         JMP   L5CBA

L5D80    CMP   #$006C
         BNE   L5D8B
         JSR   L5FFA
         JMP   L5CBA

L5D8B    CMP   #$0073
         BNE   L5D96
         JSR   L6424
         JMP   L5CBA

L5D96    CMP   #$0070
         BNE   L5D9E
         JSR   L60DA
L5D9E    JMP   L5CBA
L5DA1    RTS

L5DA2    REP   #$30
         JSR   L214E
         LDA   #L5DC0
         STA   L1021
         LDA   #^L5DC0
         STA   L1023
         LDA   #$000C
         STA   L1025
         JSR   L7D95
         LDA   L8B78
         RTS

L5DC0    STR   'story01.mth'
L5DCC    REP   #$30
L5DCE    JSR   L6F94
         BEQ   L5DCE
         CMP   #$0059
         BNE   L5DDB
         JMP   L5E32

L5DDB    CMP   #$0079
         BNE   L5DE3
         JMP   L5E32

L5DE3    CMP   #$004E
         BNE   L5DEB
         JMP   L5DF0

L5DEB    CMP   #$006E
         BNE   L5DCE
L5DF0    PHA
         _WriteChar
         LDA   #$0000
         STA   L5E78
L5DFE    JSR   L6F94
         BEQ   L5DFE
         CMP   #$000D
         BNE   L5E0B
         JMP   L5E74

L5E0B    CMP   #$007F
         BNE   L5DFE
         PEA   $0088
         _WriteChar
         LDA   #$0020
         PHA
         _WriteChar
         PEA   $0088
         _WriteChar
         JMP   L5DCE

L5E32    PHA
         _WriteChar
         LDA   #$0001
         STA   L5E78
L5E40    JSR   L6F94
         BEQ   L5E40
         CMP   #$000D
         BNE   L5E4D
         JMP   L5E74

L5E4D    CMP   #$007F
         BNE   L5E40
         PEA   $0088
         _WriteChar
         LDA   #$0020
         PHA
         _WriteChar
         PEA   $0088
         _WriteChar
         JMP   L5DCE

L5E74    LDA   L5E78
         RTS

L5E78    BRK   $00
L5E7A    REP   #$30
         JSR   L58B3
         JSR   L58F7
         LDA   L25F8
         STA   L101D
         LDA   L25FA
         STA   L101F
         LDA   #$2E68
         CLC
         ADC   L101D
         STA   L1021
         LDA   #$0000
         ADC   L101F
         STA   L1023
         LDA   L1021
         STA   L6A10
         LDA   L1023
         STA   L6A12
         LDA   L25F8
         STA   L101D
         LDA   L25FA
         STA   L101F
         LDA   #$2E90
         CLC
         ADC   L101D
         STA   L1025
         LDA   #$0000
         ADC   L101F
         STA   L1027
         LDA   L1025
         STA   L6A14
         LDA   L1027
         STA   L6A16
         LDA   #$012B
         SEC
         SBC   L695E
         BNE   L5EE4
         JMP   L5F84

L5EE4    STA   L6968
L5EE7    LDA   L6A10
         STA   L101D
         LDA   L6A12
         STA   L101F
         LDA   L6A14
         STA   L1021
         LDA   L6A16
         STA   L1023
         LDA   #$0028
         STA   L1025
         LDA   #$0000
         STA   L1027
         JSR   L70CA
         LDA   L6A10
         STA   L101D
         LDA   L6A12
         STA   L101F
         LDA   #$0028
         STA   L1021
         LDA   #$0000
         STA   L1023
         LDA   L101D
         SEC
         SBC   L1021
         STA   L1025
         LDA   L101F
         SBC   L1023
         STA   L1027
         LDA   L1025
         STA   L6A10
         LDA   L1027
         STA   L6A12
         LDA   L6A14
         STA   L101D
         LDA   L6A16
         STA   L101F
         LDA   #$0028
         STA   L1021
         LDA   #$0000
         STA   L1023
         LDA   L101D
         SEC
         SBC   L1021
         STA   L1025
         LDA   L101F
         SBC   L1023
         STA   L1027
         LDA   L1025
         STA   L6A14
         LDA   L1027
         STA   L6A16
         DEC   L6968
         BEQ   L5F84
         JMP   L5EE7

L5F84    LDA   L25F8
         STA   L101D
         LDA   L25FA
         STA   L101F
         LDA   #$0028
         LDX   L695E
         DEX
         BEQ   L5FB4
         STX   L6A0E
L5F9C    LDA   #$0028
         CLC
         ADC   L101D
         STA   L101D
         LDA   #$0000
         ADC   L101F
         STA   L101F
         DEC   L6A0E
         BNE   L5F9C
L5FB4    LDA   L101D
         STA   L6A14
         LDA   L101F
         STA   L6A16
         LDA   #L69BD
         STA   L6A10
         LDA   #^L69BD
         STA   L6A12
         LDA   L6A10
         STA   L101D
         LDA   L6A12
         STA   L101F
         LDA   L6A14
         STA   L1021
         LDA   L6A16
         STA   L1023
         LDA   #$0028
         STA   L1025
         LDA   #$0000
         STA   L1027
         JSR   L70CA
         JSR   L586C
         JSR   L5432
         RTS

L5FFA    REP   #$30
         _GrafOn
         LDA   L6954
         CMP   #$00F2
         BNE   L6016
         JSR   L595A
         CMP   #$0000
         BNE   L6027
         JMP   L60B7

L6016    JSR   L5974
         CMP   #$0000
         BNE   L6021
         JMP   L60B7

L6021    JSR   L614C
         JMP   L609F

L6027    JSR   L534D
         LDA   #L8B8E
         STA   L101D
         LDA   #^L8B8E
         STA   L101F
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         JSR   L7298
         LDA   L1041
         STA   L101D
         LDA   L1043
         STA   L101F
         LDA   #$0200
         STA   L1021
         LDA   #$0000
         STA   L1023
         JSR   L6FD5
         LDA   L1025
         STA   L1041
         LDA   L1027
         STA   L1043
         PLA
         STA   L101D
         PLA
         STA   L101F
         JSR   L7259
         LDA   L1021
         PHA
         LDA   L1021
         STA   L101D
         LDA   L25F8
         STA   L1021
         LDA   L25FA
         STA   L1023
         LDA   L1041
         STA   L1025
         LDA   L1043
         STA   L1027
         JSR   L7278
         PLA
         STA   L101D
         JSR   L728B
L609F    JSR   L651C
         LDY   L6956
         LDA   L25F8
         STA   $00
         LDA   L25FA
         STA   $02
         SEP   #$20
         LDA   #$20
         STA   [$00],Y
         REP   #$30
L60B7    _GrafOff
         LDA   #$0001
         STA   L6962
         LDA   #$0001
         STA   L6960
         LDA   #$0001
         STA   L695C
         LDA   #$0001
         STA   L695E
         JSR   L5432
         RTS

L60DA    REP   #$30
         JSR   L58B3
         JSR   L651C
         PEA   $0000
         PEA   $0000
         PEA   $0001
         _SetOutputDevice
         PEA   $0001
         _InitTextDev
         LDA   L6966
         STA   L613B
         LDA   #$0000
         STA   L695E
L6108    INC   L695E
         JSR   L54E5
         JSR   L5570
         JSR   L5523
         DEC   L613B
         BEQ   L611C
         JMP   L6108

L611C    JSR   L59BD
         LDA   #$0001
         STA   L6962
         LDA   #$0001
         STA   L6960
         LDA   #$0001
         STA   L695C
         LDA   #$0001
         STA   L695E
         JSR   L5432
         RTS

L613B    DW    $0000
L613D    REP   #$30
         JSR   L58B3
         JSR   L559A
         JSR   L5432
         JSR   L5570
         RTS

L614C    REP   #$30
         JSR   L534D
         LDA   #L8B8E
         STA   L101D
         LDA   #^L8B8E
         STA   L101F
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         JSR   L7298
         LDA   L1041
         STA   L101D
         LDA   L1043
         STA   L101F
         LDA   #$0200
         STA   L1021
         LDA   #$0000
         STA   L1023
         JSR   L6FD5
         LDA   L1027
         PHA
         LDA   L1025
         PHA
         LDA   L1025
         STA   L101D
         LDA   L1027
         STA   L101F
         LDA   #$C000
         STA   L1021
         JSR   L71D2
         LDA   L1025
         STA   L6980
         LDA   L1027
         STA   L6982
         LDA   L1029
         STA   L6984
         LDA   L102B
         STA   L6986
         PLA
         STA   L1041
         PLA
         STA   L1043
         PLA
         STA   L101D
         PLA
         STA   L101F
         JSR   L7259
         LDA   L1021
         PHA
         LDA   L1021
         STA   L101D
         LDA   L6984
         STA   L1021
         LDA   L6986
         STA   L1023
         LDA   L1041
         STA   L1025
         LDA   L1043
         STA   L1027
         JSR   L7278
         PLA
         STA   L101D
         JSR   L728B
         REP   #$30
         LDA   #$FFFF
         STA   L696E
         LDA   #$0001
         STA   L695E
         JSR   L54E5
L6208    REP   #$30
         LDA   #$0001
         STA   L695C
         LDA   #L6A18
         STA   L101D
         LDA   #^L6A18
         STA   L101F
         LDA   #$0028
         STA   L1021
         LDA   #$0000
         STA   L1023
         LDA   #$0020
         STA   L1025
         JSR   L7173
L6231    REP   #$30
         INC   L696E
         LDY   L696E
         LDA   L6984
         STA   $04
         LDA   L6986
         STA   $06
         STZ   L6A4B
         SEP   #$20
         LDA   [$04],Y
         CMP   #$7E
         BNE   L6251
         JMP   L627F

L6251    CMP   #$0D
         BEQ   L626E
         STA   L6A4B
         REP   #$30
         LDA   L6A4B
         STA   L101D
         JSR   L5893
         LDA   L695C
         CMP   #$0027
         BEQ   L626E
         JMP   L6231

L626E    REP   #$30
         INC   L696E
         JSR   L58B3
         INC   L695E
         JSR   L54E5
         JMP   L6208

L627F    REP   #$30
         LDA   L6980
         STA   L101D
         LDA   L6982
         STA   L101F
         JSR   L7214
         RTS

L6291    REP   #$30
         LDA   #L8B8E
         STA   L101D
         LDA   #^L8B8E
         STA   L101F
         LDA   #$00C3
         STA   L1021
         LDA   L6954
         STA   L1023
         LDA   #$0000
         STA   L1025
         LDA   #$0000
         STA   L1027
         LDA   #$0001
         STA   L1029
         STZ   L102B
         STZ   L102D
         JSL   GSOS
         DW    $0001      ; Create
         ADRL  L101D
         LDA   #L8B8E
         STA   L101F
         LDA   #^L8B8E
         STA   L1021
         JSL   GSOS
         DW    $0010      ; Open
         ADRL  L101D
         LDA   L101D
         STA   L6972
         LDA   #$0000
         STA   L695E
         LDA   #$0000
         STA   L696C
L62F5    INC   L695E
         JSR   L54E5
         JSR   L5570
         LDA   #$0025
         STA   L6970
         JSR   L6388
         LDA   L696C
         BEQ   L630F
         JMP   L6377

L630F    INC   L695E
         JSR   L54E5
         JSR   L5570
         LDA   #$0025
         STA   L6970
         JSR   L6388
         LDA   L696C
         BEQ   L6329
         JMP   L6377

L6329    INC   L695E
         JSR   L54E5
         JSR   L5570
         LDA   #$000C
         STA   L6970
         JSR   L6388
         LDA   L696C
         BEQ   L6343
         JMP   L6377

L6343    INC   L695E
         JSR   L54E5
         JSR   L5570
         LDA   #$000C
         STA   L6970
         JSR   L6388
         LDA   L696C
         BEQ   L635D
         JMP   L6377

L635D    INC   L695E
         JSR   L54E5
         JSR   L5570
         LDA   #$000C
         STA   L6970
         JSR   L6388
         LDA   L696C
         BNE   L6377
         JMP   L62F5

L6377    LDA   L6972
         STA   L101D
         JSL   GSOS
         DW    $0014      ; Close
         ADRL  L101D
         RTS

L6388    REP   #$30
         LDA   #L6A18
         STA   $00
         LDA   #^L6A18
         STA   $02
         LDY   L6970
         SEP   #$20
         LDA   L6A18
         CMP   #$7E
         BNE   L63D1
         REP   #$30
         LDA   #$0001
         STA   L696C
         LDA   L6972
         STA   L101D
         LDA   #L6A18
         STA   L101F
         LDA   #^L6A18
         STA   L1021
         LDA   #$0001
         STA   L1023
         LDA   #$0000
         STA   L1025
         JSL   GSOS
         DW    $0013      ; Write
         ADRL  L101D
         RTS

L63D1    REP   #$30
         LDA   #L6A18
         STA   $00
         LDA   #^L6A18
         STA   $02
         SEP   #$20
         LDA   [$00],Y
         CMP   #$20
         BNE   L63EE
         CPY   #$0000
         BEQ   L63EE
         DEY
         JMP   L63D1

L63EE    INY
         LDA   #$0D
         STA   [$00],Y
         INY
         LDA   #$0A
         STA   [$00],Y
         INY
         REP   #$30
         LDA   #$0000
         STA   L696C
         LDA   L6972
         STA   L101D
         LDA   #L6A18
         STA   L101F
         LDA   #^L6A18
         STA   L1021
         STY   L1023
         STZ   L1025
         JSL   GSOS
         DW    $0013      ; Write
         ADRL  L101D
         RTS

L6424    REP   #$30
         JSR   L58B3
         JSR   L651C
         LDY   L6956
         LDA   L25F8
         STA   $00
         LDA   L25FA
         STA   $02
         SEP   #$20
         LDA   #$7E
         STA   [$00],Y
         REP   #$30
         _GrafOn
         JSR   L5DA2
         LDA   L6954
         CMP   #$00F2
         BEQ   L6459
         JSR   L6291
         JMP   L64E1

L6459    LDA   #L8B8E
         STA   L101D
         LDA   #^L8B8E
         STA   L101F
         LDA   #$00C3
         STA   L1021
         LDA   L6954
         STA   L1023
         LDA   #$0000
         STA   L1025
         LDA   #$0000
         STA   L1027
         LDA   #$0001
         STA   L1029
         STZ   L102B
         STZ   L102D
         JSL   GSOS
         DW    $0001      ; Create
         ADRL  L101D
         LDA   #L8B8E
         STA   L101F
         LDA   #^L8B8E
         STA   L1021
         JSL   GSOS
         DW    $0010      ; Open
         ADRL  L101D
         LDA   L101D
         STA   L6972
         LDA   L25F8
         STA   L101F
         LDA   L25FA
         STA   L1021
         LDA   #$2EB8
         STA   L1023
         LDA   #$0000
         STA   L1025
         JSL   GSOS
         DW    $0013      ; Write
         ADRL  L101D
         LDA   L6972
         STA   L101D
         JSL   GSOS
         DW    $0014      ; Close
         ADRL  L101D
L64E1    LDY   L6956
         LDA   L25F8
         STA   $00
         LDA   L25FA
         STA   $02
         SEP   #$20
         LDA   #$20
         STA   [$00],Y
         REP   #$30
         _GrafOff
         LDA   #$0001
         STA   L6962
         LDA   #$0001
         STA   L6960
         LDA   #$0001
         STA   L695C
         LDA   #$0001
         STA   L695E
         JSR   L5432
         LDA   #$0000
         RTS

L651C    REP   #$30
         LDY   #$2EB7
         LDX   #$012B
L6524    LDA   #$0028
         STA   L6570
L652A    LDA   L25F8
         STA   $00
         LDA   L25FA
         STA   $02
         SEP   #$20
         LDA   [$00],Y
         BEQ   L654D
         CMP   #$0A
         BEQ   L654D
         CMP   #$0D
         BEQ   L654D
         CMP   #$20
         BEQ   L654D
         CMP   #$7E
         BEQ   L654D
         JMP   L6558

L654D    REP   #$30
         DEY
         DEC   L6570
         BNE   L652A
         DEX
         BNE   L6524
L6558    REP   #$30
         INX
         STX   L6966
         LDA   #$0000
         DEX
L6562    CLC
         ADC   #$0028
         DEX
         BNE   L6562
         STA   L6956
         STZ   L6958
         RTS

L6570    DW    $0000
L6572    ASC   '    Arabian Nights Editor Commands    '0D
         ASC   00
         ASC   '                                      '0D
         ASC   00
         ASC   '                                      '0D
         ASC   00
         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   '                                      '0D
         ASC   00
         ASC   '      Press any key to continue.      '0D00
         STR   'Select a myth file (.mth)'
         STR   'Select a question file (.qes)'
L691A    ASC   'There are not enough questions in'00
L693C    ASC   'this file !'00
L6948    ASC   '.mth'00
         DB    $00
L694E    ASC   '.qes'00
         DB    $00
L6954    DB    $00
         DB    $00
L6956    DB    $00
         DB    $00
L6958    DB    $00
         DB    $00
L695A    DB    $00
         DB    $00
L695C    DB    $00
         DB    $00
L695E    DB    $00
         DB    $00
L6960    DB    $00
         DB    $00
L6962    DB    $00
         DB    $00
         DB    $00
         DB    $00
L6966    DB    $00
         DB    $00
L6968    DB    $00
         DB    $00
         DB    $00
         DB    $00
L696C    DB    $00
         DB    $00
L696E    DB    $00
         DB    $00
L6970    DB    $00
         DB    $00
L6972    DB    $00
         DB    $00
L6974    DB    $00
         DB    $00
L6976    DB    $00
         DB    $00
L6978    DB    $00
         DB    $00
L697A    DB    $00
         DB    $00
L697C    DB    $00
         DB    $00
L697E    DB    $00
         DB    $00
L6980    DB    $00
         DB    $00
L6982    DB    $00
         DB    $00
L6984    DB    $00
         DB    $00
L6986    DB    $00
         DB    $00
L6988    DB    $00
         DB    $00
L698A    DB    $00
         DB    $00
L698C    DB    $00
         DB    $00
L698E    DB    $00
         DB    $00
L6990    DB    $00
         DB    $00
L6992    DB    $00
         DB    $00
L6994    ASC   8F
         ASC   'Clear workspace...are you sure? (Y/N) '8E
         ASC   00
L69BD    ASC   '                                       '00
L69E5    ASC   8F
         ASC   'Exit the Editor...are you sure? (Y/N) '8E00
L6A0E    DB    $00
         DB    $00
L6A10    DB    $00
         DB    $00
L6A12    DB    $00
         DB    $00
L6A14    DB    $00
         DB    $00
L6A16    DB    $00
         DB    $00
L6A18    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L6A4B    DB    $00
         DB    $00

*--- The HLS protection lied here

L6EA2    REP   #$30
         LDA   L101D
         PHA
         LDA   L1021
         PHA
         _LoadOneTool
         RTS

L6EB4    REP   #$30
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         _GetPortLoc
         RTS

L6EC6    REP   #$30
         JSR   L6EB4
         LDA   L101D
         STA   $00
         LDA   L101F
         STA   $02
         LDY   #$0002
         LDA   L1021
         STA   [$00],Y
         INY
         INY
         LDA   L1023
         STA   [$00],Y
         RTS

L6EE5    REP   #$30
         PEA   $0000
         PEA   $0000
         _GetPort
         PLA
         STA   L101D
         PLA
         STA   L101F
         RTS

L6EFD    REP   #$30
         LDA   L101D
         STA   L1041
         LDA   L101F
         STA   L1043
         JSR   L6EE5
         LDA   L101D
         STA   $00
         LDA   L101F
         STA   $02
         LDY   #$0002
         LDA   L1041
         STA   [$00],Y
         INY
         INY
         LDA   L1043
         STA   [$00],Y
         RTS

L6F28    REP   #$30
         LDA   #$2000
         STA   L101D
         LDA   #$00E1
         STA   L101F
         JSR   L6EFD
         RTS

         REP   #$30
         LDA   L101D
         PHA
         LDA   L1021
         PHA
         _PosMouse
         RTS

L6F4C    REP   #$30
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadMouse
         PLA
         AND   #$8000
         STA   L1025
         PLA
         STA   L1021
         PLA
         STA   L101D
         RTS

L6F6E    REP   #$30
         JSR   L6F4C
         LDA   L1025
         AND   #$8000
         RTS

L6F7A    REP   #$30
         PEA   $0000
         LDA   L101D
         PHA
         LDA   L1023
         PHA
         LDA   L1021
         PHA
         _GetNextEvent
         PLA
         RTS

L6F94    REP   #$30
         LDA   #$0008
         STA   L101D
         LDA   #L7516
         STA   L1021
         LDA   #^L7516
         STA   L1023
         JSR   L6F7A
         LDA   L7516
         BEQ   L6FB3
         LDA   L7518
L6FB3    RTS

L6FB4    REP   #$30
         JSR   L6F6E
         PHA
         JSR   L6F94
         PLY
         STY   L101D
         RTS

L6FC2    REP   #$30
L6FC4    JSR   L6FB4
         CMP   #$0000
         BNE   L6FD4
         LDA   L101D
         BEQ   L6FC4
         LDA   #$0000
L6FD4    RTS

L6FD5    REP   #$30
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         LDA   L1023
         PHA
         LDA   L1021
         PHA
         _LongMul
         PLA
         STA   L1025
         PLA
         STA   L1027
         PLA
         STA   L101D
         PLA
         STA   L101F
         RTS

L700B    REP   #$30
         PEA   $0000
         _Random
         PLA
         RTS

L7019    REP   #$30
         LDA   L1021
         SEC
         SBC   L101D
         INC
         STA   L1021
L7026    PEA   $0000
         _Random
         PLA
         AND   #$EFFF
         BEQ   L7026
         PEA   $0000
         PEA   $0000
         PHA
         LDA   L1021
         PHA
         _UDivide
         PLA
         PLA
         CLC
         ADC   L101D
         RTS

L704F    REP   #$10
         LDA   L101D
         STA   $00
         LDA   L101F
         STA   $02
         LDY   #$0000
         SEP   #$20
L7060    LDA   [$00],Y
         BEQ   L7067
         INY
         BRA   L7060
L7067    STY   L1021
         REP   #$20
         RTS

L706D    REP   #$30
         LDA   L1021
         STA   $00
         LDA   L1023
         STA   $02
         LDA   #$0000
         STA   [$00]
         LDY   #$0002
         STA   [$00],Y
         LDX   #$0001
         LDA   L101D
         CMP   #$000A
         BCC   L7095
         INX
         CMP   #$0064
         BCC   L7095
         INX
L7095    PHA
         LDA   L1023
         PHA
         LDA   L1021
         PHA
         PHX
         PEA   $0000
         _Int2Dec
         RTS

         REP   #$30
         JSR   L704F
         PEA   $0000
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         LDA   L1021
         PHA
         PEA   $0000
         _Dec2Int
         PLA
         RTS

L70CA    REP   #$30
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         LDA   L1023
         PHA
         LDA   L1021
         PHA
         LDA   L1027
         PHA
         LDA   L1025
         PHA
         _BlockMove
         RTS

L70EC    REP   #$30
         LDA   #$7D00
         STA   L1025
         LDA   #$0000
         STA   L1027
         JSR   L70CA
         RTS

L70FE    REP   #$30
         PEA   $0000
         PEA   $0000
         _GetWMgrPort
         PLA
         STA   L101D
         PLA
         STA   L101F
         RTS

L7116    REP   #$30
         LDA   L1021
         PHA
         _SetSolidPenPat
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         _PaintRect
         RTS

         REP   #$30
         _ObscureCursor
         RTS

L713D    REP   #$30
         _InitCursor
         RTS

L7147    REP   #$30
         _HideCursor
         RTS

L7151    REP   #$30
         _ShowCursor
         RTS

L715B    REP   #$30
         LDA   L101D
         STA   L1021
         LDA   #L0FAC
         STA   L101D
         LDA   #^L0FAC
         STA   L101F
         JSR   L7116
         RTS

L7173    REP   #$10
         LDA   L101D
         STA   $00
         LDA   L101F
         STA   $02
         LDY   L1021
         DEY
         LDA   L1025
         SEP   #$20
L7188    STA   [$00],Y
         DEY
         BPL   L7188
         REP   #$20
         RTS

         REP   #$30
         LDA   L101D
         PHA
         LDA   L1021
         PHA
         LDA   L1025
         PHA
         _SetColorEntry
         RTS

L71A6    REP   #$30
         LDA   L101D
         PHA
         LDA   L1023
         PHA
         LDA   L1021
         PHA
         _SetColorTable
         RTS

L71BC    REP   #$30
         LDA   L101D
         PHA
         LDA   L1023
         PHA
         LDA   L1021
         PHA
         _GetColorTable
         RTS

L71D2    REP   #$30
         PEA   $0000
         PEA   $0000
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         LDA   L0FBD
         PHA
         LDA   L1021
         PHA
         PEA   $0000
         PEA   $0000
         _NewHandle
         PLA
         STA   L1025
         STA   $00
         PLA
         STA   L1027
         STA   $02
         BCS   L7213
         LDA   [$00]
         STA   L1029
         LDY   #$0002
         LDA   [$00],Y
         STA   L102B
         CLC
L7213    RTS

L7214    REP   #$30
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         _DisposeHandle
         RTS

L7226    REP   #$30
         LDA   #$7D00
         STA   L101D
         LDA   #$0000
         STA   L101F
         LDA   #$C000
         STA   L1021
         JSR   L71D2
         BCS   L7258
         LDA   L1025
         STA   L101D
         LDA   L1027
         STA   L101F
         LDA   L1029
         STA   L1021
         LDA   L102B
         STA   L1023
         CLC
L7258    RTS

L7259    REP   #$30
         LDA   L101D
         STA   L1021
         LDA   L101F
         STA   L1023
         JSL   GSOS
         DW    $0010      ; Open
         ADRL  L101F
         LDA   L101F
         STA   L1021
         RTS

L7278    REP   #$30
         LDA   L101D
         STA   L101F
         JSL   GSOS
         DW    $0012      ; Read
         ADRL  L101F
         RTS

L728B    REP   #$30
         JSL   GSOS
         DW    $0014      ; Close
         ADRL  L101D
         RTS

L7298    REP   #$30
         JSL   GSOS
         DW    $0006      ; GetFileInfo
         ADRL  L101D
         LDA   L1023
         PHA
         LDA   L1027
         PHA
         LDA   L1025
         PHA
         LDA   L1029
         PHA
         LDA   L102B
         PHA
         LDA   L102D
         PHA
         LDA   L102F
         PHA
         LDA   L1031
         PHA
         LDA   L1035
         PHA
         LDA   L1033
         PHA
         PLA
         STA   L1041
         PLA
         STA   L1043
         PLA
         STA   L103D
         PLA
         STA   L1039
         PLA
         STA   L1035
         PLA
         STA   L1031
         PLA
         STA   L102D
         PLA
         STA   L1029
         PLA
         STA   L102B
         PLA
         STA   L1025
         RTS

L72F5    REP   #$30
         LDA   #$7D00
         STA   L101D
         LDA   #$0000
         STA   L101F
         LDA   #$C000
         STA   L1021
         JSR   L71D2
         BCS   L7326
         LDA   L1025
         STA   L7468
         LDA   L1027
         STA   L746A
         LDA   L1029
         STA   L746C
         LDA   L102B
         STA   L746E
L7326    RTS

L7327    REP   #$30
         LDA   L746A
         PHA
         LDA   L7468
         PHA
         _DisposeHandle
         RTS

L7339    REP   #$30
         LDA   L1021
         STA   L1035
         LDA   L1023
         STA   L1037
         LDA   L1025
         STA   L1039
         LDA   L1027
         STA   L103B
         JSR   L7259
         BCC   L735C
L7358    REP   #$30
         SEC
         RTS

L735C    LDA   L1021
         STA   L101D
         LDA   L746C
         STA   L1021
         LDA   L746E
         STA   L1023
         LDA   #$7D00
         STA   L1025
         LDA   #$0000
         STA   L1027
         JSR   L7278
         BCS   L7358
         JSR   L728B
         BCS   L7358
         LDA   L746C
         STA   $00
         LDA   L746E
         STA   $02
         LDA   [$00]
         CMP   #$0080
         BNE   L7358
         LDA   L1039
         STA   $04
         LDA   L103B
         STA   $06
         LDY   #$0002
         LDX   #$0000
L73A5    LDA   [$00],Y
         XBA
         ASL
         TXY
         STA   [$04],Y
         INY
         INY
         TYX
         INY
         INY
         CPY   #$0022
         BNE   L73A5
         STZ   L7514
         LDA   L1035
         STA   $04
         LDA   L1037
         STA   $06
         SEP   #$20
         LDA   #$C8
         STA   L7513
         LDY   #$0022
L73CD    LDX   #$0000
L73D0    LDA   [$00],Y
         BPL   L73F3
         CMP   #$80
         BEQ   L73EB
         EOR   #$FF
         INC
         INC
         STA   L7512
         INY
         LDA   [$00],Y
L73E2    STA   L7470,X
         INX
         DEC   L7512
         BNE   L73E2
L73EB    INY
L73EC    CPX   #$00A0
         BNE   L73D0
         BRA   L7406
L73F3    INC
         STA   L7512
         INY
L73F8    LDA   [$00],Y
         STA   L7470,X
         INY
         INX
         DEC   L7512
         BNE   L73F8
         BRA   L73EC
L7406    PHY
         LDX   #$0000
L740A    LDA   #$04
         STA   L7511
L740F    LDY   #$0002
         STZ   L7510
L7415    ASL   L7510
         ASL   L74E8,X
         BCC   L7420
         INC   L7510
L7420    ASL   L7510
         ASL   L74C0,X
         BCC   L742B
         INC   L7510
L742B    ASL   L7510
         ASL   L7498,X
         BCC   L7436
         INC   L7510
L7436    ASL   L7510
         ASL   L7470,X
         BCC   L7441
         INC   L7510
L7441    DEY
         BNE   L7415
         LDA   L7510
         LDY   L7514
         STA   [$04],Y
         INY
         STY   L7514
         DEC   L7511
         BNE   L740F
         INX
         CPX   #$0028
         BNE   L740A
         PLY
         DEC   L7513
         BEQ   L7464
         JMP   L73CD

L7464    REP   #$30
         CLC
         RTS

L7468    DB    $00
         DB    $00
L746A    DB    $00
         DB    $00
L746C    DB    $00
         DB    $00
L746E    DB    $00
         DB    $00
L7470    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L7498    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L74C0    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L74E8    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L7510    DB    $00
L7511    DB    $00
L7512    DB    $00
L7513    DB    $00
L7514    DB    $00
         DB    $00
L7516    DB    $00
         DB    $00
L7518    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L7524    DB    $00
         DB    $00
         REP   #$30
         LDA   L101D
         PHA
         LDA   L1021
         PHA
         _SetPenSize
         RTS

         REP   #$30
         LDA   L101D
         PHA
         _SetPenMode
         RTS

L7546    REP   #$30
         LDA   L101D
         PHA
         LDA   L1021
         PHA
         _MoveTo
         RTS

L7558    REP   #$30
         PEA   $0000
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         _CStringWidth
         PLA
         STA   L1021
         RTS

         REP   #$30
         LDA   L101D
         PHA
         _DrawChar
         RTS

L757F    REP   #$30
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         _DrawCString
         RTS

         REP   #$30
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         LDA   L101D
         STA   $00
         LDA   L101F
         STA   $02
         LDA   [$00]
         STA   L101D
         LDY   #$0002
         LDA   [$00],Y
         STA   L1021
         JSR   L7546
         PLA
         STA   L101D
         PLA
         STA   L101F
         LDA   #$0004
         CLC
         ADC   L101D
         STA   L1021
         LDA   #$0000
         ADC   L101F
         STA   L1023
         LDA   L1023
         PHA
         LDA   L1021
         PHA
         _DrawCString
         RTS

L75E0    REP   #$30
         LDA   L101D
         PHA
         _SetForeColor
         RTS

L75EE    REP   #$30
         LDA   L101D
         PHA
         _SetBackColor
         RTS

L75FC    REP   #$30
         LDA   L101D
         STA   L1025
         LDA   L101F
         STA   L1027
         LDA   L1021
         STA   L1029
         JSR   L7558
         LDA   #$0140
         SEC
         SBC   L1021
         LSR
         STA   L101D
         LDA   L1029
         STA   L1021
         JSR   L7546
         LDA   L1025
         STA   L101D
         LDA   L1027
         STA   L101F
         JSR   L757F
         RTS

L7637    REP   #$30
         PEA   $0000
         PEA   $0000
         _TickCount
         PLA
         STA   L101D
         PLA
         STA   L101F
         RTS

L764F    REP   #$30
         JSR   L7637
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         _SetRandSeed
         RTS

         REP   #$30
         DEC   L1021
         LDA   L1021
         BNE   L767B
         LDA   L101D
         STA   L1025
         LDA   L101F
         STA   L1027
         RTS

L767B    LDA   L101D
         STA   $00
         LDA   L101F
         STA   $02
         LDY   #$0000
         SEP   #$20
L768A    LDA   [$00],Y
         INY
         CMP   #$00
         BNE   L768A
         DEC   L1021
         BNE   L768A
         REP   #$20
         TYA
         CLC
         ADC   L101D
         STA   L1025
         LDA   #$0000
         ADC   L101F
         STA   L1027
         REP   #$30
         RTS

L76AC    REP   #$30
         JSR   L75E0
         LDA   L1021
         STA   L101D
         JSR   L75EE
         RTS

L76BB    REP   #$30
         PEA   $0000
         _GetForeColor
         PLA
         STA   L101D
         RTS

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

         REP   #$30
         PEA   $0000
         PEA   $0000
         _GetFont
         PLA
         STA   L101D
         PLA
         STA   L101F
         RTS

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

         REP   #$30
         PEA   $0000
         PEA   $0000
         _GetFontID
         PLA
         STA   L101D
         PLA
         STA   L101F
         RTS

         REP   #$30
         PEA   ^L101D
         PEA   L101D
         _GetPen
         RTS

         REP   #$30
         PEA   $0000
         PEA   $0000
         _GetSysFont
         PLA
         STA   L101D
         PLA
         STA   L101F
         RTS

         REP   #$30
         LDA   L101D
         PHA
         _SetTextFace
         RTS

L7754    REP   #$30
         LDA   L101D
         PHA
         _SetTextMode
         RTS

L7762    REP   #$30
         LDAL  $E0C034
         AND   #$000F
         STA   L101D
         RTS

L776F    REP   #$30
         LDAL  $E0C034
         AND   #$FFF0
         ORA   L101D
         STAL  $E0C034
         RTS

L7780    REP   #$30
         LDA   L1025
         STA   $00
         LDA   L1027
         STA   $02
         STZ   L102D
         LDX   L1029
         LDY   #$0000
L7795    STY   L1031
         LDA   L1021
         CMP   [$00],Y
         BCC   L77BE
         INY
         INY
         LDA   L101D
         CMP   [$00],Y
         BCC   L77BE
         INY
         INY
         LDA   L1021
         CMP   [$00],Y
         BPL   L77BE
         INY
         INY
         LDA   L101D
         CMP   [$00],Y
         BPL   L77BE
         INC   L102D
         RTS

L77BE    LDA   L1031
         CLC
         ADC   #$0008
         TAY
         INC   L102D
         DEX
         BNE   L7795
         STZ   L102D
         RTS

L77D0    REP   #$30
L77D2    JSR   L6FB4
         LDA   L101D
         BNE   L77D2
         RTS

         REP   #$30
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadTimeHex
         PLA
         PLY
         PLY
         PLY
         TAY
         XBA
         AND   #$00FF
         STA   L1039
         TYA
         AND   #$00FF
         STA   L103B
         CLC
         ADC   L1029
         CMP   #$003C
         BCC   L7813
         SEC
         SBC   #$003C
         INC   L1039
L7813    STA   L103B
         LDA   L1039
         XBA
         ORA   L103B
         STA   L1039
         LDA   L101D
         STA   L102F
         LDA   L1021
         STA   L1031
         LDA   L1025
         STA   L1033
L7832    LDA   L102F
         STA   L101D
         LDA   L1031
         STA   L1021
         LDA   L1033
         STA   L1025
         LDA   #$0004
         STA   L1029
         LDA   #$0000
         STA   L102B
         JSR   L7870
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadTimeHex
         PLA
         PLY
         PLY
         PLY
         CMP   L1039
         BCC   L7832
         RTS

L7870    REP   #$30
         LDA   L1021
         STA   L1035
         LDA   L1025
         STA   L1037
         LDA   #L106D
         STA   L1021
         LDA   #^L106D
         STA   L1023
         JSR   L71BC
         LDA   L1035
         CLC
         ADC   L1037
         DEC
         DEC
         ASL
         TAY
         DEC   L1037
         LDA   L106F,Y
         PHA
L789F    LDA   L106D,Y
         STA   L106F,Y
         DEC   L1037
         BEQ   L78AE
         DEY
         DEY
         BRA   L789F
L78AE    PLA
         STA   L106D,Y
         JSR   L71A6
         LDA   L1029
         STA   L101D
         LDA   L102B
         STA   L101F
         JSR   L799D
         RTS

L78C5    REP   #$30
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadTimeHex
         PLA
         PLY
         PLY
         PLY
         TAY
         XBA
         AND   #$00FF
         STA   L1039
         TYA
         AND   #$00FF
         STA   L103B
         CLC
         ADC   L101D
         CMP   #$003C
         BCC   L78FD
         SEC
         SBC   #$003C
         INC   L1039
L78FD    STA   L103B
         LDA   L1039
         XBA
         ORA   L103B
         STA   L1039
L790A    PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadTimeHex
         PLA
         PLY
         PLY
         PLY
         CMP   L1039
         BCC   L790A
         RTS

L7927    REP   #$30
         LDA   L1023
         PHA
         LDA   L1021
         PHA
         LDA   L101D
         STA   L1021
         LDA   L101F
         STA   L1023
         LDA   #L106D
         STA   L101D
         LDA   #^L106D
         STA   L101F
         JSR   L6EC6
         LDA   L1025
         STA   L1021
         LDA   L1027
         STA   L1023
         LDA   #L107D
         STA   L101D
         LDA   #^L107D
         STA   L101F
         JSR   L6EC6
         PLA
         STA   L1021
         PLA
         STA   L1023
         PEA   ^L106D
         PEA   L106D
         PEA   ^L107D
         PEA   L107D
         LDA   L1023
         PHA
         LDA   L1021
         PHA
         LDA   L102B
         PHA
         LDA   L1029
         PHA
         LDA   L102D
         PHA
         PEA   $0000
         PEA   $0000
         _CopyPixels
         RTS

L799D    REP   #$30
         LDA   L101D
         STA   L1021
         LDA   L101F
         STA   L1023
         JSR   L7637
         LDA   L101D
         CLC
         ADC   L1021
         STA   L1025
         LDA   L101F
         ADC   L1023
         STA   L1027
L79C1    JSR   L7637
         LDA   L1025
         SEC
         SBC   L101D
         STA   L1021
         LDA   L1027
         SBC   L101F
         STA   L1023
         LDA   L1023
         BPL   L79C1
         RTS

L79DD    REP   #$30
         LDA   L101D
         STA   L1029
         LDA   L1021
         STA   L102D
         LDA   L1023
         STA   L102F
         LDA   #L106D
         STA   L1021
         LDA   #^L106D
         STA   L1023
         JSR   L71BC
         LDA   L102D
         STA   $00
         LDA   L102F
         STA   $02
         LDX   #$0010
L7A0D    LDY   #$001E
L7A10    LDA   [$00],Y
         XBA
         AND   #$000F
         STA   L1031
         LDA   L106D,Y
         PHA
         PHA
         XBA
         AND   #$000F
         CMP   L1031
         BEQ   L7A28
         INC
L7A28    XBA
         STA   L1039
         LDA   [$00],Y
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         STA   L1031
         PLA
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         CMP   L1031
         BEQ   L7A46
         INC
L7A46    ASL
         ASL
         ASL
         ASL
         STA   L1035
         LDA   [$00],Y
         AND   #$000F
         STA   L1031
         PLA
         AND   #$000F
         CMP   L1031
         BEQ   L7A5F
         INC
L7A5F    ORA   L1035
         ORA   L1039
         STA   L106D,Y
         DEY
         DEY
         BPL   L7A10
         PHX
         LDA   L1029
         STA   L101D
         LDA   #L106D
         STA   L1021
         LDA   #^L106D
         STA   L1023
         JSR   L71A6
         LDA   #$0001
         STA   L101D
         LDA   #$0000
         STA   L101F
         JSR   L799D
         PLX
         DEX
         BEQ   L7A98
         JMP   L7A0D
L7A98    RTS

L7A99    REP   #$30
         LDA   L101D
         STA   L1029
         LDA   #L106D
         STA   L1021
         LDA   #^L106D
         STA   L1023
         JSR   L71BC
         LDY   #$0010
L7AB3    LDX   #$001E
L7AB6    LDA   L106D,X
         PHA
         PHA
         XBA
         AND   #$000F
         BEQ   L7AC2
         DEC
L7AC2    XBA
         STA   L1039
         PLA
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         BEQ   L7AD5
         DEC
         ASL
         ASL
         ASL
         ASL
L7AD5    STA   L1035
         PLA
         AND   #$000F
         BEQ   L7ADF
         DEC
L7ADF    ORA   L1035
         ORA   L1039
         STA   L106D,X
         DEX
         DEX
         BPL   L7AB6
         PHY
         LDA   L1029
         STA   L101D
         LDA   #L106D
         STA   L1021
         LDA   #^L106D
         STA   L1023
         JSR   L71A6
         LDA   #$0002
         STA   L101D
         LDA   #$0000
         STA   L101F
         JSR   L799D
         PLY
         DEY
         BNE   L7AB3
         RTS

L7B16    REP   #$30
         LDA   L101D
         PHA
         LDA   L1021
         STA   L102D
         LDA   L1023
         STA   L102F
         LDA   L1025
         STA   L1031
         LDA   L1027
         STA   L1033
         JSR   L7A99
         LDA   L1031
         STA   L101D
         LDA   L1033
         STA   L101F
         LDA   #$2000
         STA   L1021
         LDA   #$00E1
         STA   L1023
         LDA   #$7D00
         STA   L1025
         LDA   #$0000
         STA   L1027
         JSR   L70CA
         PLA
         STA   L101D
         LDA   L102D
         STA   L1021
         LDA   L102F
         STA   L1023
         JSR   L79DD
         RTS

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

         REP   #$30
         LDA   #$0008
         STA   L101D
         LDA   #L7516
         STA   L1021
         LDA   #^L7516
         STA   L1023
L7B9A    JSR   L6F7A
         LDA   L7516
         BEQ   L7B9A
         LDA   L7518
         RTS

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

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

L7BD6    REP   #$30
         LDA   #L8B48
         STA   L8B3B
         LDA   #^L8B48
         STA   L8B3D
         LDA   L8B39
         CMP   #$0001
         BEQ   L7C06
         LDA   #$0003
         EOR   L8B37
         STA   L8B37
         CMP   #$0002
         BNE   L7C06
         LDA   #L8B60
         STA   L8B3B
         LDA   #^L8B60
         STA   L8B3D
L7C06    RTS

L7C07    REP   #$30
         LDA   #L8B48
         STA   L1021
         LDA   #^L8B48
         STA   L1023
         JSR   L7C4B
         LDA   #L8B60
         STA   L1021
         LDA   #^L8B60
         STA   L1023
         JSR   L7C4B
         SEP   #$20
         LDY   #$0007
         LDA   #$01
         CLC
         ADC   [$00],Y
         STA   [$00],Y
         REP   #$20
         LDA   #$0001
         STA   L8B37
         STA   L8B39
         LDA   #L8B48
         STA   L8B3B
         LDA   #^L8B48
         STA   L8B3D
         RTS

L7C4B    LDA   #L8B3F
         STA   L101D
         LDA   #^L8B3F
         STA   L101F
         LDA   #$0008
         STA   L1025
         LDA   #$0000
         STA   L1027
         JSR   L70CA
         LDA   L1021
         STA   $00
         LDA   L1023
         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

L7C93    REP   #$30
         _LoadSysFont
         RTS

L7C9D    REP   #$30
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         LDA   L1021
         PHA
         _InstallFont
         RTS

L7CB3    REP   #$30
         LDA   L1029
         STA   $00
         LDA   L102B
         STA   $02
         PEA   $0000
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         _GetFamNum
         PLA
         CMP   #$FFFF
         BEQ   L7CEC
         STA   [$00]
         LDY   #$0002
         SEP   #$20
         LDA   L1021
         STA   [$00],Y
         INY
         LDA   L1025
         STA   [$00],Y
         REP   #$20
         RTS

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

L7CF7    REP   #$30
         LDA   L101D
         STA   L103D
         LDA   L101F
         STA   L103F
         STZ   L101D
         JSR   L7A99
         LDA   #$000B
         STA   L101D
         JSR   L715B
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         JSR   L7E32
         JSR   L7EA1
         JSR   L7B72
         JSR   L7151
         PEA   $001E
         PEA   $0028
         PEA   ^L7D7F
         PEA   L7D7F
         PEA   $0000
         PEA   $0000
         LDA   L103F
         PHA
         LDA   L103D
         PHA
         PEA   ^L8B78
         PEA   L8B78
         _SFGetFile
         JSR   L7147
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L7EF3
         JSR   L7E84
         SEP   #$20
         LDX   #$00C7
         LDA   #$00
L7D75    STAL  $E19D00,X
         DEX
         BPL   L7D75
         REP   #$20
         RTS

L7D7F    STR   'Please select a file.'
L7D95    REP   #$30
         LDA   L1021
         STA   L103D
         LDA   L1023
         STA   L103F
         LDA   L1025
         STA   L1041
         STZ   L101D
         JSR   L7A99
         LDA   #$000B
         STA   L101D
         JSR   L715B
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         JSR   L7E32
         JSR   L7EA1
         JSR   L7B72
         JSR   L7151
         PEA   $001E
         PEA   $0028
         PEA   ^L7E21
         PEA   L7E21
         LDA   L103F
         PHA
         LDA   L103D
         PHA
         LDA   L1041
         PHA
         PEA   ^L8B78
         PEA   L8B78
         _SFPutFile
         JSR   L7147
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L7EF3
         JSR   L7E84
         SEP   #$20
         LDX   #$00C7
         LDA   #$00
L7E17    STAL  $E19D00,X
         DEX
         BPL   L7E17
         REP   #$20
         RTS

L7E21    STR   'Enter a filename'
L7E32    REP   #$30
         LDA   #$000F
         STA   L101D
         LDA   #$0100
         STA   L1021
         JSR   L6EA2
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0100
         LDA   L0FBD
         PHA
         PEA   $C005
         PEA   $0000
         PEA   $0000
         _NewHandle
         PLA
         STA   L7E9D
         PLA
         STA   L7E9D+2
         LDA   L7E9D
         STA   $00
         LDA   L7E9D+2
         STA   $02
         LDA   L0FBD
         PHA
         LDA   [$00]
         PHA
         _MenuStartUp
         RTS

L7E84    REP   #$30
         _MenuShutDown
         LDA   L7E9D+2
         PHA
         LDA   L7E9D
         PHA
         _DisposeHandle
         RTS

L7E9D    ADRL  $00000000
L7EA1    REP   #$30
         LDA   #$0017
         STA   L101D
         LDA   #$0100
         STA   L1021
         JSR   L6EA2
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0100
         LDA   L0FBD
         PHA
         PEA   $C005
         PEA   $0000
         PEA   $0000
         _NewHandle
         PLA
         STA   L7F0C
         PLA
         STA   L7F0C+2
         LDA   L7F0C
         STA   $00
         LDA   L7F0C+2
         STA   $02
         LDA   L0FBD
         PHA
         LDA   [$00]
         PHA
         _SFStartUp
         RTS

L7EF3    REP   #$30
         _SFShutDown
         LDA   L7F0C+2
         PHA
         LDA   L7F0C
         PHA
         _DisposeHandle
         RTS

L7F0C    ADRL  $00000000
L7F10    REP   #$30
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         _InitColorTable
         RTS

*--- Check volume - AV 202103

L7F22    REP   #$30
	lda	#1
	sta	L101D
	rts
	
*         LDA   L1021
*         STA   L7FEE
*         LDA   L1023
*         STA   L7FF0
*         LDA   #L7FCA
*         STA   L7FF2
*         LDA   #^L7FCA
*         STA   L7FF4
*         LDA   #$0001
*         STA   L7FF6
*L7F42    LDA   L7FF2
*         STA   L101D
*         LDA   L7FF4
*         STA   L101F
*         LDA   #L7FF8
*         STA   L1021
*         LDA   #^L7FF8
*         STA   L1023
*         JSL   GSOS
*         DW    $0008      ; Volume
*         ADRL  L101D
*         CMP   #$0011
*         BEQ   L7FBC
*         LDA   L7FF2
*         STA   L101D
*         LDA   L7FF4
*         STA   L101F
*         LDA   #$0004
*         CLC
*         ADC   L101D
*         STA   L7FF2
*         LDA   #$0000
*         ADC   L101F
*         STA   L7FF4
*         LDA   L7FEE
*         STA   L101D
*         LDA   L7FF0
*         STA   L101F
*         LDA   #L7FF8
*         STA   L1021
*         LDA   #^L7FF8
*         STA   L1023
*         LDA   #$0000
*         STA   L1025
*         JSR   L8155
*         LDA   L1025
*         BEQ   L7FC3
*         INC   L7FF6
*         LDA   L7FF6
*         CMP   #$000A
*         BEQ   L7FBC
*         JMP   L7F42
*
*L7FBC    LDA   #$0000
*         STA   L101D
*         RTS
*
*L7FC3    LDA   L7FF6
*         STA   L101D
*         RTS
*
*L7FCA    STR   '.d1'
*         STR   '.d2'
*         STR   '.d3'
*         STR   '.d4'
*         STR   '.d5'
*         STR   '.d6'
*         STR   '.d7'
*         STR   '.d8'
*         STR   '.d9'

L7FEE    DB    $00
         DB    $00
L7FF0    DB    $00
         DB    $00
L7FF2    DB    $00
         DB    $00
L7FF4    DB    $00
         DB    $00
L7FF6    DB    $00
         DB    $00
L7FF8    DS    $100

L80F8    REP   #$30
         LDA   L1021
         STA   L814D
         LDA   L1023
         STA   L814F
         LDA   L1025
         STA   L8151
L810C    LDA   #$0000
         STA   L101D
         LDA   #$0000
         STA   L1021
         LDA   #$0000
         STA   L1025
         JSR   L6F4C
         LDA   L1025
         BEQ   L810C
         LDA   L814D
         STA   L1025
         LDA   L814F
         STA   L1027
         LDA   L8151
         STA   L1029
         LDA   #$0000
         STA   L102D
         JSR   L7780
         LDA   L102D
         BEQ   L810C
         LDA   L102D
         STA   L101D
         RTS

L814D    DW    $0000
L814F    DW    $0000
L8151    DW    $0000
         DW    $0000

L8155    REP   #$30
         LDA   L101D
         STA   $00
         LDA   L101F
         STA   $02
         LDA   L1021
         STA   $04
         LDA   L1023
         STA   $06
         SEP   #$30
         LDY   #$00
         STY   L81A8
         LDA   [$00],Y
         CMP   [$04],Y
         BNE   L819E
         CLC
         ADC   #$01
         STA   L81A7
         INY
L817F    LDA   [$00],Y
         ORA   #$20
         STA   L81A8
         LDA   [$04],Y
         ORA   #$20
         CMP   L81A8
         BNE   L819E
         INY
         CPY   L81A7
         BNE   L817F
         REP   #$30
         LDA   #$0000
         STA   L1025
         RTS

L819E    REP   #$30
         LDA   #$0001
         STA   L1025
         RTS

L81A7    DB    $00
L81A8    DB    $00

L81A9    REP   #$30
         JSR   L7116
         RTS

L81AF    REP   #$30
         JSR   L7147
         LDA   L101D
         STA   L8251
         LDA   L1021
         STA   L8253
         LDA   L1025
         STA   L8255
         LDA   L1027
         STA   L8257
         LDA   L1025
         STA   L8259
         LDA   L1027
         STA   L825B
L81D8    LDA   L8255
         STA   L101D
         LDA   L8257
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L81A9
         LDA   #$0008
         CLC
         ADC   L8255
         STA   L101D
         LDA   #$0000
         ADC   L8257
         STA   L101F
         LDA   L101D
         STA   L8255
         LDA   L101F
         STA   L8257
         DEC   L8253
         BNE   L81D8
         LDA   L8259
         STA   L101D
         LDA   L825B
         STA   L101F
L821D    DEC   L8251
         BEQ   L8244
         LDA   #$0008
         CLC
         ADC   L101D
         STA   L1021
         LDA   #$0000
         ADC   L101F
         STA   L1023
         LDA   L1021
         STA   L101D
         LDA   L1023
         STA   L101F
         JMP   L821D

L8244    LDA   #$0007
         STA   L1021
         JSR   L81A9
         JSR   L7151
         RTS

L8251    DW    $0000
L8253    DW    $0000
L8255    DW    $0000
L8257    DW    $0000
L8259    DW    $0000
L825B    DW    $0000
L825D    REP   #$30
         JSR   L216C
         LDA   #L83C3
         STA   L101D
         LDA   #^L83C3
         STA   L101F
         LDA   L1149
         STA   L1021
         LDA   L114B
         STA   L1023
         LDA   #L10C9
         STA   L1025
         LDA   #^L10C9
         STA   L1027
         JSR   L7339
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         LDA   #$0000
         STA   L101D
         LDA   #L10C9
         STA   L1021
         LDA   #^L10C9
         STA   L1023
         LDA   L1149
         STA   L1025
         LDA   L114B
         STA   L1027
         JSR   L7B16
         JSR   LA27E
         LDA   #$0004
         STA   L101D
         JSR   L7754
         LDA   #$0001
         STA   L101D
         JSR   L75E0
         LDA   #$0098
         STA   L101D
         LDA   #$003C
         STA   L1021
         JSR   L7546
         LDA   #L83E5
         STA   L101D
         LDA   #^L83E5
         STA   L101F
         JSR   L757F
         LDA   #$0042
         STA   L101D
         LDA   #$0050
         STA   L1021
         JSR   L7546
         LDA   #L8B48
         STA   L101D
         LDA   #^L8B48
         STA   L101F
         JSR   L757F
         LDA   #L8B48
         STA   L1035
         LDA   #^L8B48
         STA   L1037
         LDA   #$0050
         STA   L1039
         JSR   L835B
         LDA   L8B39
         CMP   #$0002
         BEQ   L8325
L8321    JSR   L6FC2
         RTS

L8325    LDA   #$0042
         STA   L101D
         LDA   #$0064
         STA   L1021
         JSR   L7546
         LDA   #L8B60
         STA   L101D
         LDA   #^L8B60
         STA   L101F
         JSR   L757F
         LDA   #L8B60
         STA   L1035
         LDA   #^L8B60
         STA   L1037
         LDA   #$0064
         STA   L1039
         JSR   L835B
         JMP   L8321

L835B    LDA   L1035
         STA   $04
         LDA   L1037
         STA   $06
         LDY   #$0012
         LDA   #$00B0
         STA   L1025
         JSR   L837A
         LDY   #$0014
         LDA   #$0100
         STA   L1025
L837A    LDA   [$04],Y
         STA   L101D
         LDA   #L83F8
         STA   L1021
         LDA   #^L83F8
         STA   L1023
         JSR   L706D
         SEP   #$20
         LDA   L83F8+1
         REP   #$30
         CMP   #$0000
         BNE   L83A4
         LDA   #$0008
         CLC
         ADC   L1025
         STA   L1025
L83A4    LDA   L1025
         STA   L101D
         LDA   L1039
         STA   L1021
         JSR   L7546
         LDA   #L83F8
         STA   L101D
         LDA   #^L83F8
         STA   L101F
         JSR   L757F
         RTS

L83C3    STR   '1/arab.pics/score.pc1'
L83E5    ASC   'Correct  Incorrect'00
L83F8    DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
L8402    REP   #$30
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         _SetSpaceExtra
         RTS

         REP   #$30
         PEA   $0000
         PEA   $0000
         _GetSpaceExtra
         PLA
         STA   L101D
         PLA
         STA   L101F
         RTS

L842C    REP   #$30
         PEA   $0000
         PEA   $0000
         LDA   L1023
         PHA
         LDA   L1021
         PHA
         _Long2Fix
         PLA
         STA   L101D
         PLA
         STA   L101F
         RTS

L844C    REP   #$30
         LDA   L102B
         PHA
         LDA   L1029
         PHA
         LDA   L1027
         PHA
         LDA   L1025
         PHA
         LDA   L1023
         PHA
         LDA   L1021
         PHA
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         JSL   L0764
         TSC
         CLC
         ADC   #$0010
         TCS
         RTS

L8479    REP   #$30
         LDA   L1029
         PHA
         LDA   L1025
         PHA
         LDA   L1023
         PHA
         LDA   L1021
         PHA
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         JSL   L071C
         TSC
         CLC
         ADC   #$000C
         TCS
         RTS

L849E    REP   #$30
         JSL   L0684
         RTS

L84A5    REP   #$30
         LDA   L101F
         PHA
         LDA   L101D
         PHA
         JSL   L07D9
         PLA
         STA   L101D
         PLA
         STA   L101F
         RTS

L84BC    REP   #$30
L84BE    JSR   L700B
         AND   #$0003
         CMP   #$0003
         BEQ   L84BE
         STA   L8B2D
         ASL
         ASL
         CLC
         ADC   L101D
         STA   L1039
         LDA   #$0000
         ADC   L101F
         STA   L103B
         LDA   L1149
         STA   L101D
         LDA   L114B
         STA   L101F
         JSR   L6EFD
         LDA   #L8523
         STA   L101D
         LDA   #^L8523
         STA   L101F
         STZ   L1021
         JSR   L7116
         LDA   L1039
         STA   $00
         LDA   L103B
         STA   $02
         LDA   [$00]
         STA   L101D
         LDY   #$0002
         LDA   [$00],Y
         STA   L101F
         LDA   #$00AF
         STA   L1021
         JSR   L75FC
         JSR   L17DE
         RTS

L8523    DW    $00A0
         DW    $0000
         DW    $00B4
         DW    $0140
L852B    REP   #$30
         JSR   L700B
         AND   #$0001
         BEQ   L8556
         LDA   L8AFB
         STA   L101D
         LDA   L8AFD
         STA   L101F
         LDA   L8AFF
         STA   L1021
         LDA   L8B01
         STA   L1023
         LDA   L8B03
         STA   L1025
         JSR   L1185
L8556    LDA   L8B23
         STA   L101D
         LDA   L8B25
         STA   L101F
         LDA   L8B27
         STA   L1021
         LDA   L8B29
         STA   L1023
         LDA   L8B2B
         STA   L1025
         JSR   L1185
         RTS

L8578    REP   #$30
         LDY   L8B2D
         BNE   L85A0
         LDA   L8A86
         STA   L101D
         LDA   L8A88
         STA   L101F
         LDA   L8A8A
         STA   L1021
         LDA   L8A8C
         STA   L1023
         LDA   L8A8E
         STA   L1025
         JMP   L85E4

L85A0    CPY   #$0002
         BNE   L85C6
         LDA   L8AAD
         STA   L101D
         LDA   L8AAF
         STA   L101F
         LDA   L8AB1
         STA   L1021
         LDA   L8AB3
         STA   L1023
         LDA   L8AB5
         STA   L1025
         JMP   L85E4

L85C6    LDA   L8AD4
         STA   L101D
         LDA   L8AD6
         STA   L101F
         LDA   L8AD8
         STA   L1021
         LDA   L8ADA
         STA   L1023
         LDA   L8ADC
         STA   L1025
L85E4    JSR   L1185
         RTS

L85E8    REP   #$30
         LDA   L0FB7
         BEQ   L85F2
         JSR   L216C
L85F2    LDA   #L8A69
         STA   L101D
         LDA   #^L8A69
         STA   L101F
         LDA   #L8A86
         STA   L1021
         LDA   #^L8A86
         STA   L1023
         LDA   #L8A8A
         STA   L1025
         LDA   #^L8A8A
         STA   L1027
         LDA   #L8A8E
         STA   L1029
         LDA   #^L8A8E
         STA   L102B
         JSR   L1169
         LDA   #L8A90
         STA   L101D
         LDA   #^L8A90
         STA   L101F
         LDA   #L8AAD
         STA   L1021
         LDA   #^L8AAD
         STA   L1023
         LDA   #L8AB1
         STA   L1025
         LDA   #^L8AB1
         STA   L1027
         LDA   #L8AB5
         STA   L1029
         LDA   #^L8AB5
         STA   L102B
         JSR   L1169
         LDA   #L8AB7
         STA   L101D
         LDA   #^L8AB7
         STA   L101F
         LDA   #L8AD4
         STA   L1021
         LDA   #^L8AD4
         STA   L1023
         LDA   #L8AD8
         STA   L1025
         LDA   #^L8AD8
         STA   L1027
         LDA   #L8ADC
         STA   L1029
         LDA   #^L8ADC
         STA   L102B
         JSR   L1169
         RTS

L868C    LDA   L8A86
         STA   L101D
         LDA   L8A88
         STA   L101F
         JSR   L117A
         LDA   L8AAD
         STA   L101D
         LDA   L8AAF
         STA   L101F
         JSR   L117A
         LDA   L8AD4
         STA   L101D
         LDA   L8AD6
         STA   L101F
         JSR   L117A
         RTS

L86BA    REP   #$30
         LDA   L0FB7
         BEQ   L86C4
         JSR   L216C
L86C4    LDA   #L8ADE
         STA   L101D
         LDA   #^L8ADE
         STA   L101F
         LDA   #L8AFB
         STA   L1021
         LDA   #^L8AFB
         STA   L1023
         LDA   #L8AFF
         STA   L1025
         LDA   #^L8AFF
         STA   L1027
         LDA   #L8B03
         STA   L1029
         LDA   #^L8B03
         STA   L102B
         JSR   L1169
         LDA   #L8B05
         STA   L101D
         LDA   #^L8B05
         STA   L101F
         LDA   #L8B23
         STA   L1021
         LDA   #^L8B23
         STA   L1023
         LDA   #L8B27
         STA   L1025
         LDA   #^L8B27
         STA   L1027
         LDA   #L8B2B
         STA   L1029
         LDA   #^L8B2B
         STA   L102B
         JSR   L1169
         RTS

L872B    LDA   L8AFB
         STA   L101D
         LDA   L8AFD
         STA   L101F
         JSR   L117A
         LDA   L8B23
         STA   L101D
         LDA   L8B25
         STA   L101F
         JSR   L117A
         RTS

L874A    REP   #$30
         JSR   L216C
         LDA   #L8953
         STA   L101D
         LDA   #^L8953
         STA   L101F
         LDA   #L8971
         STA   L1021
         LDA   #^L8971
         STA   L1023
         LDA   #L8975
         STA   L1025
         LDA   #^L8975
         STA   L1027
         LDA   #L8979
         STA   L1029
         LDA   #^L8979
         STA   L102B
         JSR   L1169
         LDA   #L89A3
         STA   L101D
         LDA   #^L89A3
         STA   L101F
         LDA   #L89C0
         STA   L1021
         LDA   #^L89C0
         STA   L1023
         LDA   #L89C4
         STA   L1025
         LDA   #^L89C4
         STA   L1027
         LDA   #L89C8
         STA   L1029
         LDA   #^L89C8
         STA   L102B
         JSR   L1169
         LDA   #L89CA
         STA   L101D
         LDA   #^L89CA
         STA   L101F
         LDA   #L89E7
         STA   L1021
         LDA   #^L89E7
         STA   L1023
         LDA   #L89EB
         STA   L1025
         LDA   #^L89EB
         STA   L1027
         LDA   #L89EF
         STA   L1029
         LDA   #^L89EF
         STA   L102B
         JSR   L1169
         LDA   #L89F1
         STA   L101D
         LDA   #^L89F1
         STA   L101F
         LDA   #L8A10
         STA   L1021
         LDA   #^L8A10
         STA   L1023
         LDA   #L8A14
         STA   L1025
         LDA   #^L8A14
         STA   L1027
         LDA   #L8A18
         STA   L1029
         LDA   #^L8A18
         STA   L102B
         JSR   L1169
         RTS

L881C    LDA   L8971
         STA   L101D
         LDA   L8973
         STA   L101F
         JSR   L117A
         LDA   L89C0
         STA   L101D
         LDA   L89C2
         STA   L101F
         JSR   L117A
         LDA   L89E7
         STA   L101D
         LDA   L89E9
         STA   L101F
         JSR   L117A
         LDA   L8A10
         STA   L101D
         LDA   L8A12
         STA   L101F
         JSR   L117A
         RTS

L8859    REP   #$30
         LDA   L0FB7
         BEQ   L8863
         JSR   L216C
L8863    LDA   #L8A1A
         STA   L101D
         LDA   #^L8A1A
         STA   L101F
         LDA   #L8A37
         STA   L1021
         LDA   #^L8A37
         STA   L1023
         LDA   #L8A3B
         STA   L1025
         LDA   #^L8A3B
         STA   L1027
         LDA   #L8A3F
         STA   L1029
         LDA   #^L8A3F
         STA   L102B
         JSR   L1169
         RTS

L8897    LDA   L8A37
         STA   L101D
         LDA   L8A39
         STA   L101F
         JSR   L117A
         RTS

L88A7    ADRL  L88BF
         ADRL  L88D7
         ADRL  L88CD
L88B3    ADRL  L88E2
         ADRL  L88FB
         ADRL  L8912
L88BF    ASC   'That'27's right!'00
L88CD    ASC   'Good job!'00
L88D7    ASC   'Very good!'00
L88E2    ASC   'Sorry, that'27's incorrect.'00
L88FB    ASC   'Better luck next time.'00
L8912    ASC   'Whoops, you missed it.'00
L8929    ASC   '1/magic.snd/fsagain'00
L8949    DW    $0000
L894B    DW    $0000
L894D    DW    $0000
L894F    DW    $0000
L8951    DW    $0000
L8953    ASC   '1/magic.snd/fshow'00
L8971    DW    $0000
L8973    DW    $0000
L8975    DW    $0000
L8977    DW    $0000
L8979    DW    $0000
L897B    ASC   '1/magic.snd/fsact'00
L8999    DW    $0000
L899B    DW    $0000
L899D    DW    $0000
L899F    DW    $0000
L89A1    DW    $0000
L89A3    ASC   '1/magic.snd/fsp1'00
L89C0    DW    $0000
L89C2    DW    $0000
L89C4    DW    $0000
L89C6    DW    $0000
L89C8    DW    $0000
L89CA    ASC   '1/magic.snd/fsp2'00
L89E7    DW    $0000
L89E9    DW    $0000
L89EB    DW    $0000
L89ED    DW    $0000
L89EF    DW    $0000
L89F1    ASC   '1/magic.snd/fsname'00
L8A10    DW    $0000
L8A12    DW    $0000
L8A14    DW    $0000
L8A16    DW    $0000
L8A18    DW    $0000
L8A1A    ASC   '1/magic.snd/fsqt'00
L8A37    DW    $0000
L8A39    DW    $0000
L8A3B    DW    $0000
L8A3D    DW    $0000
L8A3F    DW    $0000
L8A41    ASC   '1/magic.snd/fsopt'00
L8A5F    DW    $0000
L8A61    DW    $0000
L8A63    DW    $0000
L8A65    DW    $0000
L8A67    DW    $0000
L8A69    ASC   '1/magic.snd/fstr'00
L8A86    DW    $0000
L8A88    DW    $0000
L8A8A    DW    $0000
L8A8C    DW    $0000
L8A8E    DW    $0000
L8A90    ASC   '1/magic.snd/fsgj'00
L8AAD    DW    $0000
L8AAF    DW    $0000
L8AB1    DW    $0000
L8AB3    DW    $0000
L8AB5    DW    $0000
L8AB7    ASC   '1/magic.snd/fsvg'00
L8AD4    DW    $0000
L8AD6    DW    $0000
L8AD8    DW    $0000
L8ADA    DW    $0000
L8ADC    DW    $0000
L8ADE    ASC   '1/magic.snd/fswh'00
L8AFB    DW    $0000
L8AFD    DW    $0000
L8AFF    DW    $0000
L8B01    DW    $0000
L8B03    DW    $0000
L8B05    ASC   '1/magic.snd/fsinc'00
L8B23    DB    $00
         DB    $00
L8B25    DB    $00
         DB    $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
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L8B37    DB    $00
         DB    $00
L8B39    DB    $00
         DB    $00
L8B3B    DB    $00
         DB    $00
L8B3D    DB    $00
         DB    $00
L8B3F    ASC   'Player 1'00
L8B48    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L8B60    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L8B78    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L8B8E    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L8C78    REP   #$30
         LDA   L0FB7
         BEQ   L8C7F
L8C7F    LDA   #L8929
         STA   L101D
         LDA   #^L8929
         STA   L101F
         LDA   #L8949
         STA   L1021
         LDA   #^L8949
         STA   L1023
         LDA   #L894D
         STA   L1025
         LDA   #^L894D
         STA   L1027
         LDA   #L8951
         STA   L1029
         LDA   #^L8951
         STA   L102B
         JSR   L1169
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L6F28
         JSR   LA27E
         LDA   #$0000
         STA   L101D
         JSR   L715B
         LDA   #L8E9F
         STA   L101D
         LDA   #^L8E9F
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L8EA7
         STA   L101D
         LDA   #^L8EA7
         STA   L101F
         LDA   #$0000
         STA   L1021
         JSR   L7116
         LDA   #L8EAF
         STA   L101D
         LDA   #^L8EAF
         STA   L101F
         LDA   #$0007
         STA   L1021
         JSR   L7116
         LDA   #L8EB7
         STA   L101D
         LDA   #^L8EB7
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L8EBF
         STA   L101D
         LDA   #^L8EBF
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #$000D
         STA   L101D
         JSR   L75E0
         LDA   #L8E71
         STA   L101D
         LDA   #^L8E71
         STA   L101F
         LDA   #$0028
         STA   L1021
         JSR   L75FC
         LDA   #L8E83
         STA   L101D
         LDA   #^L8E83
         STA   L101F
         LDA   #$003C
         STA   L1021
         JSR   L75FC
         LDA   #$00A0
         STA   L101D
         LDA   #$0074
         STA   L1021
         JSR   L7546
         LDA   #L8E95
         STA   L101D
         LDA   #^L8E95
         STA   L101F
         JSR   L757F
         LDA   #$00A0
         STA   L101D
         LDA   #$008A
         STA   L1021
         JSR   L7546
         LDA   #L8E99
         STA   L101D
         LDA   #^L8E99
         STA   L101F
         JSR   L757F
         LDA   #$0007
         STA   L101D
         JSR   L75E0
         LDA   #$009B
         STA   L101D
         LDA   #$00AF
         STA   L1021
         JSR   L7546
         LDA   #L8E9C
         STA   L101D
         LDA   #^L8E9C
         STA   L101F
         JSR   L757F
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         LDA   #$0001
         STA   L8E6F
         LDA   L8949
         STA   L101D
         LDA   L894B
         STA   L101F
         LDA   L894D
         STA   L1021
         LDA   L894F
         STA   L1023
         LDA   L8951
         STA   L1025
         JSR   L1185
         JSR   L7151
L8E08    LDA   #$0000
         STA   L101D
         LDA   #L8EAF
         STA   L1021
         LDA   #^L8EAF
         STA   L1023
         LDA   #$0003
         STA   L1025
         JSR   L80F8
         LDA   L101D
         BEQ   L8E08
         CMP   #$0003
         BEQ   L8E53
         CMP   L8E6F
         BEQ   L8E08
         STA   L8E6F
         LDA   L8E6F
         STA   L101D
         LDA   #$0002
         STA   L1021
         LDA   #L8EAF
         STA   L1025
         LDA   #^L8EAF
         STA   L1027
         JSR   L81AF
         JMP   L8E08

L8E53    LDA   L8949
         STA   L101D
         LDA   L894B
         STA   L101F
         JSR   L117A
         LDA   L8E6F
         STA   L101D
         JSR   L7147
         JSR   L7C93
         RTS

L8E6F    DW    $0000
L8E71    ASC   'Would you like to'00
L8E83    ASC   'play again?'00
         ASC   '(Y/N)'00
L8E95    ASC   'Yes'00
L8E99    ASC   'No'00
L8E9C    ASC   'OK'00
L8E9F    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L8EA7    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L8EAF    DW    $0068
         DW    $008C
         DW    $0076
         DW    $009A
L8EB7    DW    $007E
         DW    $008C
         DW    $008C
         DW    $009A
L8EBF    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L8EC7    REP   #$30
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L6F28
         JSR   LA27E
         LDA   #$0000
         STA   L101D
         JSR   L715B
         LDA   #L908D
         STA   L101D
         LDA   #^L908D
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L9095
         STA   L101D
         LDA   #^L9095
         STA   L101F
         LDA   #$0000
         STA   L1021
         JSR   L7116
         LDA   #L909D
         STA   L101D
         LDA   #^L909D
         STA   L101F
         LDA   #$0007
         STA   L1021
         JSR   L7116
         LDA   #L90A5
         STA   L101D
         LDA   #^L90A5
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L90AD
         STA   L101D
         LDA   #^L90AD
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #$000D
         STA   L101D
         LDA   #$000E
         STA   L1021
         JSR   L76AC
         LDA   #L9070
         STA   L101D
         LDA   #^L9070
         STA   L101F
         LDA   #$0028
         STA   L1021
         JSR   L75FC
         LDA   #$00A0
         STA   L101D
         LDA   #$004C
         STA   L1021
         JSR   L7546
         LDA   #L9082
         STA   L101D
         LDA   #^L9082
         STA   L101F
         JSR   L757F
         LDA   #$00A0
         STA   L101D
         LDA   #$0062
         STA   L1021
         JSR   L7546
         LDA   #L9086
         STA   L101D
         LDA   #^L9086
         STA   L101F
         JSR   L757F
         LDA   #$0007
         STA   L101D
         LDA   #$0009
         STA   L1021
         JSR   L76AC
         LDA   #$009B
         STA   L101D
         LDA   #$00AF
         STA   L1021
         JSR   L7546
         LDA   #L908A
         STA   L101D
         LDA   #^L908A
         STA   L101F
         JSR   L757F
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         LDA   #$0001
         STA   L906E
         LDA   L8971
         STA   L101D
         LDA   L8973
         STA   L101F
         LDA   L8975
         STA   L1021
         LDA   L8977
         STA   L1023
         LDA   L8979
         STA   L1025
         JSR   L1185
         JSR   L7151
L9016    LDA   #$0000
         STA   L101D
         LDA   #L909D
         STA   L1021
         LDA   #^L909D
         STA   L1023
         LDA   #$0003
         STA   L1025
         JSR   L80F8
         LDA   L101D
         BEQ   L9016
         CMP   #$0003
         BEQ   L9061
         CMP   L906E
         BEQ   L9016
         STA   L906E
         LDA   L906E
         STA   L101D
         LDA   #$0002
         STA   L1021
         LDA   #L909D
         STA   L1025
         LDA   #^L909D
         STA   L1027
         JSR   L81AF
         JMP   L9016

L9061    LDA   L906E
         STA   L8B39
         JSR   L7C93
         JSR   L7147
         RTS

L906E    DW    $0000
L9070    ASC   'How many players?'00
L9082    ASC   'one'00
L9086    ASC   'two'00
L908A    ASC   'OK'00
L908D    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L9095    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L909D    DW    $0042
         DW    $008C
         DW    $0050
         DW    $009A
L90A5    DW    $0056
         DW    $008C
         DW    $0064
         DW    $009A
L90AD    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L90B5    REP   #$30
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L6F28
         JSR   LA27E
         LDA   #$0000
         STA   L101D
         JSR   L715B
         LDA   #L9218
         STA   L101D
         LDA   #^L9218
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L9220
         STA   L101D
         LDA   #^L9220
         STA   L101F
         LDA   #$0000
         STA   L1021
         JSR   L7116
         LDA   #$000D
         STA   L101D
         JSR   L75E0
         LDA   #L91B5
         STA   L101D
         LDA   #^L91B5
         STA   L101F
         LDA   #$001C
         STA   L1021
         JSR   L75FC
         LDA   #L91C4
         STA   L101D
         LDA   #^L91C4
         STA   L101F
         LDA   #$0033
         STA   L1021
         JSR   L75FC
         LDA   #L91D4
         STA   L101D
         LDA   #^L91D4
         STA   L101F
         LDA   #$004A
         STA   L1021
         JSR   L75FC
         LDA   #L91E2
         STA   L101D
         LDA   #^L91E2
         STA   L101F
         LDA   #$0061
         STA   L1021
         JSR   L75FC
         JSR   L7C93
         LDA   #$0007
         STA   L101D
         JSR   L75E0
         LDA   #L91F2
         STA   L101D
         LDA   #^L91F2
         STA   L101F
         LDA   #$00AA
         STA   L1021
         JSR   L75FC
         LDA   #L9206
         STA   L101D
         LDA   #^L9206
         STA   L101F
         LDA   #$00B4
         STA   L1021
         JSR   L75FC
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         LDA   #$0001
         STA   L91B3
         JSR   L17FF
         CMP   #$001B
         BEQ   L91B2
         LDA   #$0000
L91B2    RTS

L91B3    DW    $0000
L91B5    ASC   'Press a key or'00
L91C4    ASC   'click the mouse'00
L91D4    ASC   'to answer the'00
L91E2    ASC   'tale questions.'00
L91F2    ASC   'Press ESC to return'00
L9206    ASC   'to the main menu.'00
L9218    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L9220    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L9228    REP   #$30
         LDA   L101D
         STA   L93FE
         LDA   L101F
         STA   L9400
         LDA   L1021
         STA   L9402
         LDA   L1023
         STA   L9404
         LDA   L1025
         STA   L9406
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L6F28
         JSR   LA27E
         LDA   #$0000
         STA   L101D
         JSR   L715B
         LDA   #$000D
         STA   L101D
         LDA   #$0000
         STA   L1021
         JSR   L76AC
         LDA   L9402
         STA   L101D
         LDA   L9404
         STA   L101F
         LDA   #$0028
         STA   L1021
         JSR   L75FC
         LDA   #L940A
         STA   L101D
         LDA   #^L940A
         STA   L101F
         LDA   #$0050
         STA   L1021
         JSR   L75FC
         LDA   #$0007
         STA   L101D
         LDA   #$0000
         STA   L1021
         JSR   L76AC
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         LDA   #$0000
         STA   L9408
         LDA   #L943A
         STA   $00
         LDA   #^L943A
         STA   $02
         LDA   L9406
         CMP   #$0001
         BNE   L92F9
         LDA   L89C0
         STA   L101D
         LDA   L89C2
         STA   L101F
         LDA   L89C4
         STA   L1021
         LDA   L89C6
         STA   L1023
         LDA   L89C8
         STA   L1025
         JSR   L1185
         JMP   L931A

L92F9    LDA   L89E7
         STA   L101D
         LDA   L89E9
         STA   L101F
         LDA   L89EB
         STA   L1021
         LDA   L89ED
         STA   L1023
         LDA   L89EF
         STA   L1025
         JSR   L1185
L931A    LDA   L8A10
         STA   L101D
         LDA   L8A12
         STA   L101F
         LDA   L8A14
         STA   L1021
         LDA   L8A16
         STA   L1023
         LDA   L8A18
         STA   L1025
         JSR   L1185
L933B    JSR   L6FC2
         CMP   #$0000
         BEQ   L933B
         CMP   #$000D
         BNE   L934B
         JMP   L93CA

L934B    CMP   #$007F
         BEQ   L93AD
         LDY   L9408
         CPY   #$0008
         BEQ   L93C4
         ORA   #$0020
         CMP   #$0061
         BCC   L93C4
         CMP   #$007B
         BCS   L93C4
         CPY   #$0000
         BNE   L936D
         AND   #$00DF
L936D    SEP   #$20
         STA   [$00],Y
         INY
         LDA   #$00
         STA   [$00],Y
         REP   #$30
         STY   L9408
L937B    LDA   #L9432
         STA   L101D
         LDA   #^L9432
         STA   L101F
         LDA   #$0000
         STA   L1021
         JSR   L7116
         LDY   L9408
         BEQ   L933B
         LDA   #L943A
         STA   L101D
         LDA   #^L943A
         STA   L101F
         LDA   #$0078
         STA   L1021
         JSR   L75FC
         JMP   L933B

L93AD    LDY   L9408
         CPY   #$0000
         BEQ   L93C4
         DEY
         SEP   #$20
         LDA   #$00
         STA   [$00],Y
         REP   #$30
         STY   L9408
         JMP   L937B

L93C4    JSR   L11FC
         JMP   L933B

L93CA    LDY   L9408
         CPY   #$0000
         BEQ   L93FA
         INY
         STY   L9408
         LDA   #L943A
         STA   L101D
         LDA   #^L943A
         STA   L101F
         LDA   L93FE
         STA   L1021
         LDA   L9400
         STA   L1023
         LDA   L9408
         STA   L1025
         STZ   L1027
         JSR   L70CA
L93FA    JSR   L7C93
         RTS

L93FE    DW    $0000
L9400    DW    $0000
L9402    DW    $0000
L9404    DW    $0000
L9406    DW    $0000
L9408    DW    $0000
L940A    ASC   'Please enter your name.'00
         DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
         DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L9432    DW    $0064
         DW    $000A
         DW    $0082
         DW    $0136
L943A    DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
L9448    DW    $30C2
         LDA   L101D
         STA   L95C3
         LDA   L101F
         STA   L95C5
         LDA   L1021
         STA   L95C7
         LDA   L1023
         STA   L95C9
         LDA   #$0000
         STA   L101D
         LDA   L95C3
         STA   L1021
         LDA   L95C5
         STA   L1023
         JSR   L7F22
         LDA   L101D
         BEQ   L947F
         JMP   L95C2

L947F    LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L6F28
         JSR   LA27E
         LDA   #$0000
         STA   L101D
         JSR   L715B
         LDA   #L95FA
         STA   L101D
         LDA   #^L95FA
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L9602
         STA   L101D
         LDA   #^L9602
         STA   L101F
         LDA   #$000E
         STA   L1021
         JSR   L7116
         LDA   #L960A
         STA   L101D
         LDA   #^L960A
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #$000D
         STA   L101D
         LDA   #$000E
         STA   L1021
         JSR   L76AC
         LDA   #L95CB
         STA   L101D
         LDA   #^L95CB
         STA   L101F
         LDA   #$0028
         STA   L1021
         JSR   L75FC
         LDA   L95C7
         STA   L101D
         LDA   L95C9
         STA   L101F
         LDA   #$0046
         STA   L1021
         JSR   L75FC
         LDA   #$0007
         STA   L101D
         LDA   #$0009
         STA   L1021
         JSR   L76AC
         LDA   #$009B
         STA   L101D
         LDA   #$00AF
         STA   L1021
         JSR   L7546
         LDA   #L95D9
         STA   L101D
         LDA   #^L95D9
         STA   L101F
         JSR   L757F
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         JSR   L7151
L9554    LDA   #$0000
         STA   L101D
         LDA   #L960A
         STA   L1021
         LDA   #^L960A
         STA   L1023
         LDA   #$0001
         STA   L1025
         JSR   L80F8
         LDA   L101D
         BEQ   L9554
         CMP   #$0001
         BNE   L9554
         LDA   #$0000
         STA   L101D
         LDA   L95C3
         STA   L1021
         LDA   L95C5
         STA   L1023
         JSR   L7F22
         LDA   L101D
         BNE   L95BC
         JSR   L11FC
         LDA   #$0007
         STA   L101D
         LDA   #$000E
         STA   L1021
         JSR   L76AC
         LDA   #L95DC
         STA   L101D
         LDA   #^L95DC
         STA   L101F
         LDA   #$0078
         STA   L1021
         JSR   L75FC
         BRA   L9554
L95BC    JSR   L7C93
         JSR   L7147
L95C2    RTS

L95C3    DW    $0000
L95C5    DW    $0000
L95C7    DW    $0000
L95C9    DW    $0000
L95CB    ASC   'Please insert'00
L95D9    ASC   'OK'00
L95DC    ASC   'Wrong disk, please try again!'00
L95FA    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L9602    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L960A    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L9612    REP   #$30
         JSR   L6F28
         LDA   L0FB7
         BEQ   L961F
         JSR   L214E
L961F    LDA   #L897B
         STA   L101D
         LDA   #^L897B
         STA   L101F
         LDA   #L8999
         STA   L1021
         LDA   #^L8999
         STA   L1023
         LDA   #L899D
         STA   L1025
         LDA   #^L899D
         STA   L1027
         LDA   #L89A1
         STA   L1029
         LDA   #^L89A1
         STA   L102B
         JSR   L1169
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   LA27E
         LDA   #$0000
         STA   L101D
         JSR   L715B
         LDA   #L9866
         STA   L101D
         LDA   #^L9866
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L986E
         STA   L101D
         LDA   #^L986E
         STA   L101F
         LDA   #$0000
         STA   L1021
         JSR   L7116
         LDA   #L9876
         STA   L101D
         LDA   #^L9876
         STA   L101F
         LDA   #$0007
         STA   L1021
         JSR   L7116
         LDA   #L987E
         STA   L101D
         LDA   #^L987E
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L9886
         STA   L101D
         LDA   #^L9886
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #$000D
         STA   L101D
         LDA   #$000E
         STA   L1021
         JSR   L76AC
         LDA   #L9824
         STA   L101D
         LDA   #^L9824
         STA   L101F
         LDA   #$0028
         STA   L1021
         JSR   L75FC
         LDA   #L9832
         STA   L101D
         LDA   #^L9832
         STA   L101F
         LDA   #$003C
         STA   L1021
         JSR   L75FC
         LDA   #$006E
         STA   L101D
         LDA   #$0060
         STA   L1021
         JSR   L7546
         LDA   #L9840
         STA   L101D
         LDA   #^L9840
         STA   L101F
         JSR   L757F
         LDA   #$006E
         STA   L101D
         LDA   #$0076
         STA   L1021
         JSR   L7546
         LDA   #L984E
         STA   L101D
         LDA   #^L984E
         STA   L101F
         JSR   L757F
         LDA   #$0007
         STA   L101D
         LDA   #$0009
         STA   L1021
         JSR   L76AC
         LDA   #$009B
         STA   L101D
         LDA   #$00AF
         STA   L1021
         JSR   L7546
         LDA   #L9863
         STA   L101D
         LDA   #^L9863
         STA   L101F
         JSR   L757F
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         LDA   #$0001
         STA   L9822
         LDA   L8999
         STA   L101D
         LDA   L899B
         STA   L101F
         LDA   L899D
         STA   L1021
         LDA   L899F
         STA   L1023
         LDA   L89A1
         STA   L1025
         JSR   L1185
         JSR   L7151
L97B1    JSR   L6FB4
         CMP   #$001B
         BNE   L97BF
         STA   L9822
         JMP   L980C

L97BF    LDA   L101D
         BEQ   L97B1
         JSR   L6F4C
         LDA   #L9876
         STA   L1025
         LDA   #^L9876
         STA   L1027
         LDA   #$0003
         STA   L1029
         JSR   L7780
         LDA   L102D
         BEQ   L97B1
         CMP   #$0003
         BEQ   L980C
         CMP   L9822
         BEQ   L97B1
         STA   L9822
         LDA   L9822
         STA   L101D
         LDA   #$0002
         STA   L1021
         LDA   #L9876
         STA   L1025
         LDA   #^L9876
         STA   L1027
         JSR   L81AF
         JMP   L97B1

L980C    LDA   L8999
         STA   L101D
         LDA   L899B
         STA   L101F
         JSR   L117A
         JSR   L7147
         LDA   L9822
         RTS

L9822    DW    $0000
L9824    ASC   'Please select'00
L9832    ASC   'the activity.'00
L9840    ASC   'Read the tale'00
L984E    ASC   'Answer the questions'00
L9863    ASC   'OK'00
L9866    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L986E    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L9876    DW    $0054
         DW    $005A
         DW    $0062
         DW    $0068
L987E    DW    $006A
         DW    $005A
         DW    $0078
         DW    $0068
L9886    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L988E    REP   #$30
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   L6F28
         JSR   LA27E
         LDA   #$0000
         STA   L101D
         JSR   L715B
         LDA   #L9A90
         STA   L101D
         LDA   #^L9A90
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L9A98
         STA   L101D
         LDA   #^L9A98
         STA   L101F
         LDA   #$0000
         STA   L1021
         JSR   L7116
         LDA   #L9AA0
         STA   L101D
         LDA   #^L9AA0
         STA   L101F
         LDA   #$0007
         STA   L1021
         JSR   L7116
         LDA   #L9AA8
         STA   L101D
         LDA   #^L9AA8
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L9AB0
         STA   L101D
         LDA   #^L9AB0
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #$000D
         STA   L101D
         JSR   L75E0
         LDA   #L9A49
         STA   L101D
         LDA   #^L9A49
         STA   L101F
         LDA   #$0028
         STA   L1021
         JSR   L75FC
         LDA   #L9A5B
         STA   L101D
         LDA   #^L9A5B
         STA   L101F
         LDA   #$003C
         STA   L1021
         JSR   L75FC
         LDA   #$0068
         STA   L101D
         LDA   #$0060
         STA   L1021
         JSR   L7546
         LDA   #L9A6A
         STA   L101D
         LDA   #^L9A6A
         STA   L101F
         JSR   L757F
         LDA   #$0068
         STA   L101D
         LDA   #$0076
         STA   L1021
         JSR   L7546
         LDA   #L9A79
         STA   L101D
         LDA   #^L9A79
         STA   L101F
         JSR   L757F
         LDA   #$0007
         STA   L101D
         JSR   L75E0
         LDA   #$009B
         STA   L101D
         LDA   #$00AF
         STA   L1021
         JSR   L7546
         LDA   #L9A8D
         STA   L101D
         LDA   #^L9A8D
         STA   L101F
         JSR   L757F
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         LDA   #$0001
         STA   L9A47
         LDA   L8A37
         STA   L101D
         LDA   L8A39
         STA   L101F
         LDA   L8A3B
         STA   L1021
         LDA   L8A3D
         STA   L1023
         LDA   L8A3F
         STA   L1025
         JSR   L1185
         JSR   L7151
L99E6    LDA   #$0000
         STA   L101D
         LDA   #L9AA0
         STA   L1021
         LDA   #^L9AA0
         STA   L1023
         LDA   #$0003
         STA   L1025
         JSR   L80F8
         LDA   L101D
         BEQ   L99E6
         CMP   #$0003
         BEQ   L9A31
         CMP   L9A47
         BEQ   L99E6
         STA   L9A47
         LDA   L9A47
         STA   L101D
         LDA   #$0002
         STA   L1021
         LDA   #L9AA0
         STA   L1025
         LDA   #^L9AA0
         STA   L1027
         JSR   L81AF
         JMP   L99E6

L9A31    LDA   L8949
         STA   L101D
         LDA   L894B
         STA   L101F
         JSR   L117A
         JSR   L7147
         LDA   L9A47
         RTS

L9A47    DW    $0000
L9A49    ASC   'Please select the'00
L9A5B    ASC   'question type.'00
L9A6A    ASC   'Reading Skills'00
L9A79    ASC   'Vocabulary Building'00
L9A8D    ASC   'OK'00
L9A90    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L9A98    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L9AA0    DW    $0054
         DW    $0054
         DW    $0062
         DW    $0062
L9AA8    DW    $006A
         DW    $0054
         DW    $0078
         DW    $0062
L9AB0    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L9AB8    REP   #$30
         JSR   L6F28
         JSR   LA27E
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         LDA   #$0000
         STA   L101D
         JSR   L715B
         LDA   #L9CAB
         STA   L101D
         LDA   #^L9CAB
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L9CB3
         STA   L101D
         LDA   #^L9CB3
         STA   L101F
         LDA   #$0000
         STA   L1021
         JSR   L7116
         LDA   #L9CBB
         STA   L101D
         LDA   #^L9CBB
         STA   L101F
         LDA   #$0007
         STA   L1021
         JSR   L7116
         LDA   #L9CC3
         STA   L101D
         LDA   #^L9CC3
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L9CCB
         STA   L101D
         LDA   #^L9CCB
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #$000D
         STA   L101D
         JSR   L75E0
         LDA   #L9C64
         STA   L101D
         LDA   #^L9C64
         STA   L101F
         LDA   #$0028
         STA   L1021
         JSR   L75FC
         LDA   #L9C76
         STA   L101D
         LDA   #^L9C76
         STA   L101F
         LDA   #$003C
         STA   L1021
         JSR   L75FC
         LDA   #$006E
         STA   L101D
         LDA   #$0060
         STA   L1021
         JSR   L7546
         LDA   #L9C85
         STA   L101D
         LDA   #^L9C85
         STA   L101F
         JSR   L757F
         LDA   #$006E
         STA   L101D
         LDA   #$0076
         STA   L1021
         JSR   L7546
         LDA   #L9C95
         STA   L101D
         LDA   #^L9C95
         STA   L101F
         JSR   L757F
         LDA   #$0007
         STA   L101D
         JSR   L75E0
         LDA   #$009B
         STA   L101D
         LDA   #$00AF
         STA   L1021
         JSR   L7546
         LDA   #L9CA8
         STA   L101D
         LDA   #^L9CA8
         STA   L101F
         JSR   L757F
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         LDA   #$0001
         STA   L9C62
         LDA   L8A37
         STA   L101D
         LDA   L8A39
         STA   L101F
         LDA   L8A3B
         STA   L1021
         LDA   L8A3D
         STA   L1023
         LDA   L8A3F
         STA   L1025
         JSR   L1185
         JSR   L7151
L9C10    LDA   #$0000
         STA   L101D
         LDA   #L9CBB
         STA   L1021
         LDA   #^L9CBB
         STA   L1023
         LDA   #$0003
         STA   L1025
         JSR   L80F8
         LDA   L101D
         BEQ   L9C10
         CMP   #$0003
         BEQ   L9C5B
         CMP   L9C62
         BEQ   L9C10
         STA   L9C62
         LDA   L9C62
         STA   L101D
         LDA   #$0002
         STA   L1021
         LDA   #L9CBB
         STA   L1025
         LDA   #^L9CBB
         STA   L1027
         JSR   L81AF
         JMP   L9C10

L9C5B    JSR   L7147
         LDA   L9C62
         RTS

L9C62    DW    $0000
L9C64    ASC   'Please select the'00
L9C76    ASC   'question type.'00
L9C85    ASC   'Multiple Choice'00
L9C95    ASC   'Fill-in the Blanks'00
L9CA8    ASC   'OK'00
L9CAB    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L9CB3    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L9CBB    DW    $0054
         DW    $005A
         DW    $0062
         DW    $0068
L9CC3    DW    $006A
         DW    $005A
         DW    $0078
         DW    $0068
L9CCB    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L9CD3    REP   #$30
         JSR   L6F28
         JSR   LA27E
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         LDA   #$0000
         STA   L101D
         JSR   L715B
         LDA   #L9EEE
         STA   L101D
         LDA   #^L9EEE
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L9EF6
         STA   L101D
         LDA   #^L9EF6
         STA   L101F
         LDA   #$0000
         STA   L1021
         JSR   L7116
         LDA   #L9EFE
         STA   L101D
         LDA   #^L9EFE
         STA   L101F
         LDA   #$0007
         STA   L1021
         JSR   L7116
         LDA   #L9F06
         STA   L101D
         LDA   #^L9F06
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L9F0E
         STA   L101D
         LDA   #^L9F0E
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #L9F16
         STA   L101D
         LDA   #^L9F16
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #$000D
         STA   L101D
         JSR   L75E0
         LDA   #L9EB2
         STA   L101D
         LDA   #^L9EB2
         STA   L101F
         LDA   #$0028
         STA   L1021
         JSR   L75FC
         LDA   #L9EC4
         STA   L101D
         LDA   #^L9EC4
         STA   L101F
         LDA   #$003C
         STA   L1021
         JSR   L75FC
         LDA   #$008C
         STA   L101D
         LDA   #$0060
         STA   L1021
         JSR   L7546
         LDA   #L9ED3
         STA   L101D
         LDA   #^L9ED3
         STA   L101F
         JSR   L757F
         LDA   #$008C
         STA   L101D
         LDA   #$0076
         STA   L1021
         JSR   L7546
         LDA   #L9EDB
         STA   L101D
         LDA   #^L9EDB
         STA   L101F
         JSR   L757F
         LDA   #$008C
         STA   L101D
         LDA   #$008C
         STA   L1021
         JSR   L7546
         LDA   #L9EE3
         STA   L101D
         LDA   #^L9EE3
         STA   L101F
         JSR   L757F
         LDA   #$0007
         STA   L101D
         JSR   L75E0
         LDA   #$009B
         STA   L101D
         LDA   #$00AF
         STA   L1021
         JSR   L7546
         LDA   #L9EEB
         STA   L101D
         LDA   #^L9EEB
         STA   L101F
         JSR   L757F
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         LDA   #$0001
         STA   L9EB0
         LDA   L8A37
         STA   L101D
         LDA   L8A39
         STA   L101F
         LDA   L8A3B
         STA   L1021
         LDA   L8A3D
         STA   L1023
         LDA   L8A3F
         STA   L1025
         JSR   L1185
         JSR   L7151
L9E5E    LDA   #$0000
         STA   L101D
         LDA   #L9EFE
         STA   L1021
         LDA   #^L9EFE
         STA   L1023
         LDA   #$0004
         STA   L1025
         JSR   L80F8
         LDA   L101D
         BEQ   L9E5E
         CMP   #$0004
         BEQ   L9EA9
         CMP   L9EB0
         BEQ   L9E5E
         STA   L9EB0
         LDA   L9EB0
         STA   L101D
         LDA   #$0003
         STA   L1021
         LDA   #L9EFE
         STA   L1025
         LDA   #^L9EFE
         STA   L1027
         JSR   L81AF
         JMP   L9E5E

L9EA9    JSR   L7147
         LDA   L9EB0
         RTS

L9EB0    DW    $0000
L9EB2    ASC   'Please select the'00
L9EC4    ASC   'question type.'00
L9ED3    ASC   'Fill-In'00
L9EDB    ASC   'Synonym'00
L9EE3    ASC   'Antonym'00
L9EEB    ASC   'OK'00
L9EEE    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L9EF6    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L9EFE    DW    $0054
         DW    $0078
         DW    $0062
         DW    $0086
L9F06    DW    $006A
         DW    $0078
         DW    $0078
         DW    $0086
L9F0E    DW    $0080
         DW    $0078
         DW    $008E
         DW    $0086
L9F16    DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L9F1E    REP   #$30
         JSR   L6F28
         JSR   LA27E
         JSR   L214E
         LDA   L0FB7
         BEQ   L9F2E
L9F2E    LDA   #L8A41
         STA   L101D
         LDA   #^L8A41
         STA   L101F
         LDA   #L8A5F
         STA   L1021
         LDA   #^L8A5F
         STA   L1023
         LDA   #L8A63
         STA   L1025
         LDA   #^L8A63
         STA   L1027
         LDA   #L8A67
         STA   L1029
         LDA   #^L8A67
         STA   L102B
         JSR   L1169
         LDA   #$0000
         STA   L101D
         JSR   L7A99
         JSR   LA27E
         LDA   #$0000
         STA   L101D
         JSR   L715B
         LDA   #LA23E
         STA   L101D
         LDA   #^LA23E
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #LA246
         STA   L101D
         LDA   #^LA246
         STA   L101F
         LDA   #$0000
         STA   L1021
         JSR   L7116
         LDA   #LA24E
         STA   L101D
         LDA   #^LA24E
         STA   L101F
         LDA   #$0007
         STA   L1021
         JSR   L7116
         LDA   #LA256
         STA   L101D
         LDA   #^LA256
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #LA25E
         STA   L101D
         LDA   #^LA25E
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #LA266
         STA   L101D
         LDA   #^LA266
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #LA26E
         STA   L101D
         LDA   #^LA26E
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #LA276
         STA   L101D
         LDA   #^LA276
         STA   L101F
         LDA   #$0009
         STA   L1021
         JSR   L7116
         LDA   #$000D
         STA   L101D
         JSR   L75E0
         LDA   #LA1B3
         STA   L101D
         LDA   #^LA1B3
         STA   L101F
         LDA   #$0019
         STA   L1021
         JSR   L75FC
         LDA   #LA1C5
         STA   L101D
         LDA   #^LA1C5
         STA   L101F
         LDA   #$002D
         STA   L1021
         JSR   L75FC
         LDA   #$005A
         STA   L101D
         LDA   #$0046
         STA   L1021
         JSR   L7546
         LDA   #LA1D8
         STA   L101D
         LDA   #^LA1D8
         STA   L101F
         JSR   L757F
         LDA   #$005A
         STA   L101D
         LDA   #$005C
         STA   L1021
         JSR   L7546
         LDA   #LA1EC
         STA   L101D
         LDA   #^LA1EC
         STA   L101F
         JSR   L757F
         LDA   #$005A
         STA   L101D
         LDA   #$0072
         STA   L1021
         JSR   L7546
         LDA   #LA203
         STA   L101D
         LDA   #^LA203
         STA   L101F
         JSR   L757F
         LDA   #$005A
         STA   L101D
         LDA   #$0088
         STA   L1021
         JSR   L7546
         LDA   #LA210
         STA   L101D
         LDA   #^LA210
         STA   L101F
         JSR   L757F
         LDA   #$005A
         STA   L101D
         LDA   #$009E
         STA   L1021
         JSR   L7546
         LDA   #LA226
         STA   L101D
         LDA   #^LA226
         STA   L101F
         JSR   L757F
         LDA   #$0007
         STA   L101D
         JSR   L75E0
         LDA   #$009B
         STA   L101D
         LDA   #$00B9
         STA   L1021
         JSR   L7546
         LDA   #LA23B
         STA   L101D
         LDA   #^LA23B
         STA   L101F
         JSR   L757F
         LDA   #$0000
         STA   L101D
         LDA   #L0FE9
         STA   L1021
         LDA   #^L0FE9
         STA   L1023
         JSR   L71A6
         LDA   #$0001
         STA   LA1B1
         LDA   L8A5F
         STA   L101D
         LDA   L8A61
         STA   L101F
         LDA   L8A63
         STA   L1021
         LDA   L8A65
         STA   L1023
         LDA   L8A67
         STA   L1025
         JSR   L1185
         JSR   L7151
LA14D    LDA   #$0000
         STA   L101D
         LDA   #LA24E
         STA   L1021
         LDA   #^LA24E
         STA   L1023
         LDA   #$0006
         STA   L1025
         JSR   L80F8
         LDA   L101D
         BEQ   LA14D
         CMP   #$0006
         BEQ   LA198
         CMP   LA1B1
         BEQ   LA14D
         STA   LA1B1
         LDA   LA1B1
         STA   L101D
         LDA   #$0005
         STA   L1021
         LDA   #LA24E
         STA   L1025
         LDA   #^LA24E
         STA   L1027
         JSR   L81AF
         JMP   LA14D

LA198    LDA   L8A5F
         STA   L101D
         LDA   L8A61
         STA   L101F
         JSR   L117A
         JSR   L7C93
         JSR   L7147
         LDA   LA1B1
         RTS

LA1B1    DW    $0000
LA1B3    ASC   'Please select the'00
LA1C5    ASC   'Tale Maker option.'00
LA1D8    ASC   'Create/Edit a tale.'00
LA1EC    ASC   'Create/Edit questions.'00
LA203    ASC   'Read a tale.'00
LA210    ASC   'Answer the questions.'00
LA226    ASC   'Exit the Tale Maker.'00
LA23B    ASC   'OK'00
LA23E    DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
LA246    DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
LA24E    DW    $003A
         DW    $0046
         DW    $0048
         DW    $0054
LA256    DW    $0050
         DW    $0046
         DW    $005E
         DW    $0054
LA25E    DW    $0066
         DW    $0046
         DW    $0074
         DW    $0054
LA266    DW    $007C
         DW    $0046
         DW    $008A
         DW    $0054
LA26E    DW    $0092
         DW    $0046
         DW    $00A0
         DW    $0054
LA276    DW    $00AA
         DW    $0096
         DW    $00BE
         DW    $00B4
LA27E    REP   #$30
         LDA   #LA2BA
         STA   L101D
         LDA   #^LA2BA
         STA   L101F
         LDA   #$0001
         STA   L1021
         LDA   #$000E
         STA   L1025
         LDA   #LA2C1
         STA   L1029
         LDA   #^LA2C1
         STA   L102B
         JSR   L7CB3
         LDA   LA2C1
         STA   L101D
         LDA   LA2C3
         STA   L101F
         STZ   L1021
         JSR   L7C9D
         RTS

LA2BA    STR   'Geneva'
LA2C1    DW    $0000
LA2C3    DW    $0000
LA2C5    PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00E6
         TCS
         LDA   $F9
         SEC
         SBC   #$0000
         BEQ   LA2EE
         BVS   LA2DD
         EOR   #$8000
LA2DD    BPL   LA2EE
         LDA   $FB
         SEC
         SBC   #$0000
         BEQ   LA2EE
         BVS   LA2EC
         EOR   #$8000
LA2EC    BMI   LA2F4
LA2EE    LDA   #$0000
         BRL   LA439
LA2F4    LDA   $FB
         PHA
         LDA   $F9
         SEC
         JSL   LB5E2
         PLA
         STA   $EA
LA301    LDA   [$FD]
         SEC
         SBC   #$0000
         BEQ   LA310
         BVS   LA30E
         EOR   #$8000
LA30E    BMI   LA369
LA310    PEI   $FF
         PEI   $FD
         JSL   LBC0A
         PLY
         PLY
         CMP   #$FFFF
         BNE   LA33D
         LDA   $EA
         CLC
         ADC   $F9
         SEC
         SBC   #$0001
         PHA
         LDA   $F9
         CLC
         JSL   LB472
         PLY
         PHA
         LDA   $FB
         PLX
         STX   $EC
         SEC
         SBC   $EC
         BRL   LA439
LA33D    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
LA369    LDA   [$FD]
         CMP   $EA
         BEQ   LA375
         BCC   LA375
         LDA   $EA
         BRA   LA377
LA375    LDA   [$FD]
LA377    STA   $E8
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   LA382
         DEX
LA382    PHX
         PHA
         PEI   $E8
         LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         PEI   $F7
         PEI   $F5
         JSL   LB417
         PLY
         PLY
         PLY
         PLY
         PLY
         JSL   LB28D
         PLA
         PLX
         STX   $F7
         STA   $F5
         LDA   [$FD]
         SEC
         SBC   $E8
         STA   [$FD]
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   LA3BA
         DEX
LA3BA    PHX
         PHA
         LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         JSL   LB28D
         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   LB5D7
         PLA
         PLX
         PHA
         LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   LA404
         EOR   #$8000
LA404    BMI   LA40B
         LDA   #$0000
         BRA   LA40D
LA40B    LDA   [$FD]
LA40D    PLX
         STX   $EC
         SEC
         SBC   $EC
         BEQ   LA426
         BVS   LA41A
         EOR   #$8000
LA41A    BPL   LA426
         PEI   $FF
         PEI   $FD
         JSL   LB077
         PLY
         PLY
LA426    LDA   $EA
         SEC
         SBC   $E8
         STA   $EA
         CMP   #$0000
         BNE   LA436
         LDA   $FB
         BRA   LA439
LA436    BRL   LA301
LA439    TAY
         TDC
         CLC
         ADC   #$00EF
         TCS
         TYA
         PLD
         RTL

LA443    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   LA469
         BRL   LA60F
LA469    LDA   $FF
         SEC
         SBC   #$0002
         BVS   LA474
         EOR   #$8000
LA474    BPL   LA479
         BRL   LA5C0
LA479    LDY   #$0008
         LDA   [$F7],Y
         TAX
         LDY   #$0006
         LDA   [$F7],Y
         STX   $EE
         ORA   $EE
         BNE   LA48D
         BRL   LA5C0
LA48D    LDY   #$0010
         LDA   [$F7],Y
         AND   #$0004
         TAY
         BEQ   LA49B
         BRL   LA5C0
LA49B    LDA   [$F7]
         STA   $EC
         LDX   $FD
         LDA   $FB
         STX   $EA
         STA   $E8
         LDA   $FF
         CMP   #$0000
         BNE   LA4E4
         PEA   $0001
         PEA   $0000
         PEA   $0000
         LDY   #$0012
         LDA   [$F7],Y
         PHA
         JSL   LA691
         PLY
         PLY
         PLY
         PLY
         PHX
         PHA
         LDA   $EC
         LDX   #$0000
         TAY
         BPL   LA4D0
         DEX
LA4D0    JSL   LB5D7
         LDX   $EA
         LDA   $E8
         JSL   LB28D
         PLA
         PLX
         STX   $EA
         STA   $E8
         BRA   LA4FD
LA4E4    LDA   $EC
         LDX   #$0000
         TAY
         BPL   LA4ED
         DEX
LA4ED    PHX
         PHA
         LDX   $FD
         LDA   $FB
         JSL   LB5D7
         PLA
         PLX
         STX   $FD
         STA   $FB
LA4FD    LDY   #$0010
         LDA   [$F7],Y
         AND   #$0080
         TAY
         BEQ   LA50B
         BRL   LA5C0
LA50B    LDA   $EC
         SEC
         SBC   #$0000
         BNE   LA516
         BRL   LA5C0
LA516    BVS   LA51B
         EOR   #$8000
LA51B    BMI   LA520
         BRL   LA5C0
LA520    LDA   $EC
         LDX   #$0000
         TAY
         BPL   LA529
         DEX
LA529    LDX   #$0000
         TAY
         BPL   LA530
         DEX
LA530    PHX
         PHA
         LDX   $EA
         LDA   $E8
         JSL   LBD99
         BVS   LA53F
         EOR   #$8000
LA53F    BPL   LA5C0
         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   LB5D7
         PLA
         PLX
         LDX   #$0000
         TAY
         BPL   LA566
         DEX
LA566    LDX   #$0000
         TAY
         BPL   LA56D
         DEX
LA56D    PHX
         PHA
         LDX   $EA
         LDA   $E8
         JSL   LBD99
         BEQ   LA580
         BVS   LA57E
         EOR   #$8000
LA57E    BMI   LA5C0
LA580    LDX   $EA
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   LA58B
         DEX
LA58B    PHX
         PHA
         LDY   #$0004
         LDA   [$F7],Y
         TAX
         LDY   #$0002
         LDA   [$F7],Y
         JSL   LB28D
         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   LA687
LA5C0    LDY   #$0010
         LDA   [$F7],Y
         AND   #$0080
         TAY
         BEQ   LA5F0
         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
LA5F0    PEI   $FF
         PEI   $FD
         PEI   $FB
         LDY   #$0012
         LDA   [$F7],Y
         PHA
         JSL   LA691
         PLY
         PLY
         PLY
         PLY
         STX   $EA
         STA   $E8
         LDA   #$0000
         STA   [$F7]
         BRA   LA671
LA60F    LDY   #$0010
         LDA   [$F7],Y
         AND   #$0082
         TAY
         BEQ   LA671
         PEI   $F9
         PEI   $F7
         JSL   LB37C
         PLY
         PLY
         LDY   #$0010
         LDA   [$F7],Y
         AND   #$0080
         TAY
         BEQ   LA659
         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
LA659    PEI   $FF
         PEI   $FD
         PEI   $FB
         LDY   #$0012
         LDA   [$F7],Y
         PHA
         JSL   LA691
         PLY
         PLY
         PLY
         PLY
         STX   $EA
         STA   $E8
LA671    LDA   $E8
         CMP   #$FFFF
         BNE   LA684
         LDA   $EA
         CMP   #$FFFF
         BNE   LA684
         LDA   #$FFFF
         BRA   LA687
LA684    LDA   #$0000
LA687    TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

LA691    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   LA801
         PLY
         PLY
         PLY
         PLY
         STA   $E8
         LDA   $E8
         CMP   #$0000
         BNE   LA6CD
         LDX   $EE
         LDA   $EC
         BRA   LA6D3
LA6CD    LDX   #$FFFF
         LDA   #$FFFF
LA6D3    TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

LA6DD    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   LA6F3
         EOR   #$8000
LA6F3    BMI   LA6FA
         LDA   #$0000
         STA   [$FD]
LA6FA    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0001
         TAY
         BEQ   LA70F
         LDA   [$FD]
         EOR   #$FFFF
         INC
         STA   $EE
         BRA   LA773
LA70F    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0082
         TAY
         BEQ   LA767
         STZ   $EE
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0002
         TAY
         BEQ   LA765
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         STX   $F4
         ORA   $F4
         BEQ   LA765
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0004
         CMP   #$0000
         BNE   LA765
         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   LB5D7
         PLA
         PLX
         STA   $EE
LA765    BRA   LA773
LA767    LDA   #$FFFF
         LDX   #$0000
         TAY
         BPL   LA771
         DEX
LA771    BRA   LA7C8
LA773    PEA   $0001
         PEA   $0000
         PEA   $0000
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   LA691
         PLY
         PLY
         PLY
         PLY
         STX   $F2
         STA   $F0
         SEC
         LDA   $F0
         SBC   #$0000
         BNE   LA79D
         LDA   $F2
         SBC   #$0000
         BRA   LA7A4
LA79D    LDA   $F2
         SBC   #$0000
         REP   #$02
LA7A4    BVS   LA7A9
         EOR   #$8000
LA7A9    BPL   LA7C4
         LDA   $EE
         LDX   #$0000
         TAY
         BPL   LA7B4
         DEX
LA7B4    PHX
         PHA
         LDX   $F2
         LDA   $F0
         JSL   LB28D
         PLA
         PLX
         STX   $F2
         STA   $F0
LA7C4    LDX   $F2
         LDA   $F0
LA7C8    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

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

LA801    PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E0
         TCS
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   LA817
         EOR   #$8000
LA817    BMI   LA82B
         PEA   $0000
         PEA   $0016
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
         BRL   LA9A0
LA82B    PEA   $0000
         TDC
         CLC
         ADC   #$00F9
         PHA
         JSL   LBE1E
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         JSL   LBD99
         BNE   LA856
         LDA   #$FFFF
         BRL   LA9A0
LA856    LDA   $FB
         BRL   LA995
LA85B    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   LBAD7
         PLY
         PLY
         PLY
         PLY
         PLY
         STA   $E4
         LDA   $E4
         CMP   #$0000
         BNE   LA89F
         LDA   #$0000
         BRL   LA9A0
LA89F    LDY   #$0002
         LDA   [$EC],Y
         PHA
         PEI   $E4
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
         BRL   LA9A0
LA8B3    LDX   $FF
         LDA   $FD
         SEC
         SBC   #$0000
         BVS   LA8C0
         EOR   #$8000
LA8C0    BMI   LA8D4
         PEA   $0000
         PEA   $0009
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
         BRL   LA9A0
LA8D4    LDX   $FF
         LDA   $FD
         PHA
         LDA   #$FFFF
         PLX
         STX   $F0
         SEC
         SBC   $F0
         STA   $E6
         PEA   $0000
         TDC
         CLC
         ADC   #$00E6
         PHA
         JSL   LBE1E
         PLY
         PLY
         STX   $EA
         STA   $E8
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EA
         LDA   $E8
         JSL   LBD99
         BNE   LA90F
         LDA   #$FFFF
         BRL   LA9A0
LA90F    PEA   $0000
         TDC
         CLC
         ADC   #$00F9
         PHA
         JSL   LBE1E
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDA   $EC
         LDX   $EE
         PHX
         PHA
         LDA   $EA
         PHA
         LDA   $E8
         PHA
         PEA   $0012
         JSL   LBDC4
         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   LBAD7
         PLY
         PLY
         PLY
         PLY
         STA   $E4
         LDA   $E4
         CMP   #$0000
         BEQ   LA98F
         LDA   #$0000
         STA   [$E8]
         LDY   #$0002
         LDA   [$EC],Y
         PHA
         PEI   $E4
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
         BRA   LA9A0
LA98F    LDA   $E6
         BRA   LA9A0
         BRA   LA9A0
LA995    CMP   #$6601
         BNE   LA99D
         BRL   LA8B3
LA99D    JMP   LA85B

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

LA9AA    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E1
         TCS
         STZ   $F1
         STZ   L0140
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   LBD99
         BNE   LA9D5
         LDA   #$0001
         STA   LC0B8
         BRL   LADEA
LA9D5    LDX   #$0000
         LDA   #$0008
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   LB28D
         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   ^LAE24
         PEA   LAE24
         PEI   $FF
         PEI   $FD
         JSL   LB19B
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   LAA25
         LDA   #$0001
         STA   LC0B8
         LDA   $F3
         SEP   #$20
         STA   [$E9]
         REP   #$20
         BRL   LADEA
LAA25    LDA   #$0001
         BEQ   LAA2F
         LDA   #$0000
         BRA   LAA32
LAA2F    LDA   #$0001
LAA32    STA   LC0B8
         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   LAA73
         PEA   $FFFF
         JSL   LBBA6
         PLY
LAA73    LDA   #$0100
         STA   $E3
LAA78    LDA   [$E9]
         AND   #$00FF
         CMP   #$0000
         BNE   LAA85
         BRL   LACDE
LAA85    INC   L0140
         LDA   [$E9]
         AND   #$00FF
         CMP   #$0022
         BEQ   LAA95
         BRL   LABB9
LAA95    INC   $E9
         BNE   LAA9B
         INC   $EB
LAA9B    LDA   [$E9]
         AND   #$00FF
         CMP   #$0000
         BNE   LAAA8
         BRL   LABB6
LAAA8    LDA   [$E9]
         AND   #$00FF
         CMP   #$0022
         BEQ   LAAB5
         BRL   LAB3F
LAAB5    INC   $E9
         BNE   LAABB
         INC   $EB
LAABB    LDA   [$E9]
         AND   #$00FF
         CMP   #$0022
         BNE   LAB3B
         LDA   $F1
         CMP   $E3
         BNE   LAAFE
         LDA   $E3
         CLC
         ADC   #$0100
         LDX   #$0000
         TAY
         BPL   LAAD8
         DEX
LAAD8    PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L013C
         LDA   L013C
         BEQ   LAAF6
         PEA   $FFFF
         JSL   LBBA6
         PLY
LAAF6    LDA   $E3
         CLC
         ADC   #$0100
         STA   $E3
LAAFE    LDX   $EB
         LDA   $E9
         INC   $E9
         BNE   LAB08
         INC   $EB
LAB08    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   LAB29
         DEC   $F6
LAB29    CLC
         ADC   $F4
         STA   $F4
         BCC   LAB32
         INC   $F6
LAB32    PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
         BRA   LAB3D
LAB3B    BRA   LABB6
LAB3D    BRA   LABB3
LAB3F    LDA   $F1
         CMP   $E3
         BNE   LAB78
         LDA   $E3
         CLC
         ADC   #$0100
         LDX   #$0000
         TAY
         BPL   LAB52
         DEX
LAB52    PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L013C
         LDA   L013C
         BEQ   LAB70
         PEA   $FFFF
         JSL   LBBA6
         PLY
LAB70    LDA   $E3
         CLC
         ADC   #$0100
         STA   $E3
LAB78    LDX   $EB
         LDA   $E9
         INC   $E9
         BNE   LAB82
         INC   $EB
LAB82    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   LABA3
         DEC   $F6
LABA3    CLC
         ADC   $F4
         STA   $F4
         BCC   LABAC
         INC   $F6
LABAC    PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
LABB3    BRL   LAA9B
LABB6    BRL   LAC5D
LABB9    LDA   [$E9]
         AND   #$00FF
         SEP   #$20
         STA   $F3
         REP   #$20
         AND   #$00FF
         CMP   #$0020
         BNE   LABCF
         BRL   LAC5D
LABCF    LDA   $F3
         AND   #$00FF
         CMP   #$0000
         BNE   LABDC
         BRL   LAC5D
LABDC    LDA   $F3
         AND   #$00FF
         CMP   #$0009
         BEQ   LAC5D
         LDA   $F1
         CMP   $E3
         BNE   LAC1F
         LDA   $E3
         CLC
         ADC   #$0100
         LDX   #$0000
         TAY
         BPL   LABF9
         DEX
LABF9    PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L013C
         LDA   L013C
         BEQ   LAC17
         PEA   $FFFF
         JSL   LBBA6
         PLY
LAC17    LDA   $E3
         CLC
         ADC   #$0100
         STA   $E3
LAC1F    LDX   $EB
         LDA   $E9
         INC   $E9
         BNE   LAC29
         INC   $EB
LAC29    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   LAC4A
         DEC   $F6
LAC4A    CLC
         ADC   $F4
         STA   $F4
         BCC   LAC53
         INC   $F6
LAC53    PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
         BRL   LABB9
LAC5D    LDA   $F1
         CMP   $E3
         BNE   LAC96
         LDA   $E3
         CLC
         ADC   #$0100
         LDX   #$0000
         TAY
         BPL   LAC70
         DEX
LAC70    PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L013C
         LDA   L013C
         BEQ   LAC8E
         PEA   $FFFF
         JSL   LBBA6
         PLY
LAC8E    LDA   $E3
         CLC
         ADC   #$0100
         STA   $E3
LAC96    LDA   $F1
         INC   $F1
         PHA
         LDY   #$0002
         LDA   [$ED],Y
         TAX
         LDA   [$ED]
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LACAD
         DEC   $F6
LACAD    CLC
         ADC   $F4
         STA   $F4
         BCC   LACB6
         INC   $F6
LACB6    LDA   #$0000
         SEP   #$20
         STA   [$F4]
         REP   #$20
LACBF    LDA   [$E9]
         AND   #$00FF
         CMP   #$0020
         BEQ   LACD3
         LDA   [$E9]
         AND   #$00FF
         CMP   #$0009
         BNE   LACDB
LACD3    INC   $E9
         BNE   LACD9
         INC   $EB
LACD9    BRA   LACBF
LACDB    BRL   LAA78
LACDE    LDA   $F1
         LDX   #$0000
         TAY
         BPL   LACE7
         DEX
LACE7    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   LAD15
         DEX
LAD15    PHX
         PHA
         LDX   #$0000
         LDA   #$0004
         SEC
         JSL   LB627
         JSL   LB149
         PLY
         PLY
         STX   L0144
         STA   L0142
         LDY   #$0002
         LDA   [$ED],Y
         TAX
         LDA   [$ED]
         PHX
         PHA
         LDX   L0144
         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   LADAA
LAD61    LDA   [$E5]
         AND   #$00FF
         BNE   LADA4
         LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDX   $E7
         LDA   $E5
         JSL   LB28D
         LDA   $F1
         INC   $F1
         ASL
         ASL
         PHA
         LDX   L0144
         LDA   L0142
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LAD8F
         DEC   $F6
LAD8F    CLC
         ADC   $F4
         STA   $F4
         BCC   LAD98
         INC   $F6
LAD98    PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F4],Y
         PLA
         STA   [$F4]
LADA4    INC   $E5
         BNE   LADAA
         INC   $E7
LADAA    LDA   $F1
         SEC
         SBC   L0140
         BVS   LADB5
         EOR   #$8000
LADB5    BPL   LAD61
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDA   L0140
         ASL
         ASL
         PHA
         LDX   L0144
         LDA   L0142
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LADD5
         DEC   $F6
LADD5    CLC
         ADC   $F4
         STA   $F4
         BCC   LADDE
         INC   $F6
LADDE    PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F4],Y
         PLA
         STA   [$F4]
LADEA    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

         ASC   'HS'
LADF6    DB    $00
         DB    $00
LADF8    ADRL  LAE2D
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LAE02    DB    $00
         DB    $00
LAE04    DB    $00
         DB    $00
LAE06    ADRL  LAE39
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
LAE16    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LAE24    ASC   'BYTEWRKS'00
LAE2D    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LAE39    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LAE61    DB    $00
LAE62    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LAE71    PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00E2
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   LBD99
         BNE   LAE9D
         LDA   #$0017
         STA   LC4F3
         LDX   #$0000
         LDA   #$0000
         BRL   LB006
LAE9D    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F7
         LDA   $F5
         JSL   LBD99
         BEQ   LAEB9
         LDA   [$F5]
         AND   #$00FF
         CMP   #$0000
         BNE   LAEC8
LAEB9    LDA   #$0016
         STA   LC4F3
         LDX   #$0000
         LDA   #$0000
         BRL   LB006
LAEC8    LDY   #$0001
         LDA   [$F9],Y
         AND   #$00FF
         CMP   #$002B
         BEQ   LAEE7
         LDY   #$0002
         LDA   [$F9],Y
         AND   #$00FF
         CMP   #$002B
         BEQ   LAEE7
         LDA   #$0000
         BRA   LAEEA
LAEE7    LDA   #$0001
LAEEA    STA   $EA
         LDY   #$0001
         LDA   [$F9],Y
         AND   #$00FF
         CMP   #$0062
         BEQ   LAF0B
         LDY   #$0002
         LDA   [$F9],Y
         AND   #$00FF
         CMP   #$0062
         BEQ   LAF0B
         LDA   #$0000
         BRA   LAF0E
LAF0B    LDA   #$0001
LAF0E    STA   $E8
         LDA   [$F9]
         AND   #$00FF
         BRL   LAF62
LAF18    LDA   $EA
         BEQ   LAF21
         LDA   #$0002
         BRA   LAF24
LAF21    LDA   #$0001
LAF24    ORA   #$0200
         ORA   #$0100
         STA   $E6
         BRL   LAF74
LAF2F    LDA   $EA
         BEQ   LAF38
         LDA   #$0002
         BRA   LAF3B
LAF38    LDA   #$0001
LAF3B    ORA   #$0008
         ORA   #$0100
         STA   $E6
         BRL   LAF74
LAF46    LDA   $EA
         BEQ   LAF4F
         LDA   #$0002
         BRA   LAF52
LAF4F    LDA   #$0000
LAF52    STA   $E6
         BRL   LAF74
LAF57    LDX   #$0000
         LDA   #$0000
         BRL   LB006
         BRA   LAF74
LAF62    CMP   #$0061
         BEQ   LAF2F
         CMP   #$0072
         BEQ   LAF46
         CMP   #$0077
         BEQ   LAF18
         JMP   LAF57

LAF74    LDA   $E8
         BEQ   LAF7F
         LDA   $E6
         ORA   #$0020
         STA   $E6
LAF7F    PEI   $E6
         PEI   $F7
         PEI   $F5
         JSL   LBADF
         PLY
         PLY
         PLY
         STA   $E4
         SEC
         SBC   #$0000
         BVS   LAF97
         EOR   #$8000
LAF97    BMI   LAFA1
         LDX   #$0000
         LDA   #$0000
         BRA   LB006
LAFA1    LDA   #$0000
         STA   [$FD]
         LDA   $E4
         LDY   #$0012
         STA   [$FD],Y
         LDA   $EA
         BEQ   LAFB6
         LDA   #$0080
         BRA   LAFC8
LAFB6    LDA   [$F9]
         AND   #$00FF
         CMP   #$0072
         BNE   LAFC5
         LDA   #$0001
         BRA   LAFC8
LAFC5    LDA   #$0002
LAFC8    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
LB006    TAY
         TDC
         CLC
         ADC   #$00EF
         TCS
         TYA
         PLD
         RTL

LB010    PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         LDA   #LB6AE
         LDX   #^LB6AE
         STX   $F6
         STA   $F4
         BRA   LB046
LB027    LDY   #$0010
         LDA   [$F4],Y
         AND   #$0083
         CMP   #$0000
         BNE   LB03A
         LDX   $F6
         LDA   $F4
         BRA   LB069
LB03A    LDA   $F4
         CLC
         ADC   #$0014
         STA   $F4
         BCC   LB046
         INC   $F6
LB046    SEC
         LDA   $F4
         SBC   LB073
         BNE   LB055
         LDA   $F6
         SBC   LB073+2
         BRA   LB05C
LB055    LDA   $F6
         SBC   LB073+2
         REP   #$02
LB05C    BVS   LB061
         EOR   #$8000
LB061    BPL   LB027
         LDX   #$0000
         LDA   #$0000
LB069    TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

LB073    ADRL  LB83E
LB077    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   LB5D7
         PLA
         PLX
         STA   $F2
         SEC
         SBC   #$0000
         BVS   LB0AB
         EOR   #$8000
LB0AB    BMI   LB0C7
         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   LB0D9
LB0C7    LDA   [$FD]
         SEC
         SBC   $F2
         BEQ   LB0D9
         BVS   LB0D3
         EOR   #$8000
LB0D3    BPL   LB0D9
         LDA   $F2
         STA   [$FD]
LB0D9    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LB0E3    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   LB141
LB100    LDA   [$FD]
         AND   #$00FF
         STA   $EE
         LDA   $F0
         PHA
         LDX   $FF
         LDA   $FD
         INC   $FD
         BNE   LB114
         INC   $FF
LB114    STA   $F4
         STX   $F6
         PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
         LDA   $EE
         STA   $F0
         LDA   $EE
         BNE   LB100
         LDX   $EC
         LDA   $EA
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   LB5D7
         PLA
         PLX
         SEC
         SBC   #$0001
         SEP   #$20
         STA   [$EA]
         REP   #$20
LB141    TDC
         CLC
         ADC   #$00F7
         TCS
         PLD
         RTL

LB149    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   LB18B
         LDY   #$0002
         LDA   [$F0],Y
         TAX
         LDA   [$F0]
         BRA   LB191
LB18B    LDX   #$0000
         LDA   #$0000
LB191    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LB19B    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EC
         TCS
         BRL   LB26C
LB1A9    LDA   [$F7]
         AND   #$00FF
         PHA
         LDA   [$FB]
         AND   #$00FF
         PLX
         STX   $EE
         CMP   $EE
         BNE   LB1C1
         LDA   #$0001
         BRL   LB246
LB1C1    LDA   $FF
         BEQ   LB1CA
         LDA   #$0000
         BRA   LB246
LB1CA    LDA   [$F7]
         AND   #$00FF
         SEC
         SBC   #$0061
         BVS   LB1D8
         EOR   #$8000
LB1D8    BPL   LB1EC
         LDA   [$F7]
         AND   #$00FF
         SEC
         SBC   #$007A
         BEQ   LB1F3
         BVS   LB1EA
         EOR   #$8000
LB1EA    BPL   LB1F3
LB1EC    LDA   [$F7]
         AND   #$00FF
         BRA   LB200
LB1F3    LDA   [$F7]
         AND   #$00FF
         CLC
         ADC   #$0041
         SEC
         SBC   #$0061
LB200    PHA
         LDA   [$FB]
         AND   #$00FF
         SEC
         SBC   #$0061
         BVS   LB20F
         EOR   #$8000
LB20F    BPL   LB223
         LDA   [$FB]
         AND   #$00FF
         SEC
         SBC   #$007A
         BEQ   LB22A
         BVS   LB221
         EOR   #$8000
LB221    BPL   LB22A
LB223    LDA   [$FB]
         AND   #$00FF
         BRA   LB237
LB22A    LDA   [$FB]
         AND   #$00FF
         CLC
         ADC   #$0041
         SEC
         SBC   #$0061
LB237    PLX
         STX   $EE
         CMP   $EE
         BEQ   LB243
         LDA   #$0000
         BRA   LB246
LB243    LDA   #$0001
LB246    TAY
         BNE   LB24E
         LDA   #$0000
         BRA   LB283
LB24E    LDX   $F9
         LDA   $F7
         INC   $F7
         BNE   LB258
         INC   $F9
LB258    STA   $EE
         STX   $F0
         LDX   $FD
         LDA   $FB
         INC   $FB
         BNE   LB266
         INC   $FD
LB266    STA   $EE
         STX   $F0
         LDA   [$EE]
LB26C    LDA   [$F7]
         AND   #$00FF
         BEQ   LB276
         BRL   LB1A9
LB276    LDA   [$FB]
         AND   #$00FF
         BEQ   LB280
         BRL   LB1A9
LB280    LDA   #$0001
LB283    TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

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

LB298    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F0
         TCS
         LDA   #$FFFF
         STA   $F2
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   LBD99
         BNE   LB2C0
         LDA   #$FFFF
         BRL   LB372
LB2C0    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0083
         TAY
         BEQ   LB308
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0004
         TAY
         BEQ   LB2DB
         LDA   #$0000
         BRA   LB2E5
LB2DB    PEI   $FF
         PEI   $FD
         JSL   LB37C
         PLY
         PLY
LB2E5    STA   $F2
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   LC446
         PLY
         SEC
         SBC   #$0000
         BVS   LB2FB
         EOR   #$8000
LB2FB    BMI   LB308
         LDA   #$FFFF
         STA   $F2
         LDA   #$0002
         STA   LC4F3
LB308    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0008
         TAY
         BEQ   LB34B
         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
LB34B    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
LB372    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LB37C    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0002
         TAY
         BNE   LB39C
         LDA   #$0000
         STA   [$FD]
         LDA   #$0000
         BRA   LB40D
LB39C    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0004
         TAY
         BNE   LB3FA
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0002
         TAY
         BEQ   LB3FA
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   LBD99
         BEQ   LB3FA
         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   LBD99
         BVS   LB3EC
         EOR   #$8000
LB3EC    BMI   LB3FA
         PEI   $FF
         PEI   $FD
         JSL   LC98F
         PLY
         PLY
         BRA   LB39C
LB3FA    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0020
         TAY
         BEQ   LB40A
         LDA   #$FFFF
         BRA   LB40D
LB40A    LDA   #$0000
LB40D    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

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

LB472    PHD
         PHA
         PEA   $0001
         TSC
         TCD
         LDA   $03
         BEQ   LB4DD
         LDX   #$0000
         BCC   LB49D
         BIT   #$8000
         BEQ   LB48E
         EOR   #$FFFF
         INC
         STA   $03
         INX
LB48E    LDA   $0A
         BIT   #$8000
         BEQ   LB49D
         EOR   #$FFFF
         INC
         STA   $0A
         INX
         INX
LB49D    LDY   #$0000
         BRA   LB4A4
LB4A2    ASL   $01
LB4A4    ASL   $03
         BCC   LB4A2
         ROR   $03
LB4AA    LDA   $0A
         CMP   $03
         BCC   LB4BB
         LDA   $0A
         SEC
         SBC   $03
         STA   $0A
         TYA
         ORA   $01
         TAY
LB4BB    LSR   $03
         LSR   $01
         BCC   LB4AA
         TYA
         CPX   #$0000
         BEQ   LB4DD
         CPX   #$0003
         BEQ   LB4D5
         EOR   #$FFFF
         INC
         CPX   #$0001
         BEQ   LB4DD
LB4D5    TAY
         LDA   $0A
         EOR   #$FFFF
         INC
         TYA
LB4DD    PLY
         PLY
         PLD
         RTL

LB4E1    PHD
         PHX
         PHA
         PEA   $0000
         PEA   $0001
         PEA   $0000
         PEA   $0000
         TSC
         TCD
         LDA   $09
         ORA   $0B
         BNE   LB4FE
         LDX   #$0000
         BRL   LB5B2
LB4FE    LDX   #$0000
         BCC   LB536
         LDA   $0B
         BIT   #$8000
         BEQ   LB51C
         EOR   #$FFFF
         STA   $0B
         LDA   $09
         EOR   #$FFFF
         INC
         BNE   LB519
         INC   $0B
LB519    STA   $09
         INX
LB51C    LDA   $14
         BIT   #$8000
         BEQ   LB536
         EOR   #$FFFF
         STA   $14
         LDA   $12
         EOR   #$FFFF
         INC
         BNE   LB532
         INC   $14
LB532    STA   $12
         INX
         INX
LB536    BRA   LB53C
LB538    ASL   $05
         ROL   $07
LB53C    ASL   $09
         ROL   $0B
         BCC   LB538
         ROR   $0B
         ROR   $09
LB546    LDA   $14
         CMP   $0B
         BEQ   LB550
         BCC   LB56F
         BRA   LB556
LB550    LDA   $12
         CMP   $09
         BCC   LB56F
LB556    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
LB56F    LSR   $0B
         ROR   $09
         LSR   $07
         ROR   $05
         BCC   LB546
         CPX   #$0000
         BEQ   LB5AE
         CPX   #$0003
         BEQ   LB59B
         LDA   $01
         EOR   #$FFFF
         STA   $01
         LDA   $03
         EOR   #$FFFF
         INC   $01
         BNE   LB594
         INC
LB594    STA   $03
         CPX   #$0001
         BEQ   LB5AE
LB59B    LDA   $12
         EOR   #$FFFF
         STA   $12
         LDA   $14
         EOR   #$FFFF
         INC   $12
         BNE   LB5AC
         INC
LB5AC    STA   $14
LB5AE    LDA   $01
         LDX   $03
LB5B2    PLY
         PLY
         PLY
         PLY
         PLY
         PLY
         PLD
         RTL

LB5BA    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

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

LB5E2    PHD
         PHA
         TSC
         TCD
         LDX   #$0000
         BCC   LB607
         LDA   $01
         BIT   #$8000
         BEQ   LB5F9
         EOR   #$FFFF
         INC
         STA   $01
         INX
LB5F9    LDA   $08
         BIT   #$8000
         BEQ   LB607
         EOR   #$FFFF
         INC
         STA   $08
         DEX
LB607    LDA   #$0000
         BRA   LB615
LB60C    LSR   $08
         BCC   LB613
         CLC
         ADC   $01
LB613    ASL   $01
LB615    LDY   $08
         BNE   LB60C
         CPX   #$0000
         BEQ   LB622
         EOR   #$FFFF
         INC
LB622    STA   $08
         PLY
         PLD
         RTL

LB627    PHD
         PHX
         PHA
         PEA   $0000
         PEA   $0000
         TSC
         TCD
         LDX   #$0000
         BCC   LB669
         LDA   $07
         BIT   #$8000
         BEQ   LB650
         EOR   #$FFFF
         STA   $07
         LDA   $05
         EOR   #$FFFF
         INC
         BNE   LB64D
         INC   $07
LB64D    STA   $05
         INX
LB650    LDA   $10
         BIT   #$8000
         BEQ   LB669
         EOR   #$FFFF
         STA   $10
         LDA   $0E
         EOR   #$FFFF
         INC
         BNE   LB666
         INC   $10
LB666    STA   $0E
         DEX
LB669    BRA   LB682
LB66B    LSR   $10
         ROR   $0E
         BCC   LB67E
         LDA   $01
         CLC
         ADC   $05
         STA   $01
         LDA   $03
         ADC   $07
         STA   $03
LB67E    ASL   $05
         ROL   $07
LB682    LDA   $0E
         ORA   $10
         BNE   LB66B
         CPX   #$0000
         BEQ   LB6A0
         LDA   $01
         EOR   #$FFFF
         STA   $01
         LDA   $03
         EOR   #$FFFF
         INC   $01
         BNE   LB69E
         INC
LB69E    STA   $03
LB6A0    LDA   $01
         STA   $0E
         LDA   $03
         STA   $10
         PLY
         PLY
         PLY
         PLY
         PLD
         RTL

LB6AE    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $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
LB83E    PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$FFEC
         TCS
         LDA   #LC07C
         LDX   #^LC07C
         PHX
         PHA
         LDAL  LAE06+2
         TAX
         LDAL  LAE06
         STA   $F6
         STX   $F8
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
         LDA   LC0B8
         BNE   LB872
         BRL   LB9C5
LB872    LDX   #$0000
         TDC
         CLC
         ADC   #$FFEE
         PHA
         TXA
         STAL  LBBC6
         PLA
         STAL  LBBC4
         PEA   $0027
         PEA   ^LBBC4
         PEA   LBBC4
         JSL   LBA99
         LDAL  LBBC6
         TAX
         LDAL  LBBC4
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         STA   $F2
         STA   $F0
LB8A8    LDA   $F2
         LDX   #$0000
         TAY
         BPL   LB8B1
         DEX
LB8B1    PHX
         PHA
         LDAL  LBBC6
         TAX
         LDAL  LBBC4
         JSL   LB28D
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         CMP   #$002F
         BEQ   LB8E3
         LDA   $F2
         SEC
         SBC   #$0000
         BEQ   LB8E3
         BVS   LB8DD
         EOR   #$8000
LB8DD    BPL   LB8E3
         DEC   $F2
         BRA   LB8A8
LB8E3    LDA   $F0
         SEC
         SBC   $F2
         STA   $EE
         SEP   #$20
         STAL  LAE61
         REP   #$20
         BRA   LB94C
LB8F4    LDA   $F0
         DEC   $F0
         LDX   #$0000
         TAY
         BPL   LB8FF
         DEX
LB8FF    PHX
         PHA
         LDAL  LBBC6
         TAX
         LDAL  LBBC4
         JSL   LB28D
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         PHA
         LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDA   $EE
         LDX   #$0000
         TAY
         BPL   LB92B
         DEX
LB92B    PHX
         PHA
         LDA   #LAE62
         LDX   #^LAE62
         JSL   LB28D
         PLA
         PLX
         JSL   LB5D7
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         SEP   #$20
         STA   [$F6]
         REP   #$20
         DEC   $EE
LB94C    LDA   $EE
         SEC
         SBC   #$0000
         BEQ   LB95B
         BVS   LB959
         EOR   #$8000
LB959    BMI   LB8F4
LB95B    LDA   #LAE61
         LDX   #^LAE61
         PHX
         PHA
         LDAL  LADF8+2
         TAX
         LDAL  LADF8
         STA   $F6
         STX   $F8
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
         LDA   $FF
         BNE   LB99D
         LDAL  LADF8+2
         TAX
         LDAL  LADF8
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         JSL   LCA79
         PLY
         PLY
LB99D    LDA   #$0001
         STA   L0140
         LDAL  LADF8+2
         TAX
         LDAL  LADF8
         STX   L0144
         STA   L0142
         PEA   $007F
         PEA   $0000
         _SetInGlobals
         STAL  L013C
         BRA   LB9DD
LB9C5    LDA   L0140
         STAL  LADF6
         LDX   L0144
         LDA   L0142
         PHA
         TXA
         STAL  LADF8+2
         PLA
         STAL  LADF8
LB9DD    TAY
         TDC
         CLC
         ADC   #$00F9
         TCS
         TYA
         PLD
         RTL

LB9E7    PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F0
         TCS
         LDAL  LAE06+2
         TAX
         LDAL  LAE06
         STA   $F6
         STX   $F8
         LDX   $F8
         LDA   #$0024
         CLC
         ADC   $F6
         BCC   LBA0A
         INX
LBA0A    STX   $F4
         STA   $F2
         BRA   LBA49
LBA10    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         JSL   LBD99
         BEQ   LBA3D
         PEI   $FF
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         STA   $F6
         STX   $F8
         LDA   $F6
         LDX   $F8
         JSL   LBAD7
         PLY
LBA3D    LDA   $F2
         SEC
         SBC   #$0004
         STA   $F2
         BCS   LBA49
         DEC   $F4
LBA49    LDAL  LAE06+2
         TAX
         LDAL  LAE06
         STA   $F6
         STX   $F8
         LDA   $F6
         LDX   $F8
         PHX
         PHA
         LDX   $F4
         LDA   $F2
         JSL   LBD99
         BVS   LBA69
         EOR   #$8000
LBA69    BPL   LBA10
         LDA   $FF
         STA   L014A
         LDAL  LAE06+2
         TAX
         LDAL  LAE06
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         STA   $F6
         STX   $F8
         LDA   $F6
         LDX   $F8
         JSL   LBAD7
         TDC
         CLC
         ADC   #$00F9
         TCS
         PLD
         RTL

LBA99    PHB
         PLA
         XBA
         STAL  LBAD4
         PLA
         STAL  LBAD4+1
         PLA
         STAL  LBABA
         PLA
         STAL  LBABA+2
         PLA
         STAL  LBAB8
         JSL   GSOS
LBAB8    DW    $0000
LBABA    ADRL  $00000000
         BCS   LBAC3
         LDA   #$0000
LBAC3    STAL  L013C
         LDAL  LBAD4+1
         PHA
         PHB
         LDAL  LBAD4
         STA   $01,S
         RTL

LBAD4    HEX   000000
LBAD7    SEP   #$10
         PHX
         REP   #$10
         DEC
         PHA
         RTL

LBADF    PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00E4
         TCS
         LDA   #$FFFF
         STA   $E8
         PEA   $0000
         TDC
         CLC
         ADC   #$00E8
         PHA
         JSL   LBE1E
         PLY
         PLY
         STX   $EC
         STA   $EA
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EC
         LDA   $EA
         JSL   LBD99
         BNE   LBB1A
         LDA   #$FFFF
         BRL   LBB9C
LBB1A    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   LC4F5
         TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
         STA   $E6
         LDA   $E6
         CMP   #$0000
         BEQ   LBB70
         LDA   #$0000
         STA   [$EA]
         LDA   #$FFFF
         BRA   LBB9C
LBB70    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0006
         LDA   [$EA],Y
         TAX
         LDY   #$0004
         LDA   [$EA],Y
         JSL   LBD99
         BNE   LBB9A
         LDX   $F0
         LDA   $EE
         LDY   #$0006
         PHA
         TXA
         STA   [$EA],Y
         PLA
         LDY   #$0004
         STA   [$EA],Y
LBB9A    LDA   $E8
LBB9C    TAY
         TDC
         CLC
         ADC   #$00F5
         TCS
         TYA
         PLD
         RTL

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

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
LBBD6    DB    $00
         DB    $00
         DB    $00
         DB    $00
LBBDA    DB    $00
         DB    $00
LBBDC    DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LBBE6    DB    $00
         DB    $00
LBBE8    DB    $00
         DB    $00
LBBEA    DB    $00
         DB    $00
         DB    $00
         DB    $00
         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    DB    $00
         DB    $00
LBC0A    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EE
         TCS
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0081
         CMP   #$0000
         BNE   LBC28
         LDA   #$FFFF
         BRL   LBD8F
LBC28    LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0001
         LDY   #$0010
         STA   [$FD],Y
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0010
         TAY
         BEQ   LBC46
         LDA   #$FFFF
         BRL   LBD8F
LBC46    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   LBD99
         BNE   LBC69
         PEI   $FF
         PEI   $FD
         JSL   LC71E
         PLY
         PLY
LBC69    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0100
         TAY
         BNE   LBC77
         BRL   LBCC1
LBC77    LDA   #LB6AE
         LDX   #^LB6AE
         STX   $F2
         STA   $F0
         BRA   LBCA4
LBC83    LDY   #$0010
         LDA   [$F0],Y
         AND   #$0102
         TAY
         BEQ   LBC98
         PEI   $F2
         PEI   $F0
         JSL   LB37C
         PLY
         PLY
LBC98    LDA   $F0
         CLC
         ADC   #$0014
         STA   $F0
         BCC   LBCA4
         INC   $F2
LBCA4    SEC
         LDA   $F0
         SBC   LB073
         BNE   LBCB3
         LDA   $F2
         SBC   LB073+2
         BRA   LBCBA
LBCB3    LDA   $F2
         SBC   LB073+2
         REP   #$02
LBCBA    BVS   LBCBF
         EOR   #$8000
LBCBF    BPL   LBC83
LBCC1    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   LBCE9
         LDA   #$0001
         BRA   LBCEE
LBCE9    LDY   #$000E
         LDA   [$FD],Y
LBCEE    PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         PHX
         PHA
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   LCCBD
         PLY
         PLY
         PLY
         PLY
         STA   [$FD]
         LDA   [$FD]
         DEC
         STA   [$FD]
         SEC
         SBC   #$0000
         BVS   LBD1A
         EOR   #$8000
LBD1A    BPL   LBD4C
         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   LBD3A
         INC
LBD3A    LDY   #$0004
         STA   [$FD],Y
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         BRA   LBD8F
LBD4C    LDA   [$FD]
         CMP   #$FFFF
         BNE   LBD7A
         LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0010
         LDY   #$0010
         STA   [$FD],Y
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0080
         TAY
         BEQ   LBD78
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$FFFE
         LDY   #$0010
         STA   [$FD],Y
LBD78    BRA   LBD87
LBD7A    LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0020
         LDY   #$0010
         STA   [$FD],Y
LBD87    LDA   #$0000
         STA   [$FD]
         LDA   #$FFFF
LBD8F    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LBD99    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   LBDB4
         TYA
         SBC   $03,S
         BRA   LBDB9
LBDB4    TYA
         SBC   $03,S
         REP   #$02
LBDB9    PHP
         LDA   $00,S
         STA   $08,S
         PLY
         PLY
         PLY
         PLY
         PLP
         RTL

LBDC4    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E8
         TCS
         LDX   $FB
         LDA   $F9
         STX   $EC
         STA   $EA
LBDD7    LDA   $F7
         CMP   #$0001
         BEQ   LBE02
         BCC   LBE02
         LDA   [$FD]
         STA   [$F9]
         LDA   $F9
         CLC
         ADC   #$0002
         STA   $F9
         BCC   LBDF0
         INC   $FB
LBDF0    LDA   $FD
         CLC
         ADC   #$0002
         STA   $FD
         BCC   LBDFC
         INC   $FF
LBDFC    DEC   $F7
         DEC   $F7
         BRA   LBDD7
LBE02    LDA   $F7
         BEQ   LBE0E
         SEP   #$20
         LDA   [$FD]
         STA   [$F9]
         REP   #$20
LBE0E    LDX   $EC
         LDA   $EA
         STX   $FF
         STA   $FD
         TDC
         CLC
         ADC   #$00F1
         TCS
         PLD
         RTL

LBE1E    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E8
         TCS
         LDAL  LAE0A
         CMP   #$0000
         BNE   LBE36
         JSL   LC117
LBE36    LDAL  LAE0A
         PHA
         LDA   #$0012
         SEC
         JSL   LB472
         PLY
         SEC
         SBC   #$0001
         STA   $F2
         LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   LBE55
         EOR   #$8000
LBE55    BPL   LBE5B
         LDA   [$FD]
         BRA   LBE67
LBE5B    LDA   [$FD]
         PHA
         LDA   #$FFFF
         PLX
         STX   $F4
         SEC
         SBC   $F4
LBE67    SEC
         SBC   $F2
         BEQ   LBE88
         BVS   LBE71
         EOR   #$8000
LBE71    BPL   LBE88
         PEA   $0000
         PEA   $0016
         JSL   LC0ED
         PLY
         PLY
         LDX   #$0000
         LDA   #$0000
         BRL   LC072
LBE88    LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   LBE93
         EOR   #$8000
LBE93    BPL   LBEDE
         LDA   [$FD]
         PHA
         LDA   #$0012
         CLC
         JSL   LB5E2
         LDAL  LAE0E
         TAX
         LDAL  LAE0C
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LBEB3
         DEC   $F6
LBEB3    CLC
         ADC   $F4
         STA   $F4
         BCC   LBEBC
         INC   $F6
LBEBC    LDA   $F4
         LDX   $F6
         STX   $F0
         STA   $EE
         LDA   [$EE]
         CMP   #$0000
         BNE   LBEDB
         PEA   $0000
         PEA   $0009
         JSL   LC0ED
         PLY
         PLY
         STZ   $EE
         STZ   $F0
LBEDB    BRL   LC06E
LBEDE    LDA   [$FD]
         PHA
         LDA   #$FFFF
         PLX
         STX   $F4
         SEC
         SBC   $F4
         PHA
         LDA   #$0012
         CLC
         JSL   LB5E2
         LDAL  LAE0E
         TAX
         LDAL  LAE0C
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LBF06
         DEC   $F6
LBF06    CLC
         ADC   $F4
         STA   $F4
         BCC   LBF0F
         INC   $F6
LBF0F    LDA   $F4
         LDX   $F6
         STX   $F0
         STA   $EE
         BRA   LBF2E
LBF19    LDA   [$EE]
         CMP   #$0000
         BNE   LBF22
         BRA   LBF6A
LBF22    LDA   $EE
         CLC
         ADC   #$0012
         STA   $EE
         BCC   LBF2E
         INC   $F0
LBF2E    LDA   $F2
         PHA
         LDA   #$0012
         CLC
         JSL   LB5E2
         LDAL  LAE0E
         TAX
         LDAL  LAE0C
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LBF4C
         DEC   $F6
LBF4C    CLC
         ADC   $F4
         STA   $F4
         BCC   LBF55
         INC   $F6
LBF55    LDA   $F4
         LDX   $F6
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   LBD99
         BVS   LBF68
         EOR   #$8000
LBF68    BMI   LBF19
LBF6A    LDA   $F2
         PHA
         LDA   #$0012
         CLC
         JSL   LB5E2
         LDAL  LAE0E
         TAX
         LDAL  LAE0C
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LBF88
         DEC   $F6
LBF88    CLC
         ADC   $F4
         STA   $F4
         BCC   LBF91
         INC   $F6
LBF91    LDA   $F4
         LDX   $F6
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   LBD99
         BVS   LBFA4
         EOR   #$8000
LBFA4    BPL   LBFA9
         BRL   LC044
LBFA9    LDAL  LAE0A
         CLC
         ADC   #$00B4
         LDX   #$0000
         TAY
         BPL   LBFB8
         DEX
LBFB8    PHX
         PHA
         LDAL  LAE0E
         TAX
         LDAL  LAE0C
         PHX
         PHA
         JSL   LCDE9
         PLY
         PLY
         PLY
         PLY
         STX   $EC
         STA   $EA
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EC
         LDA   $EA
         JSL   LBD99
         BNE   LBFF8
         PEA   $0000
         PEA   $0018
         JSL   LC0ED
         PLY
         PLY
         LDX   #$0000
         LDA   #$0000
         BRL   LC072
LBFF8    LDA   $F2
         PHA
         LDA   #$0012
         CLC
         JSL   LB5E2
         LDX   $EC
         LDA   $EA
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   LC011
         DEC   $F6
LC011    CLC
         ADC   $F4
         STA   $F4
         BCC   LC01A
         INC   $F6
LC01A    LDX   $F6
         LDA   #$0012
         CLC
         ADC   $F4
         BCC   LC025
         INX
LC025    STX   $F0
         STA   $EE
         LDAL  LAE0A
         CLC
         ADC   #$00B4
         STAL  LAE0A
         LDX   $EC
         LDA   $EA
         PHA
         TXA
         STAL  LAE0E
         PLA
         STAL  LAE0C
LC044    LDAL  LAE0E
         TAX
         LDAL  LAE0C
         STA   $F4
         STX   $F6
         LDA   $F4
         LDX   $F6
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   LB5D7
         LDX   #$0000
         LDA   #$0012
         SEC
         JSL   LB4E1
         PLY
         PLY
         STA   [$FD]
LC06E    LDX   $F0
         LDA   $EE
LC072    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

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

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

LC0B8    BRK   $00
LC0BA    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   LC0EA
         INC
LC0EA    PHX
         PLD
         RTL

LC0ED    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDA   $FF
         CMP   #$0000
         BNE   LC103
         LDA   $FD
         BRA   LC10A
LC103    PEI   $FF
         JSL   LCAEA
         PLY
LC10A    STA   LC4F3
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LC117    PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F0
         TCS
         LDA   #$00B4
         STAL  LAE0A
         PEA   $0000
         PEA   $00B4
         PEA   $0000
         PEA   $0000
         JSL   LCDE9
         PLY
         PLY
         PLY
         PLY
         PHA
         TXA
         STAL  LAE0E
         PLA
         STAL  LAE0C
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDAL  LAE16
         TAX
         LDAL  LAE14
         JSL   LBD99
         BNE   LC162
         BRL   LC222
LC162    LDAL  LAE16
         TAX
         LDAL  LAE14
         STA   $F8
         STX   $FA
         LDY   #$001A
         LDA   [$F8],Y
         TAX
         LDY   #$0018
         LDA   [$F8],Y
         PHX
         PHA
         LDAL  LAE0E
         TAX
         LDAL  LAE0C
         PHX
         PHA
         PEA   $0000
         PEA   $0036
         _BlockMove
         STAL  L013C
         LDAL  LAE0E
         TAX
         LDAL  LAE0C
         STA   $F8
         STX   $FA
         LDA   $F8
         LDX   $FA
         STX   $F6
         STA   $F4
         BRA   LC1F6
LC1AF    LDA   [$F4]
         CMP   #$0000
         BEQ   LC1EA
         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   LBAD7
         PLY
         PLY
         PLY
         PLY
LC1EA    LDA   $F4
         CLC
         ADC   #$0012
         STA   $F4
         BCC   LC1F6
         INC   $F6
LC1F6    LDAL  LAE0E
         TAX
         LDAL  LAE0C
         STA   $F8
         STX   $FA
         LDX   $FA
         LDA   #$0024
         CLC
         ADC   $F8
         BCC   LC20E
         INX
LC20E    PHX
         PHA
         LDX   $F6
         LDA   $F4
         JSL   LBD99
         BVS   LC21D
         EOR   #$8000
LC21D    BMI   LC1AF
         BRL   LC3F0
LC222    PEA   $0000
         PEA   ^LC920
         PEA   LC920
         JSL   LBADF
         PLY
         PLY
         PLY
         STA   $F2
         PEA   $0000
         TDC
         CLC
         ADC   #$00F2
         PHA
         JSL   LBE1E
         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   ^LC929
         PEA   LC929
         JSL   LBADF
         PLY
         PLY
         PLY
         STA   $F2
         PEA   $0000
         TDC
         CLC
         ADC   #$00F2
         PHA
         JSL   LBE1E
         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   ^LC932
         PEA   LC932
         JSL   LBADF
         PLY
         PLY
         PLY
         STA   $F2
         PEA   $0000
         TDC
         CLC
         ADC   #$00F2
         PHA
         JSL   LBE1E
         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
LC3F0    LDA   #LC6DA
         LDX   #^LC6DA
         PHX
         PHA
         LDAL  LAE06+2
         TAX
         LDAL  LAE06
         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  LAE04
         TAX
         LDAL  LAE02
         JSL   LBD99
         BNE   LC43C
         LDA   #LCDA3
         LDX   #^LCDA3
         PHA
         TXA
         STAL  LAE04
         PLA
         STAL  LAE02
LC43C    TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

LC446    PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EE
         TCS
         LDA   $FF
         SEC
         SBC   #$0000
         BVS   LC45C
         EOR   #$8000
LC45C    BMI   LC46F
         PEA   $0000
         PEA   $0016
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
         BRA   LC4E9
LC46F    PEA   $0000
         TDC
         CLC
         ADC   #$00FF
         PHA
         JSL   LBE1E
         PLY
         PLY
         STX   $F4
         STA   $F2
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F4
         LDA   $F2
         JSL   LBD99
         BNE   LC499
         LDA   #$FFFF
         BRA   LC4E9
LC499    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   LBAD7
         PLY
         PLY
         STA   $F0
         LDA   #$0000
         STA   [$F2]
         LDA   $F0
         CMP   #$0000
         BEQ   LC4E6
         LDY   #$0002
         LDA   [$F2],Y
         PHA
         PEI   $F0
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
         BRA   LC4E9
LC4E6    LDA   #$0000
LC4E9    TAY
         TDC
         CLC
         ADC   #$00F9
         TCS
         TYA
         PLD
         RTL

LC4F3    DW    $0000
LC4F5    PHD
         TSC
         SEC
         SBC   #$00ED
         TCD
         ADC   #$00E0
         TCS
         LDA   [$F7]
         AND   #$00FF
         CMP   #$0000
         BEQ   LC50F
         LDA   #$0000
         BRA   LC512
LC50F    LDA   #$0001
LC512    PHA
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F9
         LDA   $F7
         JSL   LBD99
         BEQ   LC52A
         LDA   #$0000
         BRA   LC52D
LC52A    LDA   #$0001
LC52D    PLX
         STX   $EA
         ORA   $EA
         TAY
         BEQ   LC547
         PEA   $0000
         PEA   $0016
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
         BRL   LC6D0
LC547    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDAL  LAE12
         TAX
         LDAL  LAE10
         JSL   LBD99
         BNE   LC56F
         LDA   #LCFA8
         LDX   #^LCFA8
         PHA
         TXA
         STAL  LAE12
         PLA
         STAL  LAE10
LC56F    LDAL  LAE12
         TAX
         LDAL  LAE10
         STA   $EA
         STX   $EC
         LDA   $EA
         LDX   $EC
         STX   $E4
         STA   $E2
         BRA   LC5AD
LC586    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0006
         LDA   [$E2],Y
         TAX
         LDY   #$0004
         LDA   [$E2],Y
         JSL   LBD99
         BNE   LC5A1
         BRA   LC5D8
LC5A1    LDA   $E2
         CLC
         ADC   #$0018
         STA   $E2
         BCC   LC5AD
         INC   $E4
LC5AD    LDAL  LAE12
         TAX
         LDAL  LAE10
         STA   $EA
         STX   $EC
         LDX   $EC
         LDA   #$0078
         CLC
         ADC   $EA
         BCC   LC5C5
         INX
LC5C5    PHX
         PHA
         LDX   $E4
         LDA   $E2
         JSL   LBD99
         BEQ   LC5D8
         BVS   LC5D6
         EOR   #$8000
LC5D6    BMI   LC586
LC5D8    LDA   #$4006
         STA   $E8
LC5DD    LDAL  LAE12
         TAX
         LDAL  LAE10
         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   LBD99
         BEQ   LC611
         BVS   LC60F
         EOR   #$8000
LC60F    BMI   LC64A
LC611    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   LBAD7
         PLY
         PLY
         PLY
         PLY
         PLY
         STA   $E8
         LDA   $E8
         SEC
         SBC   #$0000
         BVS   LC644
         EOR   #$8000
LC644    BPL   LC648
         BRA   LC64A
LC648    BRA   LC5DD
LC64A    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F5
         LDA   $F3
         JSL   LBD99
         BEQ   LC68E
         LDAL  LAE12
         TAX
         LDAL  LAE10
         STA   $EA
         STX   $EC
         LDA   $EA
         LDX   $EC
         PHX
         PHA
         LDX   $E4
         LDA   $E2
         JSL   LBD99
         BEQ   LC680
         BVS   LC67E
         EOR   #$8000
LC67E    BMI   LC68E
LC680    LDX   $E4
         LDA   $E2
         LDY   #$0002
         PHA
         TXA
         STA   [$F3],Y
         PLA
         STA   [$F3]
LC68E    LDA   $E8
         AND   #$4000
         CMP   #$0000
         BNE   LC69C
         LDA   $E8
         BRA   LC6D0
LC69C    LDA   $E8
         STA   $E6
         LDA   $E6
         AND   #$8000
         TAY
         BEQ   LC6BA
         LDA   $E6
         AND   #$BFFF
         STA   $E6
         LDA   $E6
         AND   #$7FFF
         STA   $E6
         STZ   $E8
         BRA   LC6C3
LC6BA    LDA   $E8
         AND   #$BFFF
         STA   $E8
         STZ   $E6
LC6C3    PEI   $E6
         PEI   $E8
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
LC6D0    TAY
         TDC
         CLC
         ADC   #$00ED
         TCS
         TYA
         PLD
         RTL

LC6DA    PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F0
         TCS
         LDAL  LAE0A
         PHA
         LDA   #$0012
         SEC
         JSL   LB472
         PLY
         SEC
         SBC   #$0001
         STA   $F2
         STZ   $F4
         BRA   LC706
LC6FD    PEI   $F4
         JSL   LC446
         PLY
         INC   $F4
LC706    LDA   $F4
         SEC
         SBC   $F2
         BEQ   LC6FD
         BVS   LC712
         EOR   #$8000
LC712    BPL   LC6FD
         TAY
         TDC
         CLC
         ADC   #$00F9
         TCS
         TYA
         PLD
         RTL

LC71E    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDA   LC4F3
         STA   $F2
         LDA   L013C
         STA   $F0
         LDA   LCDE7
         BEQ   LC747
         STZ   LCDE7
         PEA   ^LC93B
         PEA   LC93B
         JSL   LCBFF
         PLY
         PLY
LC747    LDY   #$0010
         LDA   [$FD],Y
         AND   #$0004
         TAY
         BEQ   LC770
         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   LC8A1
LC770    LDY   #$000E
         LDA   [$FD],Y
         CMP   #$0000
         BNE   LC7D8
         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   LC7A2
         LDA   #$0064
         LDY   #$000E
         STA   [$FD],Y
         BRA   LC7D8
LC7A2    PEA   $0000
         TDC
         CLC
         ADC   #$00EE
         PHA
         PEA   $6603
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   LA801
         PLY
         PLY
         PLY
         PLY
         SEC
         SBC   #$0000
         BVS   LC7C5
         EOR   #$8000
LC7C5    BPL   LC7D0
         LDA   $EE
         LDY   #$000E
         STA   [$FD],Y
         BRA   LC7D8
LC7D0    LDA   #$0400
         LDY   #$000E
         STA   [$FD],Y
LC7D8    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   LBD99
         BEQ   LC7F4
         BRL   LC8A1
LC7F4    LDY   #$000E
         LDA   [$FD],Y
         LDX   #$0000
         PHX
         PHA
         JSL   LB149
         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   LBD99
         BNE   LC86C
         LDY   #$000E
         LDA   [$FD],Y
         CMP   #$0064
         BEQ   LC86C
         BCC   LC86C
         LDY   #$000E
         LDA   [$FD],Y
         CMP   #$0400
         BEQ   LC847
         BCC   LC847
         LDA   #$0400
         BRA   LC84A
LC847    LDA   #$0064
LC84A    LDY   #$000E
         STA   [$FD],Y
         LDY   #$000E
         LDA   [$FD],Y
         LDX   #$0000
         PHX
         PHA
         JSL   LB149
         PLY
         PLY
         LDY   #$0008
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0006
         STA   [$FD],Y
LC86C    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   LBD99
         BEQ   LC894
         LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0008
         LDY   #$0010
         STA   [$FD],Y
         BRA   LC8A1
LC894    LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0004
         LDY   #$0010
         STA   [$FD],Y
LC8A1    LDY   #$000E
         LDA   [$FD],Y
         LDX   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   LB28D
         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   LA801
         PLY
         PLY
         PLY
         SEC
         SBC   #$0000
         BVS   LC8FD
         EOR   #$8000
LC8FD    BPL   LC90C
         LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0100
         LDY   #$0010
         STA   [$FD],Y
LC90C    LDA   $F2
         STA   LC4F3
         LDA   $F0
         STA   L013C
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LC920    ASC   '.console'00
LC929    ASC   '.console'00
LC932    ASC   '.console'00
LC93B    PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         LDA   #LB6AE
         LDX   #^LB6AE
         STX   $F6
         STA   $F4
         BRA   LC968
LC952    PEI   $F6
         PEI   $F4
         JSL   LB298
         PLY
         PLY
         LDA   $F4
         CLC
         ADC   #$0014
         STA   $F4
         BCC   LC968
         INC   $F6
LC968    SEC
         LDA   $F4
         SBC   LB073
         BNE   LC977
         LDA   $F6
         SBC   LB073+2
         BRA   LC97E
LC977    LDA   $F6
         SBC   LB073+2
         REP   #$02
LC97E    BVS   LC983
         EOR   #$8000
LC983    BPL   LC952
         TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

LC98F    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   LB5D7
         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   LC9DF
         LDA   #$0000
         BRA   LC9E4
LC9DF    LDY   #$000E
         LDA   [$FD],Y
LC9E4    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   LB5D7
         PLA
         PLX
         PHA
         LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   LCA10
         EOR   #$8000
LCA10    BMI   LCA17
         LDA   #$0000
         BRA   LCA19
LCA17    LDA   [$FD]
LCA19    PLX
         STX   $F4
         SEC
         SBC   $F4
         BEQ   LCA32
         BVS   LCA26
         EOR   #$8000
LCA26    BPL   LCA32
         PEI   $FF
         PEI   $FD
         JSL   LB077
         PLY
         PLY
LCA32    LDA   $EE
         SEC
         SBC   #$0000
         BEQ   LCA6C
         BVS   LCA3F
         EOR   #$8000
LCA3F    BPL   LCA6C
         LDA   $EE
         PHA
         PEI   $F2
         PEI   $F0
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   LD038
         PLY
         PLY
         PLY
         PLY
         CMP   $EE
         BEQ   LCA6C
         LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0020
         LDY   #$0010
         STA   [$FD],Y
         LDA   #$FFFF
         BRA   LCA6F
LCA6C    LDA   #$0000
LCA6F    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LCA79    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDX   $FF
         LDA   $FD
         STX   $F4
         ORA   $F4
         BEQ   LCAE2
         LDX   $FF
         LDA   $FD
         INC   $FD
         BNE   LCA98
         INC   $FF
LCA98    STX   $F0
         STA   $EE
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         STA   $F2
         BRA   LCAD2
LCAA9    LDX   $FF
         LDA   $FD
         INC   $FD
         BNE   LCAB3
         INC   $FF
LCAB3    STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         PHA
         LDX   $F0
         LDA   $EE
         INC   $EE
         BNE   LCAC7
         INC   $F0
LCAC7    STA   $F4
         STX   $F6
         PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
LCAD2    LDA   $F2
         DEC   $F2
         TAY
         BNE   LCAA9
         LDA   #$0000
         SEP   #$20
         STA   [$EE]
         REP   #$20
LCAE2    TDC
         CLC
         ADC   #$00F7
         TCS
         PLD
         RTL

LCAEA    PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F2
         TCS
         STZ   $F4
         LDA   $FF
         BRL   LCBE0
LCAFC    BRL   LCBF3
LCAFF    LDA   #$0014
         STA   $F4
         BRL   LCBF3
LCB07    LDA   #$000E
         STA   $F4
         BRL   LCBF3
LCB0F    LDA   #$001C
         STA   $F4
         BRL   LCBF3
LCB17    LDA   #$0011
         STA   $F4
         BRL   LCBF3
LCB1F    LDA   #$0006
         STA   $F4
         BRL   LCBF3
LCB27    LDA   #$0006
         STA   $F4
         BRL   LCBF3
LCB2F    LDA   #$0010
         STA   $F4
         BRL   LCBF3
LCB37    LDA   #$0002
         STA   $F4
         BRL   LCBF3
LCB3F    LDA   #$0009
         STA   $F4
         BRL   LCBF3
LCB47    LDA   #$0005
         STA   $F4
         BRL   LCBF3
LCB4F    LDA   #$0017
         STA   $F4
         BRL   LCBF3
LCB57    LDA   #$000C
         STA   $F4
         BRL   LCBF3
LCB5F    LDA   #$001A
         STA   $F4
         BRL   LCBF3
LCB67    LDA   #$0016
         STA   $F4
         BRL   LCBF3
LCB6F    LDA   #$000D
         STA   $F4
         BRL   LCBF3
LCB77    LDA   #$001E
         STA   $F4
         BRL   LCBF3
         BRL   LCBF3
LCB82    DA    LCAFC
         DA    LCB47
         DA    LCB77
         DA    LCB07
         DA    LCB4F
         DA    LCB3F
         DA    LCB37
         DA    LCB27
         DA    LCB37
         DA    LCB17
         DA    LCB0F
         DA    LCB0F
         DA    LCAFF
         DA    LCB1F
         DA    LCB27
         DA    LCB6F
         DA    LCB5F
         DA    LCAFF
         DA    LCB67
         DA    LCB57
         DA    LCB2F
         DA    LCB27
         DA    LCB27
         DA    LCAFC
LCBB2    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
LCBE0    TAX
         PEA   ^LCBB2
         PEA   LCBB2
         LDA   #$002C
         JSL   LDAE5
         PLA
         PLA
         JMP   (LCB82,X)

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

LCBFF    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EE
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDAL  LAE04
         TAX
         LDAL  LAE02
         JSL   LBD99
         BNE   LCC32
         LDA   #LCDA3
         LDX   #^LCDA3
         PHA
         TXA
         STAL  LAE04
         PLA
         STAL  LAE02
LCC32    LDAL  LAE06+2
         TAX
         LDAL  LAE06
         STA   $F4
         STX   $F6
         LDX   $F6
         LDA   #$0010
         CLC
         ADC   $F4
         BCC   LCC4A
         INX
LCC4A    STX   $F2
         STA   $F0
         BRA   LCC85
LCC50    LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0002
         LDA   [$F0],Y
         TAX
         LDA   [$F0]
         JSL   LBD99
         BNE   LCC79
         LDX   $FF
         LDA   $FD
         LDY   #$0002
         PHA
         TXA
         STA   [$F0],Y
         PLA
         STA   [$F0]
         LDA   #$0000
         BRA   LCCB3
LCC79    LDA   $F0
         CLC
         ADC   #$0004
         STA   $F0
         BCC   LCC85
         INC   $F2
LCC85    LDAL  LAE06+2
         TAX
         LDAL  LAE06
         STA   $F4
         STX   $F6
         LDX   $F6
         LDA   #$0028
         CLC
         ADC   $F4
         BCC   LCC9D
         INX
LCC9D    PHX
         PHA
         LDX   $F2
         LDA   $F0
         JSL   LBD99
         BEQ   LCCB0
         BVS   LCCAE
         EOR   #$8000
LCCAE    BMI   LCC50
LCCB0    LDA   #$0001
LCCB3    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LCCBD    PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E8
         TCS
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   LCCD3
         EOR   #$8000
LCCD3    BMI   LCCE7
         PEA   $0000
         PEA   $0016
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
         BRL   LCD99
LCCE7    PEA   $0000
         TDC
         CLC
         ADC   #$00F9
         PHA
         JSL   LBE1E
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         JSL   LBD99
         BNE   LCD12
         LDA   #$FFFF
         BRL   LCD99
LCD12    LDA   [$EC]
         AND   #$0001
         TAY
         BNE   LCD2B
         PEA   $0000
         PEA   $0009
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
         BRA   LCD99
LCD2B    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   LBAD7
         PLY
         PLY
         STA   $EA
         LDA   $EA
         CMP   #$0000
         BEQ   LCD8B
         LDY   #$0002
         LDA   [$EC],Y
         PHA
         PEI   $EA
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
         BRA   LCD99
LCD8B    LDY   #$000C
         LDA   [$EC],Y
         PHA
         LDA   $FF
         PLX
         STX   $F0
         SEC
         SBC   $F0
LCD99    TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

LCDA3    DW    $0000
         DW    $FFFF
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
         ADRL  LD589
LCDE7    DW    $0001
LCDE9    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   LBD99
         BEQ   LCE8D
         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   LCE49
         LDA   $FF
         SBC   $EA
         BRA   LCE4F
LCE49    LDA   $FF
         SBC   $EA
         REP   #$02
LCE4F    BVS   LCE54
         EOR   #$8000
LCE54    BMI   LCE7E
         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   LCF9E
LCE7E    PEI   $EE
         PEI   $EC
         _HUnlock
         STAL  L013C
LCE8D    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   LCEE5
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         JSL   LBD99
         BEQ   LCEDC
         PEI   $EE
         PEI   $EC
         _HLock
         STAL  L013C
LCEDC    LDX   #$0000
         LDA   #$0000
         BRL   LCF9E
LCEE5    PEI   $E6
         PEI   $E4
         _HLock
         STAL  L013C
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $FB
         LDA   $F9
         JSL   LBD99
         BEQ   LCF38
         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
LCF38    LDX   $EA
         LDA   $E8
         PHX
         PHA
         LDY   #$0002
         LDA   [$E4],Y
         TAX
         LDA   [$E4]
         JSL   LB28D
         PLA
         PLX
         STX   $E2
         STA   $E0
LCF50    LDX   $FF
         LDA   $FD
         PHX
         PHA
         LDY   #$0002
         LDA   [$E4],Y
         TAX
         LDA   [$E4]
         JSL   LB28D
         LDX   $E2
         LDA   $E0
         JSL   LBD99
         BEQ   LCF8C
         BVS   LCF71
         EOR   #$8000
LCF71    BPL   LCF8C
         LDX   $E2
         LDA   $E0
         INC   $E0
         BNE   LCF7D
         INC   $E2
LCF7D    STA   $F0
         STX   $F2
         LDA   #$0000
         SEP   #$20
         STA   [$F0]
         REP   #$20
         BRA   LCF50
LCF8C    LDY   #$0002
         LDA   [$E4],Y
         TAX
         LDA   [$E4]
         AND   #$FFFF
         PHA
         TXA
         AND   #$00FF
         TAX
         PLA
LCF9E    TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

LCFA8    ASC   'SYSF'
         ADRL  LDDE4
         ADRL  LD136
         ADRL  LDC2F
         ADRL  LD760
         ADRL  LD1E1
         ASC   'SNOC'
         ADRL  LDD85
         ADRL  LD020
         ADRL  LDB3A
         ADRL  LD601
         ADRL  LD11E
         ASC   'TSYS'
         ADRL  LDF6A
         ADRL  LD748
         ADRL  LDD6D
         ADRL  LDA99
         ADRL  LD92E
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
LD020    PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F6
         TCS
         LDA   #$0000
         TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

LD038    PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E8
         TCS
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   LD04E
         EOR   #$8000
LD04E    BMI   LD062
         PEA   $0000
         PEA   $0016
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
         BRL   LD114
LD062    PEA   $0000
         TDC
         CLC
         ADC   #$00F9
         PHA
         JSL   LBE1E
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         JSL   LBD99
         BNE   LD08D
         LDA   #$FFFF
         BRL   LD114
LD08D    LDA   [$EC]
         AND   #$0002
         TAY
         BNE   LD0A6
         PEA   $0000
         PEA   $0009
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
         BRA   LD114
LD0A6    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   LBAD7
         PLY
         PLY
         STA   $EA
         LDA   $EA
         CMP   #$0000
         BEQ   LD106
         LDY   #$0002
         LDA   [$EC],Y
         PHA
         PEI   $EA
         JSL   LC0ED
         PLY
         PLY
         LDA   #$FFFF
         BRA   LD114
LD106    LDY   #$000C
         LDA   [$EC],Y
         PHA
         LDA   $FF
         PLX
         STX   $F0
         SEC
         SBC   $F0
LD114    TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

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

LD136    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   LD16E
         BVS   LD16C
         EOR   #$8000
LD16C    BMI   LD1C7
LD16E    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  LBBF0
         PEA   $0014
         PEA   ^LBBF0
         PEA   LBBF0
         JSL   LBA99
         LDA   L013C
         CMP   #$0000
         BEQ   LD1AF
         LDA   L013C
         LDY   #$0002
         STA   [$FD],Y
LD1AF    LDY   #$000A
         LDA   [$FD],Y
         TAX
         LDY   #$0008
         LDA   [$FD],Y
         PHX
         PHA
         _DisposeHandle
         STAL  L013C
LD1C7    LDA   L013C
         CMP   #$0000
         BNE   LD1D4
         LDA   #$0000
         BRA   LD1D7
LD1D4    LDA   #$0009
LD1D7    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LD1E1    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E8
         TCS
         LDA   $FB
         BRL   LD54E
LD1F1    LDA   #$0000
         LDY   #$0002
         STA   [$F7],Y
         LDA   #$0016
         BRL   LD57F
LD1FF    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  LBC04
         PEA   $0019
         PEA   ^LBC04
         PEA   LBC04
         JSL   LBA99
         LDA   L013C
         CMP   #$0000
         BEQ   LD242
         LDA   #$001D
         BRL   LD57F
LD242    LDA   $EC
         STAL  LBBFE
         LDA   [$FD]
         BRL   LD2EB
LD24D    LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHA
         TXA
         STAL  LBC02
         PLA
         STAL  LBC00
         BRL   LD2F8
LD266    PEA   $0017
         PEA   ^LBBFE
         PEA   LBBFE
         JSL   LBA99
         LDA   L013C
         CMP   #$0000
         BEQ   LD27E
         BRL   LD2F8
LD27E    LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         LDAL  LBC02
         TAX
         LDAL  LBC00
         JSL   LB28D
         PLA
         PLX
         PHA
         TXA
         STAL  LBC02
         PLA
         STAL  LBC00
         BRL   LD2F8
LD2A8    LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         LDAL  LBC08
         TAX
         LDAL  LBC06
         JSL   LB28D
         PLA
         PLX
         PHA
         TXA
         STAL  LBC02
         PLA
         STAL  LBC00
         BRL   LD2F8
LD2D2    LDA   #$0000
         LDY   #$0002
         STA   [$F7],Y
         LDA   #$0016
         BRL   LD57F
         BRL   LD2F8
LD2E3    DA    LD24D
         DA    LD266
         DA    LD2A8
         DA    LD2D2
LD2EB    CMP   #$0003
         BCC   LD2F3
         LDA   #$0003
LD2F3    ASL
         TAX
         JMP   (LD2E3,X)

LD2F8    LDA   L013C
         CMP   #$0000
         BEQ   LD30A
         LDA   [$FD]
         CMP   #$0000
         BEQ   LD30A
         BRL   LD39C
LD30A    SEC
         LDAL  LBC00
         SBCL  LBC06
         BNE   LD31F
         LDAL  LBC02
         SBCL  LBC08
         BRA   LD329
LD31F    LDAL  LBC02
         SBCL  LBC08
         REP   #$02
LD329    BNE   LD32E
         BRL   LD38F
LD32E    BVS   LD333
         EOR   #$8000
LD333    BMI   LD338
         BRL   LD38F
LD338    LDA   [$FD]
         CMP   #$0002
         BEQ   LD360
         LDA   $EC
         STAL  LBC04
         PEA   $0019
         PEA   ^LBC04
         PEA   LBC04
         JSL   LBA99
         LDA   L013C
         CMP   #$0000
         BEQ   LD360
         LDA   #$001D
         BRL   LD57F
LD360    LDAL  LBC02
         TAX
         LDAL  LBC00
         PHA
         TXA
         STAL  LBC08
         PLA
         STAL  LBC06
         PEA   $0018
         PEA   ^LBC04
         PEA   LBC04
         JSL   LBA99
         LDA   L013C
         CMP   #$0000
         BEQ   LD38F
         LDA   #$001D
         BRL   LD57F
LD38F    PEA   $0016
         PEA   ^LBBFE
         PEA   LBBFE
         JSL   LBA99
LD39C    LDA   L013C
         CMP   #$0000
         BEQ   LD3B2
         LDA   L013C
         LDY   #$0002
         STA   [$F7],Y
         LDA   #$001D
         BRL   LD57F
LD3B2    LDAL  LBC02
         TAX
         LDAL  LBC00
         LDY   #$0004
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0002
         STA   [$FD],Y
         BRL   LD55F
LD3CB    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   LD55F
LD3EE    LDA   #$0000
         LDY   #$0002
         STA   [$F7],Y
         LDA   #$0016
         BRL   LD57F
LD3FC    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   LD55F
LD421    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  LBC04
         PEA   $0019
         PEA   ^LBC04
         PEA   LBC04
         JSL   LBA99
         LDAL  LBC08
         TAX
         LDAL  LBC06
         LDY   #$0002
         PHA
         TXA
         STA   [$FD],Y
         PLA
         STA   [$FD]
         BRL   LD55F
LD468    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  LBC04
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBC08
         PLA
         STAL  LBC06
         PEA   $0018
         PEA   ^LBC04
         PEA   LBC04
         JSL   LBA99
         BRL   LD55F
LD4AB    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  LBBFE
         PEA   $0017
         PEA   ^LBBFE
         PEA   LBBFE
         JSL   LBA99
         LDAL  LBC02
         TAX
         LDAL  LBC00
         LDY   #$0002
         PHA
         TXA
         STA   [$FD],Y
         PLA
         STA   [$FD]
         BRL   LD55F
LD4F2    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  LBBFE
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBC02
         PLA
         STAL  LBC00
         PEA   $0016
         PEA   ^LBBFE
         PEA   LBBFE
         JSL   LBA99
         BRL   LD55F
         BRL   LD55F
LD538    DA    LD1FF
         DA    LD3CB
         DA    LD1F1
         DA    LD3EE
         DA    LD1F1
         DA    LD3FC
         DA    LD468
         DA    LD421
         DA    LD4F2
         DA    LD4AB
         DA    LD1F1
LD54E    SEC
         SBC   #$6600
         CMP   #$000A
         BCC   LD55A
         LDA   #$000A
LD55A    ASL
         TAX
         JMP   (LD538,X)

LD55F    LDA   L013C
         CMP   #$0000
         BEQ   LD56F
         LDA   L013C
         LDY   #$0002
         STA   [$F7],Y
LD56F    LDA   L013C
         CMP   #$0000
         BNE   LD57C
         LDA   #$0000
         BRA   LD57F
LD57C    LDA   #$0016
LD57F    TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

LD589    PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EE
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDAL  LAE04
         TAX
         LDAL  LAE02
         JSL   LBD99
         BNE   LD5BC
         LDA   #LCDA3
         LDX   #^LCDA3
         PHA
         TXA
         STAL  LAE04
         PLA
         STAL  LAE02
LD5BC    LDAL  LAE04
         TAX
         LDAL  LAE02
         STA   $F2
         STX   $F4
         LDA   #$0000
         LDY   #$0002
         STA   [$F2],Y
         LDA   #$0001
         STA   $F0
         BRA   LD5DF
LD5D8    LDA   $FB
         LSR
         STA   $FB
         INC   $F0
LD5DF    LDA   $FB
         AND   #$0001
         CMP   #$0000
         BEQ   LD5D8
         LDA   $F0
         PHA
         LDA   #$0018
         CLC
         JSL   LDB2B
         JSL   LB9E7
         PLY
         TDC
         CLC
         ADC   #$00F5
         TCS
         PLD
         RTL

LD601    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   LD69D
         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   LD671
         DEC   $F6
LD671    CLC
         ADC   $F4
         STA   $F4
         BCC   LD67A
         INC   $F6
LD67A    LDA   [$F4]
         AND   #$00FF
         CMP   #$000A
         BNE   LD69B
         PEA   ^LD995
         PEA   LD995
         PEA   $0000
         PEA   $0001
         _ErrWriteBlock
         STAL  L013C
LD69B    BRA   LD707
LD69D    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   LD6DD
         DEC   $F6
LD6DD    CLC
         ADC   $F4
         STA   $F4
         BCC   LD6E6
         INC   $F6
LD6E6    LDA   [$F4]
         AND   #$00FF
         CMP   #$000A
         BNE   LD707
         PEA   ^LD997
         PEA   LD997
         PEA   $0000
         PEA   $0001
         _TextWriteBlock
         STAL  L013C
LD707    LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   LD713
         DEX
LD713    PHX
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         JSL   LB28D
         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

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

LD760    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDA   [$FD]
         AND   #$0008
         TAY
         BNE   LD776
         BRL   LD80D
LD776    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  LBC04
         PEA   $0019
         PEA   ^LBC04
         PEA   LBC04
         JSL   LBA99
         LDA   L013C
         CMP   #$0000
         BEQ   LD7B2
         BRL   LD80D
LD7B2    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  LBBFE
         LDAL  LBC08
         TAX
         LDAL  LBC06
         PHA
         TXA
         STAL  LBC02
         PLA
         STAL  LBC00
         PEA   $0016
         PEA   ^LBBFE
         PEA   LBBFE
         JSL   LBA99
         LDA   L013C
         CMP   #$0000
         BEQ   LD80D
         LDA   L013C
         LDY   #$0002
         STA   [$FD],Y
         LDA   #$001D
         BRL   LD924
LD80D    LDA   [$FD]
         AND   #$0020
         TAY
         BNE   LD85D
         LDY   #$000C
         LDA   [$FD],Y
         STA   $F2
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         STX   $F0
         STA   $EE
         BRA   LD84E
LD82D    LDA   [$EE]
         AND   #$00FF
         CMP   #$000A
         BNE   LD840
         LDA   #$000D
         SEP   #$20
         STA   [$EE]
         REP   #$20
LD840    LDA   $F2
         DEC   $F2
         LDX   $F0
         LDA   $EE
         INC   $EE
         BNE   LD84E
         INC   $F0
LD84E    LDA   $F2
         SEC
         SBC   #$0000
         BEQ   LD85D
         BVS   LD85B
         EOR   #$8000
LD85B    BMI   LD82D
LD85D    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  LBBF0
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   LD88D
         DEX
LD88D    PHA
         TXA
         STAL  LBBF8
         PLA
         STAL  LBBF6
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         PHA
         TXA
         STAL  LBBF4
         PLA
         STAL  LBBF2
         PEA   $0013
         PEA   ^LBBF0
         PEA   LBBF0
         JSL   LBA99
         LDA   L013C
         CMP   #$0000
         BNE   LD90C
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   LD8CF
         DEX
LD8CF    SEC
         SBCL  LBBFA
         PHA
         TXA
         SBCL  LBBFC
         TAX
         PLA
         LDY   #$000C
         STA   [$FD],Y
         LDAL  LBBFC
         TAX
         LDAL  LBBFA
         PHX
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         JSL   LB28D
         PLA
         PLX
         LDY   #$0010
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$000E
         STA   [$FD],Y
         BRA   LD914
LD90C    LDA   L013C
         LDY   #$0002
         STA   [$FD],Y
LD914    LDA   L013C
         CMP   #$0000
         BNE   LD921
         LDA   #$0000
         BRA   LD924
LD921    LDA   #$0005
LD924    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LD92E    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EC
         TCS
         LDA   $FB
         BRL   LD971
LD93E    LDA   #$0000
         STA   [$FD]
         LDX   #$0000
         LDA   #$0000
         LDY   #$0004
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0002
         STA   [$FD],Y
         LDA   #$0000
         BRL   LD982
LD95C    LDA   #$0000
         BRL   LD982
LD962    LDA   #$0016
         BRL   LD982
         BRL   LD982
LD96B    DA    LD93E
         DA    LD95C
         DA    LD962
LD971    SEC
         SBC   #$6600
         CMP   #$0002
         BCC   LD97D
         LDA   #$0002
LD97D    ASL
         TAX
         JMP   (LD96B,X)

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

LD98C    ASC   '.console'00
LD995    ASC   0D00
LD997    ASC   0D00
LD999    DS    $100
LDA99    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   LDAB0
         DEX
LDAB0    PHX
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         JSL   LB28D
         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

LDAE5    TAY
         PHB
         LDA   $06,S
         PHA
         PLB
         PLB
         PHY
         PHY
         PEA   $0000
         TXA
         CMP   ($0B,S),Y
         BEQ   LDB25
         LDY   #$0000
         CMP   ($0B,S),Y
         BEQ   LDB25
         BRA   LDB02
LDAFF    TYA
         STA   $03,S
LDB02    LDA   $03,S
         CMP   $01,S
         BEQ   LDB20
         CLC
         ADC   $01,S
         LSR
         AND   #$00FE
         CMP   $01,S
         BEQ   LDB20
         TAY
         TXA
         CMP   ($0B,S),Y
         BEQ   LDB25
         BCC   LDAFF
         TYA
         STA   $01,S
         BRA   LDB02
LDB20    LDA   $05,S
         INC
         INC
         TAY
LDB25    TYX
         PLA
         PLA
         PLA
         PLB
         RTL

LDB2B    CMP   #$0000
         BEQ   LDB39
         TAX
         LDA   $04,S
LDB33    ASL
         DEX
         BNE   LDB33
         STA   $04,S
LDB39    RTL

LDB3A    PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDA   LDF64
         SEC
         SBC   #$0000
         BEQ   LDB55
         BVS   LDB53
         EOR   #$8000
LDB53    BMI   LDB74
LDB55    PEA   $0100
         PEA   ^LD999
         PEA   LD999
         JSL   LE114
         PLY
         PLY
         PLY
         STA   LDF64
         LDA   #LD999
         LDX   #^LD999
         STX   LDF68
         STA   LDF66
LDB74    LDY   #$000C
         LDA   [$FD],Y
         SEC
         SBC   #$0000
         BNE   LDB82
         BRL   LDC22
LDB82    BVS   LDB87
         EOR   #$8000
LDB87    BMI   LDB8C
         BRL   LDC22
LDB8C    LDA   LDF64
         SEC
         SBC   #$0000
         BNE   LDB98
         BRL   LDC22
LDB98    BVS   LDB9D
         EOR   #$8000
LDB9D    BMI   LDBA2
         BRL   LDC22
LDBA2    LDX   LDF68
         LDA   LDF66
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         CMP   #$0000
         BNE   LDBB9
         BRL   LDC22
LDBB9    LDX   LDF68
         LDA   LDF66
         PHX
         PHA
         CLC
         ADC   #$0001
         STA   LDF66
         LDA   LDF68
         BCC   LDBCE
         INC
LDBCE    STA   LDF68
         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   LDBFB
         INC
LDBFB    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   LDF64
         DEC
         STA   LDF64
         BRL   LDB74
LDC22    LDA   #$0000
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

LDC2F    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  LBBF0
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   LDC6A
         DEX
LDC6A    PHA
         TXA
         STAL  LBBF8
         PLA
         STAL  LBBF6
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         PHA
         TXA
         STAL  LBBF4
         PLA
         STAL  LBBF2
         PEA   $0012
         PEA   ^LBBF0
         PEA   LBBF0
         JSL   LBA99
         LDA   [$FD]
         AND   #$0020
         TAY
         BNE   LDCEC
         LDAL  LBBFC
         TAX
         LDAL  LBBFA
         STA   $F0
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         STX   $EE
         STA   $EC
         BRA   LDCDD
LDCBC    LDA   [$EC]
         AND   #$00FF
         CMP   #$000D
         BNE   LDCCF
         LDA   #$000A
         SEP   #$20
         STA   [$EC]
         REP   #$20
LDCCF    LDA   $F0
         DEC   $F0
         LDX   $EE
         LDA   $EC
         INC   $EC
         BNE   LDCDD
         INC   $EE
LDCDD    LDA   $F0
         SEC
         SBC   #$0000
         BEQ   LDCEC
         BVS   LDCEA
         EOR   #$8000
LDCEA    BMI   LDCBC
LDCEC    LDA   L013C
         CMP   #$004C
         BNE   LDCF8
         STZ   $F2
         BRA   LDCFD
LDCF8    LDA   L013C
         STA   $F2
LDCFD    LDA   $F2
         CMP   #$0000
         BNE   LDD4D
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   LDD10
         DEX
LDD10    SEC
         SBCL  LBBFA
         PHA
         TXA
         SBCL  LBBFC
         TAX
         PLA
         LDY   #$000C
         STA   [$FD],Y
         LDAL  LBBFC
         TAX
         LDAL  LBBFA
         PHX
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         JSL   LB28D
         PLA
         PLX
         LDY   #$0010
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$000E
         STA   [$FD],Y
         BRA   LDD54
LDD4D    LDA   $F2
         LDY   #$0002
         STA   [$FD],Y
LDD54    LDA   $F2
         CMP   #$0000
         BNE   LDD60
         LDA   #$0000
         BRA   LDD63
LDD60    LDA   #$0005
LDD63    TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

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

LDD85    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EC
         TCS
         LDA   #$0000
         BEQ   LDD9A
         LDA   #$0000
         BRA   LDD9D
LDD9A    LDA   #$0001
LDD9D    PHA
         PEA   $0000
         PEA   ^LD98C
         PEA   LD98C
         PEI   $F9
         PEI   $F7
         JSL   LB19B
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BNE   LDDC0
         LDA   #$FFFF
         BRL   LDDDA
LDDC0    LDA   $FB
         BRL   LDDD2
LDDC5    LDA   #$4016
         BRL   LDDDA
LDDCB    LDA   #$0000
         BRA   LDDDA
         BRA   LDDDA
LDDD2    CMP   #$6400
         BEQ   LDDCB
         JMP   LDDC5

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

LDDE4    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EC
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F9
         LDA   $F7
         JSL   LBD99
         BEQ   LDE0B
         LDA   [$F7]
         AND   #$00FF
         CMP   #$0000
         BNE   LDE11
LDE0B    LDA   #$4016
         BRL   LDF5A
LDE11    LDA   $FB
         BRL   LDF27
LDE16    LDA   #$4016
         BRL   LDF5A
LDE1C    PEI   $F9
         PEI   $F7
         PEI   $FF
         PEI   $FD
         JSL   LE274
         PLY
         PLY
         PLY
         PLY
         BRL   LDF5A
LDE2F    PEI   $F9
         PEI   $F7
         JSL   LB0E3
         PLY
         PLY
         LDX   $F9
         LDA   $F7
         PHA
         TXA
         STAL  LBBC6
         PLA
         STAL  LBBC4
         PEA   $0002
         PEA   ^LBBC4
         PEA   LBBC4
         JSL   LBA99
         PEI   $F9
         PEI   $F7
         JSL   LCA79
         PLY
         PLY
         BRL   LDF38
LDE62    PEI   $F9
         PEI   $F7
         JSL   LB0E3
         PLY
         PLY
         PEI   $FF
         PEI   $FD
         JSL   LB0E3
         PLY
         PLY
         LDX   $F9
         LDA   $F7
         PHA
         TXA
         STAL  LBBC6
         PLA
         STAL  LBBC4
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBBCA
         PLA
         STAL  LBBC8
         PEA   $0004
         PEA   ^LBBC4
         PEA   LBBC4
         JSL   LBA99
         PEI   $F9
         PEI   $F7
         JSL   LCA79
         PLY
         PLY
         PEI   $FF
         PEI   $FD
         JSL   LCA79
         PLY
         PLY
         BRL   LDF38
LDEB8    PEI   $F9
         PEI   $F7
         JSL   LB0E3
         PLY
         PLY
         LDX   $F9
         LDA   $F7
         PHA
         TXA
         STAL  LBBCE
         PLA
         STAL  LBBCC
         PEA   $0006
         PEA   ^LBBCC
         PEA   LBBCC
         JSL   LBA99
         LDA   $FB
         CMP   #$6403
         BNE   LDEEF
         LDX   $FF
         LDA   $FD
         STAL  LBBD2
         BRA   LDEFE
LDEEF    LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBBD6
         PLA
         STAL  LBBD4
LDEFE    PEA   $0005
         PEA   ^LBBCC
         PEA   LBBCC
         JSL   LBA99
         PEI   $F9
         PEI   $F7
         JSL   LCA79
         PLY
         PLY
         BRL   LDF38
         BRL   LDF38
LDF1B    DA    LDE1C
         DA    LDE2F
         DA    LDE62
         DA    LDEB8
         DA    LDEB8
         DA    LDE16
LDF27    SEC
         SBC   #$6400
         CMP   #$0005
         BCC   LDF33
         LDA   #$0005
LDF33    ASL
         TAX
         JMP   (LDF1B,X)

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

LDF64    DW    $0000
LDF66    DW    $0000
LDF68    DW    $0000
LDF6A    PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E6
         TCS
         LDA   #$0000
         BEQ   LDF7F
         LDA   #$0000
         BRA   LDF82
LDF7F    LDA   #$0001
LDF82    PHA
         PEA   $0000
         PEA   ^LE257
         PEA   LE257
         PEI   $F9
         PEI   $F7
         JSL   LB19B
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BEQ   LDFA5
         LDA   #$0000
         BRL   LE10A
LDFA5    LDA   #$0000
         BEQ   LDFAF
         LDA   #$0000
         BRA   LDFB2
LDFAF    LDA   #$0001
LDFB2    PHA
         PEA   $0000
         PEA   ^LE25D
         PEA   LE25D
         PEI   $F9
         PEI   $F7
         JSL   LB19B
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BEQ   LDFD4
         STZ   $EC
         BRL   LE03C
LDFD4    LDA   #$0000
         BEQ   LDFDE
         LDA   #$0000
         BRA   LDFE1
LDFDE    LDA   #$0001
LDFE1    PHA
         PEA   $0000
         PEA   ^LE264
         PEA   LE264
         PEI   $F9
         PEI   $F7
         JSL   LB19B
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BEQ   LE005
         LDA   #$0001
         STA   $EC
         BRA   LE03C
LE005    LDA   #$0000
         BEQ   LE00F
         LDA   #$0000
         BRA   LE012
LE00F    LDA   #$0001
LE012    PHA
         PEA   $0000
         PEA   ^LE26C
         PEA   LE26C
         PEI   $F9
         PEI   $F7
         JSL   LB19B
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BEQ   LE036
         LDA   #$0002
         STA   $EC
         BRA   LE03C
LE036    LDA   #$FFFF
         BRL   LE10A
LE03C    LDA   $FB
         CMP   #$6400
         BEQ   LE049
         LDA   #$4016
         BRL   LE10A
LE049    LDA   [$FD]
         AND   #$0500
         CMP   #$0500
         BNE   LE059
         LDA   #$4011
         BRL   LE10A
LE059    PEA   $0000
         TDC
         CLC
         ADC   #$00EC
         PHA
         JSL   LBE1E
         PLY
         PLY
         STX   $EA
         STA   $E8
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EA
         LDA   $E8
         JSL   LBD99
         BNE   LE084
         LDA   #$4009
         BRL   LE10A
LE084    LDA   [$FD]
         PHA
         LDA   [$E8]
         PLX
         STX   $EE
         AND   $EE
         AND   #$0003
         PHA
         LDA   [$FD]
         AND   #$0003
         PLX
         STX   $EE
         CMP   $EE
         BEQ   LE0A3
         LDA   #$400D
         BRA   LE10A
LE0A3    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   LBAD7
         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
LE10A    TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

LE114    PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00ED
         TCS
         STZ   $F0
LE121    LDA   $F0
         SEC
         SBC   $FF
         BVS   LE12B
         EOR   #$8000
LE12B    BPL   LE130
         BRL   LE24B
LE130    PHA
         PEA   $0001
         _ReadChar
         STAL  L013C
         PLA
         SEP   #$20
         STA   $EF
         REP   #$20
         AND   #$00FF
         PHA
         LDX   $FD
         LDA   $FB
         INC   $FB
         BNE   LE154
         INC   $FD
LE154    STA   $F2
         STX   $F4
         PLA
         SEP   #$20
         STA   [$F2]
         REP   #$20
         INC   $F0
         LDA   $EF
         AND   #$00FF
         CMP   #$000D
         BNE   LE19B
         LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDX   $FD
         LDA   $FB
         JSL   LB5D7
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$000A
         SEP   #$20
         STA   [$F2]
         REP   #$20
         PEA   $000A
         _WriteChar
         STAL  L013C
         BRL   LE24B
LE19B    LDA   $EF
         AND   #$00FF
         CMP   #$0000
         BNE   LE1C4
         PEA   $000D
         _WriteChar
         STAL  L013C
         PEA   $000A
         _WriteChar
         STAL  L013C
         BRL   LE24B
LE1C4    LDA   $EF
         AND   #$00FF
         CMP   #$007F
         BEQ   LE1D1
         BRL   LE248
LE1D1    LDA   $FB
         BNE   LE1D7
         DEC   $FD
LE1D7    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   LE248
         BVS   LE212
         EOR   #$8000
LE212    BPL   LE248
         LDA   $FB
         BNE   LE21A
         DEC   $FD
LE21A    DEC   $FB
         DEC   $F0
         PEA   $0008
         _WriteChar
         STAL  L013C
         PEA   $0020
         _WriteChar
         STAL  L013C
         PEA   $0008
         _WriteChar
         STAL  L013C
LE248    BRL   LE121
LE24B    LDA   $F0
         TAY
         TDC
         CLC
         ADC   #$00F5
         TCS
         TYA
         PLD
         RTL

LE257    ASC   '.null'00
LE25D    ASC   '.stdin'00
LE264    ASC   '.stdout'00
LE26C    ASC   '.stderr'00
LE274    PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E8
         TCS
         STZ   $EC
         PEI   $FF
         PEI   $FD
         JSL   LB0E3
         PLY
         PLY
         LDA   [$F9]
         STA   $EE
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBBCE
         PLA
         STAL  LBBCC
         PEA   $0006
         PEA   ^LBBCC
         PEA   LBBCC
         JSL   LBA99
         LDA   L013C
         CMP   #$0000
         BEQ   LE2B6
         BRL   LE36C
LE2B6    LDA   $EE
         AND   #$0500
         CMP   #$0500
         BNE   LE2C8
         LDA   #$0011
         STA   $EC
         BRL   LE369
LE2C8    LDA   $EE
         AND   #$0001
         TAY
         BEQ   LE2DA
         LDAL  LBBD0
         AND   #$0001
         TAY
         BEQ   LE2EC
LE2DA    LDA   $EE
         AND   #$0002
         TAY
         BEQ   LE2F4
         LDAL  LBBD0
         AND   #$0002
         TAY
         BNE   LE2F4
LE2EC    LDA   #$000D
         STA   $EC
         BRL   LE369
LE2F4    LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBBEA
         PLA
         STAL  LBBE8
         PEA   $0010
         PEA   ^LBBE6
         PEA   LBBE6
         JSL   LBA99
         LDA   L013C
         CMP   #$0000
         BEQ   LE31B
         BRL   LE369
LE31B    LDA   $EE
         AND   #$0200
         TAY
         BNE   LE326
         BRL   LE369
LE326    LDX   #$0000
         LDA   #$0000
         PHA
         TXA
         STAL  LBC08
         PLA
         STAL  LBC06
         LDAL  LBBE6
         STAL  LBC04
         PEA   $0018
         PEA   ^LBC04
         PEA   LBC04
         JSL   LBA99
         LDA   L013C
         CMP   #$0000
         BEQ   LE369
         LDAL  LBBE6
         STAL  LBBF0
         PEA   $0014
         PEA   ^LBBF0
         PEA   LBBF0
         JSL   LBA99
LE369    BRL   LE412
LE36C    LDA   L013C
         CMP   #$0046
         BEQ   LE377
         BRL   LE412
LE377    LDA   $EE
         AND   #$0100
         TAY
         BNE   LE382
         BRL   LE412
LE382    LDAL  LBBD0
         ORA   #$00C3
         STAL  LBBD0
         LDA   $EE
         AND   #$0020
         TAY
         BEQ   LE39E
         LDA   #$0000
         STAL  LBBD2
         BRA   LE3A5
LE39E    LDA   #$0004
         STAL  LBBD2
LE3A5    LDA   #$0000
         STAL  LBBDC
         STAL  LBBDA
         PEA   $0001
         PEA   ^LBBCC
         PEA   LBBCC
         JSL   LBA99
         LDA   L013C
         CMP   #$0000
         BEQ   LE3C8
         BRL   LE412
LE3C8    LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBBEA
         PLA
         STAL  LBBE8
         PEA   $0010
         PEA   ^LBBE6
         PEA   LBBE6
         JSL   LBA99
         LDA   L013C
         STA   $EA
         LDA   L013C
         CMP   #$0000
         BEQ   LE412
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  LBBC6
         PLA
         STAL  LBBC4
         PEA   $0002
         PEA   ^LBBC4
         PEA   LBBC4
         JSL   LBA99
         LDA   $EA
         STA   L013C
LE412    PEI   $FF
         PEI   $FD
         JSL   LCA79
         PLY
         PLY
         LDA   L013C
         CMP   #$0000
         BEQ   LE43C
         LDA   L013C
         PHA
         LDA   #$8000
         PLX
         STX   $F0
         ORA   $F0
         STA   $EC
         LDA   L013C
         LDY   #$0002
         STA   [$F9],Y
         BRA   LE44B
LE43C    LDA   $EC
         CMP   #$0000
         BEQ   LE44B
         LDA   #$0000
         LDY   #$0002
         STA   [$F9],Y
LE44B    LDA   $EC
         CMP   #$0000
         BNE   LE4C8
         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  LBBE6
         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]
LE4C8    LDA   $EC
         CMP   #$0000
         BNE   LE4D4
         LDA   #$0000
         BRA   LE4DF
LE4D4    LDA   $EC
         PHA
         LDA   #$4000
         PLX
         STX   $F0
         ORA   $F0
LE4DF    TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

