*
* The Adventures of Sinbad
*
* (c) 1988, Unicorn Software
* (s) 2021, Antoine Vignau
*

	mx	%00
	rel
	dsk	SINBAD.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   #^L010150
         PHA
         PLB
         REP   #$20
         PLA
         STA   L01013E
         STX   L010156
         STY   L010154
         TSX
         STX   L010150
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F4
         TCS
         PHA
         _MMStartUp
         STAL  L01013C
         PLA
         PHX
         PHA
         PEA   $0000
         PEA   $0100
         LDA   L01013E
         PHA
         PEA   $C011
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L01013C
         PLA
         PLX
         STX   L01015A
         STA   L010158
         STX   $F8
         ORA   $F8
         BNE   L010071
         PEA   ^L01015C
         PEA   L01015C
         _WriteCString
         STAL  L01013C
         BRL   L010130
L010071  LDX   L01015A
         LDA   L010158
         STA   $F8
         STX   $FA
         LDY   #$0002
         LDA   [$F8],Y
         TAX
         LDA   [$F8]
         STA   $F6
         PEI   $F6
         _SANEStartUp
         LDX   L010156
         LDA   L010154
         PHX
         PHA
         JSL   L01A6F5
         PLY
         PLY
         PEA   $0000
         LDA   L01BE03
         PHA
         JSL   L01B589
         PLY
         PLY
         PEA   ^L01017C
         PEA   L01017C
         JSL   L01B305
         PLY
         PLY
         TAY
         BNE   L0100D3
         LDX   L010144
         LDA   L010142
         PHX
         PHA
         LDA   L010140
         PHA
         JSL   L01018A
         PLY
         PLY
         PLY
         PEA   $0000
         JSL   L01B732
         PLY
L0100D3  LDA   L01013E
         ORA   #$0F00
         PHA
         _DisposeAll
         STAL  L01013C
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   L01014E
         LDA   L01014C
         JSL   L01BAE4
         BEQ   L010107
         LDX   L01014E
         LDA   L01014C
         PHX
         PHA
         JSL   L01AE2E
         PLY
         PLY
L010107  LDX   L01014E
         LDA   L01014C
         PHA
         TXA
         STAL  L010186
         PLA
         STAL  L010184
         LDA   L01013A
         STAL  L010188
         LDA   L01014A
         PHA
         PEA   ^L010184
         PEA   L010184
         JSL   L01BDEA
         PLY
         PLY
         PLY
L010130  TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

L01013A  DB    $00
         DB    $00
L01013C  DB    $00
         DB    $00
L01013E  DB    $00
         DB    $00
L010140  DB    $00
         DB    $00
L010142  DB    $00
         DB    $00
L010144  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01014A  DB    $00
         DB    $00
L01014C  DB    $00
         DB    $00
L01014E  DB    $00
         DB    $00
L010150  DB    $00
         DB    $00
         DB    $00
         DB    $00
L010154  DB    $00
         DB    $00
L010156  DB    $00
         DB    $00
L010158  DB    $00
         DB    $00
L01015A  DB    $00
         DB    $00
L01015C  ASC   'Can'27't allocate SANE direct page'00
L01017C  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L010184  DB    $00
         DB    $00
L010186  DB    $00
         DB    $00
L010188  DB    $00
         DB    $00
L01018A  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F6
         TCS
         JSL   L010906
         JSL   L0106FD
         TDC
         CLC
         ADC   #$00FB
         TCS
         PLD
         RTL

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

L0101DD  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

L010207  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

L010227  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EA
         TCS
         PEA   ^L01082D
         PEA   L01082D
         PEI   $FF
         PEI   $FD
         JSL   L01A51D
         PLY
         PLY
         PLY
         PLY
         STX   $F2
         STA   $F0
         STX   $F4
         ORA   $F4
         BEQ   L01029A
         PEA   $0002
         PEA   $0000
         PEA   $0000
         PEI   $F2
         PEI   $F0
         JSL   L01A18E
         PLY
         PLY
         PLY
         PLY
         PLY
         PEI   $F2
         PEI   $F0
         JSL   L01A428
         PLY
         PLY
         STX   $EE
         STA   $EC
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEI   $F2
         PEI   $F0
         JSL   L01A18E
         PLY
         PLY
         PLY
         PLY
         PLY
         PEI   $F2
         PEI   $F0
         JSL   L01AFE3
         PLY
         PLY
         LDX   $EE
         LDA   $EC
         BRA   L0102A0
         BRA   L0102A0
L01029A  LDX   #$0000
         LDA   #$0000
L0102A0  TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

L0102AA  PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00CE
         TCS
         PEI   $F7
         PEI   $F5
         JSL   L010227
         PLY
         PLY
         STX   $E6
         STA   $E4
         PEA   ^L01082F
         PEA   L01082F
         PEI   $F7
         PEI   $F5
         JSL   L01A51D
         PLY
         PLY
         PLY
         PLY
         STX   $D2
         STA   $D0
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $D2
         LDA   $D0
         JSL   L01BAE4
         BNE   L0102F1
         LDA   #$0000
         BRL   L01046A
L0102F1  PEI   $D2
         PEI   $D0
         PEA   $0001
         PEA   $0004
         PEA   $0000
         TDC
         CLC
         ADC   #$00E0
         PHA
         JSL   L01A010
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEI   $D2
         PEI   $D0
         PEA   $0001
         PEA   $0002
         PEA   $0000
         TDC
         CLC
         ADC   #$00EA
         PHA
         JSL   L01A010
         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   L01BAE4
         BEQ   L010365
         PEI   $D2
         PEI   $D0
         JSL   L01AFE3
         PLY
         PLY
         LDA   #$0000
         BRL   L01046A
L010365  PEA   $0000
         PEI   $E2
         PEI   $E0
         JSL   L0101A5
         PLY
         PLY
         PLY
         STX   $DA
         STA   $D8
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $DA
         LDA   $D8
         JSL   L01BAE4
         BNE   L01038F
         LDA   #$0000
         BRL   L01046A
L01038F  LDA   $EA
         CMP   #$0064
         BCS   L0103A4
         LDA   $EA
         PHA
         LDA   #$03E8
         CLC
         JSL   L01B32D
         PLA
         STA   $EA
L0103A4  PEI   $DA
         PEI   $D8
         JSL   L0101DD
         PLY
         PLY
         STX   $D6
         STA   $D4
         LDX   $E2
         LDA   $E0
         STX   $DE
         STA   $DC
L0103BA  SEC
         LDA   $DC
         SBC   #$7530
         BNE   L0103C9
         LDA   $DE
         SBC   #$0000
         BRA   L0103D0
L0103C9  LDA   $DE
         SBC   #$0000
         REP   #$02
L0103D0  BEQ   L01041C
         BCC   L01041C
         PEI   $D2
         PEI   $D0
         PEA   $7530
         PEA   $0001
         PEI   $D6
         PEI   $D4
         JSL   L01A010
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         STA   $E8
         LDA   $E8
         LDX   #$0000
         PHX
         PHA
         LDX   $D6
         LDA   $D4
         JSL   L01AFD8
         PLA
         PLX
         STX   $D6
         STA   $D4
         LDA   $E8
         LDX   #$0000
         PHX
         PHA
         LDX   $DE
         LDA   $DC
         JSL   L01B322
         PLA
         PLX
         STX   $DE
         STA   $DC
         BRA   L0103BA
L01041C  PEI   $D2
         PEI   $D0
         LDX   $DE
         LDA   $DC
         PHA
         PEA   $0001
         PEI   $D6
         PEI   $D4
         JSL   L01A010
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEI   $D2
         PEI   $D0
         JSL   L01AFE3
         PLY
         PLY
         PEI   $DA
         PEI   $D8
         JSL   L010207
         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
L01046A  TAY
         TDC
         CLC
         ADC   #$00EF
         TCS
         TYA
         PLD
         RTL

L010474  PHD
         TSC
         SEC
         SBC   #$00ED
         TCD
         ADC   #$00D6
         TCS
         LDA   #L010831
         LDX   #^L010831
         STX   $DA
         STA   $D8
         LDX   #$0000
         LDA   #$0020
         PHX
         PHA
         LDA   $FF
         LDX   #$0000
         SEC
         JSL   L01B372
         LDX   #$0000
         LDA   #$066D
         SEC
         JSL   L01B22C
         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   L01B22C
         PLY
         PLY
         LDY   #$0004
         STA   [$D8],Y
         LDA   $FB
         BEQ   L0104F8
         LDX   $DA
         LDA   $D8
         LDY   #$000E
         PHA
         TXA
         STA   [$D8],Y
         PLA
         LDY   #$000C
         STA   [$D8],Y
         BRA   L01050B
L0104F8  LDX   #$0000
         LDA   #$0000
         LDY   #$000E
         PHA
         TXA
         STA   [$D8],Y
         PLA
         LDY   #$000C
         STA   [$D8],Y
L01050B  LDY   #$0004
         LDA   [$D8],Y
         CMP   #$0000
         BEQ   L010518
         BRL   L0105FA
L010518  LDX   $F9
         LDA   $F7
         STA   $E4
         PEA   $0000
         PEA   $0000
         PEA   $0100
         JSL   L0101A5
         PLY
         PLY
         PLY
         STX   L010801
         STA   L0107FF
         STX   $EA
         ORA   $EA
         BNE   L01053D
         BRL   L0105F4
L01053D  LDX   L010801
         LDA   L0107FF
         PHX
         PHA
         JSL   L0101DD
         PLY
         PLY
         STX   $E2
         STA   $E0
         LDA   #$0100
         STA   $E6
L010554  LDA   $E6
         SEC
         SBC   $E4
         BEQ   L0105B2
         BVS   L010560
         EOR   #$8000
L010560  BPL   L0105B2
         LDY   #$0002
         LDA   [$D8],Y
         TAX
         LDA   [$D8]
         STX   $DE
         STA   $DC
         STZ   $E8
         BRA   L01059D
L010572  LDX   $DE
         LDA   $DC
         INC   $DC
         BNE   L01057C
         INC   $DE
L01057C  STA   $EA
         STX   $EC
         LDA   [$EA]
         AND   #$00FF
         PHA
         LDX   $E2
         LDA   $E0
         INC   $E0
         BNE   L010590
         INC   $E2
L010590  STA   $EA
         STX   $EC
         PLA
         SEP   #$20
         STA   [$EA]
         REP   #$20
         INC   $E8
L01059D  LDA   $E8
         SEC
         SBC   $E4
         BVS   L0105A7
         EOR   #$8000
L0105A7  BPL   L010572
         LDA   $E6
         SEC
         SBC   $E4
         STA   $E6
         BRA   L010554
L0105B2  LDA   $E6
         DEC   $E6
         TAY
         BEQ   L0105D2
         LDX   $E2
         LDA   $E0
         INC   $E0
         BNE   L0105C3
         INC   $E2
L0105C3  STA   $EA
         STX   $EC
         LDA   #$0000
         SEP   #$20
         STA   [$EA]
         REP   #$20
         BRA   L0105B2
L0105D2  LDX   L010801
         LDA   L0107FF
         PHX
         PHA
         JSL   L0101DD
         PLY
         PLY
         LDY   #$0002
         PHA
         TXA
         STA   [$D8],Y
         PLA
         STA   [$D8]
         LDA   #$0001
         LDY   #$0004
         STA   [$D8],Y
         BRA   L0105FA
L0105F4  LDA   #$0000
         BRL   L01067A
L0105FA  LDA   #$0000
         LDY   #$0008
         STA   [$D8],Y
         LDAL  L01080F
         LDY   #$000A
         STA   [$D8],Y
         PEA   $0001
         PEI   $DA
         PEI   $D8
         _FFStartSound
         STAL  L01013C
         LDA   $FB
         BEQ   L010624
         BRL   L01067A
L010624  PHA
         PEA   $0000
         _FFSoundDoneStatus
         STAL  L01013C
         PLA
         TAY
         BNE   L010639
         BRA   L010624
L010639  PEA   $0001
         _FFStopSound
         STAL  L01013C
         LDX   L010801
         LDA   L0107FF
         STX   $EA
         ORA   $EA
         BEQ   L01067A
         LDX   L010801
         LDA   L0107FF
         PHX
         PHA
         JSL   L010207
         PLY
         PLY
         LDX   L010801
         LDA   L0107FF
         PHX
         PHA
         _DisposeHandle
         STAL  L01013C
         STZ   L0107FF
         STZ   L010801
L01067A  TAY
         TDC
         CLC
         ADC   #$00ED
         TCS
         TYA
         PLD
         RTL

L010684  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F6
         TCS
         PEA   $0001
         _FFStopSound
         STAL  L01013C
         LDX   L010801
         LDA   L0107FF
         STX   $F8
         ORA   $F8
         BEQ   L0106D0
         LDX   L010801
         LDA   L0107FF
         PHX
         PHA
         JSL   L010207
         PLY
         PLY
         LDX   L010801
         LDA   L0107FF
         PHX
         PHA
         _DisposeHandle
         STAL  L01013C
         STZ   L0107FF
         STZ   L010801
L0106D0  _SoundShutDown
         STAL  L01013C
         LDX   L0107FD
         LDA   L0107FB
         PHX
         PHA
         JSL   L0101DD
         PLY
         PLY
         PHA
         _SoundStartUp
         STAL  L01013C
         TDC
         CLC
         ADC   #$00FB
         TCS
         PLD
         RTL

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

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

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

L010791  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F4
         TCS
         LDA   $FF
         STA   L010803
         PEA   $C005
         PEA   $0000
         PEA   $0100
         JSL   L0101A5
         PLY
         PLY
         PLY
         STX   L0107FD
         STA   L0107FB
         LDX   L0107FD
         LDA   L0107FB
         PHX
         PHA
         JSL   L0101DD
         PLY
         PLY
         PHA
         _SoundStartUp
         STAL  L01013C
         TDC
         CLC
         ADC   #$00F9
         TCS
         PLD
         RTL

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

L0107FB  DB    $00
         DB    $00
L0107FD  DB    $00
         DB    $00
L0107FF  DB    $00
         DB    $00
L010801  DB    $00
         DB    $00
L010803  DB    $00
         DB    $00
L010805  ADRL  $00000000  ;  path name
         DW    $0000      ;  flags
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01080F  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
L01082D  DB    $72
         DB    $00
L01082F  DB    $72
         DB    $00
L010831  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L010842  REP   #$30
         SEP   #$20
         PLA
         STA   L010E39
         REP   #$20
         PLA
         STA   L010E3A
         PHK
         PLB
         JSR   L01090B
         BCS   L010888
*         LDA   L010E42	; protection call
*         JSL   L0167AD
         LDA   L010E42
         PHA
         JSL   L010791
         PLA
         LDA   #L010E8E
         STA   L010EA2
         LDA   #^L010E8E
         STA   L010EA4
         JSR   L016C11
         LDA   #L010E6E
         STA   L010EA2
         LDA   #^L010E6E
         STA   L010EA4
         JSR   L017C6D
         JMP   L010A02

L010888  REP   #$30
         _FMShutDown
         _SoundShutDown
         _WindShutDown
         _CtlShutDown
         _DialogShutDown
         _EMShutDown
         _LEShutDown
         _QDShutDown
         _QDAuxShutDown
         _GrafOff
         _MTShutDown
         _TextShutDown
         LDA   L010E42
         PHA
         _DisposeAll
         LDA   L010E42
         PHA
         _MMShutDown
         _TLShutDown
         LDA   L010E3A
         PHA
         PHB
         LDA   L010E39
         STA   $01,S
         RTL

L010906  JSL   L010842
         RTL

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

L010A02  LDA   #L010E6E
         STA   L010EA2
         LDA   #^L010E6E
         STA   L010EA4
         JSR   L017C6D
         LDA   #$0001
         STA   L010E3C
         STZ   L010E3E
         STZ   L010EA0
         JSR   L0174BF
         LDA   L010EA2
         STA   L010D44
         LDA   #$0000
         STA   L010EA2
         JSR   L0174CC
         JSR   L016E5B
         LDA   L010EA2
         STA   L010FDD
         LDA   L010EA4
         STA   L010FDF
         JSR   L016C42
         LDA   L010EA2
         STA   L010FE1
         LDA   L010EA4
         STA   L010FE3
         JSR   L0173AC
         LDA   #L010F3D
         STA   L010EA2
         LDA   #^L010F3D
         STA   L010EA4
         JSR   L016C11
         LDA   #L010DAA
         STA   L010EA2
         LDA   #^L010DAA
         STA   L010EA4
         LDA   #$0001
         STA   L010EA6
         LDA   #$000E
         STA   L010EAA
         LDA   #L010FE5
         STA   L010EAE
         LDA   #^L010FE5
         STA   L010EB0
         JSR   L017A10
         LDA   #L010DB1
         STA   L010EA2
         LDA   #^L010DB1
         STA   L010EA4
         STZ   L010EA6
         LDA   #$0012
         STA   L010EAA
         LDA   #L010FE9
         STA   L010EAE
         LDA   #^L010FE9
         STA   L010EB0
         JSR   L017A10
         BRA   L010AAF
L010AAC  JMP   L010D35

L010AAF  JSR   L017052
         JSR   L0110AA
         JSR   L016F83
         BCS   L010AAC
         LDA   L010EA2
         STA   L010F2D
         LDA   L010EA4
         STA   L010F2F
         LDA   L010EA6
         STA   L010FCD
         LDA   L010EA8
         STA   L010FCF
         JSR   L016F83
         BCS   L010AAC
         LDA   L010EA2
         STA   L010F31
         LDA   L010EA4
         STA   L010F33
         LDA   L010EA6
         STA   L010FD1
         LDA   L010EA8
         STA   L010FD3
         JSR   L016F83
         BCS   L010AAC
         LDA   L010EA2
         STA   L010F35
         LDA   L010EA4
         STA   L010F37
         LDA   L010EA6
         STA   L010FD5
         LDA   L010EA8
         STA   L010FD7
         JSR   L016F83
         BCS   L010B2B
         LDA   L010EA2
         STA   L010F39
         LDA   L010EA4
         STA   L010F3B
         LDA   L010EA6
         STA   L010FD9
         LDA   L010EA8
         STA   L010FDB
         BRA   L010B31
L010B2B  JSR   L016D1F
         JMP   L010D35

L010B31  LDA   #L010ED4
         STA   L010EA2
         LDA   #^L010ED4
         STA   L010EA4
         LDA   #L010ECA
         STA   L010EA6
         LDA   #^L010ECA
         STA   L010EA8
         LDA   #L010ECE
         STA   L010EAA
         LDA   #^L010ECE
         STA   L010EAC
         LDA   #L010ED2
         STA   L010EAE
         LDA   #^L010ED2
         STA   L010EB0
         JSR   L0181A7
         LDA   #L010DD8
         STA   L010EA2
         LDA   #^L010DD8
         STA   L010EA4
         LDA   #L010DC4
         STA   L010EA6
         LDA   #^L010DC4
         STA   L010EA8
         LDA   #L010DC8
         STA   L010EAA
         LDA   #^L010DC8
         STA   L010EAC
         LDA   #L010DCC
         STA   L010EAE
         LDA   #^L010DCC
         STA   L010EB0
         JSR   L0181A7
         LDA   #L010E14
         STA   L010EA2
         LDA   #^L010E14
         STA   L010EA4
         LDA   #L010DBA
         STA   L010EA6
         LDA   #^L010DBA
         STA   L010EA8
         LDA   #L010DBE
         STA   L010EAA
         LDA   #^L010DBE
         STA   L010EAC
         LDA   #L010DC2
         STA   L010EAE
         LDA   #^L010DC2
         STA   L010EB0
         JSR   L0181A7
         LDA   #L010DF6
         STA   L010EA2
         LDA   #^L010DF6
         STA   L010EA4
         LDA   #L010DCE
         STA   L010EA6
         LDA   #^L010DCE
         STA   L010EA8
         LDA   #L010DD2
         STA   L010EAA
         LDA   #^L010DD2
         STA   L010EAC
         LDA   #L010DD6
         STA   L010EAE
         LDA   #^L010DD6
         STA   L010EB0
         JSR   L0181A7
         LDA   #L010D88
         STA   L010EA2
         LDA   #^L010D88
         STA   L010EA4
         LDA   L010FCD
         STA   L010EA6
         LDA   L010FCF
         STA   L010EA8
         LDA   #L010F4D
         STA   L010EAA
         LDA   #^L010F4D
         STA   L010EAC
         JSR   L017096
         LDA   #L010D46
         STA   L010EA2
         LDA   #^L010D46
         STA   L010EA4
         LDA   L010FD1
         STA   L010EA6
         LDA   L010FD3
         STA   L010EA8
         LDA   #L010F6D
         STA   L010EAA
         LDA   #^L010F6D
         STA   L010EAC
         JSR   L017096
         LDA   #L010D66
         STA   L010EA2
         LDA   #^L010D66
         STA   L010EA4
         LDA   L010FD5
         STA   L010EA6
         LDA   L010FD7
         STA   L010EA8
         LDA   #L010F8D
         STA   L010EAA
         LDA   #^L010F8D
         STA   L010EAC
         JSR   L017096
         LDA   L010ECA
         STA   L010EA2
         LDA   L010ECC
         STA   L010EA4
         LDA   L010ECE
         STA   L010EA6
         LDA   L010ED0
         STA   L010EA8
         LDA   #$0001
         STA   L010EAA
         LDA   L010ED2
         STA   L010EAE
         JSR   L0181D4
         JMP   L010C9F
         JMP   L010D35

L010C9F  LDA   #$0000
         STA   L010EA2
         LDA   #L010F4D
         STA   L010EA6
         LDA   #^L010F4D
         STA   L010EA8
         LDA   L010FCD
         STA   L010EAA
         LDA   L010FCF
         STA   L010EAC
         JSR   L017873
         LDA   #$0003
         STA   L010EA2
         JSR   L017622
         LDA   #$0000
         STA   L010EA2
         LDA   #L010F6D
         STA   L010EA6
         LDA   #^L010F6D
         STA   L010EA8
         LDA   L010FD1
         STA   L010EAA
         LDA   L010FD3
         STA   L010EAC
         JSR   L017873
         LDA   #$0003
         STA   L010EA2
         JSR   L017622
         LDA   #$0000
         STA   L010EA2
         LDA   #L010F8D
         STA   L010EA6
         LDA   #^L010F8D
         STA   L010EA8
         LDA   L010FD5
         STA   L010EAA
         LDA   L010FD7
         STA   L010EAC
         JSR   L017873
         LDA   #$0003
         STA   L010EA2
         JSR   L017622
         JSR   L0181F9
         LDA   L010ECA
         STA   L010EA2
         LDA   L010ECC
         STA   L010EA4
         JSR   L010FFE
         JSR   L0111FC
         JMP   L011762

L010D35  JSR   L017084
         LDA   L010D44
         STA   L010EA2
         JSR   L0174CC
         JMP   L010888

L010D44  DW    $0000
L010D46  STR   '1/sin.pics/title.pc1'
L010D66  STR   '1/sin.pics/credits.pc1'
L010D88  STR   '1/sin.pics/unicorn.pc1'
L010DAA  STR   'Geneva'
L010DB1  STR   'New York'
L010DBA  DB    $00
         DB    $00
L010DBC  DB    $00
         DB    $00
L010DBE  DB    $00
         DB    $00
L010DC0  DB    $00
         DB    $00
L010DC2  DB    $00
         DB    $00
L010DC4  DB    $00
         DB    $00
L010DC6  DB    $00
         DB    $00
L010DC8  DB    $00
         DB    $00
L010DCA  DB    $00
         DB    $00
L010DCC  DB    $00
         DB    $00
L010DCE  DB    $00
         DB    $00
L010DD0  DB    $00
         DB    $00
L010DD2  DB    $00
         DB    $00
L010DD4  DB    $00
         DB    $00
L010DD6  DB    $00
         DB    $00
L010DD8  ASC   '1/magic.snd/fsbell'00
L010DF6  ASC   '1/magic.snd/fsgood'00
L010E14  ASC   '1/magic.snd/fsbad'00
L010E31  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $C8
         DB    $00
         DB    $40
         DB    $01
L010E39  DB    $00
L010E3A  DB    $00
         DB    $00
L010E3C  DB    $00
         DB    $00
L010E3E  DB    $00
         DB    $00
         DB    $00
         DB    $00
L010E42  DB    $00
         DB    $00
L010E44  DB    $0A
         DB    $00
         DB    $04
         DB    $00
         DB    $00
         DB    $01
         DB    $06
         DB    $00
         DB    $00
         DB    $01
         DB    $0E
         DB    $00
         DB    $00
         DB    $01
         DB    $10
         DB    $00
         DB    $00
         DB    $01
         DB    $15
         DB    $00
         DB    $00
         DB    $01
         DB    $12
         DB    $00
         DB    $00
         DB    $01
         DB    $08
         DB    $00
         DB    $00
         DB    $01
         DB    $14
         DB    $00
         DB    $00
         DB    $01
         DB    $1B
         DB    $00
         DB    $00
         DB    $01
         DB    $0C
         DB    $00
         DB    $00
         DB    $01
L010E6E  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L010E8E  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L010EA0  DB    $00
         DB    $00
L010EA2  DB    $00        ;  device name
         DB    $00
L010EA4  DB    $00        ;  ref num
         DB    $00
L010EA6  DB    $00        ;  volume name
         DB    $00
L010EA8  DB    $00        ;  file type
         DB    $00
L010EAA  DB    $00        ;  total blocks
         DB    $00
L010EAC  DB    $00        ;  transfer count
         DB    $00
L010EAE  DB    $00        ;  free blocks
         DB    $00
L010EB0  DB    $00        ;  creation date
         DB    $00
L010EB2  DB    $00        ;  file system
         DB    $00
L010EB4  DB    $00        ;  modification date
         DB    $00
L010EB6  DB    $00
         DB    $00
L010EB8  DB    $00        ;  blocks used
         DB    $00
L010EBA  DB    $00
         DB    $00
L010EBC  DB    $00
         DB    $00
L010EBE  DB    $00
         DB    $00
L010EC0  DB    $00
         DB    $00
L010EC2  DB    $00
         DB    $00
L010EC4  DB    $00
         DB    $00
L010EC6  DB    $00
         DB    $00
L010EC8  DB    $00
         DB    $00
L010ECA  DB    $00
         DB    $00
L010ECC  DB    $00
         DB    $00
L010ECE  DB    $00
         DB    $00
L010ED0  DB    $00
         DB    $00
L010ED2  DB    $00
         DB    $00
L010ED4  ASC   '1/magic.snd/song1'00
L010EF1  DB    $00
         DB    $00
L010EF3  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L010F01  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L010F23  DB    $00
         DB    $00
L010F25  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L010F2D  DB    $00
         DB    $00
L010F2F  DB    $00
         DB    $00
L010F31  DB    $00
         DB    $00
L010F33  DB    $00
         DB    $00
L010F35  DB    $00
         DB    $00
L010F37  DB    $00
         DB    $00
L010F39  DB    $00
         DB    $00
L010F3B  DB    $00
         DB    $00
L010F3D  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L010F4D  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L010F6D  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L010F8D  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L010FAD  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L010FCD  DB    $00
         DB    $00
L010FCF  DB    $00
         DB    $00
L010FD1  DB    $00
         DB    $00
L010FD3  DB    $00
         DB    $00
L010FD5  DB    $00
         DB    $00
L010FD7  DB    $00
         DB    $00
L010FD9  DB    $00
         DB    $00
L010FDB  DB    $00
         DB    $00
L010FDD  DB    $00
         DB    $00
L010FDF  DB    $00
         DB    $00
L010FE1  DB    $00
         DB    $00
L010FE3  DB    $00
         DB    $00
L010FE5  DB    $00
         DB    $00
         DB    $00
         DB    $00
L010FE9  DB    $00
         DB    $00
         DB    $00
         DB    $00
L010FED  REP   #$30
         STZ   L010E3E
         LDA   L010E3C
         BEQ   L010FFD
         JSR   L0181A7
         INC   L010E3E
L010FFD  RTS

L010FFE  REP   #$30
         LDA   L010E3E
         BEQ   L011008
         JSR   L018200
L011008  RTS

L011009  REP   #$30
         LDA   L010E3E
         BEQ   L01101C
         LDA   L010EAA
         STA   L010EAE
         STZ   L010EAA
         JSR   L0181D4
L01101C  RTS

         REP   #$30
         LDA   L010E3C
         BEQ   L011028
         STZ   L010E3C
         RTS

L011028  INC   L010E3C
         RTS

L01102C  REP   #$30
         JSR   L0181F9
         LDA   L010DBA
         STA   L010EA2
         LDA   L010DBC
         STA   L010EA4
         LDA   L010DBE
         STA   L010EA6
         LDA   L010DC0
         STA   L010EA8
         STZ   L010EAA
         LDA   L010DC2
         STA   L010EAE
         JSR   L0181D4
         RTS

L011056  REP   #$30
         JSR   L0181F9
         LDA   L010DCE
         STA   L010EA2
         LDA   L010DD0
         STA   L010EA4
         LDA   L010DD2
         STA   L010EA6
         LDA   L010DD4
         STA   L010EA8
         STZ   L010EAA
         LDA   L010DD6
         STA   L010EAE
         JSR   L0181D4
         RTS

L011080  REP   #$30
         JSR   L0181F9
         LDA   L010DC4
         STA   L010EA2
         LDA   L010DC6
         STA   L010EA4
         LDA   L010DC8
         STA   L010EA6
         LDA   L010DCA
         STA   L010EA8
         STZ   L010EAA
         LDA   L010DCC
         STA   L010EAE
         JSR   L0181D4
         RTS

L0110AA  JSR   L016C85
         LDA   #$9999
         STA   L010EA2
         JSR   L016EB8
         LDA   #$0004
         STA   L010EA2
         JSR   L0174B1
         LDA   #$0007
         STA   L010EA2
         LDA   #$0009
         STA   L010EA6
         JSR   L017409
         LDA   #$0000
         STA   L010EA2
         LDA   #$0000
         STA   L010EA4
         LDA   #$0004
         STA   L010EA6
         LDA   #$0000
         STA   L010EA8
         JSR   L018187
         JSR   L01815D
         JSR   L019FC9
         LDA   #L01111D
         STA   L010EA2
         LDA   #^L01111D
         STA   L010EA4
         LDA   #$0064
         STA   L010EA6
         JSR   L017359
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         JSR   L0179F0
         RTS

L01111D  ASC   'PLEASE WAIT...'00
L01112C  LDA   L010EA6
         STA   L0111A6
         LDA   L010EA8
         STA   L0111A8
         JSR   L016C5A
         LDA   L012780
         STA   $04
         LDA   L012782
         STA   $06
         LDX   #$001A
         LDY   L012784
         STX   L012792
L01114E  LDX   #$0000
L011151  SEP   #$20
         LDA   [$04],Y
         INY
         CMP   #$0D
         BEQ   L01116A
         CMP   #$7E
         BEQ   L011164
         STA   L0111A8,X
         INX
         BRA   L011151
L011164  REP   #$30
         STY   L012784
         RTS

L01116A  INY
         JSR   L011176
         DEC   L0111A6
         BNE   L01114E
         JMP   L011164

L011176  STZ   L0111A8,X
         REP   #$30
         PHY
         LDA   #$0004
         STA   L010EA2
         LDA   L012792
         STA   L010EA6
         JSR   L0172A3
         LDA   #L0111A8
         STA   L010EA2
         LDA   #^L0111A8
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0009
         CLC
         ADC   L012792
         STA   L012792
         PLY
         RTS

L0111A6  DB    $00
         DB    $00
L0111A8  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0111FC  JSR   L016C85
         LDA   #$0000
         STA   L012784
         LDA   #L0112FB
         STA   L012780
         LDA   #^L0112FB
         STA   L012782
         JSR   L017418
         LDA   L010EA2
         STA   L0112BC
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         LDA   #$0003
         STA   L010EA2
         JSR   L016EB8
         LDA   #$000F
         STA   L010EA2
         JSR   L01733D
         LDA   #$2000
         STA   L010EA2
         LDA   #$00E1
         STA   L010EA4
         LDA   #$0010
         STA   L010EA6
         JSR   L01112C
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         JSR   L0178CF
         JSR   L016D1F
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         LDA   #$0003
         STA   L010EA2
         JSR   L016EB8
         LDA   #$000F
         STA   L010EA2
         JSR   L01733D
         LDA   #$2000
         STA   L010EA2
         LDA   #$00E1
         STA   L010EA4
         LDA   #$000C
         STA   L010EA6
         JSR   L01112C
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         JSR   L0178CF
         JSR   L016D1F
         LDA   L0112BC
         STA   L010EA2
         JSR   L01733D
         RTS

         DB    $00
         DB    $00
L0112BC  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         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
L0112FB  ASC   '   Long, long ago, far away in a city  '0D
         ASC   00
         ASC   'of the east called Baghdad, lived a    '0D
         ASC   00
         ASC   'very wealthy merchant. The merchant    '0D
         ASC   00
         ASC   'owned lots of land, several houses and '0D
         ASC   00
         ASC   'had accumulated many jewels and much   '0D
         ASC   00
         ASC   'gold. When he died, his son Sinbad     '0D
         ASC   00
         ASC   'inherited everything.                  '0D
         ASC   00
         ASC   '   Sinbad, being a carefree young man, '0D00
         ASC   'enjoyed all these riches, and began to '0D
         ASC   00
         ASC   'have a grand time spending money. He   '0D
         ASC   00
         ASC   'paid very little attention to business '0D
         ASC   00
         ASC   'matters. Before long, he realized that '0D
         ASC   00
         ASC   'he'27'd be poor and without a career.     '0D
         ASC   00
         ASC   'The businesses his father left him were'0D
         ASC   00
         ASC   'now nearly worthless because of his own'0D
         ASC   00
         ASC   'negligence.                            '0D
         ASC   00
         ASC   '    Sinbad decided he would have to    '0D
         ASC   00
         ASC   'drastically change his lifestyle. He   '0D
         ASC   00
         ASC   'proceeded to sell whatever possessions '0D
         ASC   00
         ASC   'he had left and with his money, he     '0D
         ASC   00
         ASC   'bought quite a bit of merchandise. He  '0D
         ASC   00
         ASC   'then joined a group of merchant seamen '0D
         ASC   00
         ASC   'and set off to trade his goods in      '0D
         ASC   00
         ASC   'foreign ports. Sinbad bought and sold  '0D
         ASC   00
         ASC   'cleverly and eventually became wealthy '0D
         ASC   00
         ASC   'once more. However, it was not all     '0D00
         ASC   'smooth sailing. Sinbad'27's voyages were  '0D00
         ASC   'quite adventurous.'0D00
L011762  REP   #$30
L011764  JSR   L0181F9
         JSR   L0121EB
         LDA   #L0126CB
         STA   L010EA2
         LDA   #^L0126CB
         STA   L010EA4
         LDA   L010FD9
         STA   L010EA6
         LDA   L010FDB
         STA   L010EA8
         LDA   #L010FAD
         STA   L010EAA
         LDA   #^L010FAD
         STA   L010EAC
         JSR   L017096
         LDA   #L018792
         STA   L010EA2
         LDA   #^L018792
         STA   L010EA4
         LDA   #L0187AF
         STA   L010EA6
         LDA   #^L0187AF
         STA   L010EA8
         LDA   #L0187B3
         STA   L010EAA
         LDA   #^L0187B3
         STA   L010EAC
         LDA   #L0187B7
         STA   L010EAE
         LDA   #^L0187B7
         STA   L010EB0
         JSR   L010FED
         LDA   #$0000
         STA   L010EA2
         LDA   #L010FAD
         STA   L010EA6
         LDA   #^L010FAD
         STA   L010EA8
         LDA   L010FD9
         STA   L010EAA
         LDA   L010FDB
         STA   L010EAC
         JSR   L017873
         LDA   L0187AF
         STA   L010EA2
         LDA   L0187B1
         STA   L010EA4
         LDA   L0187B3
         STA   L010EA6
         LDA   L0187B5
         STA   L010EA8
         LDA   L0187B7
         STA   L010EAA
         JSR   L011009
         JSR   L016E9A
         STZ   L012738
L01180C  JSR   L016D11
         CMP   #$001B
         BNE   L011817
         JMP   L010D35

L011817  LDA   L010EA2
         BEQ   L01180C
         JSR   L016CA9
         LDA   #L01273A
         STA   L010EAA
         LDA   #^L01273A
         STA   L010EAC
         LDA   #$0005
         STA   L010EAE
         JSR   L0174DD
         LDA   L010EB2
         BEQ   L01180C
         STA   L012738
         JSR   L016EA4
         LDA   L0187AF
         STA   L010EA2
         LDA   L0187B1
         STA   L010EA4
         JSR   L010FFE
         _CompactMem
         LDA   L012738
         DEC
         ASL
         TAX
         JMP   (L012762,X)
L01185E  JMP   L011764

L011861  REP   #$30
         LDA   #$2000
         STA   L010EA2
         LDA   #$00E1
         STA   L010EA4
         LDA   L010FCD
         STA   L010EA6
         LDA   L010FCF
         STA   L010EA8
         JSR   L016E49
         RTS

L01187F  REP   #$30
         LDA   L010FCD
         STA   L010EA2
         LDA   L010FCF
         STA   L010EA4
         LDA   #$7D00
         STA   L010EA6
         LDA   #$0000
         STA   L010EA8
         LDA   #$0000
         STA   L010EAA
         JSR   L016ED0
         LDA   #$0000
         STA   L010EA2
         JSR   L016EB8
         JSR   L016C85
         RTS

L0118AF  REP   #$30
         LDA   L010FCD
         STA   L010EA2
         LDA   L010FCF
         STA   L010EA4
         LDA   #$2000
         STA   L010EA6
         LDA   #$00E1
         STA   L010EA8
         JSR   L016E49
         JSR   L016C85
         RTS

L0118D0  REP   #$30
         JSR   L0178CF
L0118D5  JSR   L016D11
         CMP   #$001B
         BNE   L0118E0
         JMP   L0118F3

L0118E0  CMP   #$0000
         BEQ   L0118EB
         ORA   #$0020
         JMP   L0118F3

L0118EB  LDA   L010EA2
         BNE   L0118F3
         JMP   L0118D5
L0118F3  RTS

L0118F4  REP   #$30
         LDA   L010EA2
         STA   L01276C
         JSR   L01733D
         RTS

         REP   #$30
         LDA   L010EA6
         STA   L010EAA
         LDA   L010EA8
         STA   L010EAC
         LDA   #L012796
         STA   L010EA6
         LDA   #^L012796
         STA   L010EA8
         LDA   #L0127B6
         STA   L010EAE
         LDA   #^L0127B6
         STA   L010EB0
         LDA   #$0000
         STA   L010EB2
         JSR   L017684
         RTS

L011930  REP   #$30
         LDA   L010EA6
         STA   L010EAA
         LDA   L010EA8
         STA   L010EAC
         LDA   #L01279E
         STA   L010EA6
         LDA   #^L01279E
         STA   L010EA8
         LDA   #L0127B6
         STA   L010EAE
         LDA   #^L0127B6
         STA   L010EB0
         LDA   #$0000
         STA   L010EB2
         JSR   L017684
         RTS

L011960  REP   #$30
         LDA   L010EA2
         STA   L011A49
         JSR   L016C85
         LDA   #$0000
         STA   L012784
         LDA   L01277C
         STA   L012780
         LDA   L01277E
         STA   L012782
         JSR   L017418
         LDA   L010EA2
         STA   L011A4B
         LDA   #$2000
         STA   L010EA2
         LDA   #$00E1
         STA   L010EA4
         LDA   L010FD1
         STA   L010EA6
         LDA   L010FD3
         STA   L010EA8
         JSR   L016E49
         LDA   #$0000
         STA   L010EA2
         LDA   #L011A4D
         STA   L010EA6
         LDA   #^L011A4D
         STA   L010EA8
         JSR   L016F19
L0119B6  LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         LDA   #$0000
         STA   L010EA2
         JSR   L016EB8
         LDA   #$0009
         STA   L010EA2
         JSR   L01733D
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         LDA   #$2000
         STA   L010EA2
         LDA   #$00E1
         STA   L010EA4
         LDA   #$0014
         STA   L010EA6
         JSR   L012119
         LDA   #L011A6F
         STA   L010EA2
         LDA   #^L011A6F
         STA   L010EA4
         LDA   #$00BE
         STA   L010EA6
         JSR   L017359
         JSR   L0178CF
         JSR   L016D1F
         DEC   L011A49
         BEQ   L011A1E
         JMP   L0119B6

L011A1E  LDA   #$0000
         STA   L010EA2
         LDA   #L011A4D
         STA   L010EA6
         LDA   #^L011A4D
         STA   L010EA8
         LDA   L010FD1
         STA   L010EAA
         LDA   L010FD3
         STA   L010EAC
         JSR   L017873
         LDA   L011A4B
         STA   L010EA2
         JSR   L01733D
         RTS

L011A49  DB    $00
         DB    $00
L011A4B  DB    $00
         DB    $00
L011A4D  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L011A6F  ASC   'Press any key to continue.'00
L011A8A  REP   #$30
         LDA   #L011B44
         STA   $00
         LDA   #^L011B44
         STA   $02
         LDA   L010EA2
         DEC
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L010EA2
         INY
         INY
         LDA   [$00],Y
         STA   L010EA4
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         JSR   L016FF5
         LDA   L010EC6
         STA   L010EA2
         LDA   L010EC8
         STA   L010EA4
         LDA   #$0200
         STA   L010EA6
         LDA   #$0000
         STA   L010EA8
         JSR   L016D32
         LDA   L010EAC
         PHA
         LDA   L010EAA
         PHA
         LDA   L010EAA
         STA   L010EA2
         LDA   L010EAC
         STA   L010EA4
         LDA   #$C000
         STA   L010EA6
         JSR   L016F2F
         LDA   L010EAA
         STA   L012770
         LDA   L010EAC
         STA   L012772
         LDA   L010EAE
         STA   L012778
         LDA   L010EB0
         STA   L01277A
         PLA
         STA   L010EC6
         PLA
         STA   L010EC8
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         JSR   L016FB6
         LDA   L010EA6
         PHA
         LDA   L010EA6
         STA   L010EA2
         LDA   L012778
         STA   L010EA6
         LDA   L01277A
         STA   L010EA8
         LDA   L010EC6
         STA   L010EAA
         LDA   L010EC8
         STA   L010EAC
         JSR   L016FD5
         PLA
         STA   L010EA2
         JSR   L016FE8
         RTS

L011B44  ADRL  L011BA0
         ADRL  L011BC3
         ADRL  L011BE6
         ADRL  L011C09
         ADRL  L011C2C
         ADRL  L011C4F
         ADRL  L011C72
         ADRL  L011C95
         ADRL  L011CB8
         ADRL  L011CDB
         ADRL  L011CFC
         ADRL  L011D1D
         ADRL  L011D3E
         ADRL  L011D5F
         ADRL  L011D80
         ADRL  L011DA1
         ADRL  L011DC2
         ADRL  L011DE3
         ADRL  L011E04
         ADRL  L011E25
         ADRL  L011E46
         ADRL  L011E67
         ADRL  L011E88
L011BA0  STR   '1/sin.data/stor1voc.ant'
L011BC3  STR   '1/sin.data/stor2voc.ant'
L011BE6  STR   '1/sin.data/stor3voc.ant'
L011C09  STR   '1/sin.data/stor1voc.fil'
L011C2C  STR   '1/sin.data/stor2voc.fil'
L011C4F  STR   '1/sin.data/stor3voc.fil'
L011C72  STR   '1/sin.data/stor1voc.syn'
L011C95  STR   '1/sin.data/stor2voc.syn'
L011CB8  STR   '1/sin.data/stor3voc.syn'
L011CDB  STR   '1/sin.data/story1.wrd'
L011CFC  STR   '1/sin.data/story2.wrd'
L011D1D  STR   '1/sin.data/story3.wrd'
L011D3E  STR   '1/sin.data/story1.wrd'
L011D5F  STR   '1/sin.data/story1.fil'
L011D80  STR   '1/sin.data/story1.mth'
L011DA1  STR   '1/sin.data/story1.mul'
L011DC2  STR   '1/sin.data/story2.fil'
L011DE3  STR   '1/sin.data/story2.mth'
L011E04  STR   '1/sin.data/story2.mul'
L011E25  STR   '1/sin.data/story3.fil'
L011E46  STR   '1/sin.data/story3.mth'
L011E67  STR   '1/sin.data/story3.mul'
L011E88  STR   '1/sin.data/readme.doc'
L011EA9  REP   #$30
         LDA   #L011F63
         STA   $00
         LDA   #^L011F63
         STA   $02
         LDA   L010EA2
         DEC
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L010EA2
         INY
         INY
         LDA   [$00],Y
         STA   L010EA4
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         JSR   L016FF5
         LDA   L010EC6
         STA   L010EA2
         LDA   L010EC8
         STA   L010EA4
         LDA   #$0200
         STA   L010EA6
         LDA   #$0000
         STA   L010EA8
         JSR   L016D32
         LDA   L010EAC
         PHA
         LDA   L010EAA
         PHA
         LDA   L010EAA
         STA   L010EA2
         LDA   L010EAC
         STA   L010EA4
         LDA   #$C000
         STA   L010EA6
         JSR   L016F2F
         LDA   L010EAA
         STA   L012774
         LDA   L010EAC
         STA   L012776
         LDA   L010EAE
         STA   L01277C
         LDA   L010EB0
         STA   L01277E
         PLA
         STA   L010EC6
         PLA
         STA   L010EC8
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         JSR   L016FB6
         LDA   L010EA6
         PHA
         LDA   L010EA6
         STA   L010EA2
         LDA   L01277C
         STA   L010EA6
         LDA   L01277E
         STA   L010EA8
         LDA   L010EC6
         STA   L010EAA
         LDA   L010EC8
         STA   L010EAC
         JSR   L016FD5
         PLA
         STA   L010EA2
         JSR   L016FE8
         RTS

L011F63  ADRL  L011F6F
         ADRL  L011F90
         ADRL  L011FB1
L011F6F  STR   '1/sin.data/story1.wrd'
L011F90  STR   '1/sin.data/story2.wrd'
L011FB1  STR   '1/sin.data/story3.wrd'
L011FD2  REP   #$30
         LDA   L012770
         STA   L010EA2
         LDA   L012772
         STA   L010EA4
         JSR   L016F71
         RTS

L011FE4  REP   #$30
         LDA   L012774
         STA   L010EA2
         LDA   L012776
         STA   L010EA4
         JSR   L016F71
         RTS

L011FF6  REP   #$30
         LDA   L010EA6
         PHA
         LDA   L010EA6
         PHA
         LDA   L010EA2
         PHA
         LDA   L010EAA
         STA   L010EA2
         LDA   L010EAC
         STA   L010EA4
         JSR   L016C5A
         LDA   #L0127AE
         STA   L010EA2
         LDA   #^L0127AE
         STA   L010EA4
         PLA
         STA   L010EA6
         JSR   L016E73
         LDA   #L0127A6
         STA   L010EA2
         LDA   #^L0127A6
         STA   L010EA4
         PLA
         STA   L010EA6
         JSR   L016E73
         PLA
         STA   L010EA2
         LDA   L010EA2
         STA   L01276E
         JSR   L01734B
         RTS

L012047  REP   #$30
         LDA   L010EA6
         STA   L0120C3
         LDA   L010EA8
         STA   L0120C5
         JSR   L016C5A
         LDA   L012778
         STA   $04
         LDA   L01277A
         STA   $06
         LDX   #$0009
         LDY   L012788
         STX   L012792
L01206B  LDX   #$0000
L01206E  SEP   #$20
         LDA   [$04],Y
         INY
         CMP   #$0D
         BEQ   L012087
         CMP   #$7E
         BEQ   L012081
         STA   L0120C5,X
         INX
         BRA   L01206E
L012081  REP   #$30
         STY   L012788
         RTS

L012087  INY
         JSR   L012093
         DEC   L0120C3
         BNE   L01206B
         JMP   L012081

L012093  STZ   L0120C5,X
         REP   #$30
         PHY
         LDA   #$0006
         STA   L010EA2
         LDA   L012792
         STA   L010EA6
         JSR   L0172A3
         LDA   #L0120C5
         STA   L010EA2
         LDA   #^L0120C5
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0009
         CLC
         ADC   L012792
         STA   L012792
         PLY
         RTS

L0120C3  DB    $00
         DB    $00
L0120C5  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L012119  REP   #$30
         LDA   L010EA6
         STA   L012195
         LDA   L010EA8
         STA   L012197
         JSR   L016C5A
         LDA   L012780
         STA   $04
         LDA   L012782
         STA   $06
         LDX   #$0009
         LDY   L012784
         STX   L012792
L01213D  LDX   #$0000
L012140  SEP   #$20
         LDA   [$04],Y
         INY
         CMP   #$0D
         BEQ   L012159
         CMP   #$7E
         BEQ   L012153
         STA   L012197,X
         INX
         BRA   L012140
L012153  REP   #$30
         STY   L012784
         RTS

L012159  INY
         JSR   L012165
         DEC   L012195
         BNE   L01213D
         JMP   L012153

L012165  STZ   L012197,X
         REP   #$30
         PHY
         LDA   #$000E
         STA   L010EA2
         LDA   L012792
         STA   L010EA6
         JSR   L0172A3
         LDA   #L012197
         STA   L010EA2
         LDA   #^L012197
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0009
         CLC
         ADC   L012792
         STA   L012792
         PLY
         RTS

L012195  DB    $00
         DB    $00
L012197  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0121EB  REP   #$30
         LDA   #L0126B1
         STA   L010EA2
         LDA   #^L0126B1
         STA   L010EA4
         LDA   #L0126EE
         STA   L010EA6
         LDA   #^L0126EE
         STA   L010EA8
         JSR   L01918E
         RTS

L012209  REP   #$30
         LDA   #L0126BE
         STA   L010EA2
         LDA   #^L0126BE
         STA   L010EA4
         LDA   #L012729
         STA   L010EA6
         LDA   #^L012729
         STA   L010EA8
         JSR   L01918E
         RTS

L012227  REP   #$30
         LDA   L010EA2
         STA   L012285
         LDA   L010EA4
         STA   L012287
         LDA   L010EA6
         STA   L012289
         LDA   L010EAA
         STA   L01228B
         LDA   L010EAE
         STA   L01228D
         JSR   L016DAC
         LDA   L010EA6
         ASL
         ASL
         ASL
         STA   L010EA6
         LDA   #$0000
         STA   L010EA2
         LDA   L012289
         STA   L010EAA
         JSR   L01228F
         LDA   L010EA2
         CLC
         ADC   L01228B
         STA   L010EA2
         LDA   L01228D
         STA   L010EA6
         JSR   L0172A3
         LDA   L012285
         STA   L010EA2
         LDA   L012287
         STA   L010EA4
         JSR   L0172DC
         RTS

L012285  DW    $0000
L012287  DW    $0000
L012289  DW    $0000
L01228B  DW    $0000
L01228D  DW    $0000
L01228F  REP   #$30
         LDA   L010EAA
         SEC
         SBC   L010EA6
         LSR
         STA   L010EA2
         RTS

L01229D  REP   #$30
         LDA   L010EA2
         STA   L012332
         LDA   L010FD1
         STA   L010EA2
         LDA   L010FD3
         STA   L010EA4
         LDA   L010FCD
         STA   L010EA6
         LDA   L010FCF
         STA   L010EA8
         JSR   L016E49
         LDA   L010FD5
         STA   L010EA2
         LDA   L010FD7
         STA   L010EA4
         LDA   #L012334
         STA   $00
         LDA   #^L012334
         STA   $02
         LDA   L012332
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L010EA6
         INY
         INY
         LDA   [$00],Y
         STA   L010EA8
         LDA   L010FCD
         STA   L010EAA
         LDA   L010FCF
         STA   L010EAC
         LDA   #L012340
         STA   $00
         LDA   #^L012340
         STA   $02
         LDA   L012332
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L010EAE
         INY
         INY
         LDA   [$00],Y
         STA   L010EB0
         LDA   #$0000
         STA   L010EB2
         JSR   L017684
         LDA   #$0000
         STA   L010EA2
         LDA   #L010FAD
         STA   L010EA6
         LDA   #^L010FAD
         STA   L010EA8
         JSR   L016F03
         JSR   L0118AF
         RTS

L012332  DW    $0000
L012334  ADRL  L01234C
         ADRL  L012354
         ADRL  L01235C
L012340  ADRL  L012364
         ADRL  L01236C
         ADRL  L012374
L01234C  DW    $0000
         DW    $0007
         DW    $004D
         DW    $0037
L012354  DW    $0000
         DW    $003C
         DW    $004D
         DW    $006E
L01235C  DW    $0000
         DW    $0071
         DW    $004D
         DW    $00A3
L012364  DW    $0000
         DW    $003C
         DW    $004D
         DW    $006C
L01236C  DW    $0000
         DW    $003C
         DW    $004D
         DW    $006E
L012374  DW    $0000
         DW    $003C
         DW    $004D
         DW    $006E
L01237C  REP   #$30
         STZ   L012585
L012381  JSR   L016EAE
L012384  JSR   L0118D0
         CMP   #$001B
         BNE   L01238F
         JMP   L0123C9

L01238F  LDA   L010EA2
         BEQ   L012384
         JSR   L016CA9
         LDA   #L012587
         STA   L010EAA
         LDA   #^L012587
         STA   L010EAC
         LDA   #$0003
         STA   L010EAE
         JSR   L0174DD
         LDA   L010EB2
         BEQ   L012384
         CMP   L012585
         BEQ   L0123D7
         STA   L012585
         JSR   L016EA4
         LDA   L012585
         DEC
         STA   L010EA2
         JSR   L01229D
         JMP   L012381

L0123C9  CMP   #$001B
         BNE   L012384
         JSR   L016EA4
         LDA   #$001B
         JMP   L01257C

L0123D7  JSR   L016EA4
         LDA   L012585
         CMP   L012934
         BNE   L0123E5
         JMP   L0124F8

L0123E5  JSR   L01791B
         LDA   #L01860B
         STA   L010EA2
         LDA   #^L01860B
         STA   L010EA4
         JSR   L018217
         JSR   L01102C
         LDA   #L01259F
         STA   $00
         LDA   #^L01259F
         STA   $02
         LDA   L012934
         DEC
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L010EA2
         INY
         INY
         LDA   [$00],Y
         STA   L010EA4
         LDA   #$0000
         STA   L010EA6
         JSR   L016E73
         LDA   #$0001
         STA   L010EA2
         JSR   L01733D
         LDA   #L012902
         STA   L010EA2
         LDA   #^L012902
         STA   L010EA4
         LDA   #$009B
         STA   L010EA6
         LDA   #$006F
         STA   L010EAA
         LDA   #$000E
         STA   L010EAE
         JSR   L012227
         LDA   #L012910
         STA   L010EA2
         LDA   #^L012910
         STA   L010EA4
         LDA   #$009B
         STA   L010EA6
         LDA   #$006F
         STA   L010EAA
         LDA   #$0026
         STA   L010EAE
         JSR   L012227
         LDA   #L01291E
         STA   L010EA2
         LDA   #^L01291E
         STA   L010EA4
         LDA   #$009B
         STA   L010EA6
         LDA   #$006F
         STA   L010EAA
         LDA   #$003E
         STA   L010EAE
         JSR   L012227
         JSR   L018283
         LDA   #L01257D
         STA   L010EA2
         LDA   #^L01257D
         STA   L010EA4
         STZ   L010EA6
         JSR   L016E73
         LDA   #L0125C3
         STA   L010EA2
         LDA   #^L0125C3
         STA   L010EA4
         LDA   #$009B
         STA   L010EA6
         JSR   L017359
         JSR   L0178CF
         JSR   L016D1F
         LDA   L010FD5
         STA   L010EA2
         LDA   L010FD7
         STA   L010EA4
         LDA   #L0125AB
         STA   L010EA6
         LDA   #^L0125AB
         STA   L010EA8
         LDA   #$2000
         STA   L010EAA
         LDA   #$00E1
         STA   L010EAC
         LDA   #L0125AB
         STA   L010EAE
         LDA   #^L0125AB
         STA   L010EB0
         LDA   #$0000
         STA   L010EB2
         JSR   L017684
         JMP   L012573

L0124F8  JSR   L017903
         LDA   L010FD5
         STA   L010EA2
         LDA   L010FD7
         STA   L010EA4
         LDA   #L0125B3
         STA   L010EA6
         LDA   #^L0125B3
         STA   L010EA8
         LDA   #$2000
         STA   L010EAA
         LDA   #$00E1
         STA   L010EAC
         LDA   #L0125BB
         STA   L010EAE
         LDA   #^L0125BB
         STA   L010EB0
         LDA   #$0000
         STA   L010EB2
         JSR   L017684
         JSR   L011056
         LDA   #L0185FF
         STA   L010EA2
         LDA   #^L0185FF
         STA   L010EA4
         JSR   L018217
         JSR   L0182D0
         JMP   L012579

         LDA   #L01257D
         STA   L010EA2
         LDA   #^L01257D
         STA   L010EA4
         STZ   L010EA6
         JSR   L016E73
         LDA   #L0125C3
         STA   L010EA2
         LDA   #^L0125C3
         STA   L010EA4
         LDA   #$009B
         STA   L010EA6
         JSR   L017359
L012573  JSR   L0178CF
         JSR   L016D1F
L012579  LDA   #$0000
L01257C  RTS

L01257D  DW    $0091
         DW    $000A
         DW    $00A5
         DW    $00FA
L012585  DW    $0000
L012587  DW    $0001
         DW    $0070
         DW    $0012
         DW    $010A
L01258F  DW    $0019
         DW    $0070
         DW    $002A
         DW    $010A
L012597  DW    $0031
         DW    $0070
         DW    $0042
         DW    $010A
L01259F  ADRL  L012587
         ADRL  L01258F
         ADRL  L012597
L0125AB  DW    $004F
         DW    $0004
         DW    $00BC
         DW    $0140
L0125B3  DW    $000A
         DW    $00A7
         DW    $004B
         DW    $00E0
L0125BB  DW    $007B
         DW    $0107
         DW    $00BC
         DW    $0140
L0125C3  ASC   'Press any key to continue.'00
         DB    $00
L0125DF  REP   #$30
         LDA   L0127D8
         BEQ   L01260D
         LDA   L0127CC
         STA   L010EA2
         LDA   L0127CE
         STA   L010EA4
         LDA   L0127D0
         STA   L010EA6
         LDA   L0127D2
         STA   L010EA8
         LDA   L0127D4
         STA   L010EAA
         LDA   L0127D6
         STA   L010EAC
         JSR   L017096
L01260D  LDA   L0127C2
         STA   L010EA2
         LDA   L0127C0
         STA   L010EA6
         LDA   L010FCD
         STA   L010EAA
         LDA   L010FCF
         STA   L010EAC
         JSR   L011FF6
         LDA   L0127C0
         STA   L01276E
         LDA   L0127C4
         STA   L010EA2
         LDA   L0127C6
         STA   L010EA4
         LDA   L010FCD
         STA   L010EA6
         LDA   L010FCF
         STA   L010EA8
         JSR   L011930
         LDA   L0127C2
         STA   L010EA2
         JSR   L0118F4
         LDA   L010FCD
         STA   L010EA2
         LDA   L010FCF
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L012047
L012667  JSR   L0178CF
         JSR   L0118D0
         CMP   #$001B
         BNE   L012675
         JMP   L0126AD

L012675  CMP   #$0067
         BNE   L012686
         LDA   #$0003
         STA   L010EA2
         JSR   L011960
         JMP   L012667

L012686  LDA   #$0000
         STA   L010EA2
         LDA   L0127C8
         STA   L010EA6
         LDA   L0127CA
         STA   L010EA8
         JSR   L016F03
         JSR   L0118AF
         JSR   L011080
         DEC   L0127BE
         BEQ   L0126A9
         JMP   L01260D

L0126A9  LDA   #$0000
         RTS

L0126AD  LDA   #$001B
         RTS

L0126B1  STR   '/SINBAD1.DSK'
L0126BE  STR   '/SINBAD2.DSK'
L0126CB  STR   '1/sin.pics/mainmenu.pc1'
L0126EE  ASC   'Sinbad disk 1.'00
         ASC   'Player 1'00
         ASC   'Player 2'00
         ASC   'Arabian Nights data disk.'00
L012729  ASC   'Sinbad disk 2.'00
L012738  DW    $0000
L01273A  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
L012762  DA    L01296C
         DA    L013329
         DA    L013CFB
         DA    L014D1E
         DA    L014421
L01276C  DB    $00
         DB    $00
L01276E  DB    $00
         DB    $00
L012770  DB    $00
         DB    $00
L012772  DB    $00
         DB    $00
L012774  DB    $00
         DB    $00
L012776  DB    $00
         DB    $00
L012778  DB    $00
         DB    $00
L01277A  DB    $00
         DB    $00
L01277C  DB    $00
         DB    $00
L01277E  DB    $00
         DB    $00
L012780  DB    $00
         DB    $00
L012782  DB    $00
         DB    $00
L012784  DB    $00
         DB    $00
         DB    $00
         DB    $00
L012788  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L012792  DB    $00
         DB    $00
         DB    $00
         DB    $00
L012796  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DW    $0064
         DW    $0140
L01279E  DW    $004B
         DW    $0004
         DW    $00BC
         DW    $013C
L0127A6  DW    $0001
         DW    $0001
         DW    $00C7
         DW    $013F
L0127AE  DW    $0000
         DW    $0000
         DW    $00C8
         DW    $0140
L0127B6  DW    $0053
         DW    $0004
         DW    $00C4
         DW    $013C
L0127BE  DB    $00
         DB    $00
L0127C0  DB    $00
         DB    $00
L0127C2  DB    $00
         DB    $00
L0127C4  DB    $00
         DB    $00
L0127C6  DB    $00
         DB    $00
L0127C8  DB    $00
         DB    $00
L0127CA  DB    $00
         DB    $00
L0127CC  DB    $00
         DB    $00
L0127CE  DB    $00
         DB    $00
L0127D0  DB    $00
         DB    $00
L0127D2  DB    $00
         DB    $00
L0127D4  DB    $00
         DB    $00
L0127D6  DB    $00
         DB    $00
L0127D8  DB    $00
         DB    $00
L0127DA  DB    $00
         DB    $00
L0127DC  DB    $00
         DB    $00
         DB    $00
         DB    $00
L0127E0  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0128B2  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0128DA  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L012902  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L012910  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01291E  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01292C  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L012934  DB    $00
         DB    $00
L012936  ADRL  L012902
         ADRL  L012910
         ADRL  L01291E
         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
L01296C  REP   #$30
         JSR   L016C85
         JSR   L019FC9
L012974  JSR   L019358
         CMP   #$0001
         BNE   L01297F
         JMP   L012B4B

L01297F  CMP   #$0002
         BNE   L012987
         JMP   L01298F

L012987  CMP   #$001B
         BNE   L012974
         JMP   L012E20

L01298F  STZ   L01887A
         JSR   L012209
         JSR   L0184A2
         JSR   L017964
         JSR   L018C12
         LDA   #L018893
         STA   L010EA2
         LDA   #^L018893
         STA   L010EA4
         LDA   #L018893
         STA   L010EA6
         LDA   #^L018893
         STA   L010EA8
         LDA   #$0001
         STA   L010EAA
         JSR   L018F6E
         LDA   L018884
         CMP   #$0002
         BNE   L0129E8
         LDA   #L0188AB
         STA   L010EA2
         LDA   #^L0188AB
         STA   L010EA4
         LDA   #L0188AB
         STA   L010EA6
         LDA   #^L0188AB
         STA   L010EA8
         LDA   #$0002
         STA   L010EAA
         JSR   L018F6E
L0129E8  JSR   L018574
         LDA   #L012EDA
         STA   L010EA2
         LDA   #^L012EDA
         STA   L010EA4
         LDA   L010FD5
         STA   L010EA6
         LDA   L010FD7
         STA   L010EA8
         LDA   #L010F8D
         STA   L010EAA
         LDA   #^L010F8D
         STA   L010EAC
         JSR   L017096
         LDA   #L012EFC
         STA   L010EA2
         LDA   #^L012EFC
         STA   L010EA4
         LDA   L010FD9
         STA   L010EA6
         LDA   L010FDB
         STA   L010EA8
         LDA   #L010FAD
         STA   L010EAA
         LDA   #^L010FAD
         STA   L010EAC
         JSR   L017096
L012A39  JSR   L0185B1
         JSR   L0195D5
         CMP   #$0001
         BNE   L012A70
         JSR   L0197FF
         CMP   #$0001
         BEQ   L012A5E
         LDA   #$000E
         STA   L010EA2
         JSR   L011A8A
         LDA   #$0026
         STA   L0127DA
         JMP   L012AD1

L012A5E  LDA   #$0010
         STA   L010EA2
         JSR   L011A8A
         LDA   #$001D
         STA   L0127DA
         JMP   L012AD1

L012A70  JSR   L019A1A
         CMP   #$0001
         BNE   L012A8A
         LDA   #$0004
         STA   L010EA2
         JSR   L011A8A
         LDA   #$0019
         STA   L0127DA
         JMP   L012AB0

L012A8A  CMP   #$0002
         BNE   L012AA1
         LDA   #$0007
         STA   L010EA2
         JSR   L011A8A
         LDA   #$0024
         STA   L0127DA
         JMP   L012AB0

L012AA1  LDA   #$0001
         STA   L010EA2
         JSR   L011A8A
         LDA   #$0016
         STA   L0127DA
L012AB0  LDA   #$0001
         STA   L010EA2
         JSR   L011EA9
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L0179F0
         LDA   #$0003
         STA   L010EA2
         JSR   L011960
         JSR   L0110AA
L012AD1  STZ   L0127DC
         LDA   #L0127E0
         STA   L010EA2
         LDA   #^L0127E0
         STA   L010EA4
         LDA   #$0064
         STA   L010EA6
         LDA   #$0000
         STA   L010EAA
         JSR   L016ED0
         JSR   L0185EF
         JSR   L018340
         JSR   L018412
         JSR   L01187F
         JSR   L0179F0
L012AFE  JSR   L016C85
         JSR   L012F1F
         LDA   #$0000
         STA   L010EA2
         JSR   L01229D
         JSR   L01237C
         CMP   #$001B
         BEQ   L012B2B
         JSR   L017933
         LDA   L018882
         CMP   #$0001
         BNE   L012AFE
         INC   L0127DC
         LDA   L0127DC
         CMP   #$000A
         BNE   L012AFE
L012B2B  JSR   L0183E4
         JSR   L018483
         JSR   L011FD2
         JSR   L011FE4
         JSR   L0189C3
         LDA   L010EA2
         CMP   #$0001
         BNE   L012B45
         JMP   L012A39

L012B45  JSR   L017FBA
         JMP   L012E20

L012B4B  JSR   L0179F0
         JSR   L012209
         LDA   #$0001
         STA   L010EA2
         JSR   L011EA9
         LDA   #$000F
         STA   L010EA2
         JSR   L011A8A
         LDA   #L012E23
         STA   L010EA2
         LDA   #^L012E23
         STA   L010EA4
         LDA   L010FD1
         STA   L010EA6
         LDA   L010FD3
         STA   L010EA8
         LDA   #L010F6D
         STA   L010EAA
         LDA   #^L010F6D
         STA   L010EAC
         JSR   L017096
         LDA   #$0000
         STA   L012788
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L01187F
         LDA   #$0001
         STA   L010EA2
         LDA   #$0005
         STA   L010EA6
         LDA   L010FCD
         STA   L010EAA
         LDA   L010FCF
         STA   L010EAC
         JSR   L011FF6
         LDA   #$0005
         STA   L01276E
         LDA   L010FD1
         STA   L010EA2
         LDA   L010FD3
         STA   L010EA4
         LDA   L010FCD
         STA   L010EA6
         LDA   L010FCF
         STA   L010EA8
         JSR   L011930
         LDA   #$0001
         STA   L010EA2
         JSR   L0118F4
         LDA   L010FCD
         STA   L010EA2
         LDA   L010FCF
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L012047
         LDA   #$0000
         STA   L010EA2
         LDA   #L010F6D
         STA   L010EA6
         LDA   #^L010F6D
         STA   L010EA8
         LDA   L010FCD
         STA   L010EAA
         LDA   L010FCF
         STA   L010EAC
         JSR   L017873
         LDA   #L012E41
         STA   L010EA2
         LDA   #^L012E41
         STA   L010EA4
         LDA   L010FD5
         STA   L010EA6
         LDA   L010FD7
         STA   L010EA8
         LDA   #L010F8D
         STA   L010EAA
         LDA   #^L010F8D
         STA   L010EAC
         JSR   L017096
         LDA   #$0001
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0005
         STA   L0127C0
         LDA   L010FD5
         STA   L0127C4
         LDA   L010FD7
         STA   L0127C6
         LDA   #L010F8D
         STA   L0127C8
         LDA   #^L010F8D
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L012E60
         STA   L0127CC
         LDA   #^L012E60
         STA   L0127CE
         LDA   L010FD9
         STA   L0127D0
         LDA   L010FDB
         STA   L0127D2
         LDA   #L010FAD
         STA   L0127D4
         LDA   #^L010FAD
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L012C9D
         JMP   L012974

L012C9D  LDA   #L012E7F
         STA   L010EA2
         LDA   #^L012E7F
         STA   L010EA4
         LDA   L010FD5
         STA   L010EA6
         LDA   L010FD7
         STA   L010EA8
         LDA   #L010F8D
         STA   L010EAA
         LDA   #^L010F8D
         STA   L010EAC
         JSR   L017096
         LDA   L010FD9
         STA   L010EA2
         LDA   L010FDB
         STA   L010EA4
         LDA   #$2000
         STA   L010EA6
         LDA   #$00E1
         STA   L010EA8
         JSR   L011930
         LDA   L010FD5
         STA   L010EA2
         LDA   L010FD7
         STA   L010EA4
         LDA   #$2000
         STA   L010EA6
         LDA   #$00E1
         STA   L010EA8
         JSR   L011930
         LDA   #$0002
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0005
         STA   L0127C0
         LDA   L010FD5
         STA   L0127C4
         LDA   L010FD7
         STA   L0127C6
         LDA   #L010F8D
         STA   L0127C8
         LDA   #^L010F8D
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L012E9E
         STA   L0127CC
         LDA   #^L012E9E
         STA   L0127CE
         LDA   L010FD9
         STA   L0127D0
         LDA   L010FDB
         STA   L0127D2
         LDA   #L010FAD
         STA   L0127D4
         LDA   #^L010FAD
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L012D59
         JMP   L012974

L012D59  LDA   #$0003
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0005
         STA   L0127C0
         LDA   L010FD9
         STA   L0127C4
         LDA   L010FDB
         STA   L0127C6
         LDA   #L010FAD
         STA   L0127C8
         LDA   #^L010FAD
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L012EBC
         STA   L0127CC
         LDA   #^L012EBC
         STA   L0127CE
         LDA   L010FD5
         STA   L0127D0
         LDA   L010FD7
         STA   L0127D2
         LDA   #L010F8D
         STA   L0127D4
         LDA   #^L010F8D
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L012DB8
         JMP   L012974

L012DB8  LDA   #$0005
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0004
         STA   L0127C0
         LDA   L010FD5
         STA   L0127C4
         LDA   L010FD7
         STA   L0127C6
         LDA   #L010F8D
         STA   L0127C8
         LDA   #^L010F8D
         STA   L0127CA
         STZ   L0127D8
         JSR   L0125DF
         CMP   #$0000
         BEQ   L012DF0
         JMP   L012974

L012DF0  JSR   L0178CF
         JSR   L0118D0
         CMP   #$001B
         BNE   L012DFE
         JMP   L012974

L012DFE  CMP   #$0067
         BNE   L012E0F
         LDA   #$0003
         STA   L010EA2
         JSR   L011960
         JMP   L012DF0

L012E0F  JSR   L011FD2
         JSR   L011FE4
         JSR   L018E00
         CMP   #$001B
         BEQ   L012E20
         JMP   L01298F
L012E20  JMP   L01185E

L012E23  STR   '1/sin.pics/s11.pc1'
L012E41  STR   '1/sin.pics/s121.pc1'
L012E60  STR   '1/sin.pics/s122.pc1'
L012E7F  STR   '1/sin.pics/s123.pc1'
L012E9E  STR   '1/sin.pics/s13.pc1'
L012EBC  STR   '1/sin.pics/s14.pc1'
L012EDA  STR   '1/sin.pics/qaparts.pc1'
L012EFC  STR   '1/sin.pics/qapscren.pc1'
L012F1F  REP   #$30
         LDA   #$0001
         STA   L010EA2
         LDA   L0127DA
         STA   L010EA6
         JSR   L016D76
         TAX
         DEX
         SEP   #$20
         LDA   L0127E0,X
         BNE   L012F1F
         INC   L0127E0,X
         REP   #$30
         STX   L010EA2
         JSR   L012F45
         RTS

L012F45  REP   #$30
         LDA   L010EA2
         STA   L013006
         LDA   L010FD9
         STA   L010EA2
         LDA   L010FDB
         STA   L010EA4
         LDA   L010FCD
         STA   L010EA6
         LDA   L010FCF
         STA   L010EA8
         JSR   L016E49
         LDA   L010FCD
         STA   L010EA2
         LDA   L010FCF
         STA   L010EA4
         JSR   L016C5A
         LDA   L018882
         CMP   #$0001
         BNE   L012F8C
         LDA   #L018893
         STA   $00
         LDA   #^L018893
         STA   $02
         JMP   L012F96

L012F8C  LDA   #L0188AB
         STA   $00
         LDA   #^L0188AB
         STA   $02
L012F96  LDA   #L013010+$10
         STA   $08
         LDA   #^L013010+$10
         STA   $0A
         LDY   #$0000
         SEP   #$20
L012FA5  LDA   [$00],Y
         BEQ   L012FAF
         STA   [$08],Y
         INY
         JMP   L012FA5

L012FAF  LDA   #$2E
         STA   [$08],Y
         INY
         LDA   #$00
         STA   [$08],Y
         REP   #$30
         LDA   #$0001
         STA   L010EA2
         JSR   L01733D
         LDA   #L013010
         STA   L010EA2
         LDA   #^L013010
         STA   L010EA4
         LDA   #$00B0
         STA   L010EA6
         JSR   L017359
         JSR   L016C85
         LDA   L013006
         STA   L010EA2
         JSR   L01302F
         JSR   L01308B
         JSR   L013234
         LDA   L010FCD
         STA   L010EA2
         LDA   L010FCF
         STA   L010EA4
         LDA   L010FD1
         STA   L010EA6
         LDA   L010FD3
         STA   L010EA8
         JSR   L016E49
         RTS

L013006  DW    $0000
         DW    $0064
         DW    $0000
         DW    $00C8
         DW    $0140
L013010  ASC   'It'27's your turn, '00
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
L01302F  REP   #$30
         LDA   L010EA2
         STA   L013089
         LDA   L012778
         STA   $00
         LDA   L01277A
         STA   $02
         LDY   #$0000
         LDA   L013089
         CMP   #$0000
         BNE   L01304F
         JMP   L01306B

L01304F  LDY   #$0000
L013052  LDX   #$0005
         SEP   #$20
L013057  LDA   [$00],Y
         INY
         CMP   #$0A
         BEQ   L013061
         JMP   L013057

L013061  DEX
         BNE   L013057
         REP   #$30
         DEC   L013089
         BNE   L013052
L01306B  LDA   L012778
         STA   L010EA2
         LDA   L01277A
         STA   L010EA4
         TYA
         CLC
         ADC   L010EA2
         STA   L010EA2
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA4
         RTS

L013089  DW    $0000
L01308B  REP   #$30
         LDA   #L0128B2
         STA   L010EA6
         LDA   #^L0128B2
         STA   L010EA8
         JSR   L0131F3
         LDA   #L0128DA
         STA   L010EA6
         LDA   #^L0128DA
         STA   L010EA8
         JSR   L0131F3
         LDA   L010EA2
         STA   L0131EF
         LDA   L010EA4
         STA   L0131F1
         LDA   #L01292C
         STA   L010EA2
         LDA   #^L01292C
         STA   L010EA4
         LDA   #$0003
         STA   L010EA6
         LDA   #$0000
         STA   L010EAA
         JSR   L016ED0
         LDA   #L01292C
         STA   $00
         LDA   #^L01292C
         STA   $02
L0130DC  REP   #$30
         LDA   #$0000
         STA   L010EA2
         LDA   #$0002
         STA   L010EA6
         JSR   L016D76
         TAY
         SEP   #$20
         LDA   [$00],Y
         BNE   L0130DC
         LDA   #$01
         STA   [$00],Y
         REP   #$30
         INY
         STY   L012934
         DEY
         LDA   L0131EF
         STA   L010EA2
         LDA   L0131F1
         STA   L010EA4
         LDA   #L012936
         STA   $00
         LDA   #^L012936
         STA   $02
         TYA
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L010EA6
         INY
         INY
         LDA   [$00],Y
         STA   L010EA8
         JSR   L0131F3
         LDA   L010EA2
         STA   L0131EF
         LDA   L010EA4
         STA   L0131F1
         LDA   #L01292C
         STA   $00
         LDA   #^L01292C
         STA   $02
L01313E  REP   #$30
         LDA   #$0000
         STA   L010EA2
         LDA   #$0002
         STA   L010EA6
         JSR   L016D76
         TAY
         SEP   #$20
         LDA   [$00],Y
         BNE   L01313E
         LDA   #$01
         STA   [$00],Y
         REP   #$30
         LDA   L0131EF
         STA   L010EA2
         LDA   L0131F1
         STA   L010EA4
         LDA   #L012936
         STA   $00
         LDA   #^L012936
         STA   $02
         TYA
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L010EA6
         INY
         INY
         LDA   [$00],Y
         STA   L010EA8
         JSR   L0131F3
         LDA   L010EA2
         STA   L0131EF
         LDA   L010EA4
         STA   L0131F1
         LDA   #L01292C
         STA   $00
         LDA   #^L01292C
         STA   $02
L01319B  REP   #$30
         LDA   #$0000
         STA   L010EA2
         LDA   #$0002
         STA   L010EA6
         JSR   L016D76
         TAY
         SEP   #$20
         LDA   [$00],Y
         BNE   L01319B
         LDA   #$01
         STA   [$00],Y
         REP   #$30
         LDA   L0131EF
         STA   L010EA2
         LDA   L0131F1
         STA   L010EA4
         LDA   #L012936
         STA   $00
         LDA   #^L012936
         STA   $02
         TYA
         ASL
         ASL
         TAY
         LDA   [$00],Y
         STA   L010EA6
         INY
         INY
         LDA   [$00],Y
         STA   L010EA8
         JSR   L0131F3
         LDA   L010EA2
         STA   L0131EF
         LDA   L010EA4
         STA   L0131F1
         RTS

L0131EF  DW    $0000
L0131F1  DW    $0000
L0131F3  REP   #$30
         LDA   L010EA2
         STA   $00
         LDA   L010EA4
         STA   $02
         LDA   L010EA6
         STA   $04
         LDA   L010EA8
         STA   $06
         LDY   #$0000
         SEP   #$20
L01320E  LDA   [$00],Y
         CMP   #$0D
         BEQ   L01321A
         STA   [$04],Y
         INY
         JMP   L01320E

L01321A  LDA   #$00
         STA   [$04],Y
         INY
         INY
         REP   #$30
         TYA
         CLC
         ADC   L010EA2
         STA   L010EA2
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA4
         RTS

L013234  REP   #$30
         LDA   L010FCD
         STA   L010EA2
         LDA   L010FCF
         STA   L010EA4
         JSR   L016C5A
         LDA   #L0128B2
         STA   L010EA2
         LDA   #^L0128B2
         STA   L010EA4
         LDA   #$013F
         STA   L010EA6
         LDA   #$0000
         STA   L010EAA
         LDA   #$0063
         STA   L010EAE
         JSR   L012227
         LDA   #L0128DA
         STA   L010EA2
         LDA   #^L0128DA
         STA   L010EA4
         LDA   #$013F
         STA   L010EA6
         LDA   #$0000
         STA   L010EAA
         LDA   #$0073
         STA   L010EAE
         JSR   L012227
         LDA   #$0001
         STA   L010EA2
         JSR   L01733D
         LDA   #L012902
         STA   L010EA2
         LDA   #^L012902
         STA   L010EA4
         LDA   #$009B
         STA   L010EA6
         LDA   #$006F
         STA   L010EAA
         LDA   #$000E
         STA   L010EAE
         JSR   L012227
         LDA   #L012910
         STA   L010EA2
         LDA   #^L012910
         STA   L010EA4
         LDA   #$009B
         STA   L010EA6
         LDA   #$006F
         STA   L010EAA
         LDA   #$0026
         STA   L010EAE
         JSR   L012227
         LDA   #L01291E
         STA   L010EA2
         LDA   #^L01291E
         STA   L010EA4
         LDA   #$009B
         STA   L010EA6
         LDA   #$006F
         STA   L010EAA
         LDA   #$003E
         STA   L010EAE
         JSR   L012227
         JSR   L016C85
         RTS

         REP   #$30
         LDA   #$0001
         STA   L013327
L0132FF  JSR   L016C85
         LDX   L013327
         DEX
         STX   L010EA2
         JSR   L012F45
         LDA   #$0000
         STA   L010EA2
         JSR   L01229D
         JSR   L0178CF
         JSR   L016D1F
         INC   L013327
         LDA   L013327
         CMP   L0127DA
         BCC   L0132FF
         RTS

L013327  DW    $0000
L013329  REP   #$30
         JSR   L016C85
         JSR   L019FC9
L013331  JSR   L019358
         CMP   #$0001
         BNE   L01333C
         JMP   L013508

L01333C  CMP   #$0002
         BNE   L013344
         JMP   L01334C

L013344  CMP   #$001B
         BNE   L013331
         JMP   L013A44

L01334C  STZ   L01887A
         JSR   L012209
         JSR   L0184A2
         JSR   L017964
         JSR   L018C12
         LDA   #L018893
         STA   L010EA2
         LDA   #^L018893
         STA   L010EA4
         LDA   #L018893
         STA   L010EA6
         LDA   #^L018893
         STA   L010EA8
         LDA   #$0001
         STA   L010EAA
         JSR   L018F6E
         LDA   L018884
         CMP   #$0002
         BNE   L0133A5
         LDA   #L0188AB
         STA   L010EA2
         LDA   #^L0188AB
         STA   L010EA4
         LDA   #L0188AB
         STA   L010EA6
         LDA   #^L0188AB
         STA   L010EA8
         LDA   #$0002
         STA   L010EAA
         JSR   L018F6E
L0133A5  JSR   L018574
         LDA   #L012EDA
         STA   L010EA2
         LDA   #^L012EDA
         STA   L010EA4
         LDA   L010FD5
         STA   L010EA6
         LDA   L010FD7
         STA   L010EA8
         LDA   #L010F8D
         STA   L010EAA
         LDA   #^L010F8D
         STA   L010EAC
         JSR   L017096
         LDA   #L012EFC
         STA   L010EA2
         LDA   #^L012EFC
         STA   L010EA4
         LDA   L010FD9
         STA   L010EA6
         LDA   L010FDB
         STA   L010EA8
         LDA   #L010FAD
         STA   L010EAA
         LDA   #^L010FAD
         STA   L010EAC
         JSR   L017096
L0133F6  JSR   L0185B1
         JSR   L0195D5
         CMP   #$0001
         BNE   L01342D
         JSR   L0197FF
         CMP   #$0001
         BEQ   L01341B
         LDA   #$0011
         STA   L010EA2
         JSR   L011A8A
         LDA   #$0035
         STA   L0127DA
         JMP   L01348E

L01341B  LDA   #$0013
         STA   L010EA2
         JSR   L011A8A
         LDA   #$001E
         STA   L0127DA
         JMP   L01348E

L01342D  JSR   L019A1A
         CMP   #$0001
         BNE   L013447
         LDA   #$0005
         STA   L010EA2
         JSR   L011A8A
         LDA   #$002F
         STA   L0127DA
         JMP   L01346D

L013447  CMP   #$0002
         BNE   L01345E
         LDA   #$0008
         STA   L010EA2
         JSR   L011A8A
         LDA   #$0022
         STA   L0127DA
         JMP   L01346D

L01345E  LDA   #$0002
         STA   L010EA2
         JSR   L011A8A
         LDA   #$0016
         STA   L0127DA
L01346D  LDA   #$0002
         STA   L010EA2
         JSR   L011EA9
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L0179F0
         LDA   #$0003
         STA   L010EA2
         JSR   L011960
         JSR   L0110AA
L01348E  STZ   L0127DC
         LDA   #L0127E0
         STA   L010EA2
         LDA   #^L0127E0
         STA   L010EA4
         LDA   #$0064
         STA   L010EA6
         LDA   #$0000
         STA   L010EAA
         JSR   L016ED0
         JSR   L0185EF
         JSR   L018340
         JSR   L018412
         JSR   L01187F
         JSR   L0179F0
L0134BB  JSR   L016C85
         JSR   L012F1F
         LDA   #$0000
         STA   L010EA2
         JSR   L01229D
         JSR   L01237C
         CMP   #$001B
         BEQ   L0134E8
         JSR   L017933
         LDA   L018882
         CMP   #$0001
         BNE   L0134BB
         INC   L0127DC
         LDA   L0127DC
         CMP   #$000A
         BNE   L0134BB
L0134E8  JSR   L0183E4
         JSR   L018483
         JSR   L011FD2
         JSR   L011FE4
         JSR   L0189C3
         LDA   L010EA2
         CMP   #$0001
         BNE   L013502
         JMP   L0133F6

L013502  JSR   L017FBA
         JMP   L013A44

L013508  JSR   L0179F0
         JSR   L012209
         LDA   #$0002
         STA   L010EA2
         JSR   L011EA9
         LDA   #$0012
         STA   L010EA2
         JSR   L011A8A
         LDA   #L013A47
         STA   L010EA2
         LDA   #^L013A47
         STA   L010EA4
         LDA   L010FD1
         STA   L010EA6
         LDA   L010FD3
         STA   L010EA8
         LDA   #L010F6D
         STA   L010EAA
         LDA   #^L010F6D
         STA   L010EAC
         JSR   L017096
         LDA   #$0000
         STA   L012788
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L01187F
         LDA   #$0001
         STA   L010EA2
         LDA   #$0004
         STA   L010EA6
         LDA   L010FCD
         STA   L010EAA
         LDA   L010FCF
         STA   L010EAC
         JSR   L011FF6
         LDA   #$0004
         STA   L01276E
         LDA   L010FD1
         STA   L010EA2
         LDA   L010FD3
         STA   L010EA4
         LDA   L010FCD
         STA   L010EA6
         LDA   L010FCF
         STA   L010EA8
         JSR   L011930
         LDA   #$0001
         STA   L010EA2
         JSR   L0118F4
         LDA   L010FCD
         STA   L010EA2
         LDA   L010FCF
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L012047
         LDA   #$0000
         STA   L010EA2
         LDA   #L010F6D
         STA   L010EA6
         LDA   #^L010F6D
         STA   L010EA8
         LDA   L010FCD
         STA   L010EAA
         LDA   L010FCF
         STA   L010EAC
         JSR   L017873
         LDA   #L013A65
         STA   L010EA2
         LDA   #^L013A65
         STA   L010EA4
         LDA   L010FD5
         STA   L010EA6
         LDA   L010FD7
         STA   L010EA8
         LDA   #L010F8D
         STA   L010EAA
         LDA   #^L010F8D
         STA   L010EAC
         JSR   L017096
         LDA   #$0001
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0005
         STA   L0127C0
         LDA   L010FD5
         STA   L0127C4
         LDA   L010FD7
         STA   L0127C6
         LDA   #L010F8D
         STA   L0127C8
         LDA   #^L010F8D
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L013A83
         STA   L0127CC
         LDA   #^L013A83
         STA   L0127CE
         LDA   L010FD9
         STA   L0127D0
         LDA   L010FDB
         STA   L0127D2
         LDA   #L010FAD
         STA   L0127D4
         LDA   #^L010FAD
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L01365A
         JMP   L013331

L01365A  LDA   L010FD5
         STA   L010EA2
         LDA   L010FD7
         STA   L010EA4
         LDA   #L013B38
         STA   L010EA6
         LDA   #^L013B38
         STA   L010EA8
         LDA   #$2000
         STA   L010EAA
         LDA   #$00E1
         STA   L010EAC
         LDA   #L013B40
         STA   L010EAE
         LDA   #^L013B40
         STA   L010EB0
         LDA   #$0000
         STA   L010EB2
         JSR   L017684
         LDA   #$0001
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$000E
         STA   L0127C0
         LDA   L010FD9
         STA   L0127C4
         LDA   L010FDB
         STA   L0127C6
         LDA   #L010FAD
         STA   L0127C8
         LDA   #^L010FAD
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L013AA1
         STA   L0127CC
         LDA   #^L013AA1
         STA   L0127CE
         LDA   L010FD5
         STA   L0127D0
         LDA   L010FD7
         STA   L0127D2
         LDA   #L010F8D
         STA   L0127D4
         LDA   #^L010F8D
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L0136F2
         JMP   L013331

L0136F2  LDA   #$0003
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$000E
         STA   L0127C0
         LDA   L010FD5
         STA   L0127C4
         LDA   L010FD7
         STA   L0127C6
         LDA   #L010F8D
         STA   L0127C8
         LDA   #^L010F8D
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L013ABF
         STA   L0127CC
         LDA   #^L013ABF
         STA   L0127CE
         LDA   L010FD9
         STA   L0127D0
         LDA   L010FDB
         STA   L0127D2
         LDA   #L010FAD
         STA   L0127D4
         LDA   #^L010FAD
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L013751
         JMP   L013331

L013751  LDA   #$0001
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$000B
         STA   L0127C0
         LDA   L010FD9
         STA   L0127C4
         LDA   L010FDB
         STA   L0127C6
         LDA   #L010FAD
         STA   L0127C8
         LDA   #^L010FAD
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L013ADD
         STA   L0127CC
         LDA   #^L013ADD
         STA   L0127CE
         LDA   L010FD5
         STA   L0127D0
         LDA   L010FD7
         STA   L0127D2
         LDA   #L010F8D
         STA   L0127D4
         LDA   #^L010F8D
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L0137B0
         JMP   L013331

L0137B0  LDA   #$0003
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0002
         STA   L0127C0
         LDA   L010FD5
         STA   L0127C4
         LDA   L010FD7
         STA   L0127C6
         LDA   #L010F8D
         STA   L0127C8
         LDA   #^L010F8D
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L013AFB
         STA   L0127CC
         LDA   #^L013AFB
         STA   L0127CE
         LDA   L010FD9
         STA   L0127D0
         LDA   L010FDB
         STA   L0127D2
         LDA   #L010FAD
         STA   L0127D4
         LDA   #^L010FAD
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L01380F
         JMP   L013331

L01380F  LDA   #$0003
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0007
         STA   L0127C0
         LDA   L010FD9
         STA   L0127C4
         LDA   L010FDB
         STA   L0127C6
         LDA   #L010FAD
         STA   L0127C8
         LDA   #^L010FAD
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L013B19
         STA   L0127CC
         LDA   #^L013B19
         STA   L0127CE
         LDA   L010FD5
         STA   L0127D0
         LDA   L010FD7
         STA   L0127D2
         LDA   #L010F8D
         STA   L0127D4
         LDA   #^L010F8D
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L01386E
         JMP   L013331

L01386E  JSR   L014361
         JSR   L011861
         LDA   L010FD5
         STA   L013CF3
         LDA   L010FD7
         STA   L013CF5
         LDA   #L013C97
         STA   L013CE7
         LDA   #^L013C97
         STA   L013CE9
         LDA   #L013C9F
         STA   L013CEB
         LDA   #^L013C9F
         STA   L013CED
         LDA   L010FCD
         STA   L013CF7
         LDA   L010FCF
         STA   L013CF9
         LDA   #L013CA7
         STA   L013CEF
         LDA   #^L013CA7
         STA   L013CF1
         JSR   L0143AC
         LDA   L010FD5
         STA   L013CF3
         LDA   L010FD7
         STA   L013CF5
         LDA   #L013CAF
         STA   L013CE7
         LDA   #^L013CAF
         STA   L013CE9
         LDA   #L013CB7
         STA   L013CEB
         LDA   #^L013CB7
         STA   L013CED
         LDA   L010FCD
         STA   L013CF7
         LDA   L010FCF
         STA   L013CF9
         LDA   #L013CBF
         STA   L013CEF
         LDA   #^L013CBF
         STA   L013CF1
         JSR   L0143AC
         JSR   L0118AF
         JSR   L011861
         LDA   L010FD9
         STA   L010EA2
         LDA   L010FDB
         STA   L010EA4
         LDA   L010FCD
         STA   L010EA6
         LDA   L010FCF
         STA   L010EA8
         JSR   L011930
         JSR   L0178CF
         JSR   L016D1F
         LDA   L010FD5
         STA   L013CF3
         LDA   L010FD7
         STA   L013CF5
         LDA   #L013CC7
         STA   L013CE7
         LDA   #^L013CC7
         STA   L013CE9
         LDA   #L013CCF
         STA   L013CEB
         LDA   #^L013CCF
         STA   L013CED
         LDA   L010FCD
         STA   L013CF7
         LDA   L010FCF
         STA   L013CF9
         LDA   #L013CD7
         STA   L013CEF
         LDA   #^L013CD7
         STA   L013CF1
         JSR   L0143AC
         JSR   L0118AF
         JSR   L011861
         LDA   L010FD9
         STA   L010EA2
         LDA   L010FDB
         STA   L010EA4
         LDA   L010FCD
         STA   L010EA6
         LDA   L010FCF
         STA   L010EA8
         JSR   L011930
         JSR   L0178CF
         JSR   L016D1F
         LDA   #$0005
         STA   L013CD9
         LDA   #$0054
         STA   L013CD7
         LDA   #$0061
         STA   L013CDD
         LDA   #$00A7
         STA   L013CDB
         LDA   L010FD5
         STA   L013CF3
         LDA   L010FD7
         STA   L013CF5
         LDA   #L013CC7
         STA   L013CE7
         LDA   #^L013CC7
         STA   L013CE9
         LDA   #L013CCF
         STA   L013CEB
         LDA   #^L013CCF
         STA   L013CED
         LDA   L010FCD
         STA   L013CF7
         LDA   L010FCF
         STA   L013CF9
         LDA   #L013CD7
         STA   L013CEF
         LDA   #^L013CD7
         STA   L013CF1
         JSR   L0143AC
         JSR   L0118AF
         LDA   #$0004
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0007
         STA   L0127C0
         LDA   L010FD9
         STA   L0127C4
         LDA   L010FDB
         STA   L0127C6
         LDA   #L010FAD
         STA   L0127C8
         LDA   #^L010FAD
         STA   L0127CA
         LDA   #$0000
         STA   L0127D8
         JSR   L0125DF
         CMP   #$0000
         BEQ   L013A14
         JMP   L013331

L013A14  JSR   L0178CF
         JSR   L0118D0
         CMP   #$001B
         BNE   L013A22
         JMP   L013331

L013A22  CMP   #$0067
         BNE   L013A33
         LDA   #$0003
         STA   L010EA2
         JSR   L011960
         JMP   L013A14

L013A33  JSR   L011FD2
         JSR   L011FE4
         JSR   L018E00
         CMP   #$001B
         BEQ   L013A44
         JMP   L01334C
L013A44  JMP   L01185E

L013A47  STR   '1/sin.pics/s21.pc1'
L013A65  STR   '1/sin.pics/s22.pc1'
L013A83  STR   '1/sin.pics/s23.pc1'
L013AA1  STR   '1/sin.pics/s24.pc1'
L013ABF  STR   '1/sin.pics/s25.pc1'
L013ADD  STR   '1/sin.pics/s26.pc1'
L013AFB  STR   '1/sin.pics/s27.pc1'
L013B19  STR   '1/sin.pics/s27p.pc1'
L013B38  DW    $000B
         DW    $0055
         DW    $003B
         DW    $00B8
L013B40  DW    $0054
         DW    $004B
         DW    $0084
         DW    $00AE
L013B48  STR   '1/sin.pics/s21.pc1'
L013B66  STR   '1/sin.pics/s31.pc1'
L013B84  STR   '1/sin.pics/s321.pc1'
L013BA3  STR   '1/sin.pics/s322.pc1'
L013BC2  STR   '1/sin.pics/s33.pc1'
L013BE0  STR   '1/sin.pics/s34.pc1'
L013BFE  STR   '1/sin.pics/s35.pc1'
L013C1C  STR   '1/sin.pics/s361.pc1'
L013C3B  STR   '1/sin.pics/s362.pc1'
L013C5A  STR   '1/sin.pics/s363.pc1'
L013C79  STR   '1/sin.pics/s37.pc1'
L013C97  DW    $0071
         DW    $00BB
         DW    $00C4
         DW    $0117
L013C9F  DW    $000F
         DW    $00BB
         DW    $0062
         DW    $0117
L013CA7  DW    $0054
L013CA9  DW    $0070
L013CAB  DW    $00A7
L013CAD  DW    $00CC
L013CAF  DW    $0071
         DW    $005E
         DW    $00C4
         DW    $00BA
L013CB7  DW    $0071
         DW    $0001
         DW    $00C4
         DW    $005D
L013CBF  DW    $0054
L013CC1  DW    $00E4
L013CC3  DW    $00A7
L013CC5  DW    $0140
L013CC7  DW    $000F
         DW    $005E
         DW    $0062
         DW    $00BA
L013CCF  DW    $000F
         DW    $0001
         DW    $0062
         DW    $005D
L013CD7  DW    $0054
L013CD9  DW    $006E
L013CDB  DW    $00A7
L013CDD  DW    $00CA
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L013CE7  DB    $00
         DB    $00
L013CE9  DB    $00
         DB    $00
L013CEB  DB    $00
         DB    $00
L013CED  DB    $00
         DB    $00
L013CEF  DB    $00
         DB    $00
L013CF1  DB    $00
         DB    $00
L013CF3  DB    $00
         DB    $00
L013CF5  DB    $00
         DB    $00
L013CF7  DB    $00
         DB    $00
L013CF9  DB    $00
         DB    $00
L013CFB  REP   #$30
         JSR   L016C85
         JSR   L019FC9
L013D03  JSR   L019358
         CMP   #$0001
         BNE   L013D0E
         JMP   L013EDA

L013D0E  CMP   #$0002
         BNE   L013D16
         JMP   L013D1E

L013D16  CMP   #$001B
         BNE   L013D03
         JMP   L01435E

L013D1E  STZ   L01887A
         JSR   L012209
         JSR   L017964
         JSR   L0184A2
         JSR   L018C12
         LDA   #L018893
         STA   L010EA2
         LDA   #^L018893
         STA   L010EA4
         LDA   #L018893
         STA   L010EA6
         LDA   #^L018893
         STA   L010EA8
         LDA   #$0001
         STA   L010EAA
         JSR   L018F6E
         LDA   L018884
         CMP   #$0002
         BNE   L013D77
         LDA   #L0188AB
         STA   L010EA2
         LDA   #^L0188AB
         STA   L010EA4
         LDA   #L0188AB
         STA   L010EA6
         LDA   #^L0188AB
         STA   L010EA8
         LDA   #$0002
         STA   L010EAA
         JSR   L018F6E
L013D77  JSR   L018574
         LDA   #L012EDA
         STA   L010EA2
         LDA   #^L012EDA
         STA   L010EA4
         LDA   L010FD5
         STA   L010EA6
         LDA   L010FD7
         STA   L010EA8
         LDA   #L010F8D
         STA   L010EAA
         LDA   #^L010F8D
         STA   L010EAC
         JSR   L017096
         LDA   #L012EFC
         STA   L010EA2
         LDA   #^L012EFC
         STA   L010EA4
         LDA   L010FD9
         STA   L010EA6
         LDA   L010FDB
         STA   L010EA8
         LDA   #L010FAD
         STA   L010EAA
         LDA   #^L010FAD
         STA   L010EAC
         JSR   L017096
L013DC8  JSR   L0185B1
         JSR   L0195D5
         CMP   #$0001
         BNE   L013DFF
         JSR   L0197FF
         CMP   #$0001
         BEQ   L013DED
         LDA   #$0014
         STA   L010EA2
         JSR   L011A8A
         LDA   #$0041
         STA   L0127DA
         JMP   L013E60

L013DED  LDA   #$0016
         STA   L010EA2
         JSR   L011A8A
         LDA   #$001E
         STA   L0127DA
         JMP   L013E60

L013DFF  JSR   L019A1A
         CMP   #$0001
         BNE   L013E19
         LDA   #$0006
         STA   L010EA2
         JSR   L011A8A
         LDA   #$0029
         STA   L0127DA
         JMP   L013E3F

L013E19  CMP   #$0002
         BNE   L013E30
         LDA   #$0009
         STA   L010EA2
         JSR   L011A8A
         LDA   #$001F
         STA   L0127DA
         JMP   L013E3F

L013E30  LDA   #$0003
         STA   L010EA2
         JSR   L011A8A
         LDA   #$001E
         STA   L0127DA
L013E3F  LDA   #$0003
         STA   L010EA2
         JSR   L011EA9
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L0179F0
         LDA   #$0003
         STA   L010EA2
         JSR   L011960
         JSR   L0110AA
L013E60  STZ   L0127DC
         LDA   #L0127E0
         STA   L010EA2
         LDA   #^L0127E0
         STA   L010EA4
         LDA   #$0064
         STA   L010EA6
         LDA   #$0000
         STA   L010EAA
         JSR   L016ED0
         JSR   L0185EF
         JSR   L018340
         JSR   L018412
         JSR   L01187F
         JSR   L0179F0
L013E8D  JSR   L016C85
         JSR   L012F1F
         LDA   #$0000
         STA   L010EA2
         JSR   L01229D
         JSR   L01237C
         CMP   #$001B
         BEQ   L013EBA
         JSR   L017933
         LDA   L018882
         CMP   #$0001
         BNE   L013E8D
         INC   L0127DC
         LDA   L0127DC
         CMP   #$000A
         BNE   L013E8D
L013EBA  JSR   L0183E4
         JSR   L018483
         JSR   L011FD2
         JSR   L011FE4
         JSR   L0189C3
         LDA   L010EA2
         CMP   #$0001
         BNE   L013ED4
         JMP   L013DC8

L013ED4  JSR   L017FBA
         JMP   L01435E

L013EDA  JSR   L0179F0
         JSR   L012209
         LDA   #$0003
         STA   L010EA2
         JSR   L011EA9
         LDA   #$0015
         STA   L010EA2
         JSR   L011A8A
         LDA   #L013B48
         STA   L010EA2
         LDA   #^L013B48
         STA   L010EA4
         LDA   L010FD1
         STA   L010EA6
         LDA   L010FD3
         STA   L010EA8
         LDA   #L010F6D
         STA   L010EAA
         LDA   #^L010F6D
         STA   L010EAC
         JSR   L017096
         LDA   #$0000
         STA   L012788
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L01187F
         LDA   #$0001
         STA   L010EA2
         LDA   #$0004
         STA   L010EA6
         LDA   L010FCD
         STA   L010EAA
         LDA   L010FCF
         STA   L010EAC
         JSR   L011FF6
         LDA   #$0004
         STA   L01276E
         LDA   L010FD1
         STA   L010EA2
         LDA   L010FD3
         STA   L010EA4
         LDA   L010FCD
         STA   L010EA6
         LDA   L010FCF
         STA   L010EA8
         JSR   L011930
         LDA   #$0001
         STA   L010EA2
         JSR   L0118F4
         LDA   L010FCD
         STA   L010EA2
         LDA   L010FCF
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L012047
         LDA   #$0000
         STA   L010EA2
         LDA   #L010F6D
         STA   L010EA6
         LDA   #^L010F6D
         STA   L010EA8
         LDA   L010FCD
         STA   L010EAA
         LDA   L010FCF
         STA   L010EAC
         JSR   L017873
         LDA   #L013B66
         STA   L010EA2
         LDA   #^L013B66
         STA   L010EA4
         LDA   L010FD5
         STA   L010EA6
         LDA   L010FD7
         STA   L010EA8
         LDA   #L010F8D
         STA   L010EAA
         LDA   #^L010F8D
         STA   L010EAC
         JSR   L017096
         LDA   #$0002
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0006
         STA   L0127C0
         LDA   L010FD5
         STA   L0127C4
         LDA   L010FD7
         STA   L0127C6
         LDA   #L010F8D
         STA   L0127C8
         LDA   #^L010F8D
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L013B84
         STA   L0127CC
         LDA   #^L013B84
         STA   L0127CE
         LDA   L010FD9
         STA   L0127D0
         LDA   L010FDB
         STA   L0127D2
         LDA   #L010FAD
         STA   L0127D4
         LDA   #^L010FAD
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L01402C
         JMP   L013D03

L01402C  LDA   #$0001
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0006
         STA   L0127C0
         LDA   L010FD9
         STA   L0127C4
         LDA   L010FDB
         STA   L0127C6
         LDA   #L010FAD
         STA   L0127C8
         LDA   #^L010FAD
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L013BA3
         STA   L0127CC
         LDA   #^L013BA3
         STA   L0127CE
         LDA   L010FD5
         STA   L0127D0
         LDA   L010FD7
         STA   L0127D2
         LDA   #L010F8D
         STA   L0127D4
         LDA   #^L010F8D
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L01408B
         JMP   L013D03

L01408B  LDA   #$000A
         STA   L0127BE
L014091  LDA   L010FD5
         STA   L010EA2
         LDA   L010FD7
         STA   L010EA4
         LDA   #$2000
         STA   L010EA6
         LDA   #$00E1
         STA   L010EA8
         JSR   L011930
         LDA   L010FD9
         STA   L010EA2
         LDA   L010FDB
         STA   L010EA4
         LDA   #$2000
         STA   L010EA6
         LDA   #$00E1
         STA   L010EA8
         JSR   L011930
         DEC   L0127BE
         BNE   L014091
         LDA   #L013BC2
         STA   L010EA2
         LDA   #^L013BC2
         STA   L010EA4
         LDA   L010FD5
         STA   L010EA6
         LDA   L010FD7
         STA   L010EA8
         LDA   #L010F8D
         STA   L010EAA
         LDA   #^L010F8D
         STA   L010EAC
         JSR   L017096
         LDA   #$0006
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0003
         STA   L0127C0
         LDA   L010FD5
         STA   L0127C4
         LDA   L010FD7
         STA   L0127C6
         LDA   #L010F8D
         STA   L0127C8
         LDA   #^L010F8D
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L013BE0
         STA   L0127CC
         LDA   #^L013BE0
         STA   L0127CE
         LDA   L010FD9
         STA   L0127D0
         LDA   L010FDB
         STA   L0127D2
         LDA   #L010FAD
         STA   L0127D4
         LDA   #^L010FAD
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L014152
         JMP   L013D03

L014152  LDA   #$0002
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0006
         STA   L0127C0
         LDA   L010FD9
         STA   L0127C4
         LDA   L010FDB
         STA   L0127C6
         LDA   #L010FAD
         STA   L0127C8
         LDA   #^L010FAD
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L013BFE
         STA   L0127CC
         LDA   #^L013BFE
         STA   L0127CE
         LDA   L010FD5
         STA   L0127D0
         LDA   L010FD7
         STA   L0127D2
         LDA   #L010F8D
         STA   L0127D4
         LDA   #^L010F8D
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L0141B1
         JMP   L013D03

L0141B1  LDA   #$0001
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0006
         STA   L0127C0
         LDA   L010FD5
         STA   L0127C4
         LDA   L010FD7
         STA   L0127C6
         LDA   #L010F8D
         STA   L0127C8
         LDA   #^L010F8D
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L013C1C
         STA   L0127CC
         LDA   #^L013C1C
         STA   L0127CE
         LDA   L010FD9
         STA   L0127D0
         LDA   L010FDB
         STA   L0127D2
         LDA   #L010FAD
         STA   L0127D4
         LDA   #^L010FAD
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L014210
         JMP   L013D03

L014210  LDA   #$0002
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$000A
         STA   L0127C0
         LDA   L010FD9
         STA   L0127C4
         LDA   L010FDB
         STA   L0127C6
         LDA   #L010FAD
         STA   L0127C8
         LDA   #^L010FAD
         STA   L0127CA
         LDA   #$0001
         STA   L0127D8
         LDA   #L013C3B
         STA   L0127CC
         LDA   #^L013C3B
         STA   L0127CE
         LDA   L010FD5
         STA   L0127D0
         LDA   L010FD7
         STA   L0127D2
         LDA   #L010F8D
         STA   L0127D4
         LDA   #^L010F8D
         STA   L0127D6
         JSR   L0125DF
         CMP   #$0000
         BEQ   L01426F
         JMP   L013D03

L01426F  LDA   #L013C5A
         STA   L010EA2
         LDA   #^L013C5A
         STA   L010EA4
         LDA   L010FD9
         STA   L010EA6
         LDA   L010FDB
         STA   L010EA8
         LDA   #L010FAD
         STA   L010EAA
         LDA   #^L010FAD
         STA   L010EAC
         JSR   L017096
         LDA   L010FD5
         STA   L010EA2
         LDA   L010FD7
         STA   L010EA4
         LDA   #$2000
         STA   L010EA6
         LDA   #$00E1
         STA   L010EA8
         JSR   L011930
         LDA   L010FD9
         STA   L010EA2
         LDA   L010FDB
         STA   L010EA4
         LDA   #$2000
         STA   L010EA6
         LDA   #$00E1
         STA   L010EA8
         JSR   L011930
         LDA   #L013C79
         STA   L010EA2
         LDA   #^L013C79
         STA   L010EA4
         LDA   L010FD9
         STA   L010EA6
         LDA   L010FDB
         STA   L010EA8
         LDA   #L010FAD
         STA   L010EAA
         LDA   #^L010FAD
         STA   L010EAC
         JSR   L017096
         LDA   #$0003
         STA   L0127BE
         LDA   #$0001
         STA   L0127C2
         LDA   #$0009
         STA   L0127C0
         LDA   L010FD9
         STA   L0127C4
         LDA   L010FDB
         STA   L0127C6
         LDA   #L010FAD
         STA   L0127C8
         LDA   #^L010FAD
         STA   L0127CA
         LDA   #$0000
         STA   L0127D8
         JSR   L0125DF
         CMP   #$0000
         BEQ   L01432E
         JMP   L013D03

L01432E  JSR   L0178CF
         JSR   L0118D0
         CMP   #$001B
         BNE   L01433C
         JMP   L013D03

L01433C  CMP   #$0067
         BNE   L01434D
         LDA   #$0003
         STA   L010EA2
         JSR   L011960
         JMP   L01432E

L01434D  JSR   L011FD2
         JSR   L011FE4
         JSR   L018E00
         CMP   #$001B
         BEQ   L01435E
         JMP   L013D1E
L01435E  JMP   L01185E

L014361  REP   #$30
         LDA   #$0070
         STA   L013CA9
         LDA   #$0054
         STA   L013CA7
         LDA   #$00CC
         STA   L013CAD
         LDA   #$00A7
         STA   L013CAB
         LDA   #$00E4
         STA   L013CC1
         LDA   #$0054
         STA   L013CBF
         LDA   #$0140
         STA   L013CC5
         LDA   #$00A7
         STA   L013CC3
         LDA   #$006E
         STA   L013CD9
         LDA   #$0054
         STA   L013CD7
         LDA   #$00CA
         STA   L013CDD
         LDA   #$00A7
         STA   L013CDB
         RTS

L0143AC  REP   #$30
         LDA   L013CF3
         STA   L010EA2
         LDA   L013CF5
         STA   L010EA4
         LDA   L013CE7
         STA   L010EA6
         LDA   L013CE9
         STA   L010EA8
         LDA   L013CF7
         STA   L010EAA
         LDA   L013CF9
         STA   L010EAC
         LDA   L013CEF
         STA   L010EAE
         LDA   L013CF1
         STA   L010EB0
         LDA   #$0003
         STA   L010EB2
         JSR   L017684
         LDA   L013CF3
         STA   L010EA2
         LDA   L013CF5
         STA   L010EA4
         LDA   L013CEB
         STA   L010EA6
         LDA   L013CED
         STA   L010EA8
         LDA   L013CF7
         STA   L010EAA
         LDA   L013CF9
         STA   L010EAC
         LDA   L013CEF
         STA   L010EAE
         LDA   L013CF1
         STA   L010EB0
         LDA   #$0001
         STA   L010EB2
         JSR   L017684
         RTS

L014421  REP   #$30
         JSR   L012209
         JSR   L0149E4
         JSR   L016C85
         STZ   L01887A
         JSR   L017964
         JSR   L0184A2
         JSR   L018C12
         LDA   #L018893
         STA   L010EA2
         LDA   #^L018893
         STA   L010EA4
         LDA   #L018893
         STA   L010EA6
         LDA   #^L018893
         STA   L010EA8
         LDA   #$0001
         STA   L010EAA
         JSR   L018F6E
         LDA   L018884
         CMP   #$0002
         BNE   L014482
         LDA   #L0188AB
         STA   L010EA2
         LDA   #^L0188AB
         STA   L010EA4
         LDA   #L0188AB
         STA   L010EA6
         LDA   #^L0188AB
         STA   L010EA8
         LDA   #$0002
         STA   L010EAA
         JSR   L018F6E
L014482  JSR   L018574
L014485  JSR   L018340
         JSR   L018412
         JSR   L014818
         STZ   L010EA2
         LDA   #$0007
         STA   L010EA6
         LDA   #L014ADB
         STA   L010EAA
         LDA   #^L014ADB
         STA   L010EAC
         JSR   L0147AA
         JSR   L019FC9
         LDA   #$0001
         STA   L010EA2
         JSR   L01733D
         LDA   #$0000
         STA   L010EA2
         LDA   #L010F4D
         STA   L010EA6
         LDA   #^L010F4D
         STA   L010EA8
         LDA   L010FCD
         STA   L010EAA
         LDA   L010FCF
         STA   L010EAC
         JSR   L017873
         JSR   L011080
         STZ   L014CD8
L0144D9  JSR   L01489E
L0144DC  JSR   L014721
         CMP   #$FFFF
         BEQ   L0144F7
         CMP   #$FFFE
         BNE   L0144EC
         JMP   L0145DD

L0144EC  STA   L014CEE
         STA   L010EA2
         JSR   L01464C
         BRA   L0144FD
L0144F7  JSR   L011080
         JMP   L0144DC

L0144FD  JSR   L014721
         CMP   #$FFFF
         BEQ   L01451D
         CMP   #$FFFE
         BNE   L01450D
         JMP   L0145DD

L01450D  CMP   L014CEE
         BEQ   L01451D
         STA   L014CF4
         STA   L010EA2
         JSR   L01464C
         BRA   L014523
L01451D  JSR   L011080
         JMP   L0144FD

L014523  LDA   #L014ADB
         STA   $04
         LDA   #^L014ADB
         STA   $06
         LDA   L014CF4
         ASL
         TAY
         LDA   [$04],Y
         STA   L010EA2
         LDA   L014CEE
         ASL
         TAY
         LDA   [$04],Y
         CMP   L010EA2
         BEQ   L014546
         JMP   L014585

L014546  JSR   L017903
         LDA   #L0185FF
         STA   L010EA2
         LDA   #^L0185FF
         STA   L010EA4
         JSR   L0145F7
         JSR   L0182D0
         LDA   #L014ADB
         STA   $10
         LDA   #^L014ADB
         STA   $12
         LDA   L014CEE
         ASL
         TAY
         LDA   #$FFFF
         STA   [$10],Y
         STA   L014CEE
         LDA   L014CF4
         ASL
         TAY
         LDA   #$FFFF
         STA   [$10],Y
         STA   L014CF4
         INC   L014CD8
         JMP   L0145C9

L014585  JSR   L01791B
         LDA   #L014B51
         STA   L010EA2
         LDA   #^L014B51
         STA   L010EA4
         JSR   L0145F7
         JSR   L01102C
         JSR   L018283
         JSR   L0178CF
         JSR   L016D1F
         JSR   L0178CF
         LDA   L014CEE
         STA   L010EA2
         JSR   L0146B3
         LDA   L014CF4
         STA   L010EA2
         JSR   L0146B3
         LDA   #$FFFF
         STA   L014CEE
         LDA   #$FFFF
         STA   L014CF4
         JSR   L017933
         BRA   L0145D2
L0145C9  JSR   L0178CF
         JSR   L016D1F
         JSR   L0178CF
L0145D2  LDA   L014CD8
         CMP   #$0008
         BEQ   L0145DD
         JMP   L0144D9

L0145DD  JSR   L0183E4
         JSR   L018483
         JSR   L0189C3
         LDA   L010EA2
         CMP   #$0001
         BEQ   L0145F4
         JSR   L017FBA
         JMP   L01185E
L0145F4  JMP   L014485

L0145F7  REP   #$30
L0145F9  JSR   L016D68
         AND   #$0003
         CMP   #$0003
         BEQ   L0145F9
         STA   L018878
         ASL
         ASL
         CLC
         ADC   L010EA2
         STA   L010EBE
         LDA   #$0000
         ADC   L010EA4
         STA   L010EC0
         LDA   #L014B61
         STA   L010EA2
         LDA   #^L014B61
         STA   L010EA4
         STZ   L010EA6
         JSR   L016E73
         LDA   L010EBE
         STA   $00
         LDA   L010EC0
         STA   $02
         LDA   [$00]
         STA   L010EA2
         LDY   #$0002
         LDA   [$00],Y
         STA   L010EA4
         LDA   #$00C1
         STA   L010EA6
         JSR   L017359
         RTS

L01464C  REP   #$30
         LDA   L010EA2
         STA   L010EC2
         LDA   #L014ADB
         STA   $04
         LDA   #^L014ADB
         STA   $06
         LDA   L010EC2
         ASL
         TAY
         LDA   [$04],Y
         ASL
         ASL
         TAY
         LDA   #L014ABB
         STA   $04
         LDA   #^L014ABB
         STA   $06
         LDA   [$04],Y
         STA   L010EA2
         INY
         INY
         LDA   [$04],Y
         STA   L010EA6
         LDA   #$2000
         STA   L010EAA
         LDA   #$00E1
         STA   L010EAC
         LDA   #L014B69
         STA   L010EB2
         LDA   #^L014B69
         STA   L010EB4
         LDA   L010EC2
         ASL
         ASL
         ASL
         CLC
         ADC   L010EB2
         STA   L010EAE
         LDA   #$0000
         ADC   L010EB4
         STA   L010EB0
         JSR   L01497B
         JSR   L011080
         RTS

L0146B3  REP   #$30
         LDA   L010EA2
         STA   L010EC2
         LDA   L010FCD
         STA   L010EA2
         LDA   L010FCF
         STA   L010EA4
         LDA   #L014B69
         STA   L010EB2
         LDA   #^L014B69
         STA   L010EB4
         LDA   L010EC2
         ASL
         ASL
         ASL
         CLC
         ADC   L010EB2
         STA   L010EA6
         LDA   #$0000
         ADC   L010EB4
         STA   L010EA8
         LDA   #$2000
         STA   L010EAA
         LDA   #$00E1
         STA   L010EAC
         LDA   #L014B69
         STA   L010EB2
         LDA   #^L014B69
         STA   L010EB4
         LDA   L010EC2
         ASL
         ASL
         ASL
         CLC
         ADC   L010EB2
         STA   L010EAE
         LDA   #$0000
         ADC   L010EB4
         STA   L010EB0
         LDA   #$0000
         STA   L010EB2
         JSR   L017684
         RTS

L014721  REP   #$30
         JSR   L016EAE
L014726  JSR   L016CF1
         CMP   #$0000
         BEQ   L014731
         JMP   L01475A

L014731  JSR   L016CA9
         LDA   L010EAA
         BEQ   L014726
         LDA   #L014B69
         STA   L010EAA
         LDA   #^L014B69
         STA   L010EAC
         LDA   #$0010
         STA   L010EAE
         JSR   L0174DD
         LDA   L010EB2
         BNE   L014756
         JMP   L014797

L014756  DEC
         JMP   L014776

L01475A  CMP   #$001B
         BNE   L014762
         JMP   L0147A0

L014762  ORA   #$0020
         CMP   #$0061
         BCS   L01476D
L01476A  JMP   L014797

L01476D  CMP   #$0071
         BCS   L01476A
         SEC
         SBC   #$0061
L014776  STA   L010EBA
         JSR   L016EA4
         LDA   #L014ADB
         STA   $00
         LDA   #^L014ADB
         STA   $02
         LDA   L010EBA
         ASL
         TAY
         LDA   [$00],Y
         CMP   #$FFFF
         BNE   L014793
         RTS

L014793  LDA   L010EBA
         RTS

L014797  JSR   L01752D
         JSR   L011080
         JMP   L014726

L0147A0  JSR   L01752D
         JSR   L0178CF
         LDA   #$FFFE
         RTS

L0147AA  REP   #$30
         LDA   L010EA6
         SEC
         SBC   L010EA2
         INC
         STA   L010EB6
         ASL
         DEC
         STA   L010EB2
         INC
         TAX
         LDA   L010EAA
         STA   $0C
         LDA   L010EAC
         STA   $0E
         LDA   L010EA2
         STA   L010EBA
         LDA   #$FFFF
         LDY   #$0000
L0147D4  STA   [$0C],Y
         INY
         INY
         DEX
         BNE   L0147D4
L0147DB  STZ   L010EA2
         LDA   L010EB2
         STA   L010EA6
         JSR   L016D76
         ASL
         TAY
         LDA   [$0C],Y
         CMP   #$FFFF
         BNE   L0147DB
         LDA   L010EBA
         STA   [$0C],Y
L0147F5  STZ   L010EA2
         LDA   L010EB2
         STA   L010EA6
         JSR   L016D76
         ASL
         TAY
         LDA   [$0C],Y
         CMP   #$FFFF
         BNE   L0147F5
         LDA   L010EBA
         STA   [$0C],Y
         INC   L010EBA
         DEC   L010EB6
         BNE   L0147DB
         RTS

L014818  REP   #$30
         LDA   #L014ABB
         STA   $00
         LDA   #^L014ABB
         STA   $02
         STZ   L010EA2
         LDY   #$0000
L01482A  PHY
         JSR   L016D68
         PLY
         AND   #$0003
         BEQ   L01482A
         LDA   #$0001
         STA   L010F23
         TAX
L01483B  PHY
         PHX
         JSR   L016D68
         PLX
         PLY
         AND   #$001F
         CMP   #$0013
         BCS   L01483B
         INC
         STA   L010F25
         TYX
         LDA   L010EA2
         BNE   L014857
         JMP   L014880

L014857  LDY   #$0000
         STZ   L010EA6
L01485D  LDA   L010F23
         CMP   [$00],Y
         BNE   L014871
         INY
         INY
         LDA   L010F25
         CMP   [$00],Y
         BNE   L014873
         TXY
         JMP   L01482A

L014871  INY
         INY
L014873  INY
         INY
         INC   L010EA6
         LDA   L010EA6
         CMP   L010EA2
         BNE   L01485D
L014880  TXY
         LDA   L010F23
         STA   [$00],Y
         INY
         INY
         LDA   L010F25
         STA   [$00],Y
         INC   L010EA2
         LDA   L010EA2
         CMP   #$0008
         BEQ   L01489D
         INY
         INY
         JMP   L01482A
L01489D  RTS

L01489E  REP   #$30
         LDA   #L014B61
         STA   L010EA2
         LDA   #^L014B61
         STA   L010EA4
         STZ   L010EA6
         JSR   L016E73
         LDA   L018882
         CMP   #$0001
         BNE   L0148C7
         LDA   #L018893
         STA   $00
         LDA   #^L018893
         STA   $02
         JMP   L0148D1

L0148C7  LDA   #L0188AB
         STA   $00
         LDA   #^L0188AB
         STA   $02
L0148D1  LDA   #L014CB4+$10
         STA   $08
         LDA   #^L014CB4+$10
         STA   $0A
         LDY   #$0000
         SEP   #$20
L0148E0  LDA   [$00],Y
         BEQ   L0148EA
         STA   [$08],Y
         INY
         JMP   L0148E0

L0148EA  LDA   #$2E
         STA   [$08],Y
         INY
         LDA   #$00
         STA   [$08],Y
         REP   #$30
         LDA   #L014CB4
         STA   L010EA2
         LDA   #^L014CB4
         STA   L010EA4
         LDA   #$00C1
         STA   L010EA6
         JSR   L017359
         RTS

         REP   #$30
         LDY   L018878
         BNE   L014933
         LDA   L0187D5
         STA   L010EA2
         LDA   L0187D7
         STA   L010EA4
         LDA   L0187D9
         STA   L010EA6
         LDA   L0187DB
         STA   L010EA8
         LDA   L0187DD
         STA   L010EAA
         JMP   L014977

L014933  CPY   #$0002
         BNE   L014959
         LDA   L0187FB
         STA   L010EA2
         LDA   L0187FD
         STA   L010EA4
         LDA   L0187FF
         STA   L010EA6
         LDA   L018801
         STA   L010EA8
         LDA   L018803
         STA   L010EAA
         JMP   L014977

L014959  LDA   L018821
         STA   L010EA2
         LDA   L018823
         STA   L010EA4
         LDA   L018825
         STA   L010EA6
         LDA   L018827
         STA   L010EA8
         LDA   L018829
         STA   L010EAA
L014977  JSR   L011009
         RTS

L01497B  REP   #$30
         LDA   L010EA2
         STA   L010EB2
         LDA   L010FD1
         STA   L010EA2
         LDA   L010FD3
         STA   L010EA4
         LDA   L010EB2
         CMP   #$0001
         BEQ   L0149B7
         LDA   L010FD5
         STA   L010EA2
         LDA   L010FD7
         STA   L010EA4
         LDA   L010EB2
         CMP   #$0002
         BEQ   L0149B7
         LDA   L010FD9
         STA   L010EA2
         LDA   L010FDB
         STA   L010EA4
L0149B7  LDA   #L014B69
         STA   L010EB2
         LDA   #^L014B69
         STA   L010EB4
         LDA   L010EA6
         DEC
         ASL
         ASL
         ASL
         CLC
         ADC   L010EB2
         STA   L010EA6
         LDA   #$0000
         ADC   L010EB4
         STA   L010EA8
         LDA   #$0000
         STA   L010EB2
         JSR   L017684
         RTS

L0149E4  REP   #$30
         LDA   #L014A35
         STA   L010EA2
         LDA   #^L014A35
         STA   L010EA4
         LDA   L010FCD
         STA   L010EA6
         LDA   L010FCF
         STA   L010EA8
         LDA   #L010F4D
         STA   L010EAA
         LDA   #^L010F4D
         STA   L010EAC
         JSR   L017096
         LDA   #L014A58
         STA   L010EA2
         LDA   #^L014A58
         STA   L010EA4
         LDA   L010FD1
         STA   L010EA6
         LDA   L010FD3
         STA   L010EA8
         LDA   #L010F6D
         STA   L010EAA
         LDA   #^L010F6D
         STA   L010EAC
         JSR   L017096
         RTS

L014A35  STR   '1/sin.pics/machfram.pc1'
L014A58  STR   '1/sin.pics/machpics.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
L014ABB  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L014ADB  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         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  L014C09
         ADRL  L014C17
         ADRL  L014C22
         ADRL  L014C2C
L014B51  ADRL  L014C3A
         ADRL  L014C59
         ADRL  L014C78
         ADRL  L014C96
L014B61  DW    $00B2
         DW    $0002
         DW    $00C7
         DW    $013E
L014B69  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
L014C09  ASC   'That'27's right!'00
L014C17  ASC   'Very good!'00
L014C22  ASC   'Good job!'00
L014C2C  ASC   'That'27's great!'00
L014C3A  ASC   'Whoops! Those two don'27't match.'00
L014C59  ASC   'Whoops! Better luck next time.'00
L014C78  ASC   'Sorry, those two don'27't match.'00
L014C96  ASC   'Sorry, better luck next time.'00
L014CB4  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
L014CD8  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L014CEE  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L014CF4  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L014D1E  REP   #$30
L014D20  REP   #$30
         JSR   L016C85
         _CompactMem
         JSR   L019C65
         CMP   #$0005
         BEQ   L014D54
         CMP   #$0004
         BNE   L014D3C
         JMP   L014D57

L014D3C  CMP   #$0003
         BNE   L014D44
         JMP   L014EED

L014D44  CMP   #$0002
         BNE   L014D4C
         JMP   L014F8E

L014D4C  CMP   #$0001
         BNE   L014D20
         JMP   L01500B
L014D54  JMP   L01185E

L014D57  REP   #$30
         JSR   L012209
         JSR   L0184A2
         JSR   L017964
         JSR   L018C12
         LDA   #L018893
         STA   L010EA2
         LDA   #^L018893
         STA   L010EA4
         LDA   #L018893
         STA   L010EA6
         LDA   #^L018893
         STA   L010EA8
         LDA   #$0001
         STA   L010EAA
         JSR   L018F6E
         LDA   L018884
         CMP   #$0002
         BNE   L014DAF
         LDA   #L0188AB
         STA   L010EA2
         LDA   #^L0188AB
         STA   L010EA4
         LDA   #L0188AB
         STA   L010EA6
         LDA   #^L0188AB
         STA   L010EA8
         LDA   #$0002
         STA   L010EAA
         JSR   L018F6E
L014DAF  JSR   L018574
         LDA   #L012EDA
         STA   L010EA2
         LDA   #^L012EDA
         STA   L010EA4
         LDA   L010FD5
         STA   L010EA6
         LDA   L010FD7
         STA   L010EA8
         LDA   #L010F8D
         STA   L010EAA
         LDA   #^L010F8D
         STA   L010EAC
         JSR   L017096
         LDA   #L012EFC
         STA   L010EA2
         LDA   #^L012EFC
         STA   L010EA4
         LDA   L010FD9
         STA   L010EA6
         LDA   L010FDB
         STA   L010EA8
         LDA   #L010FAD
         STA   L010EAA
         LDA   #^L010FAD
         STA   L010EAC
         JSR   L017096
L014E00  REP   #$30
         JSR   L016C85
         JSR   L0156D4
         CMP   #$0000
         BNE   L014E10
         JMP   L014EE7

L014E10  JSR   L015523
         JSR   L01567E
         CMP   #$0015
         BCS   L014E6C
         LDA   #$000F
         STA   L010EA2
         JSR   L0118F4
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         LDA   #L01667A
         STA   L010EA2
         LDA   #^L01667A
         STA   L010EA4
         LDA   #$0028
         STA   L010EA6
         JSR   L017359
         LDA   #L01669C
         STA   L010EA2
         LDA   #^L01669C
         STA   L010EA4
         LDA   #$003C
         STA   L010EA6
         JSR   L017359
         JSR   L016D1F
         JSR   L011FD2
         JMP   L014E00

L014E6C  DEC
         STA   L0127DA
         STZ   L01887A
         JSR   L012209
         STZ   L0127DC
         LDA   #L0127E0
         STA   L010EA2
         LDA   #^L0127E0
         STA   L010EA4
         LDA   #$0064
         STA   L010EA6
         LDA   #$0000
         STA   L010EA8
         LDA   #$0000
         STA   L010EAA
         JSR   L016ED0
         JSR   L018340
         JSR   L018412
         JSR   L01187F
L014EA3  JSR   L016C85
         JSR   L012F1F
         LDA   #$0000
         STA   L010EA2
         JSR   L01229D
         JSR   L01237C
         CMP   #$001B
         BEQ   L014ED0
         JSR   L017933
         LDA   L018882
         CMP   #$0001
         BNE   L014EA3
         INC   L0127DC
         LDA   L0127DC
         CMP   #$000A
         BNE   L014EA3
L014ED0  JSR   L0183E4
         JSR   L018483
         JSR   L011FD2
         JSR   L0189C3
         LDA   L010EA2
         CMP   #$0001
         BNE   L014EE7
         JMP   L014E00

L014EE7  JSR   L017FBA
         JMP   L014D20

L014EED  REP   #$30
         JSR   L016C85
         JSR   L0156BA
         CMP   #$0000
         BNE   L014EFD
         JMP   L014D20

L014EFD  JSR   L015523
         JSR   L01627C
         LDA   #$0000
         STA   L0166BE
         LDA   #$0001
         STA   L0166BC
         LDA   #$0010
         STA   L0166BA
         LDA   #$0000
         STA   L0166CC
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         LDA   #$000F
         STA   L010EA2
         JSR   L0118F4
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
L014F42  REP   #$30
         LDA   #$2000
         STA   L010EA2
         LDA   #$00E1
         STA   L010EA4
         LDA   #$7D00
         STA   L010EA6
         LDA   #$0000
         STA   L010EA8
         LDA   #$0000
         STA   L010EAA
         JSR   L016ED0
         JSR   L0150FB
         JSR   L011080
         JSR   L0118D0
         CMP   #$001B
         BNE   L014F76
         JMP   L014D20

L014F76  LDA   L0166CC
         BNE   L014F83
         DEC   L0166BA
         BEQ   L014F83
         JMP   L014F42

L014F83  REP   #$30
         JSR   L011FD2
         JSR   L0178CF
         JMP   L014D20

L014F8E  REP   #$30
         JSR   L016C85
         LDA   #L0166AE
         STA   L0166D4
         LDA   #^L0166AE
         STA   L0166D6
         LDA   #$00F3
         STA   L0166B4
         LDA   #$2EB8
         STA   L010EA2
         LDA   #$0000
         STA   L010EA4
         LDA   #$C000
         STA   L010EA6
         JSR   L016F2F
         LDA   L010EAA
         STA   L012770
         LDA   L010EAC
         STA   L012772
         LDA   L010EAE
         STA   L012778
         LDA   L010EB0
         STA   L01277A
         JSR   L01187F
         JSR   L01571D
         JSR   L0150AD
         JSR   L0152FA
         JSR   L015088
L014FE1  JSR   L015A18
         CMP   #$001B
         BNE   L014FE1
         JSR   L015989
         LDA   L0166CC
         BEQ   L014FE1
         JSR   L015088
         JSR   L011FD2
         PEA   $0092
         _WriteChar
         _GrafOn
         JMP   L014D20

L01500B  REP   #$30
         JSR   L016C85
         LDA   #L0166A8
         STA   L0166D4
         LDA   #^L0166A8
         STA   L0166D6
         LDA   #$00F2
         STA   L0166B4
         LDA   #$2EB8
         STA   L010EA2
         LDA   #$0000
         STA   L010EA4
         LDA   #$C000
         STA   L010EA6
         JSR   L016F2F
         LDA   L010EAA
         STA   L012770
         LDA   L010EAC
         STA   L012772
         LDA   L010EAE
         STA   L012778
         LDA   L010EB0
         STA   L01277A
         JSR   L01187F
         JSR   L01571D
         JSR   L0150AD
         JSR   L0152FA
         JSR   L015088
L01505E  JSR   L015A18
         CMP   #$001B
         BNE   L01505E
         JSR   L015989
         LDA   L0166CC
         BEQ   L01505E
         JSR   L015088
         JSR   L011FD2
         PEA   $0092
         _WriteChar
         _GrafOn
         JMP   L014D20

L015088  REP   #$30
         LDA   #$0001
         STA   L0166BC
         LDA   #$0001
         STA   L0166C0
         LDA   #$0001
         STA   L0166BE
         JSR   L015245
         JSR   L0152D0
         PEA   $008C
         _WriteChar
         RTS

L0150AD  REP   #$30
         LDA   L012778
         STA   L010EA2
         LDA   L01277A
         STA   L010EA4
         LDA   #$2EB8
         STA   L010EA6
         LDA   #$0000
         STA   L010EA8
         LDA   #$0020
         STA   L010EAA
         JSR   L016ED0
         LDA   L012778
         STA   L0166D8
         LDA   L01277A
         STA   L0166DA
         LDA   #$0001
         STA   L0166BC
         LDA   #$0001
         STA   L0166BE
         LDA   #$0001
         STA   L0166C0
         LDA   #$0001
         STA   L0166C2
         LDA   #$0001
         STA   L0166C6
         RTS

L0150FB  REP   #$30
         LDA   #$0016
         STA   L01518E
         LDA   #$000A
         STA   L012792
L015109  INC   L0166BE
         JSR   L015245
         JSR   L0152D0
         LDA   #L016778
         STA   $00
         LDA   #^L016778
         STA   $02
         LDY   #$0000
         SEP   #$20
L015121  LDA   [$00],Y
         CMP   #$7E
         BEQ   L015130
         INY
         CPY   #$0028
         BNE   L015121
         JMP   L01515B

L015130  LDA   #$20
         STA   [$00],Y
         REP   #$30
         LDA   #$0006
         STA   L010EA2
         LDA   L012792
         STA   L010EA6
         JSR   L0172A3
         LDA   #L016778
         STA   L010EA2
         LDA   #^L016778
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0001
         STA   L0166CC
         RTS

L01515B  REP   #$30
         LDA   #$0006
         STA   L010EA2
         LDA   L012792
         STA   L010EA6
         JSR   L0172A3
         LDA   #L016778
         STA   L010EA2
         LDA   #^L016778
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0009
         CLC
         ADC   L012792
         STA   L012792
         DEC   L01518E
         BEQ   L01518D
         JMP   L015109
L01518D  RTS

L01518E  DW    $0000
         DW    $0000
L015192  REP   #$30
         JSR   L015657
         JSR   L015088
         LDA   L012778
         STA   L010EA2
         LDA   L01277A
         STA   L010EA4
         LDA   #$0028
         LDX   L0166C2
         DEX
         BEQ   L0151CA
         STX   L015243
L0151B2  LDA   #$0028
         CLC
         ADC   L010EA2
         STA   L010EA2
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA4
         DEC   L015243
         BNE   L0151B2
L0151CA  LDA   L010EA2
         STA   L0166DC
         LDA   L010EA4
         STA   L0166DE
         LDA   #$0016
         STA   L0166C8
L0151DC  LDA   L0166DC
         STA   L010EA2
         LDA   L0166DE
         STA   L010EA4
         LDA   #L016778
         STA   L010EA6
         LDA   #^L016778
         STA   L010EA8
         LDA   #$0028
         STA   L010EAA
         LDA   #$0000
         STA   L010EAC
         JSR   L016E27
         LDA   L0166DC
         STA   L010EA2
         LDA   L0166DE
         STA   L010EA4
         LDA   #$0028
         CLC
         ADC   L010EA2
         STA   L010EA2
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA4
         LDA   L010EA2
         STA   L0166DC
         LDA   L010EA4
         STA   L0166DE
         JSR   L015283
         INC   L0166C0
         DEC   L0166C8
         BNE   L0151DC
         JSR   L0155CC
         JSR   L015245
         JSR   L0152D0
         RTS

L015243  DW    $0000
L015245  REP   #$30
         LDA   L012778
         STA   L010EA2
         LDA   L01277A
         STA   L010EA4
         LDX   L0166BE
         STX   L015281
L015259  DEC   L015281
         BEQ   L015274
         LDA   #$0028
         CLC
         ADC   L010EA2
         STA   L010EA2
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA4
         JMP   L015259

L015274  LDA   L010EA2
         STA   L0166D8
         LDA   L010EA4
         STA   L0166DA
         RTS

L015281  DW    $0000
L015283  REP   #$30
         LDA   L0166BC
         STA   L0152CE
         LDA   #$0001
         STA   L0166BC
         LDA   L0166C0
         DEC
         DEC
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   L0166BC
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L016778
         STA   L010EA2
         LDA   #^L016778
         STA   L010EA4
         JSR   L01578D
         LDA   L0152CE
         STA   L0166BC
         RTS

L0152CE  DW    $0000
L0152D0  REP   #$30
         LDA   L0166D8
         STA   L010EA2
         LDA   L0166DA
         STA   L010EA4
         LDA   #L016778
         STA   L010EA6
         LDA   #^L016778
         STA   L010EA8
         LDA   #$0028
         STA   L010EAA
         LDA   #$0000
         STA   L010EAC
         JSR   L016E27
         RTS

L0152FA  REP   #$30
         JSR   L015657
         JSR   L015088
         LDA   #L0162D2
         STA   L0166DC
         LDA   #^L0162D2
         STA   L0166DE
         LDA   #$0016
         STA   L01537A
L015314  LDA   L0166DC
         STA   L010EA2
         LDA   L0166DE
         STA   L010EA4
         LDA   #L016778
         STA   L010EA6
         LDA   #^L016778
         STA   L010EA8
         LDA   #$0028
         STA   L010EAA
         LDA   #$0000
         STA   L010EAC
         JSR   L016E27
         LDA   L0166DC
         STA   L010EA2
         LDA   L0166DE
         STA   L010EA4
         LDA   #$0028
         CLC
         ADC   L010EA2
         STA   L010EA2
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA4
         LDA   L010EA2
         STA   L0166DC
         LDA   L010EA4
         STA   L0166DE
         JSR   L015283
         INC   L0166C0
         DEC   L01537A
         BNE   L015314
L015371  JSR   L016CF1
         BEQ   L015371
         JSR   L0155CC
         RTS

L01537A  DW    $0000
L01537C  REP   #$30
         JSR   L015613
         JSR   L01579F
         JSR   L015245
         JSR   L0152D0
         JSR   L015283
         RTS

L01538E  REP   #$30
         LDA   #$0001
         STA   L0166BC
         LDA   #$0001
         STA   L0166BE
         LDA   #$0001
         STA   L0166C0
         LDA   #$0001
         STA   L0166C2
         JSR   L015245
         JSR   L015192
         JSR   L0152D0
         RTS

L0153B2  REP   #$30
         LDA   L0166BC
         CMP   #$0001
         BNE   L0153C2
         JSR   L011080
         JMP   L0153C5

L0153C2  DEC   L0166BC
L0153C5  RTS

L0153C6  REP   #$30
         LDA   L0166BC
         CMP   #$0026
         BEQ   L0153D3
         INC   L0166BC
L0153D3  RTS

L0153D4  REP   #$30
         JSR   L015613
         JSR   L0156EE
         JSR   L015245
         JSR   L0152D0
         JSR   L015283
         RTS

L0153E6  REP   #$30
         JSR   L015613
         JSR   L01579F
         JSR   L015245
         JSR   L0152D0
         JSR   L015283
         LDA   #$0001
         STA   L0166BC
         RTS

L0153FE  REP   #$30
         JSR   L015613
         LDA   L0166BE
         CLC
         ADC   #$0016
         CMP   #$0115
         BCC   L015412
         LDA   #$0115
L015412  STA   L0166BE
         STA   L0166C2
         LDA   #$0001
         STA   L0166BC
         LDA   #$0001
         STA   L0166C0
         JSR   L015245
         JSR   L015192
         JSR   L0152D0
         RTS

L01542E  REP   #$30
         JSR   L015613
         LDA   L0166BE
         CMP   #$0001
         BEQ   L015447
         SEC
         SBC   #$0016
         CMP   #$0001
         BPL   L015447
         LDA   #$0001
L015447  STA   L0166BE
         STA   L0166C2
         LDA   #$0001
         STA   L0166BC
         LDA   #$0001
         STA   L0166C0
         JSR   L015245
         JSR   L015192
         JSR   L0152D0
         RTS

L015463  REP   #$30
         LDA   L0166C0
         DEC
         DEC
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   L0166BC
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         PEA   $008F
         _WriteChar
         LDA   #L016778
         STA   $00
         LDA   #^L016778
         STA   $02
         LDA   L010EA2
         AND   #$00FF
         LDY   L0166BC
         DEY
         SEP   #$20
         LDA   [$00],Y
         REP   #$30
         PHA
         _WriteChar
         PEA   $008E
         _WriteChar
         PEA   $0088
         _WriteChar
         RTS

L0154CD  REP   #$30
         LDA   L0166BC
         CMP   #$0026
         BNE   L0154DD
         JSR   L011080
         JMP   L0154F1

L0154DD  LDA   L0167AB
         PHA
         _WriteChar
         LDA   L0167AB
         STA   L010EA2
         JSR   L0155F3
L0154F1  RTS

         DW    $0000
L0154F4  REP   #$30
         LDA   #L016778
         STA   $00
         LDA   #^L016778
         STA   $02
         LDA   L010EA2
         AND   #$00FF
         LDY   L0166BC
         DEY
         SEP   #$20
         LDA   [$00],Y
         REP   #$30
         PHA
         _WriteChar
         PEA   $0088
         _WriteChar
         RTS

L015523  REP   #$30
         LDA   #L0188D9
         STA   L010EA2
         LDA   #^L0188D9
         STA   L010EA4
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         JSR   L016FF5
         LDA   L010EC6
         STA   L010EA2
         LDA   L010EC8
         STA   L010EA4
         LDA   #$0200
         STA   L010EA6
         LDA   #$0000
         STA   L010EA8
         JSR   L016D32
         LDA   L010EAC
         PHA
         LDA   L010EAA
         PHA
         LDA   L010EAA
         STA   L010EA2
         LDA   L010EAC
         STA   L010EA4
         LDA   #$C000
         STA   L010EA6
         JSR   L016F2F
         LDA   L010EAA
         STA   L012770
         LDA   L010EAC
         STA   L012772
         LDA   L010EAE
         STA   L012778
         LDA   L010EB0
         STA   L01277A
         PLA
         STA   L010EC6
         PLA
         STA   L010EC8
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         JSR   L016FB6
         LDA   L010EA6
         PHA
         LDA   L010EA6
         STA   L010EA2
         LDA   L012778
         STA   L010EA6
         LDA   L01277A
         STA   L010EA8
         LDA   L010EC6
         STA   L010EAA
         LDA   L010EC8
         STA   L010EAC
         JSR   L016FD5
         PLA
         STA   L010EA2
         JSR   L016FE8
         RTS

L0155CC  REP   #$30
         LDA   L0166E8
         STA   L0166D8
         LDA   L0166EA
         STA   L0166DA
         LDA   L0166EC
         STA   L0166BE
         LDA   L0166EE
         STA   L0166BC
         LDA   L0166F0
         STA   L0166C0
         LDA   L0166F2
         STA   L0166C2
         RTS

L0155F3  REP   #$30
         LDA   #L016778
         STA   $00
         LDA   #^L016778
         STA   $02
         LDA   L010EA2
         AND   #$00FF
         LDY   L0166BC
         DEY
         SEP   #$20
         STA   [$00],Y
         REP   #$30
         INC   L0166BC
         RTS

L015613  REP   #$30
         LDA   #L016778
         STA   $00
         LDA   #^L016778
         STA   $02
         LDY   #$0026
         SEP   #$20
         LDA   #$0D
         STA   [$00],Y
         INY
         LDA   #$00
         STA   [$00],Y
         REP   #$30
         LDA   #L016778
         STA   L010EA2
         LDA   #^L016778
         STA   L010EA4
         LDA   L0166D8
         STA   L010EA6
         LDA   L0166DA
         STA   L010EA8
         LDA   #$0028
         STA   L010EAA
         LDA   #$0000
         STA   L010EAC
         JSR   L016E27
         RTS

L015657  REP   #$30
         LDA   L0166D8
         STA   L0166E8
         LDA   L0166DA
         STA   L0166EA
         LDA   L0166BE
         STA   L0166EC
         LDA   L0166BC
         STA   L0166EE
         LDA   L0166C0
         STA   L0166F0
         LDA   L0166C2
         STA   L0166F2
         RTS

L01567E  REP   #$30
         LDA   L012778
         STA   $00
         LDA   L01277A
         STA   $02
         LDX   #$0000
         LDY   #$0000
L015690  REP   #$30
         LDA   #$0005
         STA   L010EA2
L015698  SEP   #$20
         LDA   [$00],Y
         CMP   #$0D
         BEQ   L0156AA
         CMP   #$7E
         BEQ   L0156B6
         REP   #$30
         INY
         JMP   L015698

L0156AA  REP   #$30
         INY
         DEC   L010EA2
         BNE   L015698
         INX
         JMP   L015690

L0156B6  REP   #$30
         TXA
         RTS

L0156BA  REP   #$30
         JSR   L0121EB
         LDA   #L0156D2
         STA   L010EA2
         LDA   #^L0156D2
         STA   L010EA4
         JSR   L017A54
         LDA   L0188C3
         RTS

L0156D2  DB    $01
         DB    $F2
L0156D4  REP   #$30
         JSR   L0121EB
         LDA   #L0156EC
         STA   L010EA2
         LDA   #^L0156EC
         STA   L010EA4
         JSR   L017A54
         LDA   L0188C3
         RTS

L0156EC  DB    $01
         DB    $F3
L0156EE  REP   #$30
         LDA   L0166BE
         CMP   #$0001
         BNE   L0156FE
         JSR   L011080
         JMP   L01571C

L0156FE  DEC   L0166BE
         LDA   L0166C0
         CMP   #$0001
         BNE   L015719
         DEC   L0166C2
         PEA   $0096
         _WriteChar
         JMP   L01571C

L015719  DEC   L0166C0
L01571C  RTS

L01571D  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   L010EA2
         PHA
         _WriteChar
         RTS

L01578D  REP   #$30
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         _WriteCString
         RTS

L01579F  REP   #$30
         LDA   L0166BE
         CMP   #$012B
         BNE   L0157AC
         JMP   L0157DC

L0157AC  INC   L0166BE
         LDA   L0166C0
         CMP   #$0016
         BEQ   L0157C7
         INC   L0166C0
         PEA   $008D
         _WriteChar
         JMP   L0157DC

L0157C7  LDA   L0166C2
         CMP   #$0115
         BEQ   L0157DC
         INC   L0166C2
         PEA   $0097
         _WriteChar
L0157DC  RTS

L0157DD  REP   #$30
         LDY   L0166BC
         CPY   #$0001
         BNE   L0157ED
         JSR   L011080
         JMP   L015808

L0157ED  LDA   #L016778
         STA   $00
         LDA   #^L016778
         STA   $02
         DEY
         DEY
         SEP   #$20
         LDA   #$20
         STA   [$00],Y
         REP   #$30
         INY
         STY   L0166BC
         JSR   L015283
L015808  RTS

L015809  REP   #$30
         JSR   L015613
         JSR   L015657
         LDA   #$0016
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   #$0001
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L0166F4
         STA   L010EA2
         LDA   #^L0166F4
         STA   L010EA4
         JSR   L01578D
         JSR   L015B2C
         BNE   L01584D
         JMP   L015854

L01584D  JSR   L0150AD
         JSR   L015088
         RTS

L015854  LDA   #$0016
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   #$0001
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L01671D
         STA   L010EA2
         LDA   #^L01671D
         STA   L010EA4
         JSR   L01578D
         JSR   L0155CC
         JSR   L015245
         JSR   L0152D0
         RTS

L015892  REP   #$30
         JSR   L015657
         LDA   L012778
         STA   L010EA2
         LDA   L01277A
         STA   L010EA4
         LDA   #$0028
         LDX   L0166BE
         DEX
         BEQ   L0158C7
         STX   L01676E
L0158AF  LDA   #$0028
         CLC
         ADC   L010EA2
         STA   L010EA2
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA4
         DEC   L01676E
         BNE   L0158AF
L0158C7  LDA   L010EA2
         STA   L016774
         LDA   L010EA4
         STA   L016776
         LDA   #$0028
         CLC
         ADC   L010EA2
         STA   L010EA2
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA4
         LDA   L010EA2
         STA   L016770
         LDA   L010EA4
         STA   L016772
         LDA   #$012B
         SEC
         SBC   L0166BE
         DEC
         STA   L0166C8
L0158FD  LDA   L016770
         STA   L010EA2
         LDA   L016772
         STA   L010EA4
         LDA   L016774
         STA   L010EA6
         LDA   L016776
         STA   L010EA8
         LDA   #$0028
         STA   L010EAA
         LDA   #$0000
         STA   L010EAC
         JSR   L016E27
         LDA   L016770
         STA   L010EA2
         LDA   L016772
L01592D  STA   L010EA4
         LDA   #$0028
         CLC
         ADC   L010EA2
         STA   L010EA2
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA4
         LDA   L010EA2
         STA   L016770
         LDA   L010EA4
         STA   L016772
         LDA   L016774
         STA   L010EA2
         LDA   L016776
         STA   L010EA4
         LDA   #$0028
         CLC
         ADC   L010EA2
         STA   L010EA2
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA4
         LDA   L010EA2
         STA   L016774
         LDA   L010EA4
         STA   L016776
         DEC   L0166C8
         BEQ   L015982
         JMP   L0158FD

L015982  JSR   L0155CC
         JSR   L015192
         RTS

L015989  REP   #$30
         JSR   L015613
         JSR   L015657
         LDA   #$0016
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   #$0001
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L016745
         STA   L010EA2
         LDA   #^L016745
         STA   L010EA4
         JSR   L01578D
         JSR   L015B2C
         BNE   L0159CD
         JMP   L0159D4

L0159CD  LDA   #$0001
         STA   L0166CC
         RTS

L0159D4  LDA   #$0016
         SEP   #$20
         STAL  $000025
         REP   #$30
         PEA   $008D
         _WriteChar
         LDA   #$0001
         DEC
         SEP   #$20
         STAL  $000024
         STAL  $00057B
         REP   #$30
         LDA   #L01671D
         STA   L010EA2
         LDA   #^L01671D
         STA   L010EA4
         JSR   L01578D
         JSR   L0155CC
         JSR   L015245
         JSR   L0152D0
         LDA   #$0000
         STA   L0166CC
         RTS

L015A18  REP   #$30
L015A1A  JSR   L015463
         JSR   L016CF1
         BEQ   L015A1A
         STA   L0167AB
         JSR   L0154F4
         LDA   L017281
         AND   #$0800
         BEQ   L015A33
         JMP   L015A90

L015A33  LDA   L0167AB
         CMP   #$001B
         BNE   L015A3E
         JMP   L015B01

L015A3E  CMP   #$0020
         BMI   L015A4E
         CMP   #$007B
         BPL   L015A4E
         JSR   L0154CD
         JMP   L015A1A

L015A4E  CMP   #$000D
         BNE   L015A59
         JSR   L0153E6
         JMP   L015A1A

L015A59  CMP   #$007F
         BNE   L015A64
         JSR   L0157DD
         JMP   L015A1A

L015A64  CMP   #$000B
         BNE   L015A6F
         JSR   L0153D4
         JMP   L015A1A

L015A6F  CMP   #$0008
         BNE   L015A7A
         JSR   L0153B2
         JMP   L015A1A

L015A7A  CMP   #$0015
         BNE   L015A85
         JSR   L0153C6
         JMP   L015A1A

L015A85  CMP   #$000A
         BNE   L015A8D
         JSR   L01537C
L015A8D  JMP   L015A1A

L015A90  LDA   L0167AB
         CMP   #$0075
         BNE   L015A9E
         JSR   L01542E
         JMP   L015A1A

L015A9E  CMP   #$0064
         BNE   L015AA9
         JSR   L0153FE
         JMP   L015A1A

L015AA9  CMP   #$0074
         BNE   L015AB4
         JSR   L01538E
         JMP   L015A1A

L015AB4  CMP   #$0068
         BNE   L015ABF
         JSR   L015E9D
         JMP   L015A1A

L015ABF  CMP   #$0063
         BNE   L015ACA
         JSR   L015809
         JMP   L015A1A

L015ACA  CMP   #$007A
         BNE   L015AD5
         JSR   L015892
         JMP   L015A1A

L015AD5  CMP   #$0069
         BNE   L015AE0
         JSR   L015BDA
         JMP   L015A1A

L015AE0  CMP   #$006C
         BNE   L015AEB
         JSR   L015D5A
         JMP   L015A1A

L015AEB  CMP   #$0073
         BNE   L015AF6
         JSR   L016184
         JMP   L015A1A

L015AF6  CMP   #$0070
         BNE   L015AFE
         JSR   L015E3A
L015AFE  JMP   L015A1A
L015B01  RTS

L015B02  REP   #$30
         JSR   L0121EB
         LDA   #L015B20
         STA   L010EA6
         LDA   #^L015B20
         STA   L010EA8
         LDA   #$000C
         STA   L010EAA
         JSR   L017AF2
         LDA   L0188C3
         RTS

L015B20  STR   'story01.mth'
L015B2C  REP   #$30
L015B2E  JSR   L016CF1
         BEQ   L015B2E
         CMP   #$0059
         BNE   L015B3B
         JMP   L015B92

L015B3B  CMP   #$0079
         BNE   L015B43
         JMP   L015B92

L015B43  CMP   #$004E
         BNE   L015B4B
         JMP   L015B50

L015B4B  CMP   #$006E
         BNE   L015B2E
L015B50  PHA
         _WriteChar
         LDA   #$0000
         STA   L015BD8
L015B5E  JSR   L016CF1
         BEQ   L015B5E
         CMP   #$000D
         BNE   L015B6B
         JMP   L015BD4

L015B6B  CMP   #$007F
         BNE   L015B5E
         PEA   $0088
         _WriteChar
         LDA   #$0020
         PHA
         _WriteChar
         PEA   $0088
         _WriteChar
         JMP   L015B2E

L015B92  PHA
         _WriteChar
         LDA   #$0001
         STA   L015BD8
L015BA0  JSR   L016CF1
         BEQ   L015BA0
         CMP   #$000D
         BNE   L015BAD
         JMP   L015BD4

L015BAD  CMP   #$007F
         BNE   L015BA0
         PEA   $0088
         _WriteChar
         LDA   #$0020
         PHA
         _WriteChar
         PEA   $0088
         _WriteChar
         JMP   L015B2E

L015BD4  LDA   L015BD8
         RTS

L015BD8  DW    $0000
L015BDA  REP   #$30
         JSR   L015613
         JSR   L015657
         LDA   L012778
         STA   L010EA2
         LDA   L01277A
         STA   L010EA4
         LDA   #$2E68
         CLC
         ADC   L010EA2
         STA   L010EA6
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA8
         LDA   L010EA6
         STA   L016770
         LDA   L010EA8
         STA   L016772
         LDA   L012778
         STA   L010EA2
         LDA   L01277A
         STA   L010EA4
         LDA   #$2E90
         CLC
         ADC   L010EA2
         STA   L010EAA
         LDA   #$0000
         ADC   L010EA4
         STA   L010EAC
         LDA   L010EAA
         STA   L016774
         LDA   L010EAC
         STA   L016776
         LDA   #$012B
         SEC
         SBC   L0166BE
         BNE   L015C44
         JMP   L015CE4

L015C44  STA   L0166C8
L015C47  LDA   L016770
         STA   L010EA2
         LDA   L016772
         STA   L010EA4
         LDA   L016774
         STA   L010EA6
         LDA   L016776
         STA   L010EA8
         LDA   #$0028
         STA   L010EAA
         LDA   #$0000
         STA   L010EAC
         JSR   L016E27
         LDA   L016770
         STA   L010EA2
         LDA   L016772
         STA   L010EA4
         LDA   #$0028
         STA   L010EA6
         LDA   #$0000
         STA   L010EA8
         LDA   L010EA2
         SEC
         SBC   L010EA6
         STA   L010EAA
         LDA   L010EA4
         SBC   L010EA8
         STA   L010EAC
         LDA   L010EAA
         STA   L016770
         LDA   L010EAC
         STA   L016772
         LDA   L016774
         STA   L010EA2
         LDA   L016776
         STA   L010EA4
         LDA   #$0028
         STA   L010EA6
         LDA   #$0000
         STA   L010EA8
         LDA   L010EA2
         SEC
         SBC   L010EA6
         STA   L010EAA
         LDA   L010EA4
         SBC   L010EA8
         STA   L010EAC
         LDA   L010EAA
         STA   L016774
         LDA   L010EAC
         STA   L016776
         DEC   L0166C8
         BEQ   L015CE4
         JMP   L015C47

L015CE4  LDA   L012778
         STA   L010EA2
         LDA   L01277A
         STA   L010EA4
         LDA   #$0028
         LDX   L0166BE
         DEX
         BEQ   L015D14
         STX   L01676E
L015CFC  LDA   #$0028
         CLC
         ADC   L010EA2
         STA   L010EA2
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA4
         DEC   L01676E
         BNE   L015CFC
L015D14  LDA   L010EA2
         STA   L016774
         LDA   L010EA4
         STA   L016776
         LDA   #L01671D
         STA   L016770
         LDA   #^L01671D
         STA   L016772
         LDA   L016770
         STA   L010EA2
         LDA   L016772
         STA   L010EA4
         LDA   L016774
         STA   L010EA6
         LDA   L016776
         STA   L010EA8
         LDA   #$0028
         STA   L010EAA
         LDA   #$0000
         STA   L010EAC
         JSR   L016E27
         JSR   L0155CC
         JSR   L015192
         RTS

L015D5A  REP   #$30
         _GrafOn
         LDA   L0166B4
         CMP   #$00F2
         BNE   L015D76
         JSR   L0156BA
         CMP   #$0000
         BNE   L015D87
         JMP   L015E17

L015D76  JSR   L0156D4
         CMP   #$0000
         BNE   L015D81
         JMP   L015E17

L015D81  JSR   L015EAC
         JMP   L015DFF

L015D87  JSR   L0150AD
         LDA   #L0188D9
         STA   L010EA2
         LDA   #^L0188D9
         STA   L010EA4
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         JSR   L016FF5
         LDA   L010EC6
         STA   L010EA2
         LDA   L010EC8
         STA   L010EA4
         LDA   #$0200
         STA   L010EA6
         LDA   #$0000
         STA   L010EA8
         JSR   L016D32
         LDA   L010EAA
         STA   L010EC6
         LDA   L010EAC
         STA   L010EC8
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         JSR   L016FB6
         LDA   L010EA6
         PHA
         LDA   L010EA6
         STA   L010EA2
         LDA   L012778
         STA   L010EA6
         LDA   L01277A
         STA   L010EA8
         LDA   L010EC6
         STA   L010EAA
         LDA   L010EC8
         STA   L010EAC
         JSR   L016FD5
         PLA
         STA   L010EA2
         JSR   L016FE8
L015DFF  JSR   L01627C
         LDY   L0166B6
         LDA   L012778
         STA   $00
         LDA   L01277A
         STA   $02
         SEP   #$20
         LDA   #$20
         STA   [$00],Y
         REP   #$30
L015E17  _GrafOff
         LDA   #$0001
         STA   L0166C2
         LDA   #$0001
         STA   L0166C0
         LDA   #$0001
         STA   L0166BC
         LDA   #$0001
         STA   L0166BE
         JSR   L015192
         RTS

L015E3A  REP   #$30
         JSR   L015613
         JSR   L01627C
         PEA   $0000
         PEA   $0000
         PEA   $0001
         _SetOutputDevice
         PEA   $0001
         _InitTextDev
         LDA   L0166C6
         STA   L015E9B
         LDA   #$0000
         STA   L0166BE
L015E68  INC   L0166BE
         JSR   L015245
         JSR   L0152D0
         JSR   L015283
         DEC   L015E9B
         BEQ   L015E7C
         JMP   L015E68

L015E7C  JSR   L01571D
         LDA   #$0001
         STA   L0166C2
         LDA   #$0001
         STA   L0166C0
         LDA   #$0001
         STA   L0166BC
         LDA   #$0001
         STA   L0166BE
         JSR   L015192
         RTS

L015E9B  DW    $0000
L015E9D  REP   #$30
         JSR   L015613
         JSR   L0152FA
         JSR   L015192
         JSR   L0152D0
         RTS

L015EAC  REP   #$30
         JSR   L0150AD
         LDA   #L0188D9
         STA   L010EA2
         LDA   #^L0188D9
         STA   L010EA4
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         JSR   L016FF5
         LDA   L010EC6
         STA   L010EA2
         LDA   L010EC8
         STA   L010EA4
         LDA   #$0200
         STA   L010EA6
         LDA   #$0000
         STA   L010EA8
         JSR   L016D32
         LDA   L010EAC
         PHA
         LDA   L010EAA
         PHA
         LDA   L010EAA
         STA   L010EA2
         LDA   L010EAC
         STA   L010EA4
         LDA   #$C000
         STA   L010EA6
         JSR   L016F2F
         LDA   L010EAA
         STA   L0166E0
         LDA   L010EAC
         STA   L0166E2
         LDA   L010EAE
         STA   L0166E4
         LDA   L010EB0
         STA   L0166E6
         PLA
         STA   L010EC6
         PLA
         STA   L010EC8
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         JSR   L016FB6
         LDA   L010EA6
         PHA
         LDA   L010EA6
         STA   L010EA2
         LDA   L0166E4
         STA   L010EA6
         LDA   L0166E6
         STA   L010EA8
         LDA   L010EC6
         STA   L010EAA
         LDA   L010EC8
         STA   L010EAC
         JSR   L016FD5
         PLA
         STA   L010EA2
         JSR   L016FE8
         REP   #$30
         LDA   #$FFFF
         STA   L0166CE
         LDA   #$0001
         STA   L0166BE
         JSR   L015245
L015F68  REP   #$30
         LDA   #$0001
         STA   L0166BC
         LDA   #L016778
         STA   L010EA2
         LDA   #^L016778
         STA   L010EA4
         LDA   #$0028
         STA   L010EA6
         LDA   #$0000
         STA   L010EA8
         LDA   #$0020
         STA   L010EAA
         JSR   L016ED0
L015F91  REP   #$30
         INC   L0166CE
         LDY   L0166CE
         LDA   L0166E4
         STA   $04
         LDA   L0166E6
         STA   $06
         STZ   L0167AB
         SEP   #$20
         LDA   [$04],Y
         CMP   #$7E
         BNE   L015FB1
         JMP   L015FDF

L015FB1  CMP   #$0D
         BEQ   L015FCE
         STA   L0167AB
         REP   #$30
         LDA   L0167AB
         STA   L010EA2
         JSR   L0155F3
         LDA   L0166BC
         CMP   #$0027
         BEQ   L015FCE
         JMP   L015F91

L015FCE  REP   #$30
         INC   L0166CE
         JSR   L015613
         INC   L0166BE
         JSR   L015245
         JMP   L015F68

L015FDF  REP   #$30
         LDA   L0166E0
         STA   L010EA2
         LDA   L0166E2
         STA   L010EA4
         JSR   L016F71
         RTS

L015FF1  REP   #$30
         LDA   #L0188D9
         STA   L010EA2
         LDA   #^L0188D9
         STA   L010EA4
         LDA   #$00C3
         STA   L010EA6
         LDA   L0166B4
         STA   L010EA8
         LDA   #$0000
         STA   L010EAA
         LDA   #$0000
         STA   L010EAC
         LDA   #$0001
         STA   L010EAE
         STZ   L010EB0
         STZ   L010EB2
         JSL   GSOS
         DW    $0001      ; Create
         ADRL  L010EA2
         LDA   #L0188D9
         STA   L010EA4
         LDA   #^L0188D9
         STA   L010EA6
         JSL   GSOS
         DW    $0010      ; Open
         ADRL  L010EA2
         LDA   L010EA2
         STA   L0166D2
         LDA   #$0000
         STA   L0166BE
         LDA   #$0000
         STA   L0166CC
L016055  INC   L0166BE
         JSR   L015245
         JSR   L0152D0
         LDA   #$0025
         STA   L0166D0
         JSR   L0160E8
         LDA   L0166CC
         BEQ   L01606F
         JMP   L0160D7

L01606F  INC   L0166BE
         JSR   L015245
         JSR   L0152D0
         LDA   #$0025
         STA   L0166D0
         JSR   L0160E8
         LDA   L0166CC
         BEQ   L016089
         JMP   L0160D7

L016089  INC   L0166BE
         JSR   L015245
         JSR   L0152D0
         LDA   #$000C
         STA   L0166D0
         JSR   L0160E8
         LDA   L0166CC
         BEQ   L0160A3
         JMP   L0160D7

L0160A3  INC   L0166BE
         JSR   L015245
         JSR   L0152D0
         LDA   #$000C
         STA   L0166D0
         JSR   L0160E8
         LDA   L0166CC
         BEQ   L0160BD
         JMP   L0160D7

L0160BD  INC   L0166BE
         JSR   L015245
         JSR   L0152D0
         LDA   #$000C
         STA   L0166D0
         JSR   L0160E8
         LDA   L0166CC
         BNE   L0160D7
         JMP   L016055

L0160D7  LDA   L0166D2
         STA   L010EA2
         JSL   GSOS
         DW    $0014      ; Close
         ADRL  L010EA2
         RTS

L0160E8  REP   #$30
         LDA   #L016778
         STA   $00
         LDA   #^L016778
         STA   $02
         LDY   L0166D0
         SEP   #$20
         LDA   L016778
         CMP   #$7E
         BNE   L016131
         REP   #$30
         LDA   #$0001
         STA   L0166CC
         LDA   L0166D2
         STA   L010EA2
         LDA   #L016778
         STA   L010EA4
         LDA   #^L016778
         STA   L010EA6
         LDA   #$0001
         STA   L010EA8
         LDA   #$0000
         STA   L010EAA
         JSL   GSOS
         DW    $0013      ; Write
         ADRL  L010EA2
         RTS

L016131  REP   #$30
         LDA   #L016778
         STA   $00
         LDA   #^L016778
         STA   $02
         SEP   #$20
         LDA   [$00],Y
         CMP   #$20
         BNE   L01614E
         CPY   #$0000
         BEQ   L01614E
         DEY
         JMP   L016131

L01614E  INY
         LDA   #$0D
         STA   [$00],Y
         INY
         LDA   #$0A
         STA   [$00],Y
         INY
         REP   #$30
         LDA   #$0000
         STA   L0166CC
         LDA   L0166D2
         STA   L010EA2
         LDA   #L016778
         STA   L010EA4
         LDA   #^L016778
         STA   L010EA6
         STY   L010EA8
         STZ   L010EAA
         JSL   GSOS
         DW    $0013      ; Write
         ADRL  L010EA2
         RTS

L016184  REP   #$30
         JSR   L015613
         JSR   L01627C
         LDY   L0166B6
         LDA   L012778
         STA   $00
         LDA   L01277A
         STA   $02
         SEP   #$20
         LDA   #$7E
         STA   [$00],Y
         REP   #$30
         _GrafOn
         JSR   L015B02
         LDA   L0166B4
         CMP   #$00F2
         BEQ   L0161B9
         JSR   L015FF1
         JMP   L016241

L0161B9  LDA   #L0188D9
         STA   L010EA2
         LDA   #^L0188D9
         STA   L010EA4
         LDA   #$00C3
         STA   L010EA6
         LDA   L0166B4
         STA   L010EA8
         LDA   #$0000
         STA   L010EAA
         LDA   #$0000
         STA   L010EAC
         LDA   #$0001
         STA   L010EAE
         STZ   L010EB0
         STZ   L010EB2
         JSL   GSOS
         DW    $0001      ; Create
         ADRL  L010EA2
         LDA   #L0188D9
         STA   L010EA4
         LDA   #^L0188D9
         STA   L010EA6
         JSL   GSOS
         DW    $0010      ; Open
         ADRL  L010EA2
         LDA   L010EA2
         STA   L0166D2
         LDA   L012778
         STA   L010EA4
         LDA   L01277A
         STA   L010EA6
         LDA   #$2EB8
         STA   L010EA8
         LDA   #$0000
         STA   L010EAA
         JSL   GSOS
         DW    $0013      ; Write
         ADRL  L010EA2
         LDA   L0166D2
         STA   L010EA2
         JSL   GSOS
         DW    $0014      ; Close
         ADRL  L010EA2
L016241  LDY   L0166B6
         LDA   L012778
         STA   $00
         LDA   L01277A
         STA   $02
         SEP   #$20
         LDA   #$20
         STA   [$00],Y
         REP   #$30
         _GrafOff
         LDA   #$0001
         STA   L0166C2
         LDA   #$0001
         STA   L0166C0
         LDA   #$0001
         STA   L0166BC
         LDA   #$0001
         STA   L0166BE
         JSR   L015192
         LDA   #$0000
         RTS

L01627C  REP   #$30
         LDY   #$2EB7
         LDX   #$012B
L016284  LDA   #$0028
         STA   L0162D0
L01628A  LDA   L012778
         STA   $00
         LDA   L01277A
         STA   $02
         SEP   #$20
         LDA   [$00],Y
         BEQ   L0162AD
         CMP   #$0A
         BEQ   L0162AD
         CMP   #$0D
         BEQ   L0162AD
         CMP   #$20
         BEQ   L0162AD
         CMP   #$7E
         BEQ   L0162AD
         JMP   L0162B8

L0162AD  REP   #$30
         DEY
         DEC   L0162D0
         BNE   L01628A
         DEX
         BNE   L016284
L0162B8  REP   #$30
         INX
         STX   L0166C6
         LDA   #$0000
         DEX
L0162C2  CLC
         ADC   #$0028
         DEX
         BNE   L0162C2
         STA   L0166B6
         STZ   L0166B8
         RTS

L0162D0  DW    $0000
L0162D2  ASC   '        Sinbad 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.      '0D
         ASC   00
         STR   'Select a myth file (.mth)'
         STR   'Select a question file (.qes)'
L01667A  ASC   'There are not enough questions in'00
L01669C  ASC   'this file !'00
L0166A8  ASC   '.mth'00
         ASC   00
L0166AE  ASC   '.qes'00
         DB    $00
L0166B4  DB    $00
         DB    $00
L0166B6  DB    $00
         DB    $00
L0166B8  DB    $00
         DB    $00
L0166BA  DB    $00
         DB    $00
L0166BC  DB    $00
         DB    $00
L0166BE  DB    $00
         DB    $00
L0166C0  DB    $00
         DB    $00
L0166C2  DB    $00
         DB    $00
         DB    $00
         DB    $00
L0166C6  DB    $00
         DB    $00
L0166C8  DB    $00
         DB    $00
         DB    $00
         DB    $00
L0166CC  DB    $00
         DB    $00
L0166CE  DB    $00
         DB    $00
L0166D0  DB    $00
         DB    $00
L0166D2  DB    $00
         DB    $00
L0166D4  DB    $00
         DB    $00
L0166D6  DB    $00
         DB    $00
L0166D8  DB    $00
         DB    $00
L0166DA  DB    $00
         DB    $00
L0166DC  DB    $00
         DB    $00
L0166DE  DB    $00
         DB    $00
L0166E0  DB    $00
         DB    $00
L0166E2  DB    $00
         DB    $00
L0166E4  DB    $00
         DB    $00
L0166E6  DB    $00
         DB    $00
L0166E8  DB    $00
         DB    $00
L0166EA  DB    $00
         DB    $00
L0166EC  DB    $00
         DB    $00
L0166EE  DB    $00
         DB    $00
L0166F0  DB    $00
         DB    $00
L0166F2  DB    $00
         DB    $00
L0166F4  ASC   8F
         ASC   'Clear workspace...are you sure? (Y/N) '8E00
L01671D  ASC   '                                       '00
L016745  ASC   8F
         ASC   'Exit the Editor...are you sure? (Y/N) '8E00
L01676E  DB    $00
         DB    $00
L016770  DB    $00
         DB    $00
L016772  DB    $00
         DB    $00
L016774  DB    $00
         DB    $00
L016776  DB    $00
         DB    $00
L016778  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0167AB  DB    $00
         DB    $00

*--- The HLS protection lied here

L016BFF  REP   #$30
         LDA   L010EA2
         PHA
         LDA   L010EA6
         PHA
         _LoadOneTool
         RTS

L016C11  REP   #$30
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         _GetPortLoc
         RTS

L016C23  REP   #$30
         JSR   L016C11
         LDA   L010EA2
         STA   $00
         LDA   L010EA4
         STA   $02
         LDY   #$0002
         LDA   L010EA6
         STA   [$00],Y
         INY
         INY
         LDA   L010EA8
         STA   [$00],Y
         RTS

L016C42  REP   #$30
         PEA   $0000
         PEA   $0000
         _GetPort
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         RTS

L016C5A  REP   #$30
         LDA   L010EA2
         STA   L010EC6
         LDA   L010EA4
         STA   L010EC8
         JSR   L016C42
         LDA   L010EA2
         STA   $00
         LDA   L010EA4
         STA   $02
         LDY   #$0002
         LDA   L010EC6
         STA   [$00],Y
         INY
         INY
         LDA   L010EC8
         STA   [$00],Y
         RTS

L016C85  REP   #$30
         LDA   #$2000
         STA   L010EA2
         LDA   #$00E1
         STA   L010EA4
         JSR   L016C5A
         RTS

         REP   #$30
         LDA   L010EA2
         PHA
         LDA   L010EA6
         PHA
         _PosMouse
         RTS

L016CA9  REP   #$30
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadMouse
         PLA
         AND   #$8000
         STA   L010EAA
         PLA
         STA   L010EA6
         PLA
         STA   L010EA2
         RTS

L016CCB  REP   #$30
         JSR   L016CA9
         LDA   L010EAA
         AND   #$8000
         RTS

L016CD7  REP   #$30
         PEA   $0000
         LDA   L010EA2
         PHA
         LDA   L010EA8
         PHA
         LDA   L010EA6
         PHA
         _GetNextEvent
         PLA
         RTS

L016CF1  REP   #$30
         LDA   #$0008
         STA   L010EA2
         LDA   #L017273
         STA   L010EA6
         LDA   #^L017273
         STA   L010EA8
         JSR   L016CD7
         LDA   L017273
         BEQ   L016D10
         LDA   L017275
L016D10  RTS

L016D11  REP   #$30
         JSR   L016CCB
         PHA
         JSR   L016CF1
         PLY
         STY   L010EA2
         RTS

L016D1F  REP   #$30
L016D21  JSR   L016D11
         CMP   #$0000
         BNE   L016D31
         LDA   L010EA2
         BEQ   L016D21
         LDA   #$0000
L016D31  RTS

L016D32  REP   #$30
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         LDA   L010EA8
         PHA
         LDA   L010EA6
         PHA
         _LongMul
         PLA
         STA   L010EAA
         PLA
         STA   L010EAC
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         RTS

L016D68  REP   #$30
         PEA   $0000
         _Random
         PLA
         RTS

L016D76  REP   #$30
         LDA   L010EA6
         SEC
         SBC   L010EA2
         INC
         STA   L010EA6
L016D83  PEA   $0000
         _Random
         PLA
         AND   #$EFFF
         BEQ   L016D83
         PEA   $0000
         PEA   $0000
         PHA
         LDA   L010EA6
         PHA
         _UDivide
         PLA
         PLA
         CLC
         ADC   L010EA2
         RTS

L016DAC  REP   #$10
         LDA   L010EA2
         STA   $00
         LDA   L010EA4
         STA   $02
         LDY   #$0000
         SEP   #$20
L016DBD  LDA   [$00],Y
         BEQ   L016DC4
         INY
         BRA   L016DBD
L016DC4  STY   L010EA6
         REP   #$20
         RTS

L016DCA  REP   #$30
         LDA   L010EA6
         STA   $00
         LDA   L010EA8
         STA   $02
         LDA   #$0000
         STA   [$00]
         LDY   #$0002
         STA   [$00],Y
         LDX   #$0001
         LDA   L010EA2
         CMP   #$000A
         BCC   L016DF2
         INX
         CMP   #$0064
         BCC   L016DF2
         INX
L016DF2  PHA
         LDA   L010EA8
         PHA
         LDA   L010EA6
         PHA
         PHX
         PEA   $0000
         _Int2Dec
         RTS

         REP   #$30
         JSR   L016DAC
         PEA   $0000
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         LDA   L010EA6
         PHA
         PEA   $0000
         _Dec2Int
         PLA
         RTS

L016E27  REP   #$30
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         LDA   L010EA8
         PHA
         LDA   L010EA6
         PHA
         LDA   L010EAC
         PHA
         LDA   L010EAA
         PHA
         _BlockMove
         RTS

L016E49  REP   #$30
         LDA   #$7D00
         STA   L010EAA
         LDA   #$0000
         STA   L010EAC
         JSR   L016E27
         RTS

L016E5B  REP   #$30
         PEA   $0000
         PEA   $0000
         _GetWMgrPort
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         RTS

L016E73  REP   #$30
         LDA   L010EA6
         PHA
         _SetSolidPenPat
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         _PaintRect
         RTS

         REP   #$30
         _ObscureCursor
         RTS

L016E9A  REP   #$30
         _InitCursor
         RTS

L016EA4  REP   #$30
         _HideCursor
         RTS

L016EAE  REP   #$30
         _ShowCursor
         RTS

L016EB8  REP   #$30
         LDA   L010EA2
         STA   L010EA6
         LDA   #L010E31
         STA   L010EA2
         LDA   #^L010E31
         STA   L010EA4
         JSR   L016E73
         RTS

L016ED0  REP   #$10
         LDA   L010EA2
         STA   $00
         LDA   L010EA4
         STA   $02
         LDY   L010EA6
         DEY
         LDA   L010EAA
         SEP   #$20
L016EE5  STA   [$00],Y
         DEY
         BPL   L016EE5
         REP   #$20
         RTS

         REP   #$30
         LDA   L010EA2
         PHA
         LDA   L010EA6
         PHA
         LDA   L010EAA
         PHA
         _SetColorEntry
         RTS

L016F03  REP   #$30
         LDA   L010EA2
         PHA
         LDA   L010EA8
         PHA
         LDA   L010EA6
         PHA
         _SetColorTable
         RTS

L016F19  REP   #$30
         LDA   L010EA2
         PHA
         LDA   L010EA8
         PHA
         LDA   L010EA6
         PHA
         _GetColorTable
         RTS

L016F2F  REP   #$30
         PEA   $0000
         PEA   $0000
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         LDA   L010E42
         PHA
         LDA   L010EA6
         PHA
         PEA   $0000
         PEA   $0000
         _NewHandle
         PLA
         STA   L010EAA
         STA   $00
         PLA
         STA   L010EAC
         STA   $02
         BCS   L016F70
         LDA   [$00]
         STA   L010EAE
         LDY   #$0002
         LDA   [$00],Y
         STA   L010EB0
         CLC
L016F70  RTS

L016F71  REP   #$30
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         _DisposeHandle
         RTS

L016F83  REP   #$30
         LDA   #$7D00
         STA   L010EA2
         LDA   #$0000
         STA   L010EA4
         LDA   #$C000
         STA   L010EA6
         JSR   L016F2F
         BCS   L016FB5
         LDA   L010EAA
         STA   L010EA2
         LDA   L010EAC
         STA   L010EA4
         LDA   L010EAE
         STA   L010EA6
         LDA   L010EB0
         STA   L010EA8
         CLC
L016FB5  RTS

L016FB6  REP   #$30
         LDA   L010EA2
         STA   L010EA6
         LDA   L010EA4
         STA   L010EA8
         JSL   GSOS
         DW    $0010      ; Open
         ADRL  L010EA4
         LDA   L010EA4
         STA   L010EA6
         RTS

L016FD5  REP   #$30
         LDA   L010EA2
         STA   L010EA4
         JSL   GSOS
         DW    $0012      ; Read
         ADRL  L010EA4
         RTS

L016FE8  REP   #$30
         JSL   GSOS
         DW    $0014      ; Close
         ADRL  L010EA2
         RTS

L016FF5  REP   #$30
         JSL   GSOS
         DW    $0006      ; GetFileInfo
         ADRL  L010EA2
         LDA   L010EA8
         PHA
         LDA   L010EAC
         PHA
         LDA   L010EAA
         PHA
         LDA   L010EAE
         PHA
         LDA   L010EB0
         PHA
         LDA   L010EB2
         PHA
         LDA   L010EB4
         PHA
         LDA   L010EB6
         PHA
         LDA   L010EBA
         PHA
         LDA   L010EB8
         PHA
         PLA
         STA   L010EC6
         PLA
         STA   L010EC8
         PLA
         STA   L010EC2
         PLA
         STA   L010EBE
         PLA
         STA   L010EBA
         PLA
         STA   L010EB6
         PLA
         STA   L010EB2
         PLA
         STA   L010EAE
         PLA
         STA   L010EB0
         PLA
         STA   L010EAA
         RTS

L017052  REP   #$30
         LDA   #$7D00
         STA   L010EA2
         LDA   #$0000
         STA   L010EA4
         LDA   #$C000
         STA   L010EA6
         JSR   L016F2F
         BCS   L017083
         LDA   L010EAA
         STA   L0171C5
         LDA   L010EAC
         STA   L0171C7
         LDA   L010EAE
         STA   L0171C9
         LDA   L010EB0
         STA   L0171CB
L017083  RTS

L017084  REP   #$30
         LDA   L0171C7
         PHA
         LDA   L0171C5
         PHA
         _DisposeHandle
         RTS

L017096  REP   #$30
         LDA   L010EA6
         STA   L010EBA
         LDA   L010EA8
         STA   L010EBC
         LDA   L010EAA
         STA   L010EBE
         LDA   L010EAC
         STA   L010EC0
         JSR   L016FB6
         BCC   L0170B9
L0170B5  REP   #$30
         SEC
         RTS

L0170B9  LDA   L010EA6
         STA   L010EA2
         LDA   L0171C9
         STA   L010EA6
         LDA   L0171CB
         STA   L010EA8
         LDA   #$7D00
         STA   L010EAA
         LDA   #$0000
         STA   L010EAC
         JSR   L016FD5
         BCS   L0170B5
         JSR   L016FE8
         BCS   L0170B5
         LDA   L0171C9
         STA   $00
         LDA   L0171CB
         STA   $02
         LDA   [$00]
         CMP   #$0080
         BNE   L0170B5
         LDA   L010EBE
         STA   $04
         LDA   L010EC0
         STA   $06
         LDY   #$0002
         LDX   #$0000
L017102  LDA   [$00],Y
         XBA
         ASL
         TXY
         STA   [$04],Y
         INY
         INY
         TYX
         INY
         INY
         CPY   #$0022
         BNE   L017102
         STZ   L017271
         LDA   L010EBA
         STA   $04
         LDA   L010EBC
         STA   $06
         SEP   #$20
         LDA   #$C8
         STA   L017270
         LDY   #$0022
L01712A  LDX   #$0000
L01712D  LDA   [$00],Y
         BPL   L017150
         CMP   #$80
         BEQ   L017148
         EOR   #$FF
         INC
         INC
         STA   L01726F
         INY
         LDA   [$00],Y
L01713F  STA   L0171CD,X
         INX
         DEC   L01726F
         BNE   L01713F
L017148  INY
L017149  CPX   #$00A0
         BNE   L01712D
         BRA   L017163
L017150  INC
         STA   L01726F
         INY
L017155  LDA   [$00],Y
         STA   L0171CD,X
         INY
         INX
         DEC   L01726F
         BNE   L017155
         BRA   L017149
L017163  PHY
         LDX   #$0000
L017167  LDA   #$04
         STA   L01726E
L01716C  LDY   #$0002
         STZ   L01726D
L017172  ASL   L01726D
         ASL   L017245,X
         BCC   L01717D
         INC   L01726D
L01717D  ASL   L01726D
         ASL   L01721D,X
         BCC   L017188
         INC   L01726D
L017188  ASL   L01726D
         ASL   L0171F5,X
         BCC   L017193
         INC   L01726D
L017193  ASL   L01726D
         ASL   L0171CD,X
         BCC   L01719E
         INC   L01726D
L01719E  DEY
         BNE   L017172
         LDA   L01726D
         LDY   L017271
         STA   [$04],Y
         INY
         STY   L017271
         DEC   L01726E
         BNE   L01716C
         INX
         CPX   #$0028
         BNE   L017167
         PLY
         DEC   L017270
         BEQ   L0171C1
         JMP   L01712A

L0171C1  REP   #$30
         CLC
         RTS

L0171C5  DB    $00
         DB    $00
L0171C7  DB    $00
         DB    $00
L0171C9  DB    $00
         DB    $00
L0171CB  DB    $00
         DB    $00
L0171CD  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0171F5  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01721D  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L017245  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01726D  DB    $00
L01726E  DB    $00
L01726F  DB    $00
L017270  DB    $00
L017271  DB    $00
         DB    $00
L017273  DB    $00
         DB    $00
L017275  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L017281  DB    $00
         DB    $00
         REP   #$30
         LDA   L010EA2
         PHA
         LDA   L010EA6
         PHA
         _SetPenSize
         RTS

         REP   #$30
         LDA   L010EA2
         PHA
         _SetPenMode
         RTS

L0172A3  REP   #$30
         LDA   L010EA2
         PHA
         LDA   L010EA6
         PHA
         _MoveTo
         RTS

L0172B5  REP   #$30
         PEA   $0000
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         _CStringWidth
         PLA
         STA   L010EA6
         RTS

         REP   #$30
         LDA   L010EA2
         PHA
         _DrawChar
         RTS

L0172DC  REP   #$30
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         _DrawCString
         RTS

         REP   #$30
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         LDA   L010EA2
         STA   $00
         LDA   L010EA4
         STA   $02
         LDA   [$00]
         STA   L010EA2
         LDY   #$0002
         LDA   [$00],Y
         STA   L010EA6
         JSR   L0172A3
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         LDA   #$0004
         CLC
         ADC   L010EA2
         STA   L010EA6
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA8
         LDA   L010EA8
         PHA
         LDA   L010EA6
         PHA
         _DrawCString
         RTS

L01733D  REP   #$30
         LDA   L010EA2
         PHA
         _SetForeColor
         RTS

L01734B  REP   #$30
         LDA   L010EA2
         PHA
         _SetBackColor
         RTS

L017359  REP   #$30
         LDA   L010EA2
         STA   L010EAA
         LDA   L010EA4
         STA   L010EAC
         LDA   L010EA6
         STA   L010EAE
         JSR   L0172B5
         LDA   #$0140
         SEC
         SBC   L010EA6
         LSR
         STA   L010EA2
         LDA   L010EAE
         STA   L010EA6
         JSR   L0172A3
         LDA   L010EAA
         STA   L010EA2
         LDA   L010EAC
         STA   L010EA4
         JSR   L0172DC
         RTS

L017394  REP   #$30
         PEA   $0000
         PEA   $0000
         _TickCount
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         RTS

L0173AC  REP   #$30
         JSR   L017394
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         _SetRandSeed
         RTS

         REP   #$30
         DEC   L010EA6
         LDA   L010EA6
         BNE   L0173D8
         LDA   L010EA2
         STA   L010EAA
         LDA   L010EA4
         STA   L010EAC
         RTS

L0173D8  LDA   L010EA2
         STA   $00
         LDA   L010EA4
         STA   $02
         LDY   #$0000
         SEP   #$20
L0173E7  LDA   [$00],Y
         INY
         CMP   #$00
         BNE   L0173E7
         DEC   L010EA6
         BNE   L0173E7
         REP   #$20
         TYA
         CLC
         ADC   L010EA2
         STA   L010EAA
         LDA   #$0000
         ADC   L010EA4
         STA   L010EAC
         REP   #$30
         RTS

L017409  REP   #$30
         JSR   L01733D
         LDA   L010EA6
         STA   L010EA2
         JSR   L01734B
         RTS

L017418  REP   #$30
         PEA   $0000
         _GetForeColor
         PLA
         STA   L010EA2
         RTS

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

         REP   #$30
         PEA   $0000
         PEA   $0000
         _GetFont
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         RTS

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

         REP   #$30
         PEA   $0000
         PEA   $0000
         _GetFontID
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         RTS

         REP   #$30
         PEA   ^L010EA2
         PEA   L010EA2
         _GetPen
         RTS

         REP   #$30
         PEA   $0000
         PEA   $0000
         _GetSysFont
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         RTS

         REP   #$30
         LDA   L010EA2
         PHA
         _SetTextFace
         RTS

L0174B1  REP   #$30
         LDA   L010EA2
         PHA
         _SetTextMode
         RTS

L0174BF  REP   #$30
         LDAL  $E0C034
         AND   #$000F
         STA   L010EA2
         RTS

L0174CC  REP   #$30
         LDAL  $E0C034
         AND   #$FFF0
         ORA   L010EA2
         STAL  $E0C034
         RTS

L0174DD  REP   #$30
         LDA   L010EAA
         STA   $00
         LDA   L010EAC
         STA   $02
         STZ   L010EB2
         LDX   L010EAE
         LDY   #$0000
L0174F2  STY   L010EB6
         LDA   L010EA6
         CMP   [$00],Y
         BCC   L01751B
         INY
         INY
         LDA   L010EA2
         CMP   [$00],Y
         BCC   L01751B
         INY
         INY
         LDA   L010EA6
         CMP   [$00],Y
         BPL   L01751B
         INY
         INY
         LDA   L010EA2
         CMP   [$00],Y
         BPL   L01751B
         INC   L010EB2
         RTS

L01751B  LDA   L010EB6
         CLC
         ADC   #$0008
         TAY
         INC   L010EB2
         DEX
         BNE   L0174F2
         STZ   L010EB2
         RTS

L01752D  REP   #$30
L01752F  JSR   L016D11
         LDA   L010EA2
         BNE   L01752F
         RTS

         REP   #$30
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadTimeHex
         PLA
         PLY
         PLY
         PLY
         TAY
         XBA
         AND   #$00FF
         STA   L010EBE
         TYA
         AND   #$00FF
         STA   L010EC0
         CLC
         ADC   L010EAE
         CMP   #$003C
         BCC   L017570
         SEC
         SBC   #$003C
         INC   L010EBE
L017570  STA   L010EC0
         LDA   L010EBE
         XBA
         ORA   L010EC0
         STA   L010EBE
         LDA   L010EA2
         STA   L010EB4
         LDA   L010EA6
         STA   L010EB6
         LDA   L010EAA
         STA   L010EB8
L01758F  LDA   L010EB4
         STA   L010EA2
         LDA   L010EB6
         STA   L010EA6
         LDA   L010EB8
         STA   L010EAA
         LDA   #$0004
         STA   L010EAE
         LDA   #$0000
         STA   L010EB0
         JSR   L0175CD
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadTimeHex
         PLA
         PLY
         PLY
         PLY
         CMP   L010EBE
         BCC   L01758F
         RTS

L0175CD  REP   #$30
         LDA   L010EA6
         STA   L010EBA
         LDA   L010EAA
         STA   L010EBC
         LDA   #L010EF1
         STA   L010EA6
         LDA   #^L010EF1
         STA   L010EA8
         JSR   L016F19
         LDA   L010EBA
         CLC
         ADC   L010EBC
         DEC
         DEC
         ASL
         TAY
         DEC   L010EBC
         LDA   L010EF3,Y
         PHA
L0175FC  LDA   L010EF1,Y
         STA   L010EF3,Y
         DEC   L010EBC
         BEQ   L01760B
         DEY
         DEY
         BRA   L0175FC
L01760B  PLA
         STA   L010EF1,Y
         JSR   L016F03
         LDA   L010EAE
         STA   L010EA2
         LDA   L010EB0
         STA   L010EA4
         JSR   L0176FA
         RTS

L017622  REP   #$30
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadTimeHex
         PLA
         PLY
         PLY
         PLY
         TAY
         XBA
         AND   #$00FF
         STA   L010EBE
         TYA
         AND   #$00FF
         STA   L010EC0
         CLC
         ADC   L010EA2
         CMP   #$003C
         BCC   L01765A
         SEC
         SBC   #$003C
         INC   L010EBE
L01765A  STA   L010EC0
         LDA   L010EBE
         XBA
         ORA   L010EC0
         STA   L010EBE
L017667  PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _ReadTimeHex
         PLA
         PLY
         PLY
         PLY
         CMP   L010EBE
         BCC   L017667
         RTS

L017684  REP   #$30
         LDA   L010EA8
         PHA
         LDA   L010EA6
         PHA
         LDA   L010EA2
         STA   L010EA6
         LDA   L010EA4
         STA   L010EA8
         LDA   #L010EF1
         STA   L010EA2
         LDA   #^L010EF1
         STA   L010EA4
         JSR   L016C23
         LDA   L010EAA
         STA   L010EA6
         LDA   L010EAC
         STA   L010EA8
         LDA   #L010F01
         STA   L010EA2
         LDA   #^L010F01
         STA   L010EA4
         JSR   L016C23
         PLA
         STA   L010EA6
         PLA
         STA   L010EA8
         PEA   ^L010EF1
         PEA   L010EF1
         PEA   ^L010F01
         PEA   L010F01
         LDA   L010EA8
         PHA
         LDA   L010EA6
         PHA
         LDA   L010EB0
         PHA
         LDA   L010EAE
         PHA
         LDA   L010EB2
         PHA
         PEA   $0000
         PEA   $0000
         _CopyPixels
         RTS

L0176FA  REP   #$30
         LDA   L010EA2
         STA   L010EA6
         LDA   L010EA4
         STA   L010EA8
         JSR   L017394
         LDA   L010EA2
         CLC
         ADC   L010EA6
         STA   L010EAA
         LDA   L010EA4
         ADC   L010EA8
         STA   L010EAC
L01771E  JSR   L017394
         LDA   L010EAA
         SEC
         SBC   L010EA2
         STA   L010EA6
         LDA   L010EAC
         SBC   L010EA4
         STA   L010EA8
         LDA   L010EA8
         BPL   L01771E
         RTS

L01773A  REP   #$30
         LDA   L010EA2
         STA   L010EAE
         LDA   L010EA6
         STA   L010EB2
         LDA   L010EA8
         STA   L010EB4
         LDA   #L010EF1
         STA   L010EA6
         LDA   #^L010EF1
         STA   L010EA8
         JSR   L016F19
         LDA   L010EB2
         STA   $00
         LDA   L010EB4
         STA   $02
         LDX   #$0010
L01776A  LDY   #$001E
L01776D  LDA   [$00],Y
         XBA
         AND   #$000F
         STA   L010EB6
         LDA   L010EF1,Y
         PHA
         PHA
         XBA
         AND   #$000F
         CMP   L010EB6
         BEQ   L017785
         INC
L017785  XBA
         STA   L010EBE
         LDA   [$00],Y
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         STA   L010EB6
         PLA
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         CMP   L010EB6
         BEQ   L0177A3
         INC
L0177A3  ASL
         ASL
         ASL
         ASL
         STA   L010EBA
         LDA   [$00],Y
         AND   #$000F
         STA   L010EB6
         PLA
         AND   #$000F
         CMP   L010EB6
         BEQ   L0177BC
         INC
L0177BC  ORA   L010EBA
         ORA   L010EBE
         STA   L010EF1,Y
         DEY
         DEY
         BPL   L01776D
         PHX
         LDA   L010EAE
         STA   L010EA2
         LDA   #L010EF1
         STA   L010EA6
         LDA   #^L010EF1
         STA   L010EA8
         JSR   L016F03
         LDA   #$0001
         STA   L010EA2
         LDA   #$0000
         STA   L010EA4
         JSR   L0176FA
         PLX
         DEX
         BEQ   L0177F5
         JMP   L01776A
L0177F5  RTS

L0177F6  REP   #$30
         LDA   L010EA2
         STA   L010EAE
         LDA   #L010EF1
         STA   L010EA6
         LDA   #^L010EF1
         STA   L010EA8
         JSR   L016F19
         LDY   #$0010
L017810  LDX   #$001E
L017813  LDA   L010EF1,X
         PHA
         PHA
         XBA
         AND   #$000F
         BEQ   L01781F
         DEC
L01781F  XBA
         STA   L010EBE
         PLA
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         BEQ   L017832
         DEC
         ASL
         ASL
         ASL
         ASL
L017832  STA   L010EBA
         PLA
         AND   #$000F
         BEQ   L01783C
         DEC
L01783C  ORA   L010EBA
         ORA   L010EBE
         STA   L010EF1,X
         DEX
         DEX
         BPL   L017813
         PHY
         LDA   L010EAE
         STA   L010EA2
         LDA   #L010EF1
         STA   L010EA6
         LDA   #^L010EF1
         STA   L010EA8
         JSR   L016F03
         LDA   #$0002
         STA   L010EA2
         LDA   #$0000
         STA   L010EA4
         JSR   L0176FA
         PLY
         DEY
         BNE   L017810
         RTS

L017873  REP   #$30
         LDA   L010EA2
         PHA
         LDA   L010EA6
         STA   L010EB2
         LDA   L010EA8
         STA   L010EB4
         LDA   L010EAA
         STA   L010EB6
         LDA   L010EAC
         STA   L010EB8
         JSR   L0177F6
         LDA   L010EB6
         STA   L010EA2
         LDA   L010EB8
         STA   L010EA4
         LDA   #$2000
         STA   L010EA6
         LDA   #$00E1
         STA   L010EA8
         LDA   #$7D00
         STA   L010EAA
         LDA   #$0000
         STA   L010EAC
         JSR   L016E27
         PLA
         STA   L010EA2
         LDA   L010EB2
         STA   L010EA6
         LDA   L010EB4
         STA   L010EA8
         JSR   L01773A
         RTS

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

         REP   #$30
         LDA   #$0008
         STA   L010EA2
         LDA   #L017273
         STA   L010EA6
         LDA   #^L017273
         STA   L010EA8
L0178F7  JSR   L016CD7
         LDA   L017273
         BEQ   L0178F7
         LDA   L017275
         RTS

L017903  REP   #$30
         LDA   L018886
         STA   $00
         LDA   L018888
         STA   $02
         LDY   #$0012
         LDA   #$0001
         CLC
         ADC   [$00],Y
         STA   [$00],Y
         RTS

L01791B  REP   #$30
         LDA   L018886
         STA   $00
         LDA   L018888
         STA   $02
         LDY   #$0014
         LDA   #$0001
         CLC
         ADC   [$00],Y
         STA   [$00],Y
         RTS

L017933  REP   #$30
         LDA   #L018893
         STA   L018886
         LDA   #^L018893
         STA   L018888
         LDA   L018884
         CMP   #$0001
         BEQ   L017963
         LDA   #$0003
         EOR   L018882
         STA   L018882
         CMP   #$0002
         BNE   L017963
         LDA   #L0188AB
         STA   L018886
         LDA   #^L0188AB
         STA   L018888
L017963  RTS

L017964  REP   #$30
         LDA   #L018893
         STA   L010EA6
         LDA   #^L018893
         STA   L010EA8
         JSR   L0179A8
         LDA   #L0188AB
         STA   L010EA6
         LDA   #^L0188AB
         STA   L010EA8
         JSR   L0179A8
         SEP   #$20
         LDY   #$0007
         LDA   #$01
         CLC
         ADC   [$00],Y
         STA   [$00],Y
         REP   #$20
         LDA   #$0001
         STA   L018882
         STA   L018884
         LDA   #L018893
         STA   L018886
         LDA   #^L018893
         STA   L018888
         RTS

L0179A8  LDA   #L01888A
         STA   L010EA2
         LDA   #^L01888A
         STA   L010EA4
         LDA   #$0008
         STA   L010EAA
         LDA   #$0000
         STA   L010EAC
         JSR   L016E27
         LDA   L010EA6
         STA   $00
         LDA   L010EA8
         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

L0179F0  REP   #$30
         _LoadSysFont
         RTS

L0179FA  REP   #$30
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         LDA   L010EA6
         PHA
         _InstallFont
         RTS

L017A10  REP   #$30
         LDA   L010EAE
         STA   $00
         LDA   L010EB0
         STA   $02
         PEA   $0000
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         _GetFamNum
         PLA
         CMP   #$FFFF
         BEQ   L017A49
         STA   [$00]
         LDY   #$0002
         SEP   #$20
         LDA   L010EA6
         STA   [$00],Y
         INY
         LDA   L010EAA
         STA   [$00],Y
         REP   #$20
         RTS

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

L017A54  REP   #$30
         LDA   L010EA2
         STA   L010EC2
         LDA   L010EA4
         STA   L010EC4
         STZ   L010EA2
         JSR   L0177F6
         LDA   #$000B
         STA   L010EA2
         JSR   L016EB8
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         JSR   L017B8F
         JSR   L017BFE
         JSR   L0178CF
         JSR   L016EAE
         PEA   $001E
         PEA   $0028
         PEA   ^L017ADC
         PEA   L017ADC
         PEA   $0000
         PEA   $0000
         LDA   L010EC4
         PHA
         LDA   L010EC2
         PHA
         PEA   ^L0188C3
         PEA   L0188C3
         _SFGetFile
         JSR   L016EA4
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L017C50
         JSR   L017BE1
         SEP   #$20
         LDX   #$00C7
         LDA   #$00
L017AD2  STAL  $E19D00,X
         DEX
         BPL   L017AD2
         REP   #$20
         RTS

L017ADC  STR   'Please select a file.'
L017AF2  REP   #$30
         LDA   L010EA6
         STA   L010EC2
         LDA   L010EA8
         STA   L010EC4
         LDA   L010EAA
         STA   L010EC6
         STZ   L010EA2
         JSR   L0177F6
         LDA   #$000B
         STA   L010EA2
         JSR   L016EB8
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         JSR   L017B8F
         JSR   L017BFE
         JSR   L0178CF
         JSR   L016EAE
         PEA   $001E
         PEA   $0028
         PEA   ^L017B7E
         PEA   L017B7E
         LDA   L010EC4
         PHA
         LDA   L010EC2
         PHA
         LDA   L010EC6
         PHA
         PEA   ^L0188C3
         PEA   L0188C3
         _SFPutFile
         JSR   L016EA4
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L017C50
         JSR   L017BE1
         SEP   #$20
         LDX   #$00C7
         LDA   #$00
L017B74  STAL  $E19D00,X
         DEX
         BPL   L017B74
         REP   #$20
         RTS

L017B7E  STR   'Enter a filename'
L017B8F  REP   #$30
         LDA   #$000F
         STA   L010EA2
         LDA   #$0100
         STA   L010EA6
         JSR   L016BFF
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0100
         LDA   L010E42
         PHA
         PEA   $C005
         PEA   $0000
         PEA   $0000
         _NewHandle
         PLA
         STA   L017BFA
         PLA
         STA   L017BFA+2
         LDA   L017BFA
         STA   $00
         LDA   L017BFA+2
         STA   $02
         LDA   L010E42
         PHA
         LDA   [$00]
         PHA
         _MenuStartUp
         RTS

L017BE1  REP   #$30
         _MenuShutDown
         LDA   L017BFA+2
         PHA
         LDA   L017BFA
         PHA
         _DisposeHandle
         RTS

L017BFA  ADRL  $00000000
L017BFE  REP   #$30
         LDA   #$0017
         STA   L010EA2
         LDA   #$0100
         STA   L010EA6
         JSR   L016BFF
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0100
         LDA   L010E42
         PHA
         PEA   $C005
         PEA   $0000
         PEA   $0000
         _NewHandle
         PLA
         STA   L017C69
         PLA
         STA   L017C69+2
         LDA   L017C69
         STA   $00
         LDA   L017C69+2
         STA   $02
         LDA   L010E42
         PHA
         LDA   [$00]
         PHA
         _SFStartUp
         RTS

L017C50  REP   #$30
         _SFShutDown
         LDA   L017C69+2
         PHA
         LDA   L017C69
         PHA
         _DisposeHandle
         RTS

L017C69  ADRL  $00000000
L017C6D  REP   #$30
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         _InitColorTable
         RTS

*--- Check volume - AV 202103

L017C7F  REP   #$30
	lda	#1
        sta   L010EA2
	rts

*         LDA   L010EA6
*         STA   L017D4B
*         LDA   L010EA8
*         STA   L017D4D
*         LDA   #L017D27
*         STA   L017D4F
*         LDA   #^L017D27
*         STA   L017D51
*         LDA   #$0001
*         STA   L017D53
*L017C9F  LDA   L017D4F
*         STA   L010EA2
*         LDA   L017D51
*         STA   L010EA4
*         LDA   #L017D55
*         STA   L010EA6
*         LDA   #^L017D55
*         STA   L010EA8
*         JSL   GSOS
*         DW    $0008      ; Volume
*         ADRL  L010EA2
*         CMP   #$0011
*         BEQ   L017D19
*         LDA   L017D4F
*         STA   L010EA2
*         LDA   L017D51
*         STA   L010EA4
*         LDA   #$0004
*         CLC
*         ADC   L010EA2
*         STA   L017D4F
*         LDA   #$0000
*         ADC   L010EA4
*         STA   L017D51
*         LDA   L017D4B
*         STA   L010EA2
*         LDA   L017D4D
*         STA   L010EA4
*         LDA   #L017D55
*         STA   L010EA6
*         LDA   #^L017D55
*         STA   L010EA8
*         LDA   #$0000
*         STA   L010EAA
*         JSR   L017EB2
*         LDA   L010EAA
*         BEQ   L017D20
*         INC   L017D53
*         LDA   L017D53
*         CMP   #$000A
*         BEQ   L017D19
*         JMP   L017C9F
*
*L017D19  LDA   #$0000
*         STA   L010EA2
*         RTS
*
*L017D20  LDA   L017D53
*         STA   L010EA2
*         RTS
$
*L017D27  STR   '.d1'
*         STR   '.d2'
*         STR   '.d3'
*         STR   '.d4'
*         STR   '.d5'
*         STR   '.d6'
*         STR   '.d7'
*         STR   '.d8'
*         STR   '.d9'
*L017D4B  DB    $00
*         DB    $00
*L017D4D  DB    $00
*         DB    $00
*L017D4F  DB    $00
*         DB    $00
*L017D51  DB    $00
*         DB    $00
*L017D53  DB    $00
*         DB    $00
*L017D55  DS    $100

L017E55  REP   #$30
         LDA   L010EA6
         STA   L017EAA
         LDA   L010EA8
         STA   L017EAC
         LDA   L010EAA
         STA   L017EAE
L017E69  LDA   #$0000
         STA   L010EA2
         LDA   #$0000
         STA   L010EA6
         LDA   #$0000
         STA   L010EAA
         JSR   L016CA9
         LDA   L010EAA
         BEQ   L017E69
         LDA   L017EAA
         STA   L010EAA
         LDA   L017EAC
         STA   L010EAC
         LDA   L017EAE
         STA   L010EAE
         LDA   #$0000
         STA   L010EB2
         JSR   L0174DD
         LDA   L010EB2
         BEQ   L017E69
         LDA   L010EB2
         STA   L010EA2
         RTS

L017EAA  DW    $0000
L017EAC  DW    $0000
L017EAE  DW    $0000
         DW    $0000
L017EB2  REP   #$30
         LDA   L010EA2
         STA   $00
         LDA   L010EA4
         STA   $02
         LDA   L010EA6
         STA   $04
         LDA   L010EA8
         STA   $06
         SEP   #$30
         LDY   #$00
         STY   L017F05
         LDA   [$00],Y
         CMP   [$04],Y
         BNE   L017EFB
         CLC
         ADC   #$01
         STA   L017F04
         INY
L017EDC  LDA   [$00],Y
         ORA   #$20
         STA   L017F05
         LDA   [$04],Y
         ORA   #$20
         CMP   L017F05
         BNE   L017EFB
         INY
         CPY   L017F04
         BNE   L017EDC
         REP   #$30
         LDA   #$0000
         STA   L010EAA
         RTS

L017EFB  REP   #$30
         LDA   #$0001
         STA   L010EAA
         RTS

L017F04  DB    $00
L017F05  DB    $00

L017F06  REP   #$30
         JSR   L016E73
         RTS

L017F0C  REP   #$30
         JSR   L016EA4
         LDA   L010EA2
         STA   L017FAE
         LDA   L010EA6
         STA   L017FB0
         LDA   L010EAA
         STA   L017FB2
         LDA   L010EAC
         STA   L017FB4
         LDA   L010EAA
         STA   L017FB6
         LDA   L010EAC
         STA   L017FB8
L017F35  LDA   L017FB2
         STA   L010EA2
         LDA   L017FB4
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L017F06
         LDA   #$0008
         CLC
         ADC   L017FB2
         STA   L010EA2
         LDA   #$0000
         ADC   L017FB4
         STA   L010EA4
         LDA   L010EA2
         STA   L017FB2
         LDA   L010EA4
         STA   L017FB4
         DEC   L017FB0
         BNE   L017F35
         LDA   L017FB6
         STA   L010EA2
         LDA   L017FB8
         STA   L010EA4
L017F7A  DEC   L017FAE
         BEQ   L017FA1
         LDA   #$0008
         CLC
         ADC   L010EA2
         STA   L010EA6
         LDA   #$0000
         ADC   L010EA4
         STA   L010EA8
         LDA   L010EA6
         STA   L010EA2
         LDA   L010EA8
         STA   L010EA4
         JMP   L017F7A

L017FA1  LDA   #$0007
         STA   L010EA6
         JSR   L017F06
         JSR   L016EAE
         RTS

L017FAE  DW    $0000
L017FB0  DW    $0000
L017FB2  DW    $0000
L017FB4  DW    $0000
L017FB6  DW    $0000
L017FB8  DW    $0000
L017FBA  REP   #$30
         JSR   L012209
         LDA   #L018120
         STA   L010EA2
         LDA   #^L018120
         STA   L010EA4
         LDA   L010FCD
         STA   L010EA6
         LDA   L010FCF
         STA   L010EA8
         LDA   #L010F4D
         STA   L010EAA
         LDA   #^L010F4D
         STA   L010EAC
         JSR   L017096
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         LDA   #$0000
         STA   L010EA2
         LDA   #L010F4D
         STA   L010EA6
         LDA   #^L010F4D
         STA   L010EA8
         LDA   L010FCD
         STA   L010EAA
         LDA   L010FCF
         STA   L010EAC
         JSR   L017873
         JSR   L019FC9
         LDA   #$0004
         STA   L010EA2
         JSR   L0174B1
         LDA   #$000F
         STA   L010EA2
         JSR   L01733D
         LDA   #$0098
         STA   L010EA2
         LDA   #$000E
         STA   L010EA6
         JSR   L0172A3
         LDA   #L018140
         STA   L010EA2
         LDA   #^L018140
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0024
         STA   L010EA2
         LDA   #$0022
         STA   L010EA6
         JSR   L0172A3
         LDA   #L018893
         STA   L010EA2
         LDA   #^L018893
         STA   L010EA4
         JSR   L0172DC
         LDA   #L018893
         STA   L010EBA
         LDA   #^L018893
         STA   L010EBC
         LDA   #$0022
         STA   L010EBE
         JSR   L0180B8
         LDA   L018884
         CMP   #$0002
         BEQ   L018082
L01807E  JSR   L016D1F
         RTS

L018082  LDA   #$0024
         STA   L010EA2
         LDA   #$0036
         STA   L010EA6
         JSR   L0172A3
         LDA   #L0188AB
         STA   L010EA2
         LDA   #^L0188AB
         STA   L010EA4
         JSR   L0172DC
         LDA   #L0188AB
         STA   L010EBA
         LDA   #^L0188AB
         STA   L010EBC
         LDA   #$0036
         STA   L010EBE
         JSR   L0180B8
         JMP   L01807E

L0180B8  LDA   L010EBA
         STA   $04
         LDA   L010EBC
         STA   $06
         LDY   #$0012
         LDA   #$00B0
         STA   L010EAA
         JSR   L0180D7
         LDY   #$0014
         LDA   #$0100
         STA   L010EAA
L0180D7  LDA   [$04],Y
         STA   L010EA2
         LDA   #L018153
         STA   L010EA6
         LDA   #^L018153
         STA   L010EA8
         JSR   L016DCA
         SEP   #$20
         LDA   L018154
         REP   #$30
         CMP   #$0000
         BNE   L018101
         LDA   #$0008
         CLC
         ADC   L010EAA
         STA   L010EAA
L018101  LDA   L010EAA
         STA   L010EA2
         LDA   L010EBE
         STA   L010EA6
         JSR   L0172A3
         LDA   #L018153
         STA   L010EA2
         LDA   #^L018153
         STA   L010EA4
         JSR   L0172DC
         RTS

L018120  STR   '1/sin.pics/score.pc1'
L018140  ASC   'Correct  '
         ASC   'Incorrect'00
L018153  DB    $00
L018154  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01815D  REP   #$30
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         _SetSpaceExtra
         RTS

         REP   #$30
         PEA   $0000
         PEA   $0000
         _GetSpaceExtra
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         RTS

L018187  REP   #$30
         PEA   $0000
         PEA   $0000
         LDA   L010EA8
         PHA
         LDA   L010EA6
         PHA
         _Long2Fix
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         RTS

L0181A7  REP   #$30
         LDA   L010EB0
         PHA
         LDA   L010EAE
         PHA
         LDA   L010EAC
         PHA
         LDA   L010EAA
         PHA
         LDA   L010EA8
         PHA
         LDA   L010EA6
         PHA
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         JSL   L010764
         TSC
         CLC
         ADC   #$0010
         TCS
         RTS

L0181D4  REP   #$30
         LDA   L010EAE
         PHA
         LDA   L010EAA
         PHA
         LDA   L010EA8
         PHA
         LDA   L010EA6
         PHA
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         JSL   L01071C
         TSC
         CLC
         ADC   #$000C
         TCS
         RTS

L0181F9  REP   #$30
         JSL   L010684
         RTS

L018200  REP   #$30
         LDA   L010EA4
         PHA
         LDA   L010EA2
         PHA
         JSL   L0107D9
         PLA
         STA   L010EA2
         PLA
         STA   L010EA4
         RTS

L018217  REP   #$30
L018219  JSR   L016D68
         AND   #$0003
         CMP   #$0003
         BEQ   L018219
         STA   L018878
         ASL
         ASL
         CLC
         ADC   L010EA2
         STA   L010EBE
         LDA   #$0000
         ADC   L010EA4
         STA   L010EC0
         LDA   #$2000
         STA   L010EA2
         LDA   #$00E1
         STA   L010EA4
         JSR   L016C5A
         LDA   #L01827B
         STA   L010EA2
         LDA   #^L01827B
         STA   L010EA4
         STZ   L010EA6
         JSR   L016E73
         LDA   L010EBE
         STA   $00
         LDA   L010EC0
         STA   $02
         LDA   [$00]
         STA   L010EA2
         LDY   #$0002
         LDA   [$00],Y
         STA   L010EA4
         LDA   #$009B
         STA   L010EA6
         JSR   L017359
         RTS

L01827B  DW    $0096
         DW    $000A
         DW    $00A5
         DW    $00FF
L018283  REP   #$30
         JSR   L016D68
         AND   #$0001
         BEQ   L0182AE
         LDA   L018847
         STA   L010EA2
         LDA   L018849
         STA   L010EA4
         LDA   L01884B
         STA   L010EA6
         LDA   L01884D
         STA   L010EA8
         LDA   L01884F
         STA   L010EAA
         JSR   L011009
L0182AE  LDA   L01886E
         STA   L010EA2
         LDA   L018870
         STA   L010EA4
         LDA   L018872
         STA   L010EA6
         LDA   L018874
         STA   L010EA8
         LDA   L018876
         STA   L010EAA
         JSR   L011009
         RTS

L0182D0  REP   #$30
         LDY   L018878
         BNE   L0182F8
         LDA   L0187D5
         STA   L010EA2
         LDA   L0187D7
         STA   L010EA4
         LDA   L0187D9
         STA   L010EA6
         LDA   L0187DB
         STA   L010EA8
         LDA   L0187DD
         STA   L010EAA
         JMP   L01833C

L0182F8  CPY   #$0002
         BNE   L01831E
         LDA   L0187FB
         STA   L010EA2
         LDA   L0187FD
         STA   L010EA4
         LDA   L0187FF
         STA   L010EA6
         LDA   L018801
         STA   L010EA8
         LDA   L018803
         STA   L010EAA
         JMP   L01833C

L01831E  LDA   L018821
         STA   L010EA2
         LDA   L018823
         STA   L010EA4
         LDA   L018825
         STA   L010EA6
         LDA   L018827
         STA   L010EA8
         LDA   L018829
         STA   L010EAA
L01833C  JSR   L011009
         RTS

L018340  REP   #$30
         LDA   L010E3C
         BEQ   L01834A
         JSR   L012209
L01834A  LDA   #L0187B9
         STA   L010EA2
         LDA   #^L0187B9
         STA   L010EA4
         LDA   #L0187D5
         STA   L010EA6
         LDA   #^L0187D5
         STA   L010EA8
         LDA   #L0187D9
         STA   L010EAA
         LDA   #^L0187D9
         STA   L010EAC
         LDA   #L0187DD
         STA   L010EAE
         LDA   #^L0187DD
         STA   L010EB0
         JSR   L010FED
         LDA   #L0187DF
         STA   L010EA2
         LDA   #^L0187DF
         STA   L010EA4
         LDA   #L0187FB
         STA   L010EA6
         LDA   #^L0187FB
         STA   L010EA8
         LDA   #L0187FF
         STA   L010EAA
         LDA   #^L0187FF
         STA   L010EAC
         LDA   #L018803
         STA   L010EAE
         LDA   #^L018803
         STA   L010EB0
         JSR   L010FED
         LDA   #L018805
         STA   L010EA2
         LDA   #^L018805
         STA   L010EA4
         LDA   #L018821
         STA   L010EA6
         LDA   #^L018821
         STA   L010EA8
         LDA   #L018825
         STA   L010EAA
         LDA   #^L018825
         STA   L010EAC
         LDA   #L018829
         STA   L010EAE
         LDA   #^L018829
         STA   L010EB0
         JSR   L010FED
         RTS

L0183E4  LDA   L0187D5
         STA   L010EA2
         LDA   L0187D7
         STA   L010EA4
         JSR   L010FFE
         LDA   L0187FB
         STA   L010EA2
         LDA   L0187FD
         STA   L010EA4
         JSR   L010FFE
         LDA   L018821
         STA   L010EA2
         LDA   L018823
         STA   L010EA4
         JSR   L010FFE
         RTS

L018412  REP   #$30
         LDA   L010E3C
         BEQ   L01841C
         JSR   L012209
L01841C  LDA   #L01882B
         STA   L010EA2
         LDA   #^L01882B
         STA   L010EA4
         LDA   #L018847
         STA   L010EA6
         LDA   #^L018847
         STA   L010EA8
         LDA   #L01884B
         STA   L010EAA
         LDA   #^L01884B
         STA   L010EAC
         LDA   #L01884F
         STA   L010EAE
         LDA   #^L01884F
         STA   L010EB0
         JSR   L010FED
         LDA   #L018851
         STA   L010EA2
         LDA   #^L018851
         STA   L010EA4
         LDA   #L01886E
         STA   L010EA6
         LDA   #^L01886E
         STA   L010EA8
         LDA   #L018872
         STA   L010EAA
         LDA   #^L018872
         STA   L010EAC
         LDA   #L018876
         STA   L010EAE
         LDA   #^L018876
         STA   L010EB0
         JSR   L010FED
         RTS

L018483  LDA   L018847
         STA   L010EA2
         LDA   L018849
         STA   L010EA4
         JSR   L010FFE
         LDA   L01886E
         STA   L010EA2
         LDA   L018870
         STA   L010EA4
         JSR   L010FFE
         RTS

L0184A2  REP   #$30
         JSR   L012209
         LDA   #L0186AA
         STA   L010EA2
         LDA   #^L0186AA
         STA   L010EA4
         LDA   #L0186C7
         STA   L010EA6
         LDA   #^L0186C7
         STA   L010EA8
         LDA   #L0186CB
         STA   L010EAA
         LDA   #^L0186CB
         STA   L010EAC
         LDA   #L0186CF
         STA   L010EAE
         LDA   #^L0186CF
         STA   L010EB0
         JSR   L010FED
         LDA   #L0186F8
         STA   L010EA2
         LDA   #^L0186F8
         STA   L010EA4
         LDA   #L018714
         STA   L010EA6
         LDA   #^L018714
         STA   L010EA8
         LDA   #L018718
         STA   L010EAA
         LDA   #^L018718
         STA   L010EAC
         LDA   #L01871C
         STA   L010EAE
         LDA   #^L01871C
         STA   L010EB0
         JSR   L010FED
         LDA   #L01871E
         STA   L010EA2
         LDA   #^L01871E
         STA   L010EA4
         LDA   #L01873A
         STA   L010EA6
         LDA   #^L01873A
         STA   L010EA8
         LDA   #L01873E
         STA   L010EAA
         LDA   #^L01873E
         STA   L010EAC
         LDA   #L018742
         STA   L010EAE
         LDA   #^L018742
         STA   L010EB0
         JSR   L010FED
         LDA   #L018744
         STA   L010EA2
         LDA   #^L018744
         STA   L010EA4
         LDA   #L018762
         STA   L010EA6
         LDA   #^L018762
         STA   L010EA8
         LDA   #L018766
         STA   L010EAA
         LDA   #^L018766
         STA   L010EAC
         LDA   #L01876A
         STA   L010EAE
         LDA   #^L01876A
         STA   L010EB0
         JSR   L010FED
         RTS

L018574  LDA   L0186C7
         STA   L010EA2
         LDA   L0186C9
         STA   L010EA4
         JSR   L010FFE
         LDA   L018714
         STA   L010EA2
         LDA   L018716
         STA   L010EA4
         JSR   L010FFE
         LDA   L01873A
         STA   L010EA2
         LDA   L01873C
         STA   L010EA4
         JSR   L010FFE
         LDA   L018762
         STA   L010EA2
         LDA   L018764
         STA   L010EA4
         JSR   L010FFE
         RTS

L0185B1  REP   #$30
         LDA   L010E3C
         BEQ   L0185BB
         JSR   L012209
L0185BB  LDA   #L01876C
         STA   L010EA2
         LDA   #^L01876C
         STA   L010EA4
         LDA   #L018788
         STA   L010EA6
         LDA   #^L018788
         STA   L010EA8
         LDA   #L01878C
         STA   L010EAA
         LDA   #^L01878C
         STA   L010EAC
         LDA   #L018790
         STA   L010EAE
         LDA   #^L018790
         STA   L010EB0
         JSR   L010FED
         RTS

L0185EF  LDA   L018788
         STA   L010EA2
         LDA   L01878A
         STA   L010EA4
         JSR   L010FFE
         RTS

L0185FF  ADRL  L018617
         ADRL  L01862F
         ADRL  L018625
L01860B  ADRL  L01863A
         ADRL  L018653
         ADRL  L01866A
L018617  ASC   'That'27's right!'00
L018625  ASC   'Good job!'00
L01862F  ASC   'Very good!'00
L01863A  ASC   'Sorry, that'27's incorrect.'00
L018653  ASC   'Better luck next time.'00
L01866A  ASC   'Whoops, you missed it.'00
L018681  ASC   '1/magic.snd/fsagain'00
L0186A0  BRK   $00
L0186A2  BRK   $00
L0186A4  BRK   $00
L0186A6  BRK   $00
L0186A8  BRK   $00
L0186AA  ASC   '1/magic.snd/fshow'00
L0186C7  BRK   $00
L0186C9  BRK   $00
L0186CB  BRK   $00
L0186CD  BRK   $00
L0186CF  BRK   $00
L0186D1  ASC   '1/magic.snd/fsact'00
L0186EE  BRK   $00
L0186F0  BRK   $00
L0186F2  BRK   $00
L0186F4  BRK   $00
L0186F6  BRK   $00
L0186F8  ASC   '1/magic.snd/fsp1'00
L018714  BRK   $00
L018716  BRK   $00
L018718  BRK   $00
L01871A  BRK   $00
L01871C  BRK   $00
L01871E  ASC   '1/magic.snd/fsp2'00
L01873A  BRK   $00
L01873C  BRK   $00
L01873E  BRK   $00
L018740  BRK   $00
L018742  BRK   $00
L018744  ASC   '1/magic.snd/fsname'00
L018762  BRK   $00
L018764  BRK   $00
L018766  BRK   $00
L018768  BRK   $00
L01876A  BRK   $00
L01876C  ASC   '1/magic.snd/fsqt'00
L018788  BRK   $00
L01878A  BRK   $00
L01878C  BRK   $00
L01878E  BRK   $00
L018790  BRK   $00
L018792  ASC   '1/magic.snd/fsopt'00
L0187AF  BRK   $00
L0187B1  BRK   $00
L0187B3  BRK   $00
L0187B5  BRK   $00
L0187B7  BRK   $00
L0187B9  ASC   '1/magic.snd/fstr'00
L0187D5  BRK   $00
L0187D7  BRK   $00
L0187D9  BRK   $00
L0187DB  BRK   $00
L0187DD  BRK   $00
L0187DF  ASC   '1/magic.snd/fsgj'00
L0187FB  BRK   $00
L0187FD  BRK   $00
L0187FF  BRK   $00
L018801  BRK   $00
L018803  BRK   $00
L018805  ASC   '1/magic.snd/fsvg'00
L018821  BRK   $00
L018823  BRK   $00
L018825  BRK   $00
L018827  BRK   $00
L018829  BRK   $00
L01882B  ASC   '1/magic.snd/fswh'00
L018847  BRK   $00
L018849  BRK   $00
L01884B  BRK   $00
L01884D  BRK   $00
L01884F  BRK   $00
L018851  ASC   '1/magic.snd/fsinc'00
L01886E  DB    $00
         DB    $00
L018870  DB    $00
         DB    $00
L018872  DB    $00
         DB    $00
L018874  DB    $00
         DB    $00
L018876  DB    $00
         DB    $00
L018878  DB    $00
         DB    $00
L01887A  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L018882  DB    $00
         DB    $00
L018884  DB    $00
         DB    $00
L018886  DB    $00
         DB    $00
L018888  DB    $00
         DB    $00
L01888A  ASC   'Player 1'00
L018893  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0188AB  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0188C3  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0188D9  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L0189C3  REP   #$30
         LDA   L010E3C
         BEQ   L0189CA
L0189CA  LDA   #L018681
         STA   L010EA2
         LDA   #^L018681
         STA   L010EA4
         LDA   #L0186A0
         STA   L010EA6
         LDA   #^L0186A0
         STA   L010EA8
         LDA   #L0186A4
         STA   L010EAA
         LDA   #^L0186A4
         STA   L010EAC
         LDA   #L0186A8
         STA   L010EAE
         LDA   #^L0186A8
         STA   L010EB0
         JSR   L010FED
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L016C85
         JSR   L019FC9
         LDA   #$0000
         STA   L010EA2
         JSR   L016EB8
         LDA   #L018BEA
         STA   L010EA2
         LDA   #^L018BEA
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L018BF2
         STA   L010EA2
         LDA   #^L018BF2
         STA   L010EA4
         LDA   #$0000
         STA   L010EA6
         JSR   L016E73
         LDA   #L018BFA
         STA   L010EA2
         LDA   #^L018BFA
         STA   L010EA4
         LDA   #$0007
         STA   L010EA6
         JSR   L016E73
         LDA   #L018C02
         STA   L010EA2
         LDA   #^L018C02
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L018C0A
         STA   L010EA2
         LDA   #^L018C0A
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #$000D
         STA   L010EA2
         JSR   L01733D
         LDA   #L018BBC
         STA   L010EA2
         LDA   #^L018BBC
         STA   L010EA4
         LDA   #$0028
         STA   L010EA6
         JSR   L017359
         LDA   #L018BCE
         STA   L010EA2
         LDA   #^L018BCE
         STA   L010EA4
         LDA   #$003C
         STA   L010EA6
         JSR   L017359
         LDA   #$00A0
         STA   L010EA2
         LDA   #$0074
         STA   L010EA6
         JSR   L0172A3
         LDA   #L018BE0
         STA   L010EA2
         LDA   #^L018BE0
         STA   L010EA4
         JSR   L0172DC
         LDA   #$00A0
         STA   L010EA2
         LDA   #$008A
         STA   L010EA6
         JSR   L0172A3
         LDA   #L018BE4
         STA   L010EA2
         LDA   #^L018BE4
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0007
         STA   L010EA2
         JSR   L01733D
         LDA   #$009B
         STA   L010EA2
         LDA   #$00AF
         STA   L010EA6
         JSR   L0172A3
         LDA   #L018BE7
         STA   L010EA2
         LDA   #^L018BE7
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         LDA   #$0001
         STA   L018BBA
         LDA   L0186A0
         STA   L010EA2
         LDA   L0186A2
         STA   L010EA4
         LDA   L0186A4
         STA   L010EA6
         LDA   L0186A6
         STA   L010EA8
         LDA   L0186A8
         STA   L010EAA
         JSR   L011009
         JSR   L016EAE
L018B53  LDA   #$0000
         STA   L010EA2
         LDA   #L018BFA
         STA   L010EA6
         LDA   #^L018BFA
         STA   L010EA8
         LDA   #$0003
         STA   L010EAA
         JSR   L017E55
         LDA   L010EA2
         BEQ   L018B53
         CMP   #$0003
         BEQ   L018B9E
         CMP   L018BBA
         BEQ   L018B53
         STA   L018BBA
         LDA   L018BBA
         STA   L010EA2
         LDA   #$0002
         STA   L010EA6
         LDA   #L018BFA
         STA   L010EAA
         LDA   #^L018BFA
         STA   L010EAC
         JSR   L017F0C
         JMP   L018B53

L018B9E  LDA   L0186A0
         STA   L010EA2
         LDA   L0186A2
         STA   L010EA4
         JSR   L010FFE
         LDA   L018BBA
         STA   L010EA2
         JSR   L016EA4
         JSR   L0179F0
         RTS

L018BBA  DW    $0000
L018BBC  ASC   'Would you like to'00
L018BCE  ASC   'play again?'00
         ASC   '(Y/N)'00
L018BE0  ASC   'Yes'00
L018BE4  ASC   'No'00
L018BE7  ASC   'OK'00
L018BEA  DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L018BF2  DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L018BFA  DW    $0068
         DW    $008C
         DW    $0076
         DW    $009A
L018C02  DW    $007E
         DW    $008C
         DW    $008C
         DW    $009A
L018C0A  DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L018C12  REP   #$30
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L016C85
         JSR   L019FC9
         LDA   #$0000
         STA   L010EA2
         JSR   L016EB8
         LDA   #L018DD8
         STA   L010EA2
         LDA   #^L018DD8
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L018DE0
         STA   L010EA2
         LDA   #^L018DE0
         STA   L010EA4
         LDA   #$0000
         STA   L010EA6
         JSR   L016E73
         LDA   #L018DE8
         STA   L010EA2
         LDA   #^L018DE8
         STA   L010EA4
         LDA   #$0007
         STA   L010EA6
         JSR   L016E73
         LDA   #L018DF0
         STA   L010EA2
         LDA   #^L018DF0
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L018DF8
         STA   L010EA2
         LDA   #^L018DF8
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #$000D
         STA   L010EA2
         LDA   #$000E
         STA   L010EA6
         JSR   L017409
         LDA   #L018DBB
         STA   L010EA2
         LDA   #^L018DBB
         STA   L010EA4
         LDA   #$0028
         STA   L010EA6
         JSR   L017359
         LDA   #$00A0
         STA   L010EA2
         LDA   #$004C
         STA   L010EA6
         JSR   L0172A3
         LDA   #L018DCD
         STA   L010EA2
         LDA   #^L018DCD
         STA   L010EA4
         JSR   L0172DC
         LDA   #$00A0
         STA   L010EA2
         LDA   #$0062
         STA   L010EA6
         JSR   L0172A3
         LDA   #L018DD1
         STA   L010EA2
         LDA   #^L018DD1
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0007
         STA   L010EA2
         LDA   #$0009
         STA   L010EA6
         JSR   L017409
         LDA   #$009B
         STA   L010EA2
         LDA   #$00AF
         STA   L010EA6
         JSR   L0172A3
         LDA   #L018DD5
         STA   L010EA2
         LDA   #^L018DD5
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         LDA   #$0001
         STA   L018DB9
         LDA   L0186C7
         STA   L010EA2
         LDA   L0186C9
         STA   L010EA4
         LDA   L0186CB
         STA   L010EA6
         LDA   L0186CD
         STA   L010EA8
         LDA   L0186CF
         STA   L010EAA
         JSR   L011009
         JSR   L016EAE
L018D61  LDA   #$0000
         STA   L010EA2
         LDA   #L018DE8
         STA   L010EA6
         LDA   #^L018DE8
         STA   L010EA8
         LDA   #$0003
         STA   L010EAA
         JSR   L017E55
         LDA   L010EA2
         BEQ   L018D61
         CMP   #$0003
         BEQ   L018DAC
         CMP   L018DB9
         BEQ   L018D61
         STA   L018DB9
         LDA   L018DB9
         STA   L010EA2
         LDA   #$0002
         STA   L010EA6
         LDA   #L018DE8
         STA   L010EAA
         LDA   #^L018DE8
         STA   L010EAC
         JSR   L017F0C
         JMP   L018D61

L018DAC  LDA   L018DB9
         STA   L018884
         JSR   L0179F0
         JSR   L016EA4
         RTS

L018DB9  DW    $0000
L018DBB  ASC   'How many players?'00
L018DCD  ASC   'one'00
L018DD1  ASC   'two'00
L018DD5  ASC   'OK'00
L018DD8  DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L018DE0  DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L018DE8  DW    $0042
         DW    $008C
         DW    $0050
         DW    $009A
L018DF0  DW    $0056
         DW    $008C
         DW    $0064
         DW    $009A
L018DF8  DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L018E00  REP   #$30
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L016C85
         JSR   L019FC9
         LDA   #$0000
         STA   L010EA2
         JSR   L016EB8
         LDA   #L018F5E
         STA   L010EA2
         LDA   #^L018F5E
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L018F66
         STA   L010EA2
         LDA   #^L018F66
         STA   L010EA4
         LDA   #$0000
         STA   L010EA6
         JSR   L016E73
         LDA   #$000D
         STA   L010EA2
         JSR   L01733D
         LDA   #L018F00
         STA   L010EA2
         LDA   #^L018F00
         STA   L010EA4
         LDA   #$001C
         STA   L010EA6
         JSR   L017359
         LDA   #L018F0F
         STA   L010EA2
         LDA   #^L018F0F
         STA   L010EA4
         LDA   #$0033
         STA   L010EA6
         JSR   L017359
         LDA   #L018F1F
         STA   L010EA2
         LDA   #^L018F1F
         STA   L010EA4
         LDA   #$004A
         STA   L010EA6
         JSR   L017359
         LDA   #L018F2D
         STA   L010EA2
         LDA   #^L018F2D
         STA   L010EA4
         LDA   #$0061
         STA   L010EA6
         JSR   L017359
         JSR   L0179F0
         LDA   #$0007
         STA   L010EA2
         JSR   L01733D
         LDA   #L018F38
         STA   L010EA2
         LDA   #^L018F38
         STA   L010EA4
         LDA   #$00AA
         STA   L010EA6
         JSR   L017359
         LDA   #L018F4C
         STA   L010EA2
         LDA   #^L018F4C
         STA   L010EA4
         LDA   #$00B4
         STA   L010EA6
         JSR   L017359
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         LDA   #$0001
         STA   L018EFE
         JSR   L0118D0
         CMP   #$001B
         BEQ   L018EFD
         LDA   #$0000
L018EFD  RTS

L018EFE  DW    $0000
L018F00  ASC   'Press a key or'00
L018F0F  ASC   'click the mouse'00
L018F1F  ASC   'to answer the'00
L018F2D  ASC   'questions.'00
L018F38  ASC   'Press ESC to return'00
L018F4C  ASC   'to the main menu.'00
L018F5E  DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L018F66  DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L018F6E  REP   #$30
         LDA   L010EA2
         STA   L019144
         LDA   L010EA4
         STA   L019146
         LDA   L010EA6
         STA   L019148
         LDA   L010EA8
         STA   L01914A
         LDA   L010EAA
         STA   L01914C
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L016C85
         JSR   L019FC9
         LDA   #$0000
         STA   L010EA2
         JSR   L016EB8
         LDA   #$000D
         STA   L010EA2
         LDA   #$0000
         STA   L010EA6
         JSR   L017409
         LDA   L019148
         STA   L010EA2
         LDA   L01914A
         STA   L010EA4
         LDA   #$0028
         STA   L010EA6
         JSR   L017359
         LDA   #L019150
         STA   L010EA2
         LDA   #^L019150
         STA   L010EA4
         LDA   #$0050
         STA   L010EA6
         JSR   L017359
         LDA   #$0007
         STA   L010EA2
         LDA   #$0000
         STA   L010EA6
         JSR   L017409
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         LDA   #$0000
         STA   L01914E
         LDA   #L019180
         STA   $00
         LDA   #^L019180
         STA   $02
         LDA   L01914C
         CMP   #$0001
         BNE   L01903F
         LDA   L018714
         STA   L010EA2
         LDA   L018716
         STA   L010EA4
         LDA   L018718
         STA   L010EA6
         LDA   L01871A
         STA   L010EA8
         LDA   L01871C
         STA   L010EAA
         JSR   L011009
         JMP   L019060

L01903F  LDA   L01873A
         STA   L010EA2
         LDA   L01873C
         STA   L010EA4
         LDA   L01873E
         STA   L010EA6
         LDA   L018740
         STA   L010EA8
         LDA   L018742
         STA   L010EAA
         JSR   L011009
L019060  LDA   L018762
         STA   L010EA2
         LDA   L018764
         STA   L010EA4
         LDA   L018766
         STA   L010EA6
         LDA   L018768
         STA   L010EA8
         LDA   L01876A
         STA   L010EAA
         JSR   L011009
L019081  JSR   L016D1F
         CMP   #$0000
         BEQ   L019081
         CMP   #$000D
         BNE   L019091
         JMP   L019110

L019091  CMP   #$007F
         BEQ   L0190F3
         LDY   L01914E
         CPY   #$0008
         BEQ   L01910A
         ORA   #$0020
         CMP   #$0061
         BCC   L01910A
         CMP   #$007B
         BCS   L01910A
         CPY   #$0000
         BNE   L0190B3
         AND   #$00DF
L0190B3  SEP   #$20
         STA   [$00],Y
         INY
         LDA   #$00
         STA   [$00],Y
         REP   #$30
         STY   L01914E
L0190C1  LDA   #L019178
         STA   L010EA2
         LDA   #^L019178
         STA   L010EA4
         LDA   #$0000
         STA   L010EA6
         JSR   L016E73
         LDY   L01914E
         BEQ   L019081
         LDA   #L019180
         STA   L010EA2
         LDA   #^L019180
         STA   L010EA4
         LDA   #$0078
         STA   L010EA6
         JSR   L017359
         JMP   L019081

L0190F3  LDY   L01914E
         CPY   #$0000
         BEQ   L01910A
         DEY
         SEP   #$20
         LDA   #$00
         STA   [$00],Y
         REP   #$30
         STY   L01914E
         JMP   L0190C1

L01910A  JSR   L011080
         JMP   L019081

L019110  LDY   L01914E
         CPY   #$0000
         BEQ   L019140
         INY
         STY   L01914E
         LDA   #L019180
         STA   L010EA2
         LDA   #^L019180
         STA   L010EA4
         LDA   L019144
         STA   L010EA6
         LDA   L019146
         STA   L010EA8
         LDA   L01914E
         STA   L010EAA
         STZ   L010EAC
         JSR   L016E27
L019140  JSR   L0179F0
         RTS

L019144  DW    $0000
L019146  DW    $0000
L019148  DW    $0000
L01914A  DW    $0000
L01914C  DW    $0000
L01914E  DW    $0000
L019150  ASC   'Please enter your name.'00
         DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
         DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L019178  DW    $0064
         DW    $000A
         DW    $0082
         DW    $0136
L019180  DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
         DW    $0000
L01918E  REP   #$30
         LDA   L010EA2
         STA   L019309
         LDA   L010EA4
         STA   L01930B
         LDA   L010EA6
         STA   L01930D
         LDA   L010EA8
         STA   L01930F
         LDA   #$0000
         STA   L010EA2
         LDA   L019309
         STA   L010EA6
         LDA   L01930B
         STA   L010EA8
         JSR   L017C7F
         LDA   L010EA2
         BEQ   L0191C5
         JMP   L019308

L0191C5  LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L016C85
         JSR   L019FC9
         LDA   #$0000
         STA   L010EA2
         JSR   L016EB8
         LDA   #L019340
         STA   L010EA2
         LDA   #^L019340
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L019348
         STA   L010EA2
         LDA   #^L019348
         STA   L010EA4
         LDA   #$000E
         STA   L010EA6
         JSR   L016E73
         LDA   #L019350
         STA   L010EA2
         LDA   #^L019350
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #$000D
         STA   L010EA2
         LDA   #$000E
         STA   L010EA6
         JSR   L017409
         LDA   #L019311
         STA   L010EA2
         LDA   #^L019311
         STA   L010EA4
         LDA   #$0028
         STA   L010EA6
         JSR   L017359
         LDA   L01930D
         STA   L010EA2
         LDA   L01930F
         STA   L010EA4
         LDA   #$0046
         STA   L010EA6
         JSR   L017359
         LDA   #$0007
         STA   L010EA2
         LDA   #$0009
         STA   L010EA6
         JSR   L017409
         LDA   #$009B
         STA   L010EA2
         LDA   #$00AF
         STA   L010EA6
         JSR   L0172A3
         LDA   #L01931F
         STA   L010EA2
         LDA   #^L01931F
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         JSR   L016EAE
L01929A  LDA   #$0000
         STA   L010EA2
         LDA   #L019350
         STA   L010EA6
         LDA   #^L019350
         STA   L010EA8
         LDA   #$0001
         STA   L010EAA
         JSR   L017E55
         LDA   L010EA2
         BEQ   L01929A
         CMP   #$0001
         BNE   L01929A
         LDA   #$0000
         STA   L010EA2
         LDA   L019309
         STA   L010EA6
         LDA   L01930B
         STA   L010EA8
         JSR   L017C7F
         LDA   L010EA2
         BNE   L019302
         JSR   L011080
         LDA   #$0007
         STA   L010EA2
         LDA   #$000E
         STA   L010EA6
         JSR   L017409
         LDA   #L019322
         STA   L010EA2
         LDA   #^L019322
         STA   L010EA4
         LDA   #$0078
         STA   L010EA6
         JSR   L017359
         BRA   L01929A
L019302  JSR   L0179F0
         JSR   L016EA4
L019308  RTS

L019309  DW    $0000
L01930B  DW    $0000
L01930D  DW    $0000
L01930F  DW    $0000
L019311  ASC   'Please insert'00
L01931F  ASC   'OK'00
L019322  ASC   'Wrong disk, please try again!'00
L019340  DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L019348  DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L019350  DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L019358  REP   #$30
         JSR   L016C85
         LDA   L010E3C
         BEQ   L019365
         JSR   L0121EB
L019365  LDA   #L0186D1
         STA   L010EA2
         LDA   #^L0186D1
         STA   L010EA4
         LDA   #L0186EE
         STA   L010EA6
         LDA   #^L0186EE
         STA   L010EA8
         LDA   #L0186F2
         STA   L010EAA
         LDA   #^L0186F2
         STA   L010EAC
         LDA   #L0186F6
         STA   L010EAE
         LDA   #^L0186F6
         STA   L010EB0
         JSR   L010FED
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L019FC9
         LDA   #$0000
         STA   L010EA2
         JSR   L016EB8
         LDA   #L0195AD
         STA   L010EA2
         LDA   #^L0195AD
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L0195B5
         STA   L010EA2
         LDA   #^L0195B5
         STA   L010EA4
         LDA   #$0000
         STA   L010EA6
         JSR   L016E73
         LDA   #L0195BD
         STA   L010EA2
         LDA   #^L0195BD
         STA   L010EA4
         LDA   #$0007
         STA   L010EA6
         JSR   L016E73
         LDA   #L0195C5
         STA   L010EA2
         LDA   #^L0195C5
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L0195CD
         STA   L010EA2
         LDA   #^L0195CD
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #$000D
         STA   L010EA2
         LDA   #$000E
         STA   L010EA6
         JSR   L017409
         LDA   #L01956A
         STA   L010EA2
         LDA   #^L01956A
         STA   L010EA4
         LDA   #$0028
         STA   L010EA6
         JSR   L017359
         LDA   #L019578
         STA   L010EA2
         LDA   #^L019578
         STA   L010EA4
         LDA   #$003C
         STA   L010EA6
         JSR   L017359
         LDA   #$006E
         STA   L010EA2
         LDA   #$0060
         STA   L010EA6
         JSR   L0172A3
         LDA   #L019586
         STA   L010EA2
         LDA   #^L019586
         STA   L010EA4
         JSR   L0172DC
         LDA   #$006E
         STA   L010EA2
         LDA   #$0076
         STA   L010EA6
         JSR   L0172A3
         LDA   #L019595
         STA   L010EA2
         LDA   #^L019595
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0007
         STA   L010EA2
         LDA   #$0009
         STA   L010EA6
         JSR   L017409
         LDA   #$009B
         STA   L010EA2
         LDA   #$00AF
         STA   L010EA6
         JSR   L0172A3
         LDA   #L0195AA
         STA   L010EA2
         LDA   #^L0195AA
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         LDA   #$0001
         STA   L019568
         LDA   L0186EE
         STA   L010EA2
         LDA   L0186F0
         STA   L010EA4
         LDA   L0186F2
         STA   L010EA6
         LDA   L0186F4
         STA   L010EA8
         LDA   L0186F6
         STA   L010EAA
         JSR   L011009
         JSR   L016EAE
L0194F7  JSR   L016D11
         CMP   #$001B
         BNE   L019505
         STA   L019568
         JMP   L019552

L019505  LDA   L010EA2
         BEQ   L0194F7
         JSR   L016CA9
         LDA   #L0195BD
         STA   L010EAA
         LDA   #^L0195BD
         STA   L010EAC
         LDA   #$0003
         STA   L010EAE
         JSR   L0174DD
         LDA   L010EB2
         BEQ   L0194F7
         CMP   #$0003
         BEQ   L019552
         CMP   L019568
         BEQ   L0194F7
         STA   L019568
         LDA   L019568
         STA   L010EA2
         LDA   #$0002
         STA   L010EA6
         LDA   #L0195BD
         STA   L010EAA
         LDA   #^L0195BD
         STA   L010EAC
         JSR   L017F0C
         JMP   L0194F7

L019552  LDA   L0186EE
         STA   L010EA2
         LDA   L0186F0
         STA   L010EA4
         JSR   L010FFE
         JSR   L016EA4
         LDA   L019568
         RTS

L019568  DW    $0000
L01956A  ASC   'Please select'00
L019578  ASC   'the activity.'00
L019586  ASC   'Read the story'00
L019595  ASC   'Answer the questions'00
L0195AA  ASC   'OK'00
L0195AD  DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L0195B5  DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L0195BD  DW    $0054
         DW    $005A
         DW    $0062
         DW    $0068
L0195C5  DW    $006A
         DW    $005A
         DW    $0078
         DW    $0068
L0195CD  DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L0195D5  REP   #$30
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L016C85
         JSR   L019FC9
         LDA   #$0000
         STA   L010EA2
         JSR   L016EB8
         LDA   #L0197D7
         STA   L010EA2
         LDA   #^L0197D7
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L0197DF
         STA   L010EA2
         LDA   #^L0197DF
         STA   L010EA4
         LDA   #$0000
         STA   L010EA6
         JSR   L016E73
         LDA   #L0197E7
         STA   L010EA2
         LDA   #^L0197E7
         STA   L010EA4
         LDA   #$0007
         STA   L010EA6
         JSR   L016E73
         LDA   #L0197EF
         STA   L010EA2
         LDA   #^L0197EF
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L0197F7
         STA   L010EA2
         LDA   #^L0197F7
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #$000D
         STA   L010EA2
         JSR   L01733D
         LDA   #L019790
         STA   L010EA2
         LDA   #^L019790
         STA   L010EA4
         LDA   #$0028
         STA   L010EA6
         JSR   L017359
         LDA   #L0197A2
         STA   L010EA2
         LDA   #^L0197A2
         STA   L010EA4
         LDA   #$003C
         STA   L010EA6
         JSR   L017359
         LDA   #$0068
         STA   L010EA2
         LDA   #$0060
         STA   L010EA6
         JSR   L0172A3
         LDA   #L0197B1
         STA   L010EA2
         LDA   #^L0197B1
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0068
         STA   L010EA2
         LDA   #$0076
         STA   L010EA6
         JSR   L0172A3
         LDA   #L0197C0
         STA   L010EA2
         LDA   #^L0197C0
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0007
         STA   L010EA2
         JSR   L01733D
         LDA   #$009B
         STA   L010EA2
         LDA   #$00AF
         STA   L010EA6
         JSR   L0172A3
         LDA   #L0197D4
         STA   L010EA2
         LDA   #^L0197D4
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         LDA   #$0001
         STA   L01978E
         LDA   L018788
         STA   L010EA2
         LDA   L01878A
         STA   L010EA4
         LDA   L01878C
         STA   L010EA6
         LDA   L01878E
         STA   L010EA8
         LDA   L018790
         STA   L010EAA
         JSR   L011009
         JSR   L016EAE
L01972D  LDA   #$0000
         STA   L010EA2
         LDA   #L0197E7
         STA   L010EA6
         LDA   #^L0197E7
         STA   L010EA8
         LDA   #$0003
         STA   L010EAA
         JSR   L017E55
         LDA   L010EA2
         BEQ   L01972D
         CMP   #$0003
         BEQ   L019778
         CMP   L01978E
         BEQ   L01972D
         STA   L01978E
         LDA   L01978E
         STA   L010EA2
         LDA   #$0002
         STA   L010EA6
         LDA   #L0197E7
         STA   L010EAA
         LDA   #^L0197E7
         STA   L010EAC
         JSR   L017F0C
         JMP   L01972D

L019778  LDA   L0186A0
         STA   L010EA2
         LDA   L0186A2
         STA   L010EA4
         JSR   L010FFE
         JSR   L016EA4
         LDA   L01978E
         RTS

L01978E  DW    $0000
L019790  ASC   'Please select the'00
L0197A2  ASC   'question type.'00
L0197B1  ASC   'Reading Skills'00
L0197C0  ASC   'Vocabulary Building'00
L0197D4  ASC   'OK'00
L0197D7  DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L0197DF  DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L0197E7  DW    $0054
         DW    $0054
         DW    $0062
         DW    $0062
L0197EF  DW    $006A
         DW    $0054
         DW    $0078
         DW    $0062
L0197F7  DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L0197FF  REP   #$30
         JSR   L016C85
         JSR   L019FC9
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         LDA   #$0000
         STA   L010EA2
         JSR   L016EB8
         LDA   #L0199F2
         STA   L010EA2
         LDA   #^L0199F2
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L0199FA
         STA   L010EA2
         LDA   #^L0199FA
         STA   L010EA4
         LDA   #$0000
         STA   L010EA6
         JSR   L016E73
         LDA   #L019A02
         STA   L010EA2
         LDA   #^L019A02
         STA   L010EA4
         LDA   #$0007
         STA   L010EA6
         JSR   L016E73
         LDA   #L019A0A
         STA   L010EA2
         LDA   #^L019A0A
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L019A12
         STA   L010EA2
         LDA   #^L019A12
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #$000D
         STA   L010EA2
         JSR   L01733D
         LDA   #L0199AB
         STA   L010EA2
         LDA   #^L0199AB
         STA   L010EA4
         LDA   #$0028
         STA   L010EA6
         JSR   L017359
         LDA   #L0199BD
         STA   L010EA2
         LDA   #^L0199BD
         STA   L010EA4
         LDA   #$003C
         STA   L010EA6
         JSR   L017359
         LDA   #$006E
         STA   L010EA2
         LDA   #$0060
         STA   L010EA6
         JSR   L0172A3
         LDA   #L0199CC
         STA   L010EA2
         LDA   #^L0199CC
         STA   L010EA4
         JSR   L0172DC
         LDA   #$006E
         STA   L010EA2
         LDA   #$0076
         STA   L010EA6
         JSR   L0172A3
         LDA   #L0199DC
         STA   L010EA2
         LDA   #^L0199DC
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0007
         STA   L010EA2
         JSR   L01733D
         LDA   #$009B
         STA   L010EA2
         LDA   #$00AF
         STA   L010EA6
         JSR   L0172A3
         LDA   #L0199EF
         STA   L010EA2
         LDA   #^L0199EF
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         LDA   #$0001
         STA   L0199A9
         LDA   L018788
         STA   L010EA2
         LDA   L01878A
         STA   L010EA4
         LDA   L01878C
         STA   L010EA6
         LDA   L01878E
         STA   L010EA8
         LDA   L018790
         STA   L010EAA
         JSR   L011009
         JSR   L016EAE
L019957  LDA   #$0000
         STA   L010EA2
         LDA   #L019A02
         STA   L010EA6
         LDA   #^L019A02
         STA   L010EA8
         LDA   #$0003
         STA   L010EAA
         JSR   L017E55
         LDA   L010EA2
         BEQ   L019957
         CMP   #$0003
         BEQ   L0199A2
         CMP   L0199A9
         BEQ   L019957
         STA   L0199A9
         LDA   L0199A9
         STA   L010EA2
         LDA   #$0002
         STA   L010EA6
         LDA   #L019A02
         STA   L010EAA
         LDA   #^L019A02
         STA   L010EAC
         JSR   L017F0C
         JMP   L019957

L0199A2  JSR   L016EA4
         LDA   L0199A9
         RTS

L0199A9  DW    $0000
L0199AB  ASC   'Please select the'00
L0199BD  ASC   'question type.'00
L0199CC  ASC   'Multiple Choice'00
L0199DC  ASC   'Fill-in the Blanks'00
L0199EF  ASC   'OK'00
L0199F2  DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L0199FA  DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L019A02  DW    $0054
         DW    $005A
         DW    $0062
         DW    $0068
L019A0A  DW    $006A
         DW    $005A
         DW    $0078
         DW    $0068
L019A12  DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L019A1A  REP   #$30
         JSR   L016C85
         JSR   L019FC9
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         LDA   #$0000
         STA   L010EA2
         JSR   L016EB8
         LDA   #L019C35
         STA   L010EA2
         LDA   #^L019C35
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L019C3D
         STA   L010EA2
         LDA   #^L019C3D
         STA   L010EA4
         LDA   #$0000
         STA   L010EA6
         JSR   L016E73
         LDA   #L019C45
         STA   L010EA2
         LDA   #^L019C45
         STA   L010EA4
         LDA   #$0007
         STA   L010EA6
         JSR   L016E73
         LDA   #L019C4D
         STA   L010EA2
         LDA   #^L019C4D
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L019C55
         STA   L010EA2
         LDA   #^L019C55
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L019C5D
         STA   L010EA2
         LDA   #^L019C5D
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #$000D
         STA   L010EA2
         JSR   L01733D
         LDA   #L019BF9
         STA   L010EA2
         LDA   #^L019BF9
         STA   L010EA4
         LDA   #$0028
         STA   L010EA6
         JSR   L017359
         LDA   #L019C0B
         STA   L010EA2
         LDA   #^L019C0B
         STA   L010EA4
         LDA   #$003C
         STA   L010EA6
         JSR   L017359
         LDA   #$008C
         STA   L010EA2
         LDA   #$0060
         STA   L010EA6
         JSR   L0172A3
         LDA   #L019C1A
         STA   L010EA2
         LDA   #^L019C1A
         STA   L010EA4
         JSR   L0172DC
         LDA   #$008C
         STA   L010EA2
         LDA   #$0076
         STA   L010EA6
         JSR   L0172A3
         LDA   #L019C22
         STA   L010EA2
         LDA   #^L019C22
         STA   L010EA4
         JSR   L0172DC
         LDA   #$008C
         STA   L010EA2
         LDA   #$008C
         STA   L010EA6
         JSR   L0172A3
         LDA   #L019C2A
         STA   L010EA2
         LDA   #^L019C2A
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0007
         STA   L010EA2
         JSR   L01733D
         LDA   #$009B
         STA   L010EA2
         LDA   #$00AF
         STA   L010EA6
         JSR   L0172A3
         LDA   #L019C32
         STA   L010EA2
         LDA   #^L019C32
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         LDA   #$0001
         STA   L019BF7
         LDA   L018788
         STA   L010EA2
         LDA   L01878A
         STA   L010EA4
         LDA   L01878C
         STA   L010EA6
         LDA   L01878E
         STA   L010EA8
         LDA   L018790
         STA   L010EAA
         JSR   L011009
         JSR   L016EAE
L019BA5  LDA   #$0000
         STA   L010EA2
         LDA   #L019C45
         STA   L010EA6
         LDA   #^L019C45
         STA   L010EA8
         LDA   #$0004
         STA   L010EAA
         JSR   L017E55
         LDA   L010EA2
         BEQ   L019BA5
         CMP   #$0004
         BEQ   L019BF0
         CMP   L019BF7
         BEQ   L019BA5
         STA   L019BF7
         LDA   L019BF7
         STA   L010EA2
         LDA   #$0003
         STA   L010EA6
         LDA   #L019C45
         STA   L010EAA
         LDA   #^L019C45
         STA   L010EAC
         JSR   L017F0C
         JMP   L019BA5

L019BF0  JSR   L016EA4
         LDA   L019BF7
         RTS

L019BF7  DW    $0000
L019BF9  ASC   'Please select the'00
L019C0B  ASC   'question type.'00
L019C1A  ASC   'Fill-In'00
L019C22  ASC   'Synonym'00
L019C2A  ASC   'Antonym'00
L019C32  ASC   'OK'00
L019C35  DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L019C3D  DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L019C45  DW    $0054
         DW    $0078
         DW    $0062
         DW    $0086
L019C4D  DW    $006A
         DW    $0078
         DW    $0078
         DW    $0086
L019C55  DW    $0080
         DW    $0078
         DW    $008E
         DW    $0086
L019C5D  DW    $00A0
         DW    $0096
         DW    $00B4
         DW    $00B4
L019C65  REP   #$30
         JSR   L016C85
         JSR   L019FC9
         JSR   L0121EB
         LDA   L010E3C
         BEQ   L019C75
L019C75  LDA   #L018792
         STA   L010EA2
         LDA   #^L018792
         STA   L010EA4
         LDA   #L0187AF
         STA   L010EA6
         LDA   #^L0187AF
         STA   L010EA8
         LDA   #L0187B3
         STA   L010EAA
         LDA   #^L0187B3
         STA   L010EAC
         LDA   #L0187B7
         STA   L010EAE
         LDA   #^L0187B7
         STA   L010EB0
         JSR   L010FED
         LDA   #$0000
         STA   L010EA2
         JSR   L0177F6
         JSR   L019FC9
         LDA   #$0000
         STA   L010EA2
         JSR   L016EB8
         LDA   #L019F89
         STA   L010EA2
         LDA   #^L019F89
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L019F91
         STA   L010EA2
         LDA   #^L019F91
         STA   L010EA4
         LDA   #$0000
         STA   L010EA6
         JSR   L016E73
         LDA   #L019F99
         STA   L010EA2
         LDA   #^L019F99
         STA   L010EA4
         LDA   #$0007
         STA   L010EA6
         JSR   L016E73
         LDA   #L019FA1
         STA   L010EA2
         LDA   #^L019FA1
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L019FA9
         STA   L010EA2
         LDA   #^L019FA9
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L019FB1
         STA   L010EA2
         LDA   #^L019FB1
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L019FB9
         STA   L010EA2
         LDA   #^L019FB9
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #L019FC1
         STA   L010EA2
         LDA   #^L019FC1
         STA   L010EA4
         LDA   #$0009
         STA   L010EA6
         JSR   L016E73
         LDA   #$000D
         STA   L010EA2
         JSR   L01733D
         LDA   #L019EFA
         STA   L010EA2
         LDA   #^L019EFA
         STA   L010EA4
         LDA   #$0019
         STA   L010EA6
         JSR   L017359
         LDA   #L019F0C
         STA   L010EA2
         LDA   #^L019F0C
         STA   L010EA4
         LDA   #$002D
         STA   L010EA6
         JSR   L017359
         LDA   #$005A
         STA   L010EA2
         LDA   #$0046
         STA   L010EA6
         JSR   L0172A3
         LDA   #L019F20
         STA   L010EA2
         LDA   #^L019F20
         STA   L010EA4
         JSR   L0172DC
         LDA   #$005A
         STA   L010EA2
         LDA   #$005C
         STA   L010EA6
         JSR   L0172A3
         LDA   #L019F35
         STA   L010EA2
         LDA   #^L019F35
         STA   L010EA4
         JSR   L0172DC
         LDA   #$005A
         STA   L010EA2
         LDA   #$0072
         STA   L010EA6
         JSR   L0172A3
         LDA   #L019F4C
         STA   L010EA2
         LDA   #^L019F4C
         STA   L010EA4
         JSR   L0172DC
         LDA   #$005A
         STA   L010EA2
         LDA   #$0088
         STA   L010EA6
         JSR   L0172A3
         LDA   #L019F5A
         STA   L010EA2
         LDA   #^L019F5A
         STA   L010EA4
         JSR   L0172DC
         LDA   #$005A
         STA   L010EA2
         LDA   #$009E
         STA   L010EA6
         JSR   L0172A3
         LDA   #L019F70
         STA   L010EA2
         LDA   #^L019F70
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0007
         STA   L010EA2
         JSR   L01733D
         LDA   #$009B
         STA   L010EA2
         LDA   #$00B9
         STA   L010EA6
         JSR   L0172A3
         LDA   #L019F86
         STA   L010EA2
         LDA   #^L019F86
         STA   L010EA4
         JSR   L0172DC
         LDA   #$0000
         STA   L010EA2
         LDA   #L010E6E
         STA   L010EA6
         LDA   #^L010E6E
         STA   L010EA8
         JSR   L016F03
         LDA   #$0001
         STA   L019EF8
         LDA   L0187AF
         STA   L010EA2
         LDA   L0187B1
         STA   L010EA4
         LDA   L0187B3
         STA   L010EA6
         LDA   L0187B5
         STA   L010EA8
         LDA   L0187B7
         STA   L010EAA
         JSR   L011009
         JSR   L016EAE
L019E94  LDA   #$0000
         STA   L010EA2
         LDA   #L019F99
         STA   L010EA6
         LDA   #^L019F99
         STA   L010EA8
         LDA   #$0006
         STA   L010EAA
         JSR   L017E55
         LDA   L010EA2
         BEQ   L019E94
         CMP   #$0006
         BEQ   L019EDF
         CMP   L019EF8
         BEQ   L019E94
         STA   L019EF8
         LDA   L019EF8
         STA   L010EA2
         LDA   #$0005
         STA   L010EA6
         LDA   #L019F99
         STA   L010EAA
         LDA   #^L019F99
         STA   L010EAC
         JSR   L017F0C
         JMP   L019E94

L019EDF  LDA   L0187AF
         STA   L010EA2
         LDA   L0187B1
         STA   L010EA4
         JSR   L010FFE
         JSR   L0179F0
         JSR   L016EA4
         LDA   L019EF8
         RTS

L019EF8  DW    $0000
L019EFA  ASC   'Please select the'00
L019F0C  ASC   'Story Maker option.'00
L019F20  ASC   'Create/Edit a story.'00
L019F35  ASC   'Create/Edit questions.'00
L019F4C  ASC   'Read a story.'00
L019F5A  ASC   'Answer the questions.'00
L019F70  ASC   'Exit the Story Maker.'00
L019F86  ASC   'OK'00
L019F89  DW    $0005
         DW    $0005
         DW    $00C2
         DW    $013A
L019F91  DW    $0007
         DW    $0007
         DW    $00C0
         DW    $0138
L019F99  DW    $003A
         DW    $0046
         DW    $0048
         DW    $0054
L019FA1  DW    $0050
         DW    $0046
         DW    $005E
         DW    $0054
L019FA9  DW    $0066
         DW    $0046
         DW    $0074
         DW    $0054
L019FB1  DW    $007C
         DW    $0046
         DW    $008A
         DW    $0054
L019FB9  DW    $0092
         DW    $0046
         DW    $00A0
         DW    $0054
L019FC1  DW    $00AA
         DW    $0096
         DW    $00BE
         DW    $00B4
L019FC9  REP   #$30
         LDA   #L01A005
         STA   L010EA2
         LDA   #^L01A005
         STA   L010EA4
         LDA   #$0001
         STA   L010EA6
         LDA   #$000E
         STA   L010EAA
         LDA   #L01A00C
         STA   L010EAE
         LDA   #^L01A00C
         STA   L010EB0
         JSR   L017A10
         LDA   L01A00C
         STA   L010EA2
         LDA   L01A00E
         STA   L010EA4
         STZ   L010EA6
         JSR   L0179FA
         RTS

L01A005  STR   'Geneva'
L01A00C  DB    $00
         DB    $00
L01A00E  DB    $00
         DB    $00
L01A010  PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00E6
         TCS
         LDA   $F9
         SEC
         SBC   #$0000
         BEQ   L01A039
         BVS   L01A028
         EOR   #$8000
L01A028  BPL   L01A039
         LDA   $FB
         SEC
         SBC   #$0000
         BEQ   L01A039
         BVS   L01A037
         EOR   #$8000
L01A037  BMI   L01A03F
L01A039  LDA   #$0000
         BRL   L01A184
L01A03F  LDA   $FB
         PHA
         LDA   $F9
         SEC
         JSL   L01B32D
         PLA
         STA   $EA
L01A04C  LDA   [$FD]
         SEC
         SBC   #$0000
         BEQ   L01A05B
         BVS   L01A059
         EOR   #$8000
L01A059  BMI   L01A0B4
L01A05B  PEI   $FF
         PEI   $FD
         JSL   L01B955
         PLY
         PLY
         CMP   #$FFFF
         BNE   L01A088
         LDA   $EA
         CLC
         ADC   $F9
         SEC
         SBC   #$0001
         PHA
         LDA   $F9
         CLC
         JSL   L01B1BD
         PLY
         PHA
         LDA   $FB
         PLX
         STX   $EC
         SEC
         SBC   $EC
         BRL   L01A184
L01A088  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
L01A0B4  LDA   [$FD]
         CMP   $EA
         BEQ   L01A0C0
         BCC   L01A0C0
         LDA   $EA
         BRA   L01A0C2
L01A0C0  LDA   [$FD]
L01A0C2  STA   $E8
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   L01A0CD
         DEX
L01A0CD  PHX
         PHA
         PEI   $E8
         LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         PEI   $F7
         PEI   $F5
         JSL   L01B162
         PLY
         PLY
         PLY
         PLY
         PLY
         JSL   L01AFD8
         PLA
         PLX
         STX   $F7
         STA   $F5
         LDA   [$FD]
         SEC
         SBC   $E8
         STA   [$FD]
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   L01A105
         DEX
L01A105  PHX
         PHA
         LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         JSL   L01AFD8
         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   L01B322
         PLA
         PLX
         PHA
         LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   L01A14F
         EOR   #$8000
L01A14F  BMI   L01A156
         LDA   #$0000
         BRA   L01A158
L01A156  LDA   [$FD]
L01A158  PLX
         STX   $EC
         SEC
         SBC   $EC
         BEQ   L01A171
         BVS   L01A165
         EOR   #$8000
L01A165  BPL   L01A171
         PEI   $FF
         PEI   $FD
         JSL   L01ADC2
         PLY
         PLY
L01A171  LDA   $EA
         SEC
         SBC   $E8
         STA   $EA
         CMP   #$0000
         BNE   L01A181
         LDA   $FB
         BRA   L01A184
L01A181  BRL   L01A04C
L01A184  TAY
         TDC
         CLC
         ADC   #$00EF
         TCS
         TYA
         PLD
         RTL

L01A18E  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   L01A1B4
         BRL   L01A35A
L01A1B4  LDA   $FF
         SEC
         SBC   #$0002
         BVS   L01A1BF
         EOR   #$8000
L01A1BF  BPL   L01A1C4
         BRL   L01A30B
L01A1C4  LDY   #$0008
         LDA   [$F7],Y
         TAX
         LDY   #$0006
         LDA   [$F7],Y
         STX   $EE
         ORA   $EE
         BNE   L01A1D8
         BRL   L01A30B
L01A1D8  LDY   #$0010
         LDA   [$F7],Y
         AND   #$0004
         TAY
         BEQ   L01A1E6
         BRL   L01A30B
L01A1E6  LDA   [$F7]
         STA   $EC
         LDX   $FD
         LDA   $FB
         STX   $EA
         STA   $E8
         LDA   $FF
         CMP   #$0000
         BNE   L01A22F
         PEA   $0001
         PEA   $0000
         PEA   $0000
         LDY   #$0012
         LDA   [$F7],Y
         PHA
         JSL   L01A3DC
         PLY
         PLY
         PLY
         PLY
         PHX
         PHA
         LDA   $EC
         LDX   #$0000
         TAY
         BPL   L01A21B
         DEX
L01A21B  JSL   L01B322
         LDX   $EA
         LDA   $E8
         JSL   L01AFD8
         PLA
         PLX
         STX   $EA
         STA   $E8
         BRA   L01A248
L01A22F  LDA   $EC
         LDX   #$0000
         TAY
         BPL   L01A238
         DEX
L01A238  PHX
         PHA
         LDX   $FD
         LDA   $FB
         JSL   L01B322
         PLA
         PLX
         STX   $FD
         STA   $FB
L01A248  LDY   #$0010
         LDA   [$F7],Y
         AND   #$0080
         TAY
         BEQ   L01A256
         BRL   L01A30B
L01A256  LDA   $EC
         SEC
         SBC   #$0000
         BNE   L01A261
         BRL   L01A30B
L01A261  BVS   L01A266
         EOR   #$8000
L01A266  BMI   L01A26B
         BRL   L01A30B
L01A26B  LDA   $EC
         LDX   #$0000
         TAY
         BPL   L01A274
         DEX
L01A274  LDX   #$0000
         TAY
         BPL   L01A27B
         DEX
L01A27B  PHX
         PHA
         LDX   $EA
         LDA   $E8
         JSL   L01BAE4
         BVS   L01A28A
         EOR   #$8000
L01A28A  BPL   L01A30B
         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   L01B322
         PLA
         PLX
         LDX   #$0000
         TAY
         BPL   L01A2B1
         DEX
L01A2B1  LDX   #$0000
         TAY
         BPL   L01A2B8
         DEX
L01A2B8  PHX
         PHA
         LDX   $EA
         LDA   $E8
         JSL   L01BAE4
         BEQ   L01A2CB
         BVS   L01A2C9
         EOR   #$8000
L01A2C9  BMI   L01A30B
L01A2CB  LDX   $EA
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   L01A2D6
         DEX
L01A2D6  PHX
         PHA
         LDY   #$0004
         LDA   [$F7],Y
         TAX
         LDY   #$0002
         LDA   [$F7],Y
         JSL   L01AFD8
         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   L01A3D2
L01A30B  LDY   #$0010
         LDA   [$F7],Y
         AND   #$0080
         TAY
         BEQ   L01A33B
         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
L01A33B  PEI   $FF
         PEI   $FD
         PEI   $FB
         LDY   #$0012
         LDA   [$F7],Y
         PHA
         JSL   L01A3DC
         PLY
         PLY
         PLY
         PLY
         STX   $EA
         STA   $E8
         LDA   #$0000
         STA   [$F7]
         BRA   L01A3BC
L01A35A  LDY   #$0010
         LDA   [$F7],Y
         AND   #$0082
         TAY
         BEQ   L01A3BC
         PEI   $F9
         PEI   $F7
         JSL   L01B0C7
         PLY
         PLY
         LDY   #$0010
         LDA   [$F7],Y
         AND   #$0080
         TAY
         BEQ   L01A3A4
         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
L01A3A4  PEI   $FF
         PEI   $FD
         PEI   $FB
         LDY   #$0012
         LDA   [$F7],Y
         PHA
         JSL   L01A3DC
         PLY
         PLY
         PLY
         PLY
         STX   $EA
         STA   $E8
L01A3BC  LDA   $E8
         CMP   #$FFFF
         BNE   L01A3CF
         LDA   $EA
         CMP   #$FFFF
         BNE   L01A3CF
         LDA   #$FFFF
         BRA   L01A3D2
L01A3CF  LDA   #$0000
L01A3D2  TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

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

L01A428  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   L01A43E
         EOR   #$8000
L01A43E  BMI   L01A445
         LDA   #$0000
         STA   [$FD]
L01A445  LDY   #$0010
         LDA   [$FD],Y
         AND   #$0001
         TAY
         BEQ   L01A45A
         LDA   [$FD]
         EOR   #$FFFF
         INC
         STA   $EE
         BRA   L01A4BE
L01A45A  LDY   #$0010
         LDA   [$FD],Y
         AND   #$0082
         TAY
         BEQ   L01A4B2
         STZ   $EE
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0002
         TAY
         BEQ   L01A4B0
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         STX   $F4
         ORA   $F4
         BEQ   L01A4B0
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0004
         CMP   #$0000
         BNE   L01A4B0
         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   L01B322
         PLA
         PLX
         STA   $EE
L01A4B0  BRA   L01A4BE
L01A4B2  LDA   #$FFFF
         LDX   #$0000
         TAY
         BPL   L01A4BC
         DEX
L01A4BC  BRA   L01A513
L01A4BE  PEA   $0001
         PEA   $0000
         PEA   $0000
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   L01A3DC
         PLY
         PLY
         PLY
         PLY
         STX   $F2
         STA   $F0
         SEC
         LDA   $F0
         SBC   #$0000
         BNE   L01A4E8
         LDA   $F2
         SBC   #$0000
         BRA   L01A4EF
L01A4E8  LDA   $F2
         SBC   #$0000
         REP   #$02
L01A4EF  BVS   L01A4F4
         EOR   #$8000
L01A4F4  BPL   L01A50F
         LDA   $EE
         LDX   #$0000
         TAY
         BPL   L01A4FF
         DEX
L01A4FF  PHX
         PHA
         LDX   $F2
         LDA   $F0
         JSL   L01AFD8
         PLA
         PLX
         STX   $F2
         STA   $F0
L01A50F  LDX   $F2
         LDA   $F0
L01A513  TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

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

L01A54C  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E0
         TCS
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   L01A562
         EOR   #$8000
L01A562  BMI   L01A576
         PEA   $0000
         PEA   $0016
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
         BRL   L01A6EB
L01A576  PEA   $0000
         TDC
         CLC
         ADC   #$00F9
         PHA
         JSL   L01BB69
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         JSL   L01BAE4
         BNE   L01A5A1
         LDA   #$FFFF
         BRL   L01A6EB
L01A5A1  LDA   $FB
         BRL   L01A6E0
L01A5A6  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   L01B822
         PLY
         PLY
         PLY
         PLY
         PLY
         STA   $E4
         LDA   $E4
         CMP   #$0000
         BNE   L01A5EA
         LDA   #$0000
         BRL   L01A6EB
L01A5EA  LDY   #$0002
         LDA   [$EC],Y
         PHA
         PEI   $E4
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
         BRL   L01A6EB
L01A5FE  LDX   $FF
         LDA   $FD
         SEC
         SBC   #$0000
         BVS   L01A60B
         EOR   #$8000
L01A60B  BMI   L01A61F
         PEA   $0000
         PEA   $0009
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
         BRL   L01A6EB
L01A61F  LDX   $FF
         LDA   $FD
         PHA
         LDA   #$FFFF
         PLX
         STX   $F0
         SEC
         SBC   $F0
         STA   $E6
         PEA   $0000
         TDC
         CLC
         ADC   #$00E6
         PHA
         JSL   L01BB69
         PLY
         PLY
         STX   $EA
         STA   $E8
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EA
         LDA   $E8
         JSL   L01BAE4
         BNE   L01A65A
         LDA   #$FFFF
         BRL   L01A6EB
L01A65A  PEA   $0000
         TDC
         CLC
         ADC   #$00F9
         PHA
         JSL   L01BB69
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDA   $EC
         LDX   $EE
         PHX
         PHA
         LDA   $EA
         PHA
         LDA   $E8
         PHA
         PEA   $0012
         JSL   L01BB0F
         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   L01B822
         PLY
         PLY
         PLY
         PLY
         STA   $E4
         LDA   $E4
         CMP   #$0000
         BEQ   L01A6DA
         LDA   #$0000
         STA   [$E8]
         LDY   #$0002
         LDA   [$EC],Y
         PHA
         PEI   $E4
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
         BRA   L01A6EB
L01A6DA  LDA   $E6
         BRA   L01A6EB
         BRA   L01A6EB
L01A6E0  CMP   #$6601
         BNE   L01A6E8
         BRL   L01A5FE
L01A6E8  JMP   L01A5A6

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

L01A6F5  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E1
         TCS
         STZ   $F1
         STZ   L010140
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   L01BAE4
         BNE   L01A720
         LDA   #$0001
         STA   L01BE03
         BRL   L01AB35
L01A720  LDX   #$0000
         LDA   #$0008
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   L01AFD8
         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   ^L01AB6F
         PEA   L01AB6F
         PEI   $FF
         PEI   $FD
         JSL   L01AEE6
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L01A770
         LDA   #$0001
         STA   L01BE03
         LDA   $F3
         SEP   #$20
         STA   [$E9]
         REP   #$20
         BRL   L01AB35
L01A770  LDA   #$0001
         BEQ   L01A77A
         LDA   #$0000
         BRA   L01A77D
L01A77A  LDA   #$0001
L01A77D  STA   L01BE03
         LDA   $F3
         SEP   #$20
         STA   [$E9]
         REP   #$20
         PHX
         PHA
         PEA   $0000
         PEA   $0100
         LDA   L01013E
         ORA   #$0F00
         PHA
         PEA   $0000
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L01013C
         PLA
         PLX
         STX   $EF
         STA   $ED
         LDA   L01013C
         BEQ   L01A7BE
         PEA   $FFFF
         JSL   L01B8F1
         PLY
L01A7BE  LDA   #$0100
         STA   $E3
L01A7C3  LDA   [$E9]
         AND   #$00FF
         CMP   #$0000
         BNE   L01A7D0
         BRL   L01AA29
L01A7D0  INC   L010140
         LDA   [$E9]
         AND   #$00FF
         CMP   #$0022
         BEQ   L01A7E0
         BRL   L01A904
L01A7E0  INC   $E9
         BNE   L01A7E6
         INC   $EB
L01A7E6  LDA   [$E9]
         AND   #$00FF
         CMP   #$0000
         BNE   L01A7F3
         BRL   L01A901
L01A7F3  LDA   [$E9]
         AND   #$00FF
         CMP   #$0022
         BEQ   L01A800
         BRL   L01A88A
L01A800  INC   $E9
         BNE   L01A806
         INC   $EB
L01A806  LDA   [$E9]
         AND   #$00FF
         CMP   #$0022
         BNE   L01A886
         LDA   $F1
         CMP   $E3
         BNE   L01A849
         LDA   $E3
         CLC
         ADC   #$0100
         LDX   #$0000
         TAY
         BPL   L01A823
         DEX
L01A823  PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L01013C
         LDA   L01013C
         BEQ   L01A841
         PEA   $FFFF
         JSL   L01B8F1
         PLY
L01A841  LDA   $E3
         CLC
         ADC   #$0100
         STA   $E3
L01A849  LDX   $EB
         LDA   $E9
         INC   $E9
         BNE   L01A853
         INC   $EB
L01A853  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   L01A874
         DEC   $F6
L01A874  CLC
         ADC   $F4
         STA   $F4
         BCC   L01A87D
         INC   $F6
L01A87D  PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
         BRA   L01A888
L01A886  BRA   L01A901
L01A888  BRA   L01A8FE
L01A88A  LDA   $F1
         CMP   $E3
         BNE   L01A8C3
         LDA   $E3
         CLC
         ADC   #$0100
         LDX   #$0000
         TAY
         BPL   L01A89D
         DEX
L01A89D  PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L01013C
         LDA   L01013C
         BEQ   L01A8BB
         PEA   $FFFF
         JSL   L01B8F1
         PLY
L01A8BB  LDA   $E3
         CLC
         ADC   #$0100
         STA   $E3
L01A8C3  LDX   $EB
         LDA   $E9
         INC   $E9
         BNE   L01A8CD
         INC   $EB
L01A8CD  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   L01A8EE
         DEC   $F6
L01A8EE  CLC
         ADC   $F4
         STA   $F4
         BCC   L01A8F7
         INC   $F6
L01A8F7  PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
L01A8FE  BRL   L01A7E6
L01A901  BRL   L01A9A8
L01A904  LDA   [$E9]
         AND   #$00FF
         SEP   #$20
         STA   $F3
         REP   #$20
         AND   #$00FF
         CMP   #$0020
         BNE   L01A91A
         BRL   L01A9A8
L01A91A  LDA   $F3
         AND   #$00FF
         CMP   #$0000
         BNE   L01A927
         BRL   L01A9A8
L01A927  LDA   $F3
         AND   #$00FF
         CMP   #$0009
         BEQ   L01A9A8
         LDA   $F1
         CMP   $E3
         BNE   L01A96A
         LDA   $E3
         CLC
         ADC   #$0100
         LDX   #$0000
         TAY
         BPL   L01A944
         DEX
L01A944  PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L01013C
         LDA   L01013C
         BEQ   L01A962
         PEA   $FFFF
         JSL   L01B8F1
         PLY
L01A962  LDA   $E3
         CLC
         ADC   #$0100
         STA   $E3
L01A96A  LDX   $EB
         LDA   $E9
         INC   $E9
         BNE   L01A974
         INC   $EB
L01A974  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   L01A995
         DEC   $F6
L01A995  CLC
         ADC   $F4
         STA   $F4
         BCC   L01A99E
         INC   $F6
L01A99E  PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
         BRL   L01A904
L01A9A8  LDA   $F1
         CMP   $E3
         BNE   L01A9E1
         LDA   $E3
         CLC
         ADC   #$0100
         LDX   #$0000
         TAY
         BPL   L01A9BB
         DEX
L01A9BB  PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L01013C
         LDA   L01013C
         BEQ   L01A9D9
         PEA   $FFFF
         JSL   L01B8F1
         PLY
L01A9D9  LDA   $E3
         CLC
         ADC   #$0100
         STA   $E3
L01A9E1  LDA   $F1
         INC   $F1
         PHA
         LDY   #$0002
         LDA   [$ED],Y
         TAX
         LDA   [$ED]
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   L01A9F8
         DEC   $F6
L01A9F8  CLC
         ADC   $F4
         STA   $F4
         BCC   L01AA01
         INC   $F6
L01AA01  LDA   #$0000
         SEP   #$20
         STA   [$F4]
         REP   #$20
L01AA0A  LDA   [$E9]
         AND   #$00FF
         CMP   #$0020
         BEQ   L01AA1E
         LDA   [$E9]
         AND   #$00FF
         CMP   #$0009
         BNE   L01AA26
L01AA1E  INC   $E9
         BNE   L01AA24
         INC   $EB
L01AA24  BRA   L01AA0A
L01AA26  BRL   L01A7C3
L01AA29  LDA   $F1
         LDX   #$0000
         TAY
         BPL   L01AA32
         DEX
L01AA32  PHX
         PHA
         PEI   $EF
         PEI   $ED
         _SetHandleSize
         STAL  L01013C
         PEI   $EF
         PEI   $ED
         _HLock
         STAL  L01013C
         LDA   L010140
         CLC
         ADC   #$0001
         LDX   #$0000
         TAY
         BPL   L01AA60
         DEX
L01AA60  PHX
         PHA
         LDX   #$0000
         LDA   #$0004
         SEC
         JSL   L01B372
         JSL   L01AE94
         PLY
         PLY
         STX   L010144
         STA   L010142
         LDY   #$0002
         LDA   [$ED],Y
         TAX
         LDA   [$ED]
         PHX
         PHA
         LDX   L010144
         LDA   L010142
         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   L01AAF5
L01AAAC  LDA   [$E5]
         AND   #$00FF
         BNE   L01AAEF
         LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDX   $E7
         LDA   $E5
         JSL   L01AFD8
         LDA   $F1
         INC   $F1
         ASL
         ASL
         PHA
         LDX   L010144
         LDA   L010142
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   L01AADA
         DEC   $F6
L01AADA  CLC
         ADC   $F4
         STA   $F4
         BCC   L01AAE3
         INC   $F6
L01AAE3  PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F4],Y
         PLA
         STA   [$F4]
L01AAEF  INC   $E5
         BNE   L01AAF5
         INC   $E7
L01AAF5  LDA   $F1
         SEC
         SBC   L010140
         BVS   L01AB00
         EOR   #$8000
L01AB00  BPL   L01AAAC
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDA   L010140
         ASL
         ASL
         PHA
         LDX   L010144
         LDA   L010142
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   L01AB20
         DEC   $F6
L01AB20  CLC
         ADC   $F4
         STA   $F4
         BCC   L01AB29
         INC   $F6
L01AB29  PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F4],Y
         PLA
         STA   [$F4]
L01AB35  TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

         ASC   'HS'
L01AB41  DB    $00
         DB    $00
L01AB43  ADRL  L01AB78
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01AB4D  DB    $00
         DB    $00
L01AB4F  DB    $00
         DB    $00
L01AB51  ADRL  L01AB84
L01AB55  DB    $00
         DB    $00
L01AB57  DB    $00
         DB    $00
L01AB59  DB    $00
         DB    $00
L01AB5B  DB    $00
         DB    $00
L01AB5D  DB    $00
         DB    $00
L01AB5F  DB    $00
         DB    $00
L01AB61  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01AB6F  ASC   'BYTEWRKS'00
L01AB78  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01AB84  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01ABAC  DB    $00
L01ABAD  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01ABBC  PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00E2
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   L01BAE4
         BNE   L01ABE8
         LDA   #$0017
         STA   L01C23E
         LDX   #$0000
         LDA   #$0000
         BRL   L01AD51
L01ABE8  LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F7
         LDA   $F5
         JSL   L01BAE4
         BEQ   L01AC04
         LDA   [$F5]
         AND   #$00FF
         CMP   #$0000
         BNE   L01AC13
L01AC04  LDA   #$0016
         STA   L01C23E
         LDX   #$0000
         LDA   #$0000
         BRL   L01AD51
L01AC13  LDY   #$0001
         LDA   [$F9],Y
         AND   #$00FF
         CMP   #$002B
         BEQ   L01AC32
         LDY   #$0002
         LDA   [$F9],Y
         AND   #$00FF
         CMP   #$002B
         BEQ   L01AC32
         LDA   #$0000
         BRA   L01AC35
L01AC32  LDA   #$0001
L01AC35  STA   $EA
         LDY   #$0001
         LDA   [$F9],Y
         AND   #$00FF
         CMP   #$0062
         BEQ   L01AC56
         LDY   #$0002
         LDA   [$F9],Y
         AND   #$00FF
         CMP   #$0062
         BEQ   L01AC56
         LDA   #$0000
         BRA   L01AC59
L01AC56  LDA   #$0001
L01AC59  STA   $E8
         LDA   [$F9]
         AND   #$00FF
         BRL   L01ACAD
L01AC63  LDA   $EA
         BEQ   L01AC6C
         LDA   #$0002
         BRA   L01AC6F
L01AC6C  LDA   #$0001
L01AC6F  ORA   #$0200
         ORA   #$0100
         STA   $E6
         BRL   L01ACBF
L01AC7A  LDA   $EA
         BEQ   L01AC83
         LDA   #$0002
         BRA   L01AC86
L01AC83  LDA   #$0001
L01AC86  ORA   #$0008
         ORA   #$0100
         STA   $E6
         BRL   L01ACBF
L01AC91  LDA   $EA
         BEQ   L01AC9A
         LDA   #$0002
         BRA   L01AC9D
L01AC9A  LDA   #$0000
L01AC9D  STA   $E6
         BRL   L01ACBF
L01ACA2  LDX   #$0000
         LDA   #$0000
         BRL   L01AD51
         BRA   L01ACBF
L01ACAD  CMP   #$0061
         BEQ   L01AC7A
         CMP   #$0072
         BEQ   L01AC91
         CMP   #$0077
         BEQ   L01AC63
         JMP   L01ACA2

L01ACBF  LDA   $E8
         BEQ   L01ACCA
         LDA   $E6
         ORA   #$0020
         STA   $E6
L01ACCA  PEI   $E6
         PEI   $F7
         PEI   $F5
         JSL   L01B82A
         PLY
         PLY
         PLY
         STA   $E4
         SEC
         SBC   #$0000
         BVS   L01ACE2
         EOR   #$8000
L01ACE2  BMI   L01ACEC
         LDX   #$0000
         LDA   #$0000
         BRA   L01AD51
L01ACEC  LDA   #$0000
         STA   [$FD]
         LDA   $E4
         LDY   #$0012
         STA   [$FD],Y
         LDA   $EA
         BEQ   L01AD01
         LDA   #$0080
         BRA   L01AD13
L01AD01  LDA   [$F9]
         AND   #$00FF
         CMP   #$0072
         BNE   L01AD10
         LDA   #$0001
         BRA   L01AD13
L01AD10  LDA   #$0002
L01AD13  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
L01AD51  TAY
         TDC
         CLC
         ADC   #$00EF
         TCS
         TYA
         PLD
         RTL

L01AD5B  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         LDA   #L01B3F9
         LDX   #^L01B3F9
         STX   $F6
         STA   $F4
         BRA   L01AD91
L01AD72  LDY   #$0010
         LDA   [$F4],Y
         AND   #$0083
         CMP   #$0000
         BNE   L01AD85
         LDX   $F6
         LDA   $F4
         BRA   L01ADB4
L01AD85  LDA   $F4
         CLC
         ADC   #$0014
         STA   $F4
         BCC   L01AD91
         INC   $F6
L01AD91  SEC
         LDA   $F4
         SBC   L01ADBE
         BNE   L01ADA0
         LDA   $F6
         SBC   L01ADBE+2
         BRA   L01ADA7
L01ADA0  LDA   $F6
         SBC   L01ADBE+2
         REP   #$02
L01ADA7  BVS   L01ADAC
         EOR   #$8000
L01ADAC  BPL   L01AD72
         LDX   #$0000
         LDA   #$0000
L01ADB4  TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

L01ADBE  ADRL  L01B589

L01ADC2  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   L01B322
         PLA
         PLX
         STA   $F2
         SEC
         SBC   #$0000
         BVS   L01ADF6
         EOR   #$8000
L01ADF6  BMI   L01AE12
         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   L01AE24
L01AE12  LDA   [$FD]
         SEC
         SBC   $F2
         BEQ   L01AE24
         BVS   L01AE1E
         EOR   #$8000
L01AE1E  BPL   L01AE24
         LDA   $F2
         STA   [$FD]
L01AE24  TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

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

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

L01AEE6  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EC
         TCS
         BRL   L01AFB7
L01AEF4  LDA   [$F7]
         AND   #$00FF
         PHA
         LDA   [$FB]
         AND   #$00FF
         PLX
         STX   $EE
         CMP   $EE
         BNE   L01AF0C
         LDA   #$0001
         BRL   L01AF91
L01AF0C  LDA   $FF
         BEQ   L01AF15
         LDA   #$0000
         BRA   L01AF91
L01AF15  LDA   [$F7]
         AND   #$00FF
         SEC
         SBC   #$0061
         BVS   L01AF23
         EOR   #$8000
L01AF23  BPL   L01AF37
         LDA   [$F7]
         AND   #$00FF
         SEC
         SBC   #$007A
         BEQ   L01AF3E
         BVS   L01AF35
         EOR   #$8000
L01AF35  BPL   L01AF3E
L01AF37  LDA   [$F7]
         AND   #$00FF
         BRA   L01AF4B
L01AF3E  LDA   [$F7]
         AND   #$00FF
         CLC
         ADC   #$0041
         SEC
         SBC   #$0061
L01AF4B  PHA
         LDA   [$FB]
         AND   #$00FF
         SEC
         SBC   #$0061
         BVS   L01AF5A
         EOR   #$8000
L01AF5A  BPL   L01AF6E
         LDA   [$FB]
         AND   #$00FF
         SEC
         SBC   #$007A
         BEQ   L01AF75
         BVS   L01AF6C
         EOR   #$8000
L01AF6C  BPL   L01AF75
L01AF6E  LDA   [$FB]
         AND   #$00FF
         BRA   L01AF82
L01AF75  LDA   [$FB]
         AND   #$00FF
         CLC
         ADC   #$0041
         SEC
         SBC   #$0061
L01AF82  PLX
         STX   $EE
         CMP   $EE
         BEQ   L01AF8E
         LDA   #$0000
         BRA   L01AF91
L01AF8E  LDA   #$0001
L01AF91  TAY
         BNE   L01AF99
         LDA   #$0000
         BRA   L01AFCE
L01AF99  LDX   $F9
         LDA   $F7
         INC   $F7
         BNE   L01AFA3
         INC   $F9
L01AFA3  STA   $EE
         STX   $F0
         LDX   $FD
         LDA   $FB
         INC   $FB
         BNE   L01AFB1
         INC   $FD
L01AFB1  STA   $EE
         STX   $F0
         LDA   [$EE]
L01AFB7  LDA   [$F7]
         AND   #$00FF
         BEQ   L01AFC1
         BRL   L01AEF4
L01AFC1  LDA   [$FB]
         AND   #$00FF
         BEQ   L01AFCB
         BRL   L01AEF4
L01AFCB  LDA   #$0001
L01AFCE  TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

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

L01AFE3  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F0
         TCS
         LDA   #$FFFF
         STA   $F2
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   L01BAE4
         BNE   L01B00B
         LDA   #$FFFF
         BRL   L01B0BD
L01B00B  LDY   #$0010
         LDA   [$FD],Y
         AND   #$0083
         TAY
         BEQ   L01B053
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0004
         TAY
         BEQ   L01B026
         LDA   #$0000
         BRA   L01B030
L01B026  PEI   $FF
         PEI   $FD
         JSL   L01B0C7
         PLY
         PLY
L01B030  STA   $F2
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   L01C191
         PLY
         SEC
         SBC   #$0000
         BVS   L01B046
         EOR   #$8000
L01B046  BMI   L01B053
         LDA   #$FFFF
         STA   $F2
         LDA   #$0002
         STA   L01C23E
L01B053  LDY   #$0010
         LDA   [$FD],Y
         AND   #$0008
         TAY
         BEQ   L01B096
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         PHX
         PHA
         _FindHandle
         STAL  L01013C
         _DisposeHandle
         STAL  L01013C
         LDX   #$0000
         LDA   #$0000
         LDY   #$0008
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0006
         STA   [$FD],Y
L01B096  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
L01B0BD  TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

L01B0C7  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0002
         TAY
         BNE   L01B0E7
         LDA   #$0000
         STA   [$FD]
         LDA   #$0000
         BRA   L01B158
L01B0E7  LDY   #$0010
         LDA   [$FD],Y
         AND   #$0004
         TAY
         BNE   L01B145
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0002
         TAY
         BEQ   L01B145
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   L01BAE4
         BEQ   L01B145
         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   L01BAE4
         BVS   L01B137
         EOR   #$8000
L01B137  BMI   L01B145
         PEI   $FF
         PEI   $FD
         JSL   L01C6DA
         PLY
         PLY
         BRA   L01B0E7
L01B145  LDY   #$0010
         LDA   [$FD],Y
         AND   #$0020
         TAY
         BEQ   L01B155
         LDA   #$FFFF
         BRA   L01B158
L01B155  LDA   #$0000
L01B158  TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

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

L01B1BD  PHD
         PHA
         PEA   $0001
         TSC
         TCD
         LDA   $03
         BEQ   L01B228
         LDX   #$0000
         BCC   L01B1E8
         BIT   #$8000
         BEQ   L01B1D9
         EOR   #$FFFF
         INC
         STA   $03
         INX
L01B1D9  LDA   $0A
         BIT   #$8000
         BEQ   L01B1E8
         EOR   #$FFFF
         INC
         STA   $0A
         INX
         INX
L01B1E8  LDY   #$0000
         BRA   L01B1EF
L01B1ED  ASL   $01
L01B1EF  ASL   $03
         BCC   L01B1ED
         ROR   $03
L01B1F5  LDA   $0A
         CMP   $03
         BCC   L01B206
         LDA   $0A
         SEC
         SBC   $03
         STA   $0A
         TYA
         ORA   $01
         TAY
L01B206  LSR   $03
         LSR   $01
         BCC   L01B1F5
         TYA
         CPX   #$0000
         BEQ   L01B228
         CPX   #$0003
         BEQ   L01B220
         EOR   #$FFFF
         INC
         CPX   #$0001
         BEQ   L01B228
L01B220  TAY
         LDA   $0A
         EOR   #$FFFF
         INC
         TYA
L01B228  PLY
         PLY
         PLD
         RTL

L01B22C  PHD
         PHX
         PHA
         PEA   $0000
         PEA   $0001
         PEA   $0000
         PEA   $0000
         TSC
         TCD
         LDA   $09
         ORA   $0B
         BNE   L01B249
         LDX   #$0000
         BRL   L01B2FD
L01B249  LDX   #$0000
         BCC   L01B281
         LDA   $0B
         BIT   #$8000
         BEQ   L01B267
         EOR   #$FFFF
         STA   $0B
         LDA   $09
         EOR   #$FFFF
         INC
         BNE   L01B264
         INC   $0B
L01B264  STA   $09
         INX
L01B267  LDA   $14
         BIT   #$8000
         BEQ   L01B281
         EOR   #$FFFF
         STA   $14
         LDA   $12
         EOR   #$FFFF
         INC
         BNE   L01B27D
         INC   $14
L01B27D  STA   $12
         INX
         INX
L01B281  BRA   L01B287
L01B283  ASL   $05
         ROL   $07
L01B287  ASL   $09
         ROL   $0B
         BCC   L01B283
         ROR   $0B
         ROR   $09
L01B291  LDA   $14
         CMP   $0B
         BEQ   L01B29B
         BCC   L01B2BA
         BRA   L01B2A1
L01B29B  LDA   $12
         CMP   $09
         BCC   L01B2BA
L01B2A1  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
L01B2BA  LSR   $0B
         ROR   $09
         LSR   $07
         ROR   $05
         BCC   L01B291
         CPX   #$0000
         BEQ   L01B2F9
         CPX   #$0003
         BEQ   L01B2E6
         LDA   $01
         EOR   #$FFFF
         STA   $01
         LDA   $03
         EOR   #$FFFF
         INC   $01
         BNE   L01B2DF
         INC
L01B2DF  STA   $03
         CPX   #$0001
         BEQ   L01B2F9
L01B2E6  LDA   $12
         EOR   #$FFFF
         STA   $12
         LDA   $14
         EOR   #$FFFF
         INC   $12
         BNE   L01B2F7
         INC
L01B2F7  STA   $14
L01B2F9  LDA   $01
         LDX   $03
L01B2FD  PLY
         PLY
         PLY
         PLY
         PLY
         PLY
         PLD
         RTL

L01B305  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

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

L01B32D  PHD
         PHA
         TSC
         TCD
         LDX   #$0000
         BCC   L01B352
         LDA   $01
         BIT   #$8000
         BEQ   L01B344
         EOR   #$FFFF
         INC
         STA   $01
         INX
L01B344  LDA   $08
         BIT   #$8000
         BEQ   L01B352
         EOR   #$FFFF
         INC
         STA   $08
         DEX
L01B352  LDA   #$0000
         BRA   L01B360
L01B357  LSR   $08
         BCC   L01B35E
         CLC
         ADC   $01
L01B35E  ASL   $01
L01B360  LDY   $08
         BNE   L01B357
         CPX   #$0000
         BEQ   L01B36D
         EOR   #$FFFF
         INC
L01B36D  STA   $08
         PLY
         PLD
         RTL

L01B372  PHD
         PHX
         PHA
         PEA   $0000
         PEA   $0000
         TSC
         TCD
         LDX   #$0000
         BCC   L01B3B4
         LDA   $07
         BIT   #$8000
         BEQ   L01B39B
         EOR   #$FFFF
         STA   $07
         LDA   $05
         EOR   #$FFFF
         INC
         BNE   L01B398
         INC   $07
L01B398  STA   $05
         INX
L01B39B  LDA   $10
         BIT   #$8000
         BEQ   L01B3B4
         EOR   #$FFFF
         STA   $10
         LDA   $0E
         EOR   #$FFFF
         INC
         BNE   L01B3B1
         INC   $10
L01B3B1  STA   $0E
         DEX
L01B3B4  BRA   L01B3CD
L01B3B6  LSR   $10
         ROR   $0E
         BCC   L01B3C9
         LDA   $01
         CLC
         ADC   $05
         STA   $01
         LDA   $03
         ADC   $07
         STA   $03
L01B3C9  ASL   $05
         ROL   $07
L01B3CD  LDA   $0E
         ORA   $10
         BNE   L01B3B6
         CPX   #$0000
         BEQ   L01B3EB
         LDA   $01
         EOR   #$FFFF
         STA   $01
         LDA   $03
         EOR   #$FFFF
         INC   $01
         BNE   L01B3E9
         INC
L01B3E9  STA   $03
L01B3EB  LDA   $01
         STA   $0E
         LDA   $03
         STA   $10
         PLY
         PLY
         PLY
         PLY
         PLD
         RTL

L01B3F9  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $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

L01B589  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$FFEC
         TCS
         LDA   #L01BDC7
         LDX   #^L01BDC7
         PHX
         PHA
         LDAL  L01AB51+2
         TAX
         LDAL  L01AB51
         STA   $F6
         STX   $F8
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
         LDA   L01BE03
         BNE   L01B5BD
         BRL   L01B710
L01B5BD  LDX   #$0000
         TDC
         CLC
         ADC   #$FFEE
         PHA
         TXA
         STAL  L01B911
         PLA
         STAL  L01B90F
         PEA   $0027
         PEA   ^L01B90F
         PEA   L01B90F
         JSL   L01B7E4
         LDAL  L01B911
         TAX
         LDAL  L01B90F
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         STA   $F2
         STA   $F0
L01B5F3  LDA   $F2
         LDX   #$0000
         TAY
         BPL   L01B5FC
         DEX
L01B5FC  PHX
         PHA
         LDAL  L01B911
         TAX
         LDAL  L01B90F
         JSL   L01AFD8
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         CMP   #$002F
         BEQ   L01B62E
         LDA   $F2
         SEC
         SBC   #$0000
         BEQ   L01B62E
         BVS   L01B628
         EOR   #$8000
L01B628  BPL   L01B62E
         DEC   $F2
         BRA   L01B5F3
L01B62E  LDA   $F0
         SEC
         SBC   $F2
         STA   $EE
         SEP   #$20
         STAL  L01ABAC
         REP   #$20
         BRA   L01B697
L01B63F  LDA   $F0
         DEC   $F0
         LDX   #$0000
         TAY
         BPL   L01B64A
         DEX
L01B64A  PHX
         PHA
         LDAL  L01B911
         TAX
         LDAL  L01B90F
         JSL   L01AFD8
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         PHA
         LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDA   $EE
         LDX   #$0000
         TAY
         BPL   L01B676
         DEX
L01B676  PHX
         PHA
         LDA   #L01ABAD
         LDX   #^L01ABAD
         JSL   L01AFD8
         PLA
         PLX
         JSL   L01B322
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         SEP   #$20
         STA   [$F6]
         REP   #$20
         DEC   $EE
L01B697  LDA   $EE
         SEC
         SBC   #$0000
         BEQ   L01B6A6
         BVS   L01B6A4
         EOR   #$8000
L01B6A4  BMI   L01B63F
L01B6A6  LDA   #L01ABAC
         LDX   #^L01ABAC
         PHX
         PHA
         LDAL  L01AB43+2
         TAX
         LDAL  L01AB43
         STA   $F6
         STX   $F8
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
         LDA   $FF
         BNE   L01B6E8
         LDAL  L01AB43+2
         TAX
         LDAL  L01AB43
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         JSL   L01C7C4
         PLY
         PLY
L01B6E8  LDA   #$0001
         STA   L010140
         LDAL  L01AB43+2
         TAX
         LDAL  L01AB43
         STX   L010144
         STA   L010142
         PEA   $007F
         PEA   $0000
         _SetInGlobals
         STAL  L01013C
         BRA   L01B728
L01B710  LDA   L010140
         STAL  L01AB41
         LDX   L010144
         LDA   L010142
         PHA
         TXA
         STAL  L01AB43+2
         PLA
         STAL  L01AB43
L01B728  TAY
         TDC
         CLC
         ADC   #$00F9
         TCS
         TYA
         PLD
         RTL

L01B732  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F0
         TCS
         LDAL  L01AB51+2
         TAX
         LDAL  L01AB51
         STA   $F6
         STX   $F8
         LDX   $F8
         LDA   #$0024
         CLC
         ADC   $F6
         BCC   L01B755
         INX
L01B755  STX   $F4
         STA   $F2
         BRA   L01B794
L01B75B  LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         JSL   L01BAE4
         BEQ   L01B788
         PEI   $FF
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         STA   $F6
         STX   $F8
         LDA   $F6
         LDX   $F8
         JSL   L01B822
         PLY
L01B788  LDA   $F2
         SEC
         SBC   #$0004
         STA   $F2
         BCS   L01B794
         DEC   $F4
L01B794  LDAL  L01AB51+2
         TAX
         LDAL  L01AB51
         STA   $F6
         STX   $F8
         LDA   $F6
         LDX   $F8
         PHX
         PHA
         LDX   $F4
         LDA   $F2
         JSL   L01BAE4
         BVS   L01B7B4
         EOR   #$8000
L01B7B4  BPL   L01B75B
         LDA   $FF
         STA   L01014A
         LDAL  L01AB51+2
         TAX
         LDAL  L01AB51
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         STA   $F6
         STX   $F8
         LDA   $F6
         LDX   $F8
         JSL   L01B822
         TDC
         CLC
         ADC   #$00F9
         TCS
         PLD
         RTL

L01B7E4  PHB
         PLA
         XBA
         STAL  L01B81F
         PLA
         STAL  L01B81F+1
         PLA
         STAL  L01B805
         PLA
         STAL  L01B805+2
         PLA
         STAL  L01B803
         JSL   GSOS
L01B803  DW    $0000
L01B805  ADRL  $00000000
         BCS   L01B80E
         LDA   #$0000
L01B80E  STAL  L01013C
         LDAL  L01B81F+1
         PHA
         PHB
         LDAL  L01B81F
         STA   $01,S
         RTL

L01B81F  HEX   000000
L01B822  SEP   #$10
         PHX
         REP   #$10
         DEC
         PHA
         RTL

L01B82A  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00E4
         TCS
         LDA   #$FFFF
         STA   $E8
         PEA   $0000
         TDC
         CLC
         ADC   #$00E8
         PHA
         JSL   L01BB69
         PLY
         PLY
         STX   $EC
         STA   $EA
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EC
         LDA   $EA
         JSL   L01BAE4
         BNE   L01B865
         LDA   #$FFFF
         BRL   L01B8E7
L01B865  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   L01C240
         TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
         STA   $E6
         LDA   $E6
         CMP   #$0000
         BEQ   L01B8BB
         LDA   #$0000
         STA   [$EA]
         LDA   #$FFFF
         BRA   L01B8E7
L01B8BB  LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0006
         LDA   [$EA],Y
         TAX
         LDY   #$0004
         LDA   [$EA],Y
         JSL   L01BAE4
         BNE   L01B8E5
         LDX   $F0
         LDA   $EE
         LDY   #$0006
         PHA
         TXA
         STA   [$EA],Y
         PLA
         LDY   #$0004
         STA   [$EA],Y
L01B8E5  LDA   $E8
L01B8E7  TAY
         TDC
         CLC
         ADC   #$00F5
         TCS
         TYA
         PLD
         RTL

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

L01B90F  DB    $00
         DB    $00
L01B911  DB    $00
         DB    $00
L01B913  DB    $00
         DB    $00
L01B915  DB    $00
         DB    $00
L01B917  DB    $00
         DB    $00
L01B919  DB    $00
         DB    $00
L01B91B  DB    $00
         DB    $00
L01B91D  DB    $00
         DB    $00
L01B91F  DB    $00
         DB    $00
L01B921  DB    $00
         DB    $00
         DB    $00
         DB    $00
L01B925  DB    $00
         DB    $00
L01B927  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01B931  DB    $00
         DB    $00
L01B933  DB    $00
         DB    $00
L01B935  DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01B93B  DB    $00
         DB    $00
L01B93D  DB    $00
         DB    $00
L01B93F  DB    $00
         DB    $00
L01B941  DB    $00
         DB    $00
L01B943  DB    $00
         DB    $00
L01B945  DB    $00
         DB    $00
L01B947  DB    $00
         DB    $00
L01B949  DB    $00
         DB    $00
L01B94B  DB    $00
         DB    $00
L01B94D  DB    $00
         DB    $00
L01B94F  DB    $00
         DB    $00
L01B951  DB    $00
         DB    $00
L01B953  DB    $00
         DB    $00
L01B955  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EE
         TCS
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0081
         CMP   #$0000
         BNE   L01B973
         LDA   #$FFFF
         BRL   L01BADA
L01B973  LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0001
         LDY   #$0010
         STA   [$FD],Y
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0010
         TAY
         BEQ   L01B991
         LDA   #$FFFF
         BRL   L01BADA
L01B991  LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   L01BAE4
         BNE   L01B9B4
         PEI   $FF
         PEI   $FD
         JSL   L01C469
         PLY
         PLY
L01B9B4  LDY   #$0010
         LDA   [$FD],Y
         AND   #$0100
         TAY
         BNE   L01B9C2
         BRL   L01BA0C
L01B9C2  LDA   #L01B3F9
         LDX   #^L01B3F9
         STX   $F2
         STA   $F0
         BRA   L01B9EF
L01B9CE  LDY   #$0010
         LDA   [$F0],Y
         AND   #$0102
         TAY
         BEQ   L01B9E3
         PEI   $F2
         PEI   $F0
         JSL   L01B0C7
         PLY
         PLY
L01B9E3  LDA   $F0
         CLC
         ADC   #$0014
         STA   $F0
         BCC   L01B9EF
         INC   $F2
L01B9EF  SEC
         LDA   $F0
         SBC   L01ADBE
         BNE   L01B9FE
         LDA   $F2
         SBC   L01ADBE+2
         BRA   L01BA05
L01B9FE  LDA   $F2
         SBC   L01ADBE+2
         REP   #$02
L01BA05  BVS   L01BA0A
         EOR   #$8000
L01BA0A  BPL   L01B9CE
L01BA0C  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   L01BA34
         LDA   #$0001
         BRA   L01BA39
L01BA34  LDY   #$000E
         LDA   [$FD],Y
L01BA39  PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         PHX
         PHA
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   L01CA08
         PLY
         PLY
         PLY
         PLY
         STA   [$FD]
         LDA   [$FD]
         DEC
         STA   [$FD]
         SEC
         SBC   #$0000
         BVS   L01BA65
         EOR   #$8000
L01BA65  BPL   L01BA97
         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   L01BA85
         INC
L01BA85  LDY   #$0004
         STA   [$FD],Y
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         BRA   L01BADA
L01BA97  LDA   [$FD]
         CMP   #$FFFF
         BNE   L01BAC5
         LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0010
         LDY   #$0010
         STA   [$FD],Y
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$0080
         TAY
         BEQ   L01BAC3
         LDY   #$0010
         LDA   [$FD],Y
         AND   #$FFFE
         LDY   #$0010
         STA   [$FD],Y
L01BAC3  BRA   L01BAD2
L01BAC5  LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0020
         LDY   #$0010
         STA   [$FD],Y
L01BAD2  LDA   #$0000
         STA   [$FD]
         LDA   #$FFFF
L01BADA  TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

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

L01BB0F  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E8
         TCS
         LDX   $FB
         LDA   $F9
         STX   $EC
         STA   $EA
L01BB22  LDA   $F7
         CMP   #$0001
         BEQ   L01BB4D
         BCC   L01BB4D
         LDA   [$FD]
         STA   [$F9]
         LDA   $F9
         CLC
         ADC   #$0002
         STA   $F9
         BCC   L01BB3B
         INC   $FB
L01BB3B  LDA   $FD
         CLC
         ADC   #$0002
         STA   $FD
         BCC   L01BB47
         INC   $FF
L01BB47  DEC   $F7
         DEC   $F7
         BRA   L01BB22
L01BB4D  LDA   $F7
         BEQ   L01BB59
         SEP   #$20
         LDA   [$FD]
         STA   [$F9]
         REP   #$20
L01BB59  LDX   $EC
         LDA   $EA
         STX   $FF
         STA   $FD
         TDC
         CLC
         ADC   #$00F1
         TCS
         PLD
         RTL

L01BB69  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E8
         TCS
         LDAL  L01AB55
         CMP   #$0000
         BNE   L01BB81
         JSL   L01BE62
L01BB81  LDAL  L01AB55
         PHA
         LDA   #$0012
         SEC
         JSL   L01B1BD
         PLY
         SEC
         SBC   #$0001
         STA   $F2
         LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   L01BBA0
         EOR   #$8000
L01BBA0  BPL   L01BBA6
         LDA   [$FD]
         BRA   L01BBB2
L01BBA6  LDA   [$FD]
         PHA
         LDA   #$FFFF
         PLX
         STX   $F4
         SEC
         SBC   $F4
L01BBB2  SEC
         SBC   $F2
         BEQ   L01BBD3
         BVS   L01BBBC
         EOR   #$8000
L01BBBC  BPL   L01BBD3
         PEA   $0000
         PEA   $0016
         JSL   L01BE38
         PLY
         PLY
         LDX   #$0000
         LDA   #$0000
         BRL   L01BDBD
L01BBD3  LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   L01BBDE
         EOR   #$8000
L01BBDE  BPL   L01BC29
         LDA   [$FD]
         PHA
         LDA   #$0012
         CLC
         JSL   L01B32D
         LDAL  L01AB59
         TAX
         LDAL  L01AB57
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   L01BBFE
         DEC   $F6
L01BBFE  CLC
         ADC   $F4
         STA   $F4
         BCC   L01BC07
         INC   $F6
L01BC07  LDA   $F4
         LDX   $F6
         STX   $F0
         STA   $EE
         LDA   [$EE]
         CMP   #$0000
         BNE   L01BC26
         PEA   $0000
         PEA   $0009
         JSL   L01BE38
         PLY
         PLY
         STZ   $EE
         STZ   $F0
L01BC26  BRL   L01BDB9
L01BC29  LDA   [$FD]
         PHA
         LDA   #$FFFF
         PLX
         STX   $F4
         SEC
         SBC   $F4
         PHA
         LDA   #$0012
         CLC
         JSL   L01B32D
         LDAL  L01AB59
         TAX
         LDAL  L01AB57
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   L01BC51
         DEC   $F6
L01BC51  CLC
         ADC   $F4
         STA   $F4
         BCC   L01BC5A
         INC   $F6
L01BC5A  LDA   $F4
         LDX   $F6
         STX   $F0
         STA   $EE
         BRA   L01BC79
L01BC64  LDA   [$EE]
         CMP   #$0000
         BNE   L01BC6D
         BRA   L01BCB5
L01BC6D  LDA   $EE
         CLC
         ADC   #$0012
         STA   $EE
         BCC   L01BC79
         INC   $F0
L01BC79  LDA   $F2
         PHA
         LDA   #$0012
         CLC
         JSL   L01B32D
         LDAL  L01AB59
         TAX
         LDAL  L01AB57
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   L01BC97
         DEC   $F6
L01BC97  CLC
         ADC   $F4
         STA   $F4
         BCC   L01BCA0
         INC   $F6
L01BCA0  LDA   $F4
         LDX   $F6
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   L01BAE4
         BVS   L01BCB3
         EOR   #$8000
L01BCB3  BMI   L01BC64
L01BCB5  LDA   $F2
         PHA
         LDA   #$0012
         CLC
         JSL   L01B32D
         LDAL  L01AB59
         TAX
         LDAL  L01AB57
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   L01BCD3
         DEC   $F6
L01BCD3  CLC
         ADC   $F4
         STA   $F4
         BCC   L01BCDC
         INC   $F6
L01BCDC  LDA   $F4
         LDX   $F6
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   L01BAE4
         BVS   L01BCEF
         EOR   #$8000
L01BCEF  BPL   L01BCF4
         BRL   L01BD8F
L01BCF4  LDAL  L01AB55
         CLC
         ADC   #$00B4
         LDX   #$0000
         TAY
         BPL   L01BD03
         DEX
L01BD03  PHX
         PHA
         LDAL  L01AB59
         TAX
         LDAL  L01AB57
         PHX
         PHA
         JSL   L01CB34
         PLY
         PLY
         PLY
         PLY
         STX   $EC
         STA   $EA
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EC
         LDA   $EA
         JSL   L01BAE4
         BNE   L01BD43
         PEA   $0000
         PEA   $0018
         JSL   L01BE38
         PLY
         PLY
         LDX   #$0000
         LDA   #$0000
         BRL   L01BDBD
L01BD43  LDA   $F2
         PHA
         LDA   #$0012
         CLC
         JSL   L01B32D
         LDX   $EC
         LDA   $EA
         STA   $F4
         STX   $F6
         PLA
         TAY
         BPL   L01BD5C
         DEC   $F6
L01BD5C  CLC
         ADC   $F4
         STA   $F4
         BCC   L01BD65
         INC   $F6
L01BD65  LDX   $F6
         LDA   #$0012
         CLC
         ADC   $F4
         BCC   L01BD70
         INX
L01BD70  STX   $F0
         STA   $EE
         LDAL  L01AB55
         CLC
         ADC   #$00B4
         STAL  L01AB55
         LDX   $EC
         LDA   $EA
         PHA
         TXA
         STAL  L01AB59
         PLA
         STAL  L01AB57
L01BD8F  LDAL  L01AB59
         TAX
         LDAL  L01AB57
         STA   $F4
         STX   $F6
         LDA   $F4
         LDX   $F6
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   L01B322
         LDX   #$0000
         LDA   #$0012
         SEC
         JSL   L01B22C
         PLY
         PLY
         STA   [$FD]
L01BDB9  LDX   $F0
         LDA   $EE
L01BDBD  TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

L01BDC7  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F4
         TCS
         PEA   $0001
         PEA   ^L01017C
         PEA   L01017C
         JSL   L01BE05
         PLY
         PLY
         PLY
         TDC
         CLC
         ADC   #$00F9
         TCS
         PLD
         RTL

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

L01BE03  BRK   $00
L01BE05  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   L01BE35
         INC
L01BE35  PHX
         PLD
         RTL

L01BE38  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDA   $FF
         CMP   #$0000
         BNE   L01BE4E
         LDA   $FD
         BRA   L01BE55
L01BE4E  PEI   $FF
         JSL   L01C835
         PLY
L01BE55  STA   L01C23E
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

L01BE62  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F0
         TCS
         LDA   #$00B4
         STAL  L01AB55
         PEA   $0000
         PEA   $00B4
         PEA   $0000
         PEA   $0000
         JSL   L01CB34
         PLY
         PLY
         PLY
         PLY
         PHA
         TXA
         STAL  L01AB59
         PLA
         STAL  L01AB57
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDAL  L01AB61
         TAX
         LDAL  L01AB5F
         JSL   L01BAE4
         BNE   L01BEAD
         BRL   L01BF6D
L01BEAD  LDAL  L01AB61
         TAX
         LDAL  L01AB5F
         STA   $F8
         STX   $FA
         LDY   #$001A
         LDA   [$F8],Y
         TAX
         LDY   #$0018
         LDA   [$F8],Y
         PHX
         PHA
         LDAL  L01AB59
         TAX
         LDAL  L01AB57
         PHX
         PHA
         PEA   $0000
         PEA   $0036
         _BlockMove
         STAL  L01013C
         LDAL  L01AB59
         TAX
         LDAL  L01AB57
         STA   $F8
         STX   $FA
         LDA   $F8
         LDX   $FA
         STX   $F6
         STA   $F4
         BRA   L01BF41
L01BEFA  LDA   [$F4]
         CMP   #$0000
         BEQ   L01BF35
         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   L01B822
         PLY
         PLY
         PLY
         PLY
L01BF35  LDA   $F4
         CLC
         ADC   #$0012
         STA   $F4
         BCC   L01BF41
         INC   $F6
L01BF41  LDAL  L01AB59
         TAX
         LDAL  L01AB57
         STA   $F8
         STX   $FA
         LDX   $FA
         LDA   #$0024
         CLC
         ADC   $F8
         BCC   L01BF59
         INX
L01BF59  PHX
         PHA
         LDX   $F6
         LDA   $F4
         JSL   L01BAE4
         BVS   L01BF68
         EOR   #$8000
L01BF68  BMI   L01BEFA
         BRL   L01C13B
L01BF6D  PEA   $0000
         PEA   ^L01C66B
         PEA   L01C66B
         JSL   L01B82A
         PLY
         PLY
         PLY
         STA   $F2
         PEA   $0000
         TDC
         CLC
         ADC   #$00F2
         PHA
         JSL   L01BB69
         PLY
         PLY
         STX   $F6
         STA   $F4
         PHX
         PHA
         PEA   $0000
         PEA   $0004
         LDA   L01013E
         ORA   #$0F00
         PHA
         PEA   $8300
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L01013C
         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   ^L01C674
         PEA   L01C674
         JSL   L01B82A
         PLY
         PLY
         PLY
         STA   $F2
         PEA   $0000
         TDC
         CLC
         ADC   #$00F2
         PHA
         JSL   L01BB69
         PLY
         PLY
         STX   $F6
         STA   $F4
         PHX
         PHA
         PEA   $0000
         PEA   $0004
         LDA   L01013E
         ORA   #$0F00
         PHA
         PEA   $8300
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L01013C
         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   ^L01C67D
         PEA   L01C67D
         JSL   L01B82A
         PLY
         PLY
         PLY
         STA   $F2
         PEA   $0000
         TDC
         CLC
         ADC   #$00F2
         PHA
         JSL   L01BB69
         PLY
         PLY
         STX   $F6
         STA   $F4
         PHX
         PHA
         PEA   $0000
         PEA   $0004
         LDA   L01013E
         ORA   #$0F00
         PHA
         PEA   $8300
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L01013C
         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
L01C13B  LDA   #L01C425
         LDX   #^L01C425
         PHX
         PHA
         LDAL  L01AB51+2
         TAX
         LDAL  L01AB51
         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  L01AB4F
         TAX
         LDAL  L01AB4D
         JSL   L01BAE4
         BNE   L01C187
         LDA   #L01CAEE
         LDX   #^L01CAEE
         PHA
         TXA
         STAL  L01AB4F
         PLA
         STAL  L01AB4D
L01C187  TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

L01C191  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EE
         TCS
         LDA   $FF
         SEC
         SBC   #$0000
         BVS   L01C1A7
         EOR   #$8000
L01C1A7  BMI   L01C1BA
         PEA   $0000
         PEA   $0016
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
         BRA   L01C234
L01C1BA  PEA   $0000
         TDC
         CLC
         ADC   #$00FF
         PHA
         JSL   L01BB69
         PLY
         PLY
         STX   $F4
         STA   $F2
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F4
         LDA   $F2
         JSL   L01BAE4
         BNE   L01C1E4
         LDA   #$FFFF
         BRA   L01C234
L01C1E4  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   L01B822
         PLY
         PLY
         STA   $F0
         LDA   #$0000
         STA   [$F2]
         LDA   $F0
         CMP   #$0000
         BEQ   L01C231
         LDY   #$0002
         LDA   [$F2],Y
         PHA
         PEI   $F0
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
         BRA   L01C234
L01C231  LDA   #$0000
L01C234  TAY
         TDC
         CLC
         ADC   #$00F9
         TCS
         TYA
         PLD
         RTL

L01C23E  DW    $0000
L01C240  PHD
         TSC
         SEC
         SBC   #$00ED
         TCD
         ADC   #$00E0
         TCS
         LDA   [$F7]
         AND   #$00FF
         CMP   #$0000
         BEQ   L01C25A
         LDA   #$0000
         BRA   L01C25D
L01C25A  LDA   #$0001
L01C25D  PHA
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F9
         LDA   $F7
         JSL   L01BAE4
         BEQ   L01C275
         LDA   #$0000
         BRA   L01C278
L01C275  LDA   #$0001
L01C278  PLX
         STX   $EA
         ORA   $EA
         TAY
         BEQ   L01C292
         PEA   $0000
         PEA   $0016
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
         BRL   L01C41B
L01C292  LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDAL  L01AB5D
         TAX
         LDAL  L01AB5B
         JSL   L01BAE4
         BNE   L01C2BA
         LDA   #L01CCF3
         LDX   #^L01CCF3
         PHA
         TXA
         STAL  L01AB5D
         PLA
         STAL  L01AB5B
L01C2BA  LDAL  L01AB5D
         TAX
         LDAL  L01AB5B
         STA   $EA
         STX   $EC
         LDA   $EA
         LDX   $EC
         STX   $E4
         STA   $E2
         BRA   L01C2F8
L01C2D1  LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0006
         LDA   [$E2],Y
         TAX
         LDY   #$0004
         LDA   [$E2],Y
         JSL   L01BAE4
         BNE   L01C2EC
         BRA   L01C323
L01C2EC  LDA   $E2
         CLC
         ADC   #$0018
         STA   $E2
         BCC   L01C2F8
         INC   $E4
L01C2F8  LDAL  L01AB5D
         TAX
         LDAL  L01AB5B
         STA   $EA
         STX   $EC
         LDX   $EC
         LDA   #$0078
         CLC
         ADC   $EA
         BCC   L01C310
         INX
L01C310  PHX
         PHA
         LDX   $E4
         LDA   $E2
         JSL   L01BAE4
         BEQ   L01C323
         BVS   L01C321
         EOR   #$8000
L01C321  BMI   L01C2D1
L01C323  LDA   #$4006
         STA   $E8
L01C328  LDAL  L01AB5D
         TAX
         LDAL  L01AB5B
         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   L01BAE4
         BEQ   L01C35C
         BVS   L01C35A
         EOR   #$8000
L01C35A  BMI   L01C395
L01C35C  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   L01B822
         PLY
         PLY
         PLY
         PLY
         PLY
         STA   $E8
         LDA   $E8
         SEC
         SBC   #$0000
         BVS   L01C38F
         EOR   #$8000
L01C38F  BPL   L01C393
         BRA   L01C395
L01C393  BRA   L01C328
L01C395  LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F5
         LDA   $F3
         JSL   L01BAE4
         BEQ   L01C3D9
         LDAL  L01AB5D
         TAX
         LDAL  L01AB5B
         STA   $EA
         STX   $EC
         LDA   $EA
         LDX   $EC
         PHX
         PHA
         LDX   $E4
         LDA   $E2
         JSL   L01BAE4
         BEQ   L01C3CB
         BVS   L01C3C9
         EOR   #$8000
L01C3C9  BMI   L01C3D9
L01C3CB  LDX   $E4
         LDA   $E2
         LDY   #$0002
         PHA
         TXA
         STA   [$F3],Y
         PLA
         STA   [$F3]
L01C3D9  LDA   $E8
         AND   #$4000
         CMP   #$0000
         BNE   L01C3E7
         LDA   $E8
         BRA   L01C41B
L01C3E7  LDA   $E8
         STA   $E6
         LDA   $E6
         AND   #$8000
         TAY
         BEQ   L01C405
         LDA   $E6
         AND   #$BFFF
         STA   $E6
         LDA   $E6
         AND   #$7FFF
         STA   $E6
         STZ   $E8
         BRA   L01C40E
L01C405  LDA   $E8
         AND   #$BFFF
         STA   $E8
         STZ   $E6
L01C40E  PEI   $E6
         PEI   $E8
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
L01C41B  TAY
         TDC
         CLC
         ADC   #$00ED
         TCS
         TYA
         PLD
         RTL

L01C425  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F0
         TCS
         LDAL  L01AB55
         PHA
         LDA   #$0012
         SEC
         JSL   L01B1BD
         PLY
         SEC
         SBC   #$0001
         STA   $F2
         STZ   $F4
         BRA   L01C451
L01C448  PEI   $F4
         JSL   L01C191
         PLY
         INC   $F4
L01C451  LDA   $F4
         SEC
         SBC   $F2
         BEQ   L01C448
         BVS   L01C45D
         EOR   #$8000
L01C45D  BPL   L01C448
         TAY
         TDC
         CLC
         ADC   #$00F9
         TCS
         TYA
         PLD
         RTL

L01C469  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDA   L01C23E
         STA   $F2
         LDA   L01013C
         STA   $F0
         LDA   L01CB32
         BEQ   L01C492
         STZ   L01CB32
         PEA   ^L01C686
         PEA   L01C686
         JSL   L01C94A
         PLY
         PLY
L01C492  LDY   #$0010
         LDA   [$FD],Y
         AND   #$0004
         TAY
         BEQ   L01C4BB
         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   L01C5EC
L01C4BB  LDY   #$000E
         LDA   [$FD],Y
         CMP   #$0000
         BNE   L01C523
         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   L01C4ED
         LDA   #$0064
         LDY   #$000E
         STA   [$FD],Y
         BRA   L01C523
L01C4ED  PEA   $0000
         TDC
         CLC
         ADC   #$00EE
         PHA
         PEA   $6603
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   L01A54C
         PLY
         PLY
         PLY
         PLY
         SEC
         SBC   #$0000
         BVS   L01C510
         EOR   #$8000
L01C510  BPL   L01C51B
         LDA   $EE
         LDY   #$000E
         STA   [$FD],Y
         BRA   L01C523
L01C51B  LDA   #$0400
         LDY   #$000E
         STA   [$FD],Y
L01C523  LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   L01BAE4
         BEQ   L01C53F
         BRL   L01C5EC
L01C53F  LDY   #$000E
         LDA   [$FD],Y
         LDX   #$0000
         PHX
         PHA
         JSL   L01AE94
         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   L01BAE4
         BNE   L01C5B7
         LDY   #$000E
         LDA   [$FD],Y
         CMP   #$0064
         BEQ   L01C5B7
         BCC   L01C5B7
         LDY   #$000E
         LDA   [$FD],Y
         CMP   #$0400
         BEQ   L01C592
         BCC   L01C592
         LDA   #$0400
         BRA   L01C595
L01C592  LDA   #$0064
L01C595  LDY   #$000E
         STA   [$FD],Y
         LDY   #$000E
         LDA   [$FD],Y
         LDX   #$0000
         PHX
         PHA
         JSL   L01AE94
         PLY
         PLY
         LDY   #$0008
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0006
         STA   [$FD],Y
L01C5B7  LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   L01BAE4
         BEQ   L01C5DF
         LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0008
         LDY   #$0010
         STA   [$FD],Y
         BRA   L01C5EC
L01C5DF  LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0004
         LDY   #$0010
         STA   [$FD],Y
L01C5EC  LDY   #$000E
         LDA   [$FD],Y
         LDX   #$0000
         PHX
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         TAX
         LDY   #$0006
         LDA   [$FD],Y
         JSL   L01AFD8
         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   L01A54C
         PLY
         PLY
         PLY
         SEC
         SBC   #$0000
         BVS   L01C648
         EOR   #$8000
L01C648  BPL   L01C657
         LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0100
         LDY   #$0010
         STA   [$FD],Y
L01C657  LDA   $F2
         STA   L01C23E
         LDA   $F0
         STA   L01013C
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

L01C66B  ASC   '.console'00
L01C674  ASC   '.console'00
L01C67D  ASC   '.console'00
L01C686  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         LDA   #L01B3F9
         LDX   #^L01B3F9
         STX   $F6
         STA   $F4
         BRA   L01C6B3
L01C69D  PEI   $F6
         PEI   $F4
         JSL   L01AFE3
         PLY
         PLY
         LDA   $F4
         CLC
         ADC   #$0014
         STA   $F4
         BCC   L01C6B3
         INC   $F6
L01C6B3  SEC
         LDA   $F4
         SBC   L01ADBE
         BNE   L01C6C2
         LDA   $F6
         SBC   L01ADBE+2
         BRA   L01C6C9
L01C6C2  LDA   $F6
         SBC   L01ADBE+2
         REP   #$02
L01C6C9  BVS   L01C6CE
         EOR   #$8000
L01C6CE  BPL   L01C69D
         TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

L01C6DA  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   L01B322
         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   L01C72A
         LDA   #$0000
         BRA   L01C72F
L01C72A  LDY   #$000E
         LDA   [$FD],Y
L01C72F  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   L01B322
         PLA
         PLX
         PHA
         LDA   [$FD]
         SEC
         SBC   #$0000
         BVS   L01C75B
         EOR   #$8000
L01C75B  BMI   L01C762
         LDA   #$0000
         BRA   L01C764
L01C762  LDA   [$FD]
L01C764  PLX
         STX   $F4
         SEC
         SBC   $F4
         BEQ   L01C77D
         BVS   L01C771
         EOR   #$8000
L01C771  BPL   L01C77D
         PEI   $FF
         PEI   $FD
         JSL   L01ADC2
         PLY
         PLY
L01C77D  LDA   $EE
         SEC
         SBC   #$0000
         BEQ   L01C7B7
         BVS   L01C78A
         EOR   #$8000
L01C78A  BPL   L01C7B7
         LDA   $EE
         PHA
         PEI   $F2
         PEI   $F0
         LDY   #$0012
         LDA   [$FD],Y
         PHA
         JSL   L01CD83
         PLY
         PLY
         PLY
         PLY
         CMP   $EE
         BEQ   L01C7B7
         LDY   #$0010
         LDA   [$FD],Y
         ORA   #$0020
         LDY   #$0010
         STA   [$FD],Y
         LDA   #$FFFF
         BRA   L01C7BA
L01C7B7  LDA   #$0000
L01C7BA  TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

L01C7C4  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDX   $FF
         LDA   $FD
         STX   $F4
         ORA   $F4
         BEQ   L01C82D
         LDX   $FF
         LDA   $FD
         INC   $FD
         BNE   L01C7E3
         INC   $FF
L01C7E3  STX   $F0
         STA   $EE
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         STA   $F2
         BRA   L01C81D
L01C7F4  LDX   $FF
         LDA   $FD
         INC   $FD
         BNE   L01C7FE
         INC   $FF
L01C7FE  STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         PHA
         LDX   $F0
         LDA   $EE
         INC   $EE
         BNE   L01C812
         INC   $F0
L01C812  STA   $F4
         STX   $F6
         PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
L01C81D  LDA   $F2
         DEC   $F2
         TAY
         BNE   L01C7F4
         LDA   #$0000
         SEP   #$20
         STA   [$EE]
         REP   #$20
L01C82D  TDC
         CLC
         ADC   #$00F7
         TCS
         PLD
         RTL

L01C835  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F2
         TCS
         STZ   $F4
         LDA   $FF
         BRL   L01C92B
L01C847  BRL   L01C93E
L01C84A  LDA   #$0014
         STA   $F4
         BRL   L01C93E
L01C852  LDA   #$000E
         STA   $F4
         BRL   L01C93E
L01C85A  LDA   #$001C
         STA   $F4
         BRL   L01C93E
L01C862  LDA   #$0011
         STA   $F4
         BRL   L01C93E
L01C86A  LDA   #$0006
         STA   $F4
         BRL   L01C93E
L01C872  LDA   #$0006
         STA   $F4
         BRL   L01C93E
L01C87A  LDA   #$0010
         STA   $F4
         BRL   L01C93E
L01C882  LDA   #$0002
         STA   $F4
         BRL   L01C93E
L01C88A  LDA   #$0009
         STA   $F4
         BRL   L01C93E
L01C892  LDA   #$0005
         STA   $F4
         BRL   L01C93E
L01C89A  LDA   #$0017
         STA   $F4
         BRL   L01C93E
L01C8A2  LDA   #$000C
         STA   $F4
         BRL   L01C93E
L01C8AA  LDA   #$001A
         STA   $F4
         BRL   L01C93E
L01C8B2  LDA   #$0016
         STA   $F4
         BRL   L01C93E
L01C8BA  LDA   #$000D
         STA   $F4
         BRL   L01C93E
L01C8C2  LDA   #$001E
         STA   $F4
         BRL   L01C93E
         BRL   L01C93E
L01C8CD  DA    L01C847
         DA    L01C892
         DA    L01C8C2
         DA    L01C852
         DA    L01C89A
         DA    L01C88A
         DA    L01C882
         DA    L01C872
         DA    L01C882
         DA    L01C862
         DA    L01C85A
         DA    L01C85A
         DA    L01C84A
         DA    L01C86A
         DA    L01C872
         DA    L01C8BA
         DA    L01C8AA
         DA    L01C84A
         DA    L01C8B2
         DA    L01C8A2
         DA    L01C87A
         DA    L01C872
         DA    L01C872
         DA    L01C847
L01C8FD  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
L01C92B  TAX
         PEA   ^L01C8FD
         PEA   L01C8FD
         LDA   #$002C
         JSL   L01D830
         PLA
         PLA
         JMP   (L01C8CD,X)

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

L01C94A  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EE
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDAL  L01AB4F
         TAX
         LDAL  L01AB4D
         JSL   L01BAE4
         BNE   L01C97D
         LDA   #L01CAEE
         LDX   #^L01CAEE
         PHA
         TXA
         STAL  L01AB4F
         PLA
         STAL  L01AB4D
L01C97D  LDAL  L01AB51+2
         TAX
         LDAL  L01AB51
         STA   $F4
         STX   $F6
         LDX   $F6
         LDA   #$0010
         CLC
         ADC   $F4
         BCC   L01C995
         INX
L01C995  STX   $F2
         STA   $F0
         BRA   L01C9D0
L01C99B  LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDY   #$0002
         LDA   [$F0],Y
         TAX
         LDA   [$F0]
         JSL   L01BAE4
         BNE   L01C9C4
         LDX   $FF
         LDA   $FD
         LDY   #$0002
         PHA
         TXA
         STA   [$F0],Y
         PLA
         STA   [$F0]
         LDA   #$0000
         BRA   L01C9FE
L01C9C4  LDA   $F0
         CLC
         ADC   #$0004
         STA   $F0
         BCC   L01C9D0
         INC   $F2
L01C9D0  LDAL  L01AB51+2
         TAX
         LDAL  L01AB51
         STA   $F4
         STX   $F6
         LDX   $F6
         LDA   #$0028
         CLC
         ADC   $F4
         BCC   L01C9E8
         INX
L01C9E8  PHX
         PHA
         LDX   $F2
         LDA   $F0
         JSL   L01BAE4
         BEQ   L01C9FB
         BVS   L01C9F9
         EOR   #$8000
L01C9F9  BMI   L01C99B
L01C9FB  LDA   #$0001
L01C9FE  TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

L01CA08  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E8
         TCS
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   L01CA1E
         EOR   #$8000
L01CA1E  BMI   L01CA32
         PEA   $0000
         PEA   $0016
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
         BRL   L01CAE4
L01CA32  PEA   $0000
         TDC
         CLC
         ADC   #$00F9
         PHA
         JSL   L01BB69
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         JSL   L01BAE4
         BNE   L01CA5D
         LDA   #$FFFF
         BRL   L01CAE4
L01CA5D  LDA   [$EC]
         AND   #$0001
         TAY
         BNE   L01CA76
         PEA   $0000
         PEA   $0009
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
         BRA   L01CAE4
L01CA76  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   L01B822
         PLY
         PLY
         STA   $EA
         LDA   $EA
         CMP   #$0000
         BEQ   L01CAD6
         LDY   #$0002
         LDA   [$EC],Y
         PHA
         PEI   $EA
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
         BRA   L01CAE4
L01CAD6  LDY   #$000C
         LDA   [$EC],Y
         PHA
         LDA   $FF
         PLX
         STX   $F0
         SEC
         SBC   $F0
L01CAE4  TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

L01CAEE  DW    $0000
         DW    $FFFF
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
         ADRL  L01D2D4
L01CB32  DW    $0001
L01CB34  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   L01BAE4
         BEQ   L01CBD8
         PHX
         PHA
         PEI   $FB
         PEI   $F9
         _FindHandle
         STAL  L01013C
         PLA
         PLX
         STX   $EE
         STA   $EC
         PHX
         PHA
         PEI   $EE
         PEI   $EC
         _GetHandleSize
         STAL  L01013C
         PLA
         PLX
         STX   $EA
         STA   $E8
         SEC
         LDA   $FD
         SBC   $E8
         BNE   L01CB94
         LDA   $FF
         SBC   $EA
         BRA   L01CB9A
L01CB94  LDA   $FF
         SBC   $EA
         REP   #$02
L01CB9A  BVS   L01CB9F
         EOR   #$8000
L01CB9F  BMI   L01CBC9
         PEI   $EE
         PEI   $EC
         PEI   $FF
         PEI   $FD
         _SetHandleSize
         STAL  L01013C
         LDY   #$0002
         LDA   [$EC],Y
         TAX
         LDA   [$EC]
         AND   #$FFFF
         PHA
         TXA
         AND   #$00FF
         TAX
         PLA
         BRL   L01CCE9
L01CBC9  PEI   $EE
         PEI   $EC
         _HUnlock
         STAL  L01013C
L01CBD8  PHX
         PHA
         LDX   $FF
         LDA   $FD
         PHX
         PHA
         LDA   L01013E
         ORA   #$0F00
         PHA
         PEA   $8300
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L01013C
         PLA
         PLX
         STX   $E6
         STA   $E4
         LDA   L01013C
         BEQ   L01CC30
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         JSL   L01BAE4
         BEQ   L01CC27
         PEI   $EE
         PEI   $EC
         _HLock
         STAL  L01013C
L01CC27  LDX   #$0000
         LDA   #$0000
         BRL   L01CCE9
L01CC30  PEI   $E6
         PEI   $E4
         _HLock
         STAL  L01013C
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $FB
         LDA   $F9
         JSL   L01BAE4
         BEQ   L01CC83
         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  L01013C
         PEI   $EE
         PEI   $EC
         _DisposeHandle
         STAL  L01013C
L01CC83  LDX   $EA
         LDA   $E8
         PHX
         PHA
         LDY   #$0002
         LDA   [$E4],Y
         TAX
         LDA   [$E4]
         JSL   L01AFD8
         PLA
         PLX
         STX   $E2
         STA   $E0
L01CC9B  LDX   $FF
         LDA   $FD
         PHX
         PHA
         LDY   #$0002
         LDA   [$E4],Y
         TAX
         LDA   [$E4]
         JSL   L01AFD8
         LDX   $E2
         LDA   $E0
         JSL   L01BAE4
         BEQ   L01CCD7
         BVS   L01CCBC
         EOR   #$8000
L01CCBC  BPL   L01CCD7
         LDX   $E2
         LDA   $E0
         INC   $E0
         BNE   L01CCC8
         INC   $E2
L01CCC8  STA   $F0
         STX   $F2
         LDA   #$0000
         SEP   #$20
         STA   [$F0]
         REP   #$20
         BRA   L01CC9B
L01CCD7  LDY   #$0002
         LDA   [$E4],Y
         TAX
         LDA   [$E4]
         AND   #$FFFF
         PHA
         TXA
         AND   #$00FF
         TAX
         PLA
L01CCE9  TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

L01CCF3  ASC   'SYSF'
         ADRL  L01DB2F
         ADRL  L01CE81
         ADRL  L01D97A
         ADRL  L01D4AB
         ADRL  L01CF2C
         ASC   'SNOC'
         ADRL  L01DAD0
         ADRL  L01CD6B
         ADRL  L01D885
         ADRL  L01D34C
         ADRL  L01CE69
         ASC   'TSYS'
         ADRL  L01DCB5
         ADRL  L01D493
         ADRL  L01DAB8
         ADRL  L01D7E4
         ADRL  L01D679
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
         DB    $00
L01CD6B  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F6
         TCS
         LDA   #$0000
         TAY
         TDC
         CLC
         ADC   #$00FB
         TCS
         TYA
         PLD
         RTL

L01CD83  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E8
         TCS
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   L01CD99
         EOR   #$8000
L01CD99  BMI   L01CDAD
         PEA   $0000
         PEA   $0016
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
         BRL   L01CE5F
L01CDAD  PEA   $0000
         TDC
         CLC
         ADC   #$00F9
         PHA
         JSL   L01BB69
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         JSL   L01BAE4
         BNE   L01CDD8
         LDA   #$FFFF
         BRL   L01CE5F
L01CDD8  LDA   [$EC]
         AND   #$0002
         TAY
         BNE   L01CDF1
         PEA   $0000
         PEA   $0009
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
         BRA   L01CE5F
L01CDF1  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   L01B822
         PLY
         PLY
         STA   $EA
         LDA   $EA
         CMP   #$0000
         BEQ   L01CE51
         LDY   #$0002
         LDA   [$EC],Y
         PHA
         PEI   $EA
         JSL   L01BE38
         PLY
         PLY
         LDA   #$FFFF
         BRA   L01CE5F
L01CE51  LDY   #$000C
         LDA   [$EC],Y
         PHA
         LDA   $FF
         PLX
         STX   $F0
         SEC
         SBC   $F0
L01CE5F  TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

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

L01CE81  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   L01CEB9
         BVS   L01CEB7
         EOR   #$8000
L01CEB7  BMI   L01CF12
L01CEB9  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  L01B93B
         PEA   $0014
         PEA   ^L01B93B
         PEA   L01B93B
         JSL   L01B7E4
         LDA   L01013C
         CMP   #$0000
         BEQ   L01CEFA
         LDA   L01013C
         LDY   #$0002
         STA   [$FD],Y
L01CEFA  LDY   #$000A
         LDA   [$FD],Y
         TAX
         LDY   #$0008
         LDA   [$FD],Y
         PHX
         PHA
         _DisposeHandle
         STAL  L01013C
L01CF12  LDA   L01013C
         CMP   #$0000
         BNE   L01CF1F
         LDA   #$0000
         BRA   L01CF22
L01CF1F  LDA   #$0009
L01CF22  TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

L01CF2C  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E8
         TCS
         LDA   $FB
         BRL   L01D299
L01CF3C  LDA   #$0000
         LDY   #$0002
         STA   [$F7],Y
         LDA   #$0016
         BRL   L01D2CA
L01CF4A  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  L01B94F
         PEA   $0019
         PEA   ^L01B94F
         PEA   L01B94F
         JSL   L01B7E4
         LDA   L01013C
         CMP   #$0000
         BEQ   L01CF8D
         LDA   #$001D
         BRL   L01D2CA
L01CF8D  LDA   $EC
         STAL  L01B949
         LDA   [$FD]
         BRL   L01D036
L01CF98  LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHA
         TXA
         STAL  L01B94D
         PLA
         STAL  L01B94B
         BRL   L01D043
L01CFB1  PEA   $0017
         PEA   ^L01B949
         PEA   L01B949
         JSL   L01B7E4
         LDA   L01013C
         CMP   #$0000
         BEQ   L01CFC9
         BRL   L01D043
L01CFC9  LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         LDAL  L01B94D
         TAX
         LDAL  L01B94B
         JSL   L01AFD8
         PLA
         PLX
         PHA
         TXA
         STAL  L01B94D
         PLA
         STAL  L01B94B
         BRL   L01D043
L01CFF3  LDY   #$0004
         LDA   [$FD],Y
         TAX
         LDY   #$0002
         LDA   [$FD],Y
         PHX
         PHA
         LDAL  L01B953
         TAX
         LDAL  L01B951
         JSL   L01AFD8
         PLA
         PLX
         PHA
         TXA
         STAL  L01B94D
         PLA
         STAL  L01B94B
         BRL   L01D043
L01D01D  LDA   #$0000
         LDY   #$0002
         STA   [$F7],Y
         LDA   #$0016
         BRL   L01D2CA
         BRL   L01D043
L01D02E  DA    L01CF98
         DA    L01CFB1
         DA    L01CFF3
         DA    L01D01D
L01D036  CMP   #$0003
         BCC   L01D03E
         LDA   #$0003
L01D03E  ASL
         TAX
         JMP   (L01D02E,X)

L01D043  LDA   L01013C
         CMP   #$0000
         BEQ   L01D055
         LDA   [$FD]
         CMP   #$0000
         BEQ   L01D055
         BRL   L01D0E7
L01D055  SEC
         LDAL  L01B94B
         SBCL  L01B951
         BNE   L01D06A
         LDAL  L01B94D
         SBCL  L01B953
         BRA   L01D074
L01D06A  LDAL  L01B94D
         SBCL  L01B953
         REP   #$02
L01D074  BNE   L01D079
         BRL   L01D0DA
L01D079  BVS   L01D07E
         EOR   #$8000
L01D07E  BMI   L01D083
         BRL   L01D0DA
L01D083  LDA   [$FD]
         CMP   #$0002
         BEQ   L01D0AB
         LDA   $EC
         STAL  L01B94F
         PEA   $0019
         PEA   ^L01B94F
         PEA   L01B94F
         JSL   L01B7E4
         LDA   L01013C
         CMP   #$0000
         BEQ   L01D0AB
         LDA   #$001D
         BRL   L01D2CA
L01D0AB  LDAL  L01B94D
         TAX
         LDAL  L01B94B
         PHA
         TXA
         STAL  L01B953
         PLA
         STAL  L01B951
         PEA   $0018
         PEA   ^L01B94F
         PEA   L01B94F
         JSL   L01B7E4
         LDA   L01013C
         CMP   #$0000
         BEQ   L01D0DA
         LDA   #$001D
         BRL   L01D2CA
L01D0DA  PEA   $0016
         PEA   ^L01B949
         PEA   L01B949
         JSL   L01B7E4
L01D0E7  LDA   L01013C
         CMP   #$0000
         BEQ   L01D0FD
         LDA   L01013C
         LDY   #$0002
         STA   [$F7],Y
         LDA   #$001D
         BRL   L01D2CA
L01D0FD  LDAL  L01B94D
         TAX
         LDAL  L01B94B
         LDY   #$0004
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0002
         STA   [$FD],Y
         BRL   L01D2AA
L01D116  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   L01D2AA
L01D139  LDA   #$0000
         LDY   #$0002
         STA   [$F7],Y
         LDA   #$0016
         BRL   L01D2CA
L01D147  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   L01D2AA
L01D16C  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  L01B94F
         PEA   $0019
         PEA   ^L01B94F
         PEA   L01B94F
         JSL   L01B7E4
         LDAL  L01B953
         TAX
         LDAL  L01B951
         LDY   #$0002
         PHA
         TXA
         STA   [$FD],Y
         PLA
         STA   [$FD]
         BRL   L01D2AA
L01D1B3  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  L01B94F
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  L01B953
         PLA
         STAL  L01B951
         PEA   $0018
         PEA   ^L01B94F
         PEA   L01B94F
         JSL   L01B7E4
         BRL   L01D2AA
L01D1F6  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  L01B949
         PEA   $0017
         PEA   ^L01B949
         PEA   L01B949
         JSL   L01B7E4
         LDAL  L01B94D
         TAX
         LDAL  L01B94B
         LDY   #$0002
         PHA
         TXA
         STA   [$FD],Y
         PLA
         STA   [$FD]
         BRL   L01D2AA
L01D23D  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  L01B949
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  L01B94D
         PLA
         STAL  L01B94B
         PEA   $0016
         PEA   ^L01B949
         PEA   L01B949
         JSL   L01B7E4
         BRL   L01D2AA
         BRL   L01D2AA
L01D283  DA    L01CF4A
         DA    L01D116
         DA    L01CF3C
         DA    L01D139
         DA    L01CF3C
         DA    L01D147
         DA    L01D1B3
         DA    L01D16C
         DA    L01D23D
         DA    L01D1F6
         DA    L01CF3C
L01D299  SEC
         SBC   #$6600
         CMP   #$000A
         BCC   L01D2A5
         LDA   #$000A
L01D2A5  ASL
         TAX
         JMP   (L01D283,X)

L01D2AA  LDA   L01013C
         CMP   #$0000
         BEQ   L01D2BA
         LDA   L01013C
         LDY   #$0002
         STA   [$F7],Y
L01D2BA  LDA   L01013C
         CMP   #$0000
         BNE   L01D2C7
         LDA   #$0000
         BRA   L01D2CA
L01D2C7  LDA   #$0016
L01D2CA  TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

L01D2D4  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EE
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDAL  L01AB4F
         TAX
         LDAL  L01AB4D
         JSL   L01BAE4
         BNE   L01D307
         LDA   #L01CAEE
         LDX   #^L01CAEE
         PHA
         TXA
         STAL  L01AB4F
         PLA
         STAL  L01AB4D
L01D307  LDAL  L01AB4F
         TAX
         LDAL  L01AB4D
         STA   $F2
         STX   $F4
         LDA   #$0000
         LDY   #$0002
         STA   [$F2],Y
         LDA   #$0001
         STA   $F0
         BRA   L01D32A
L01D323  LDA   $FB
         LSR
         STA   $FB
         INC   $F0
L01D32A  LDA   $FB
         AND   #$0001
         CMP   #$0000
         BEQ   L01D323
         LDA   $F0
         PHA
         LDA   #$0018
         CLC
         JSL   L01D876
         JSL   L01B732
         PLY
         TDC
         CLC
         ADC   #$00F5
         TCS
         PLD
         RTL

L01D34C  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   L01D3E8
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         PHX
         PHA
         PEA   $0000
         LDY   #$000C
         LDA   [$FD],Y
         PHA
         _ErrWriteBlock
         STAL  L01013C
         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   L01D3BC
         DEC   $F6
L01D3BC  CLC
         ADC   $F4
         STA   $F4
         BCC   L01D3C5
         INC   $F6
L01D3C5  LDA   [$F4]
         AND   #$00FF
         CMP   #$000A
         BNE   L01D3E6
         PEA   ^L01D6E0
         PEA   L01D6E0
         PEA   $0000
         PEA   $0001
         _ErrWriteBlock
         STAL  L01013C
L01D3E6  BRA   L01D452
L01D3E8  LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         PHX
         PHA
         PEA   $0000
         LDY   #$000C
         LDA   [$FD],Y
         PHA
         _TextWriteBlock
         STAL  L01013C
         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   L01D428
         DEC   $F6
L01D428  CLC
         ADC   $F4
         STA   $F4
         BCC   L01D431
         INC   $F6
L01D431  LDA   [$F4]
         AND   #$00FF
         CMP   #$000A
         BNE   L01D452
         PEA   ^L01D6E2
         PEA   L01D6E2
         PEA   $0000
         PEA   $0001
         _TextWriteBlock
         STAL  L01013C
L01D452  LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   L01D45E
         DEX
L01D45E  PHX
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         JSL   L01AFD8
         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

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

L01D4AB  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDA   [$FD]
         AND   #$0008
         TAY
         BNE   L01D4C1
         BRL   L01D558
L01D4C1  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  L01B94F
         PEA   $0019
         PEA   ^L01B94F
         PEA   L01B94F
         JSL   L01B7E4
         LDA   L01013C
         CMP   #$0000
         BEQ   L01D4FD
         BRL   L01D558
L01D4FD  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  L01B949
         LDAL  L01B953
         TAX
         LDAL  L01B951
         PHA
         TXA
         STAL  L01B94D
         PLA
         STAL  L01B94B
         PEA   $0016
         PEA   ^L01B949
         PEA   L01B949
         JSL   L01B7E4
         LDA   L01013C
         CMP   #$0000
         BEQ   L01D558
         LDA   L01013C
         LDY   #$0002
         STA   [$FD],Y
         LDA   #$001D
         BRL   L01D66F
L01D558  LDA   [$FD]
         AND   #$0020
         TAY
         BNE   L01D5A8
         LDY   #$000C
         LDA   [$FD],Y
         STA   $F2
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         STX   $F0
         STA   $EE
         BRA   L01D599
L01D578  LDA   [$EE]
         AND   #$00FF
         CMP   #$000A
         BNE   L01D58B
         LDA   #$000D
         SEP   #$20
         STA   [$EE]
         REP   #$20
L01D58B  LDA   $F2
         DEC   $F2
         LDX   $F0
         LDA   $EE
         INC   $EE
         BNE   L01D599
         INC   $F0
L01D599  LDA   $F2
         SEC
         SBC   #$0000
         BEQ   L01D5A8
         BVS   L01D5A6
         EOR   #$8000
L01D5A6  BMI   L01D578
L01D5A8  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  L01B93B
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   L01D5D8
         DEX
L01D5D8  PHA
         TXA
         STAL  L01B943
         PLA
         STAL  L01B941
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         PHA
         TXA
         STAL  L01B93F
         PLA
         STAL  L01B93D
         PEA   $0013
         PEA   ^L01B93B
         PEA   L01B93B
         JSL   L01B7E4
         LDA   L01013C
         CMP   #$0000
         BNE   L01D657
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   L01D61A
         DEX
L01D61A  SEC
         SBCL  L01B945
         PHA
         TXA
         SBCL  L01B947
         TAX
         PLA
         LDY   #$000C
         STA   [$FD],Y
         LDAL  L01B947
         TAX
         LDAL  L01B945
         PHX
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         JSL   L01AFD8
         PLA
         PLX
         LDY   #$0010
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$000E
         STA   [$FD],Y
         BRA   L01D65F
L01D657  LDA   L01013C
         LDY   #$0002
         STA   [$FD],Y
L01D65F  LDA   L01013C
         CMP   #$0000
         BNE   L01D66C
         LDA   #$0000
         BRA   L01D66F
L01D66C  LDA   #$0005
L01D66F  TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

L01D679  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EC
         TCS
         LDA   $FB
         BRL   L01D6BC
L01D689  LDA   #$0000
         STA   [$FD]
         LDX   #$0000
         LDA   #$0000
         LDY   #$0004
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$0002
         STA   [$FD],Y
         LDA   #$0000
         BRL   L01D6CD
L01D6A7  LDA   #$0000
         BRL   L01D6CD
L01D6AD  LDA   #$0016
         BRL   L01D6CD
         BRL   L01D6CD
L01D6B6  DA    L01D689
         DA    L01D6A7
         DA    L01D6AD
L01D6BC  SEC
         SBC   #$6600
         CMP   #$0002
         BCC   L01D6C8
         LDA   #$0002
L01D6C8  ASL
         TAX
         JMP   (L01D6B6,X)

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

L01D6D7  ASC   '.console'00
L01D6E0  ASC   0D00
L01D6E2  ASC   0D00
L01D6E4  DS    $100
L01D7E4  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   L01D7FB
         DEX
L01D7FB  PHX
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         JSL   L01AFD8
         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

L01D830  TAY
         PHB
         LDA   $06,S
         PHA
         PLB
         PLB
         PHY
         PHY
         PEA   $0000
         TXA
         CMP   ($0B,S),Y
         BEQ   L01D870
         LDY   #$0000
         CMP   ($0B,S),Y
         BEQ   L01D870
         BRA   L01D84D
L01D84A  TYA
         STA   $03,S
L01D84D  LDA   $03,S
         CMP   $01,S
         BEQ   L01D86B
         CLC
         ADC   $01,S
         LSR
         AND   #$00FE
         CMP   $01,S
         BEQ   L01D86B
         TAY
         TXA
         CMP   ($0B,S),Y
         BEQ   L01D870
         BCC   L01D84A
         TYA
         STA   $01,S
         BRA   L01D84D
L01D86B  LDA   $05,S
         INC
         INC
         TAY
L01D870  TYX
         PLA
         PLA
         PLA
         PLB
         RTL

L01D876  CMP   #$0000
         BEQ   L01D884
         TAX
         LDA   $04,S
L01D87E  ASL
         DEX
         BNE   L01D87E
         STA   $04,S
L01D884  RTL

L01D885  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F2
         TCS
         LDA   L01DCAF
         SEC
         SBC   #$0000
         BEQ   L01D8A0
         BVS   L01D89E
         EOR   #$8000
L01D89E  BMI   L01D8BF
L01D8A0  PEA   $0100
         PEA   ^L01D6E4
         PEA   L01D6E4
         JSL   L01DE5F
         PLY
         PLY
         PLY
         STA   L01DCAF
         LDA   #L01D6E4
         LDX   #^L01D6E4
         STX   L01DCB3
         STA   L01DCB1
L01D8BF  LDY   #$000C
         LDA   [$FD],Y
         SEC
         SBC   #$0000
         BNE   L01D8CD
         BRL   L01D96D
L01D8CD  BVS   L01D8D2
         EOR   #$8000
L01D8D2  BMI   L01D8D7
         BRL   L01D96D
L01D8D7  LDA   L01DCAF
         SEC
         SBC   #$0000
         BNE   L01D8E3
         BRL   L01D96D
L01D8E3  BVS   L01D8E8
         EOR   #$8000
L01D8E8  BMI   L01D8ED
         BRL   L01D96D
L01D8ED  LDX   L01DCB3
         LDA   L01DCB1
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         CMP   #$0000
         BNE   L01D904
         BRL   L01D96D
L01D904  LDX   L01DCB3
         LDA   L01DCB1
         PHX
         PHA
         CLC
         ADC   #$0001
         STA   L01DCB1
         LDA   L01DCB3
         BCC   L01D919
         INC
L01D919  STA   L01DCB3
         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   L01D946
         INC
L01D946  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   L01DCAF
         DEC
         STA   L01DCAF
         BRL   L01D8BF
L01D96D  LDA   #$0000
         TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

L01D97A  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  L01B93B
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   L01D9B5
         DEX
L01D9B5  PHA
         TXA
         STAL  L01B943
         PLA
         STAL  L01B941
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         PHA
         TXA
         STAL  L01B93F
         PLA
         STAL  L01B93D
         PEA   $0012
         PEA   ^L01B93B
         PEA   L01B93B
         JSL   L01B7E4
         LDA   [$FD]
         AND   #$0020
         TAY
         BNE   L01DA37
         LDAL  L01B947
         TAX
         LDAL  L01B945
         STA   $F0
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         STX   $EE
         STA   $EC
         BRA   L01DA28
L01DA07  LDA   [$EC]
         AND   #$00FF
         CMP   #$000D
         BNE   L01DA1A
         LDA   #$000A
         SEP   #$20
         STA   [$EC]
         REP   #$20
L01DA1A  LDA   $F0
         DEC   $F0
         LDX   $EE
         LDA   $EC
         INC   $EC
         BNE   L01DA28
         INC   $EE
L01DA28  LDA   $F0
         SEC
         SBC   #$0000
         BEQ   L01DA37
         BVS   L01DA35
         EOR   #$8000
L01DA35  BMI   L01DA07
L01DA37  LDA   L01013C
         CMP   #$004C
         BNE   L01DA43
         STZ   $F2
         BRA   L01DA48
L01DA43  LDA   L01013C
         STA   $F2
L01DA48  LDA   $F2
         CMP   #$0000
         BNE   L01DA98
         LDY   #$000C
         LDA   [$FD],Y
         LDX   #$0000
         TAY
         BPL   L01DA5B
         DEX
L01DA5B  SEC
         SBCL  L01B945
         PHA
         TXA
         SBCL  L01B947
         TAX
         PLA
         LDY   #$000C
         STA   [$FD],Y
         LDAL  L01B947
         TAX
         LDAL  L01B945
         PHX
         PHA
         LDY   #$0010
         LDA   [$FD],Y
         TAX
         LDY   #$000E
         LDA   [$FD],Y
         JSL   L01AFD8
         PLA
         PLX
         LDY   #$0010
         PHA
         TXA
         STA   [$FD],Y
         PLA
         LDY   #$000E
         STA   [$FD],Y
         BRA   L01DA9F
L01DA98  LDA   $F2
         LDY   #$0002
         STA   [$FD],Y
L01DA9F  LDA   $F2
         CMP   #$0000
         BNE   L01DAAB
         LDA   #$0000
         BRA   L01DAAE
L01DAAB  LDA   #$0005
L01DAAE  TAY
         TDC
         CLC
         ADC   #$00F7
         TCS
         TYA
         PLD
         RTL

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

L01DAD0  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EC
         TCS
         LDA   #$0000
         BEQ   L01DAE5
         LDA   #$0000
         BRA   L01DAE8
L01DAE5  LDA   #$0001
L01DAE8  PHA
         PEA   $0000
         PEA   ^L01D6D7
         PEA   L01D6D7
         PEI   $F9
         PEI   $F7
         JSL   L01AEE6
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BNE   L01DB0B
         LDA   #$FFFF
         BRL   L01DB25
L01DB0B  LDA   $FB
         BRL   L01DB1D
L01DB10  LDA   #$4016
         BRL   L01DB25
L01DB16  LDA   #$0000
         BRA   L01DB25
         BRA   L01DB25
L01DB1D  CMP   #$6400
         BEQ   L01DB16
         JMP   L01DB10

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

L01DB2F  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EC
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $F9
         LDA   $F7
         JSL   L01BAE4
         BEQ   L01DB56
         LDA   [$F7]
         AND   #$00FF
         CMP   #$0000
         BNE   L01DB5C
L01DB56  LDA   #$4016
         BRL   L01DCA5
L01DB5C  LDA   $FB
         BRL   L01DC72
L01DB61  LDA   #$4016
         BRL   L01DCA5
L01DB67  PEI   $F9
         PEI   $F7
         PEI   $FF
         PEI   $FD
         JSL   L01DFBF
         PLY
         PLY
         PLY
         PLY
         BRL   L01DCA5
L01DB7A  PEI   $F9
         PEI   $F7
         JSL   L01AE2E
         PLY
         PLY
         LDX   $F9
         LDA   $F7
         PHA
         TXA
         STAL  L01B911
         PLA
         STAL  L01B90F
         PEA   $0002
         PEA   ^L01B90F
         PEA   L01B90F
         JSL   L01B7E4
         PEI   $F9
         PEI   $F7
         JSL   L01C7C4
         PLY
         PLY
         BRL   L01DC83
L01DBAD  PEI   $F9
         PEI   $F7
         JSL   L01AE2E
         PLY
         PLY
         PEI   $FF
         PEI   $FD
         JSL   L01AE2E
         PLY
         PLY
         LDX   $F9
         LDA   $F7
         PHA
         TXA
         STAL  L01B911
         PLA
         STAL  L01B90F
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  L01B915
         PLA
         STAL  L01B913
         PEA   $0004
         PEA   ^L01B90F
         PEA   L01B90F
         JSL   L01B7E4
         PEI   $F9
         PEI   $F7
         JSL   L01C7C4
         PLY
         PLY
         PEI   $FF
         PEI   $FD
         JSL   L01C7C4
         PLY
         PLY
         BRL   L01DC83
L01DC03  PEI   $F9
         PEI   $F7
         JSL   L01AE2E
         PLY
         PLY
         LDX   $F9
         LDA   $F7
         PHA
         TXA
         STAL  L01B919
         PLA
         STAL  L01B917
         PEA   $0006
         PEA   ^L01B917
         PEA   L01B917
         JSL   L01B7E4
         LDA   $FB
         CMP   #$6403
         BNE   L01DC3A
         LDX   $FF
         LDA   $FD
         STAL  L01B91D
         BRA   L01DC49
L01DC3A  LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  L01B921
         PLA
         STAL  L01B91F
L01DC49  PEA   $0005
         PEA   ^L01B917
         PEA   L01B917
         JSL   L01B7E4
         PEI   $F9
         PEI   $F7
         JSL   L01C7C4
         PLY
         PLY
         BRL   L01DC83
         BRL   L01DC83
L01DC66  DA    L01DB67
         DA    L01DB7A
         DA    L01DBAD
         DA    L01DC03
         DA    L01DC03
         DA    L01DB61
L01DC72  SEC
         SBC   #$6400
         CMP   #$0005
         BCC   L01DC7E
         LDA   #$0005
L01DC7E  ASL
         TAX
         JMP   (L01DC66,X)

L01DC83  LDA   L01013C
         CMP   #$0000
         BNE   L01DC90
         LDA   #$0000
         BRA   L01DCA5
L01DC90  LDA   L01013C
         PHA
         LDA   #$8000
         PLX
         STX   $EE
         ORA   $EE
         PHA
         LDA   #$4000
         PLX
         STX   $EE
         ORA   $EE
L01DCA5  TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

L01DCAF  DW    $0000
L01DCB1  DW    $0000
L01DCB3  DW    $0000
L01DCB5  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E6
         TCS
         LDA   #$0000
         BEQ   L01DCCA
         LDA   #$0000
         BRA   L01DCCD
L01DCCA  LDA   #$0001
L01DCCD  PHA
         PEA   $0000
         PEA   ^L01DFA2
         PEA   L01DFA2
         PEI   $F9
         PEI   $F7
         JSL   L01AEE6
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BEQ   L01DCF0
         LDA   #$0000
         BRL   L01DE55
L01DCF0  LDA   #$0000
         BEQ   L01DCFA
         LDA   #$0000
         BRA   L01DCFD
L01DCFA  LDA   #$0001
L01DCFD  PHA
         PEA   $0000
         PEA   ^L01DFA8
         PEA   L01DFA8
         PEI   $F9
         PEI   $F7
         JSL   L01AEE6
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BEQ   L01DD1F
         STZ   $EC
         BRL   L01DD87
L01DD1F  LDA   #$0000
         BEQ   L01DD29
         LDA   #$0000
         BRA   L01DD2C
L01DD29  LDA   #$0001
L01DD2C  PHA
         PEA   $0000
         PEA   ^L01DFAF
         PEA   L01DFAF
         PEI   $F9
         PEI   $F7
         JSL   L01AEE6
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BEQ   L01DD50
         LDA   #$0001
         STA   $EC
         BRA   L01DD87
L01DD50  LDA   #$0000
         BEQ   L01DD5A
         LDA   #$0000
         BRA   L01DD5D
L01DD5A  LDA   #$0001
L01DD5D  PHA
         PEA   $0000
         PEA   ^L01DFB7
         PEA   L01DFB7
         PEI   $F9
         PEI   $F7
         JSL   L01AEE6
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BEQ   L01DD81
         LDA   #$0002
         STA   $EC
         BRA   L01DD87
L01DD81  LDA   #$FFFF
         BRL   L01DE55
L01DD87  LDA   $FB
         CMP   #$6400
         BEQ   L01DD94
         LDA   #$4016
         BRL   L01DE55
L01DD94  LDA   [$FD]
         AND   #$0500
         CMP   #$0500
         BNE   L01DDA4
         LDA   #$4011
         BRL   L01DE55
L01DDA4  PEA   $0000
         TDC
         CLC
         ADC   #$00EC
         PHA
         JSL   L01BB69
         PLY
         PLY
         STX   $EA
         STA   $E8
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDX   $EA
         LDA   $E8
         JSL   L01BAE4
         BNE   L01DDCF
         LDA   #$4009
         BRL   L01DE55
L01DDCF  LDA   [$FD]
         PHA
         LDA   [$E8]
         PLX
         STX   $EE
         AND   $EE
         AND   #$0003
         PHA
         LDA   [$FD]
         AND   #$0003
         PLX
         STX   $EE
         CMP   $EE
         BEQ   L01DDEE
         LDA   #$400D
         BRA   L01DE55
L01DDEE  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   L01B822
         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
L01DE55  TAY
         TDC
         CLC
         ADC   #$00F1
         TCS
         TYA
         PLD
         RTL

L01DE5F  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00ED
         TCS
         STZ   $F0
L01DE6C  LDA   $F0
         SEC
         SBC   $FF
         BVS   L01DE76
         EOR   #$8000
L01DE76  BPL   L01DE7B
         BRL   L01DF96
L01DE7B  PHA
         PEA   $0001
         _ReadChar
         STAL  L01013C
         PLA
         SEP   #$20
         STA   $EF
         REP   #$20
         AND   #$00FF
         PHA
         LDX   $FD
         LDA   $FB
         INC   $FB
         BNE   L01DE9F
         INC   $FD
L01DE9F  STA   $F2
         STX   $F4
         PLA
         SEP   #$20
         STA   [$F2]
         REP   #$20
         INC   $F0
         LDA   $EF
         AND   #$00FF
         CMP   #$000D
         BNE   L01DEE6
         LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDX   $FD
         LDA   $FB
         JSL   L01B322
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$000A
         SEP   #$20
         STA   [$F2]
         REP   #$20
         PEA   $000A
         _WriteChar
         STAL  L01013C
         BRL   L01DF96
L01DEE6  LDA   $EF
         AND   #$00FF
         CMP   #$0000
         BNE   L01DF0F
         PEA   $000D
         _WriteChar
         STAL  L01013C
         PEA   $000A
         _WriteChar
         STAL  L01013C
         BRL   L01DF96
L01DF0F  LDA   $EF
         AND   #$00FF
         CMP   #$007F
         BEQ   L01DF1C
         BRL   L01DF93
L01DF1C  LDA   $FB
         BNE   L01DF22
         DEC   $FD
L01DF22  DEC   $FB
         DEC   $F0
         PEA   $0008
         _WriteChar
         STAL  L01013C
         PEA   $0020
         _WriteChar
         STAL  L01013C
         PEA   $0008
         _WriteChar
         STAL  L01013C
         LDA   $F0
         SEC
         SBC   #$0000
         BEQ   L01DF93
         BVS   L01DF5D
         EOR   #$8000
L01DF5D  BPL   L01DF93
         LDA   $FB
         BNE   L01DF65
         DEC   $FD
L01DF65  DEC   $FB
         DEC   $F0
         PEA   $0008
         _WriteChar
         STAL  L01013C
         PEA   $0020
         _WriteChar
         STAL  L01013C
         PEA   $0008
         _WriteChar
         STAL  L01013C
L01DF93  BRL   L01DE6C
L01DF96  LDA   $F0
         TAY
         TDC
         CLC
         ADC   #$00F5
         TCS
         TYA
         PLD
         RTL

L01DFA2  ASC   '.null'00
L01DFA8  ASC   '.stdin'00
L01DFAF  ASC   '.stdout'00
L01DFB7  ASC   '.stderr'00
L01DFBF  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E8
         TCS
         STZ   $EC
         PEI   $FF
         PEI   $FD
         JSL   L01AE2E
         PLY
         PLY
         LDA   [$F9]
         STA   $EE
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  L01B919
         PLA
         STAL  L01B917
         PEA   $0006
         PEA   ^L01B917
         PEA   L01B917
         JSL   L01B7E4
         LDA   L01013C
         CMP   #$0000
         BEQ   L01E001
         BRL   L01E0B7
L01E001  LDA   $EE
         AND   #$0500
         CMP   #$0500
         BNE   L01E013
         LDA   #$0011
         STA   $EC
         BRL   L01E0B4
L01E013  LDA   $EE
         AND   #$0001
         TAY
         BEQ   L01E025
         LDAL  L01B91B
         AND   #$0001
         TAY
         BEQ   L01E037
L01E025  LDA   $EE
         AND   #$0002
         TAY
         BEQ   L01E03F
         LDAL  L01B91B
         AND   #$0002
         TAY
         BNE   L01E03F
L01E037  LDA   #$000D
         STA   $EC
         BRL   L01E0B4
L01E03F  LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  L01B935
         PLA
         STAL  L01B933
         PEA   $0010
         PEA   ^L01B931
         PEA   L01B931
         JSL   L01B7E4
         LDA   L01013C
         CMP   #$0000
         BEQ   L01E066
         BRL   L01E0B4
L01E066  LDA   $EE
         AND   #$0200
         TAY
         BNE   L01E071
         BRL   L01E0B4
L01E071  LDX   #$0000
         LDA   #$0000
         PHA
         TXA
         STAL  L01B953
         PLA
         STAL  L01B951
         LDAL  L01B931
         STAL  L01B94F
         PEA   $0018
         PEA   ^L01B94F
         PEA   L01B94F
         JSL   L01B7E4
         LDA   L01013C
         CMP   #$0000
         BEQ   L01E0B4
         LDAL  L01B931
         STAL  L01B93B
         PEA   $0014
         PEA   ^L01B93B
         PEA   L01B93B
         JSL   L01B7E4
L01E0B4  BRL   L01E15D
L01E0B7  LDA   L01013C
         CMP   #$0046
         BEQ   L01E0C2
         BRL   L01E15D
L01E0C2  LDA   $EE
         AND   #$0100
         TAY
         BNE   L01E0CD
         BRL   L01E15D
L01E0CD  LDAL  L01B91B
         ORA   #$00C3
         STAL  L01B91B
         LDA   $EE
         AND   #$0020
         TAY
         BEQ   L01E0E9
         LDA   #$0000
         STAL  L01B91D
         BRA   L01E0F0
L01E0E9  LDA   #$0004
         STAL  L01B91D
L01E0F0  LDA   #$0000
         STAL  L01B927
         STAL  L01B925
         PEA   $0001
         PEA   ^L01B917
         PEA   L01B917
         JSL   L01B7E4
         LDA   L01013C
         CMP   #$0000
         BEQ   L01E113
         BRL   L01E15D
L01E113  LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  L01B935
         PLA
         STAL  L01B933
         PEA   $0010
         PEA   ^L01B931
         PEA   L01B931
         JSL   L01B7E4
         LDA   L01013C
         STA   $EA
         LDA   L01013C
         CMP   #$0000
         BEQ   L01E15D
         LDX   $FF
         LDA   $FD
         PHA
         TXA
         STAL  L01B911
         PLA
         STAL  L01B90F
         PEA   $0002
         PEA   ^L01B90F
         PEA   L01B90F
         JSL   L01B7E4
         LDA   $EA
         STA   L01013C
L01E15D  PEI   $FF
         PEI   $FD
         JSL   L01C7C4
         PLY
         PLY
         LDA   L01013C
         CMP   #$0000
         BEQ   L01E187
         LDA   L01013C
         PHA
         LDA   #$8000
         PLX
         STX   $F0
         ORA   $F0
         STA   $EC
         LDA   L01013C
         LDY   #$0002
         STA   [$F9],Y
         BRA   L01E196
L01E187  LDA   $EC
         CMP   #$0000
         BEQ   L01E196
         LDA   #$0000
         LDY   #$0002
         STA   [$F9],Y
L01E196  LDA   $EC
         CMP   #$0000
         BNE   L01E213
         PHX
         PHA
         PEA   $0000
         PEA   $000E
         LDA   L01013E
         ORA   #$0F00
         PHA
         PEA   $8300
         PEA   $0000
         PEA   $0000
         _NewHandle
         STAL  L01013C
         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  L01B931
         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]
L01E213  LDA   $EC
         CMP   #$0000
         BNE   L01E21F
         LDA   #$0000
         BRA   L01E22A
L01E21F  LDA   $EC
         PHA
         LDA   #$4000
         PLX
         STX   $F0
         ORA   $F0
L01E22A  TAY
         TDC
         CLC
         ADC   #$00F3
         TCS
         TYA
         PLD
         RTL

