antoine-source/ultima2/ULTIMA.II.S
Antoine Vignau 0498bcc0c9 Mass upload
of a couple of (working) disassemblies
2020-11-10 11:31:13 +01:00

4981 lines
95 KiB
ArmAsm

*
* Ultima II: The Revenge of the Enchanteress
*
* (c) 1982, Sierra On-Line
* (s) 2020, John Disam
*
TYP BIN
ORG $5000
MX %11
LST OFF
*----------------------------
UPDATE = $0240 ; CALL UPDATE
PRINTSTR = $402C ; PRINT C STRING
KBD EQU $C000
KBDSTROBE EQU $C010
SPKR EQU $C030
TXTCLR EQU $C050
TXTSET EQU $C051
MIXSET EQU $C053
HIRES EQU $C057
PRNTAX EQU $F941
HOME EQU $FC58
PRBYTE EQU $FDDA
COUT EQU $FDED
*----------------------------
L5000 JSR HOME
LDY #$0C
LDX #$0A
JSR $458A
JSR PRINTSTR
ASC "(INSERT PLAYER DISK)"00
BIT KBDSTROBE
L5025 LDA KBD
CMP #$9B
BNE L5025
BIT KBDSTROBE
JSR PRINTSTR
ASC 0D
ASC 04
ASC "BLOAD PLAYER"0D00
LDA $4E00
BNE L5076
JSR HOME
LDY #$0C
LDX #$0A
JSR $458A
JSR PRINTSTR
ASC "NO CHARACTER ON DISK"00
L5069 LDA KBD
CMP #$9B
BNE L5069
BIT KBDSTROBE
JMP L5000
L5076 JSR L6706
BIT KBDSTROBE
LDA $4E11
ASL
CLC
ADC #$78
STA $11
LDA #$00
STA $D9
STA $DA
STA $DB
STA $DC
LDA $4E24
STA $00
LDA $4E25
STA $01
LDA $4E33
BEQ L50AF
LDA $4E34
STA $F4
LDA $4E35
STA $F5
JSR $437B
LDA #$50
STA ($06),Y
L50AF LDX #$FF
LDA #$FF
L50B3 DEX
STA $4B00,X
STA $4C00,X
BNE L50B3
JSR UPDATE
LDA MIXSET
LDA HIRES
LDA TXTCLR
JSR HOME
LDA #$FF
STA $10
JSR $44DE
L50D2 LDA $4E14
CMP #$04
BCC L50DC
JMP L6CCE
L50DC JSR PRINTSTR
ASC "CMD: "00
JSR L6900
JSR L6900
JSR L6900
JSR L6900
JSR L6855
LDA #$00
STA $F2
LDA #$E8
STA $F3
LDA $DC
BEQ L511A
LDA #$14
STA $FC
L5104 JSR PRINTSTR
ASC "Z"00
LDX #$FF
L510B DEX
NOP
NOP
NOP
NOP
NOP
BNE L510B
DEC $FC
BNE L5104
JMP L528B
L511A LDA KBD
BMI L5175
INC $F2
BNE L511A
LDA $11
CMP #$26
BNE L512C
JSR $43E9
L512C JSR UPDATE
JSR L6900
JSR L6900
JSR L6900
JSR L6900
JSR L6855
INC $4E
INC $F3
BNE L511A
INC $4F
LDA #$00
STA $FB
JSR PRINTSTR
ASC "PASS"00
L5152 SED
SEC
LDA $4E1F
SBC #$0A
STA $4E1F
LDA $4E1E
SBC #$00
STA $4E1E
LDA $4E1D
SBC #$00
STA $4E1D
CLD
BCS L5172
JMP L6703
L5172 JMP L528B
L5175 STA $4E27
STA KBDSTROBE
LDA $4E27
CMP #$A0
BNE L5191
LDA #$00
STA $FB
JSR PRINTSTR
ASC "PASS"00
JMP L5152
L5191 CMP #$8D
BNE L51B1
DEC $01
JSR PRINTSTR
ASC "NORTH"00
LDA $13
JSR L69D3
CMP #$00
BEQ L51AE
INC $01
JMP L5225
L51AE JMP L520F
L51B1 CMP #$AF ; /
BNE L51D1
INC $01
JSR PRINTSTR
ASC "SOUTH"00
LDA $14
JSR L69D3
CMP #$00
BEQ L51CE
DEC $01
JMP L5225
L51CE JMP L520F
L51D1 CMP #$88
BNE L51F0
DEC $00
JSR PRINTSTR
ASC "WEST"00
LDA $16
JSR L69D3
CMP #$00
BEQ L51ED
INC $00
JMP L5225
L51ED JMP L520F
L51F0 CMP #$95
BNE L5218
INC $00
JSR PRINTSTR
ASC "EAST"00
LDA $15
JSR L69D3
CMP #$00
BEQ L520C
DEC $00
JMP L5225
L520C JMP L520F
L520F LDA $FB
EOR #$FF
STA $FB
JMP L528B
L5218 PHA
LDA #$00
STA $FB
PLA
L521E CMP #$C1
BCS L523C
JMP L66EA
L5225 JSR PRINTSTR
ASC "--INVALID MOVE!"8700
JMP L528B
L523C CMP #$DB
BCC L5243
JMP L66EA
L5243 SEC
SBC #$C1
ASL
TAY
LDA L5257,Y
STA L5254+1
LDA L5257+1,Y
STA L5254+2
L5254 JMP $FFFF
L5257 DA L6F8B ; A
DA L729D ; B
DA L7407 ; C
DA L75B5 ; D
DA L75EE ; E
DA L7816 ; F
DA L7884 ; G
DA L79A1 ; H
DA L79B3 ; I
DA L79F8 ; J
DA L7A0D ; K
DA L7ACE ; L
DA L7D75 ; M
DA L7DB1 ; N
DA L7E0D ; O
DA L7F69 ; P
DA L7F74 ; Q
DA L7FFB ; R
DA L80BE ; S
DA L81C7 ; T
DA L8426 ; U
DA L849F ; V
DA L850C ; W
DA L85D8 ; X
DA L8634 ; Y
DA L865E ; Z
L528B LDA #$8D
JSR COUT
LDA #$00
STA $F3
STA $F1
STA $F2
LDA $4E14
BEQ L52C0
CMP #$01
BNE L52A4
JMP L5723
L52A4 CMP #$02
BNE L52AB
JMP L5723
L52AB CMP #$03
BNE L52B2
JMP L5723
L52B2 CMP #$04
BNE L52B9
JMP L5809
L52B9 CMP #$05
BNE L52C0
JMP L5809
L52C0 LDX #$1F
L52C2 LDA $4D60,X
BEQ L52E6
LDA $11
CMP #$22
BNE L52EC
LDA $FB
BPL L52EC
LDA $4D60,X
CMP #$48
BEQ L52EC
CMP #$3C
BEQ L52EC
CMP #$2C
BEQ L52EC
LDA $11
CMP #$22
BNE L52EC
L52E6 DEX
BNE L52C2
JMP L5472
L52EC JSR $401B
STX $FA
LDA $17
JSR $44D4
CMP #$03
BCS L5334
LDA $18
JSR $44D4
CMP #$03
BCS L5334
JSR $4592
LDX $FA
CMP #$20
BCS L5334
LDA $4D60,X
CMP #$34
BNE L5319
JSR L55A1
JMP L5334
L5319 CMP #$38
BNE L5323
JSR L55EF
JMP L5334
L5323 CMP #$F8
BNE L532D
JSR L563C
JMP L5334
L532D CMP #$3C
BNE L5334
JSR L5668
L5334 LDX $FA
JSR $4000
LDA $4D40,X
CMP #$0F
BCS L534E
SEC
LDA #$00
SBC $17
STA $17
SEC
LDA #$00
SBC $18
STA $18
L534E CLC
LDA $4D00,X
ADC $17
AND #$3F
CMP $00
BEQ L535D
JMP L65E9
L535D CLC
LDA $4D20,X
ADC $18
AND #$3F
CMP $01
BEQ L536C
JMP L65E9
L536C INC $F1
STX $FC
LDA $4D60,X
CMP #$FC
BNE L537A
JSR L56E7
L537A JSR $4592
LDX $FC
CMP #$00
BMI L539D
AND #$07
CMP $4E2C
BCC L539D
INC $F2
LDA $4D40,X
LSR
LSR
SEC
ADC $F3
LDY $12
CPY #$06
BNE L539B
ASL
L539B STA $F3
L539D LDA $4E14
BEQ L53A5
JMP L573E
L53A5 JMP L52E6
L53A8 JSR UPDATE
L53AB LDA $F1
BEQ L53D0
LDA #$7E
STA $A0
LDA #$00
STA $A1
LDA #$6F
STA $A2
JSR $43AF
DEC $F1
DEC $F2
BMI L53AB
JSR $45E1
JSR $4419
JSR $45E1
JMP L53AB
L53D0 LDA $F3
BEQ L5409
JSR $4592
AND $F3
AND #$77
CLC
ADC #$01
STA $F3
SED
SEC
LDA $4E1C
SBC $F3
STA $4E1C
LDA $4E1B
SBC #$00
STA $4E1B
CLD
BCC L5437
LDA $4E14
BEQ L5409
STA $F3
SED
SEC
LDA $4E1B
SBC $F3
STA $4E1B
CLD
BCC L5437
L5409 JSR $44DE
LDA #$04
STA $10
LDA $4E14
BNE L541C
LDA #$FF
STA $10
JSR L6C3C
L541C LDA $DA
BEQ L5422
DEC $DA
L5422 LDA $DB
BEQ L5428
DEC $DB
L5428 LDA $DC
BEQ L542E
DEC $DC
L542E LDA $D9
BEQ L5434
DEC $D9
L5434 JMP L50D2
L5437 LDA #$00
STA $4E1B
STA $4E1C
STA $4E1D
STA $4E1E
STA $4E1F
STA $4E20
STA $4E21
STA $4E22
STA $4E23
JSR $44DE
JSR PRINTSTR
ASC 8D8D8D00
JSR $4084
JSR PRINTSTR
ASC " IS DEAD!"8D00
L546F JMP L546F
L5472 LDX #$1F
L5474 LDA $4D60,X
BEQ L547F
DEX
BNE L5474
JMP L53A8
L547F STX $F0
JSR $4592
CMP #$3F
BCC L548B
JMP L53A8
L548B LDX $F0
STA $4D00,X
STA $F4
JSR $4592
AND #$3F
BCC L549C
JMP L53A8
L549C LDX $F0
STA $4D20,X
STA $F5
JSR $437B
LDX $F0
STA $4D80,X
INC $4E2A
LDA $4E2A
LSR
BCS L54CC
LSR
BCS L54E2
LSR
BCS L54F8
LSR
BCS L550E
LSR
BCS L5533
LSR
BCS L552A
LSR
BCS L552D
LSR
BCS L5530
JMP L558B
L54CC LDA $4D80,X
CMP #$08
BNE L5524
LDA #$30
STA ($06),Y
STA $4D60,X
LDA #$10
STA $4D40,X
JMP L53A8
L54E2 LDA $4D80,X
CMP #$08
BNE L5524
LDA #$FC
STA ($06),Y
STA $4D60,X
LDA #$20
STA $4D40,X
JMP L53A8
L54F8 LDA $4D80,X
CMP #$08
BNE L5524
LDA #$34
STA ($06),Y
STA $4D60,X
LDA #$40
STA $4D40,X
JMP L53A8
L550E LDA $4D80,X
CMP #$00
BNE L5524
LDA #$2C
STA ($06),Y
STA $4D60,X
LDA #$40
STA $4D40,X
JMP L53A8
L5524 DEC $4E2A
JMP L53A8
L552A JMP L5549
L552D JMP L555F
L5530 JMP L5575
L5533 LDA $4D80,X
CMP #$08
BNE L5524
LDA #$F0
STA ($06),Y
STA $4D60,X
LDA #$80
STA $4D40,X
JMP L53A8
L5549 LDA $4D80,X
CMP #$00
BNE L5524
LDA #$48
STA ($06),Y
STA $4D60,X
LDA #$A0
STA $4D40,X
JMP L53A8
L555F LDA $4D80,X
CMP #$08
BNE L5524
LDA #$38
STA ($06),Y
STA $4D60,X
LDA #$C0
STA $4D40,X
JMP L53A8
L5575 LDA $4D80,X
CMP #$08
BNE L5524
LDA #$F8
STA ($06),Y
STA $4D60,X
LDA #$E0
STA $4D40,X
JMP L53A8
L558B LDA $4D80,X
CMP #$08
BNE L5524
LDA #$3C
STA ($06),Y
STA $4D60,X
LDA #$FF
STA $4D40,X
JMP L53A8
L55A1 JSR PRINTSTR
ASC "LEGS PARALIZED!"0D00
JSR $404D
JSR $44A7
JSR $404D
LDA $4EA3
BEQ L55E7
JSR $4592
CMP #$40
BCC L55E7
JSR PRINTSTR
ASC "SAVED BY MAGICAL BOOTS!"8D00
RTS
L55E7 JSR $4592
AND #$0F
STA $DA
RTS
L55EF JSR PRINTSTR
ASC "ARMS PARALIZED!"0D00
JSR $404D
JSR $44A7
JSR $404D
LDA $4EA4
BEQ L5634
JSR $4592
CMP #$40
BCC L5634
JSR PRINTSTR
ASC "SAVED BY MAGICAL CLOAK"8D00
RTS
L5634 JSR $4592
AND #$0F
STA $DB
RTS
L563C JSR PRINTSTR
ASC "MAGIC MISSILE!"0D00
JSR $404D
JSR $44A7
JSR $404D
INC $F1
INC $F1
INC $F2
INC $F2
CLC
LDA $F3
ADC #$40
STA $F3
RTS
L5668 JSR PRINTSTR
ASC "SLEEP SPELL!"0D00
JSR $404D
JSR $44A7
JSR $404D
LDA $4EAE
BEQ L56A2
JSR $4592
CMP #$40
BCC L56A2
JSR PRINTSTR
ASC "SAVED BY IDOL!"8D00
RTS
L56A2 JSR $4592
AND #$0F
STA $DC
RTS
L56AA JSR PRINTSTR
ASC "MINAX CRIES: DIE FOOL!"8D00
LDA #$00
STA $17
STA $18
JSR $459D
JSR $4419
JSR $459D
SED
SEC
LDA $4E1B
SBC #$01
STA $4E1B
CLD
BCS L56E6
BCS L56E6
JMP L5437
L56E6 RTS
L56E7 JSR $4592
CMP #$40
BCC L56EF
RTS
L56EF JSR $4592
AND #$0F
TAX
LDA $4EA0,X
BEQ L5722
SED
SEC
LDA $4EA0,X
SBC #$01
STA $4EA0,X
CLD
JSR PRINTSTR
ASC "A THIEF STOLE SOMETHING!"8D00
L5722 RTS
L5723 LDX #$1F
L5725 STX $F6
LDA $4D60,X
BEQ L573E
LDA $4DA0,X
BEQ L573E
BMI L573E
CMP #$03
BCS L5773
CMP #$02
BEQ L576A
JMP L5770
L573E LDA $4D60,X
CMP #$40
BNE L5762
LDA $4D00,X
SEC
SBC $00
JSR $44D4
CMP #$04
BCS L5762
LDA $4D20,X
SEC
SBC $01
JSR $44D4
CMP #$04
BCS L5762
JSR L56AA
L5762 LDX $F6
DEX
BPL L5725
JMP L53A8
L576A JSR $4000
JMP L65E9
L5770 JMP L52EC
L5773 LDX $F6
LDA $4DC0,X
STA $17
LDA $4DE0,X
STA $18
JSR $4592
CMP #$40
BCS L57A0
JSR $4592
JSR $44BD
LDX $F6
STA $4DC0,X
STA $17
JSR $4592
JSR $44BD
LDX $F6
STA $4DE0,X
STA $18
L57A0 LDX $F6
CLC
LDA $4D00,X
ADC $17
AND #$3F
STA $F4
CMP #$04
BCS L57B3
JMP L573E
L57B3 CMP #$3C
BCC L57BA
JMP L573E
L57BA CMP $00
BNE L57C1
JMP L573E
L57C1 CLC
LDA $4D20,X
ADC $18
AND #$3F
STA $F5
CMP #$04
BCS L57D2
JMP L573E
L57D2 CMP #$3C
BCC L57D9
JMP L573E
L57D9 CMP $01
BNE L57E0
JMP L573E
L57E0 JSR $437B
CMP #$70
BEQ L57EE
CMP #$08
BEQ L57EE
JMP L573E
L57EE LDX $F6
JMP L669B
L57F3 LDA $4E14
BNE L57F9
RTS
L57F9 LDX #$07
LDA #$01
L57FD STA $4DA0,X
DEX
BPL L57FD
LDX $F1
STA $4DA0,X
RTS
L5809 JSR L5A74
LDX #$1F
STX $F0
L5810 LDA $4D60,X
BNE L581E
L5815 DEC $F0
LDX $F0
BNE L5810
JMP L58D5
L581E LDX $F0
JSR L5AE0
LDA $4D40,X
CMP #$0F
BCS L5838
SEC
LDA #$00
SBC $17
STA $17
SEC
LDA #$00
SBC $18
STA $18
L5838 LDA $17
BEQ L5863
CLC
ADC $4D00,X
STA $F4
LDA $4D20,X
STA $F5
LDA $F4
CMP $00
BNE L5856
LDA $F5
CMP $01
BNE L5856
JMP L5951
L5856 JSR L5A53
BEQ L5891
CMP #$FF
BEQ L5863
AND #$7F
BNE L5891
L5863 LDA $18
BEQ L588E
CLC
ADC $4D20,X
STA $F5
LDA $4D00,X
STA $F4
LDA $F4
CMP $00
BNE L5881
LDA $F5
CMP $01
BNE L5881
JMP L5951
L5881 JSR L5A53
BEQ L5891
CMP #$FF
BEQ L588E
AND #$7F
BNE L5891
L588E JMP L5815
L5891 JSR L5A5D
AND #$07
BEQ L589B
JMP L5815
L589B LDA $F4
STA $4DC0,X
LDA $F5
STA $4DE0,X
LDA $4D00,X
STA $F4
LDA $4D20,X
STA $F5
JSR L5A5D
LDA ($06),Y
AND #$F0
STA ($06),Y
LDA $4DC0,X
STA $F4
STA $4D00,X
LDA $4DE0,X
STA $F5
STA $4D20,X
JSR L5A5D
LDA ($06),Y
ORA $4D60,X
STA ($06),Y
JMP L5815
L58D5 LDA $FB
BNE L58EE
JSR L5917
JSR PRINTSTR
ASC "IT'S DARK!"8D00
JMP L5909
L58EE DEC $FB
BNE L5909
JSR PRINTSTR
ASC "TORCH BURNED OUT!"878D00
L5909 JSR $8900
LDA #$10
JSR L592E
JSR $44DE
JMP L50D2
L5917 LDA #$3F ; DARKNESS
STA $07
LDA #$00
STA $06
TAY
L5920 STA ($06),Y
DEY
BNE L5920
DEC $07
LDX $07
CPX #$20
BCS L5920
RTS
L592E STA $F1
SED
SEC
LDA $4E1F
SBC $F1
STA $4E1F
LDA $4E1E
SBC #$00
STA $4E1E
LDA $4E1D
SBC #$00
STA $4E1D
CLD
BCS L5950
JMP L5437
L5950 RTS
L5951 JSR $4592
CMP #$40
BCS L597C
LDX $F0
LDA $F6
CMP $4D80,X
BEQ L5964
JMP L5815
L5964 LDA $4D60,X
CMP #$02
BNE L596E
JMP L59CF
L596E CMP #$05
BNE L5975
JMP L59F8
L5975 CMP #$07
BNE L597C
JMP L5A2B
L597C LDX $F0
LDA $F6
CMP $4D80,X
BEQ L5988
JMP L5815
L5988 JSR $43AF
JSR $4592
BMI L5997
AND #$07
CMP $4E2C
BCS L599A
L5997 JMP L5815
L599A JSR $404D
JSR $4419
JSR $404D
JSR $4592
AND #$77
STA $F1
LDA $F6
ASL
ASL
AND #$77
SED
ADC $F1
STA $F1
SEC
LDA $4E1C
SBC $F1
STA $4E1C
LDA $4E1B
SBC #$00
STA $4E1B
CLD
BCS L59CC
JMP L5437
L59CC JMP L5815
L59CF LDA $FB
BEQ L59F5
JSR PRINTSTR
ASC "YOUR TORCH IS BLOWN OUT!"878D00
LDA #$00
STA $FB
L59F5 JMP L5815
L59F8 JSR PRINTSTR
ASC "A GREMLIN STOLE SOME FOOD!"878D00
SED
SEC
LDA $4E1D
SBC #$01
STA $4E1D
CLD
BCC L5A28
JMP L5815
L5A28 JMP L5437
L5A2B JSR PRINTSTR
ASC "YOU FEEL A STRONG MAGIC!"878D00
JSR $4592
AND #$07
STA $DC
JMP L5815
L5A53 LDA $F6
CMP $4D80,X
BEQ L5A5D
LDA #$FF
RTS
L5A5D LDA $4D80,X
L5A60 CLC
ADC #$10
STA $07
LDA $F5
ASL
ASL
ASL
ASL
ADC $F4
STA $06
LDY #$00
LDA ($06),Y
RTS
L5A74 LDX #$1F
L5A76 STX $F0
LDA $4D60,X
BEQ L5A83
L5A7D LDX $F0
DEX
BNE L5A76
RTS
L5A83 JSR $4592
LDX $F0
AND #$07
ASL
ORA #$01
STA $4D00,X
STA $F4
JSR $4592
LDX $F0
AND #$07
ASL
ORA #$01
STA $4D20,X
STA $F5
TXA
LSR
STA $4D80,X
JSR L5A5D
BNE L5A7D
JSR $4592
LDX $F0
AND #$07
CMP #$07
BEQ L5ABE
ASL
CMP $4D80,X
BEQ L5AC1
BCC L5AC1
L5ABE JMP L5A7D
L5AC1 LSR
ADC #$01
STA $4D60,X
ASL
ADC $4D80,X
ASL
ASL
ASL
ORA #$10
STA $4D40,X
JSR L5A5D
LDA ($06),Y
ORA $4D60,X
STA ($06),Y
JMP L5A7D
L5AE0 LDA $00
SEC
SBC $4D00,X
JSR $44BD
STA $17
LDA $01
SEC
SBC $4D20,X
JSR $44BD
STA $18
RTS
L5AF7 TAY
LDA #$00
STA $FC
LDA #$4F
STA $FD
LDX #$00
L5B02 LDA ($FC,X)
BEQ L5B0C
L5B06 JSR L5B20
JMP L5B02
L5B0C DEY
BEQ L5B12
JMP L5B06
L5B12 JSR L5B20
LDA ($FC,X)
BEQ L5B1F
JSR COUT
JMP L5B12
L5B1F RTS
L5B20 LDA $FC
CLC
ADC #$01
STA $FC
LDA $FD
ADC #$00
STA $FD
RTS
L5B2E LDA $00
CMP #$20
BCC L5B3D
LDA $01
CMP #$20
BCC L5B46
JMP L5B60
L5B3D LDA $01
CMP #$20
BCC L5B53
JMP L5B6D
L5B46 LDA $4E14
CMP #$02
BNE L5B50
JMP L6268
L5B50 JMP L5D1B
L5B53 LDA $4E14
CMP #$02
BNE L5B5D
JMP L6384
L5B5D JMP L6036
L5B60 LDA $4E14
CMP #$02
BNE L5B6A
JMP L6495
L5B6A JMP L5DBC
L5B6D LDA $4E14
CMP #$02
BNE L5B77
JMP L5B7A
L5B77 JMP L5F17
L5B7A JSR PRINTSTR
ASC "WELCOME TO THE PUB!"0D
ASC "1-BUY, 2-TIP --- "00
JSR L653E
CMP #$01
BEQ L5BB1
CMP #$02
BEQ L5BE3
JMP L528B
L5BB1 LDA #$05
STA $FD
LDA #$00
STA $FC
JSR L655D
JSR PRINTSTR
ASC "HERE, HAVE A STRONG ONE!"0D00
JSR $4592
AND #$03
LDA #$01
JMP L5C12
L5BE3 JSR PRINTSTR
ASC "TIP HOW MUCH? "00
JSR L653E
STA $F6
STA $FD
LDA #$00
STA $FC
JSR L655D
JSR $4592
JSR $44BD
CLC
ADC $F6
CMP #$0A
BCC L5C12
LDA #$00
L5C12 STA $F6
JSR PRINTSTR
ASC "THE BARKEEP SAYS:"0D00
LDA $F6
TAY
INY
LDA #<L5C3E
STA $FC
LDA #>L5C3E
STA $FD
LDX #$00
JSR L5B02
JMP L528B
L5C3E ASC 00
ASC "CAUGH..."00
ASC "ISN'T THIS A GREAT GAME?"00
ASC "HHMMM..."00
ASC "SOME FIGHTERS WEAR MAGIC HELMS!"00
ASC "AVIATORS USE SKULL KEYS!"00
ASC "SAYLORS WEAR BLUE TASSLES!"00
ASC "MAGES CARRY WANDS OR STAFFS!"00
ASC "GUARDS CARRY KEYS!"00
ASC "ANKHS OPEN SPACE!"00
ASC "PLANES NEED BRASS BUTTONS!"00
L5D1B JSR PRINTSTR
ASC "THE FOOD HERE COSTS "00
LDA #$03
JSR L65A9
LDA $FC
LDX $FD
JSR PRNTAX
JSR PRINTSTR
ASC 8D
ASC "PER 100, WANT ONE? "00
L5D57 LDA KBD
BPL L5D57
BIT KBDSTROBE
CMP #$D9
BEQ L5D6C
JSR PRINTSTR
ASC "NO"00
JMP L528B
L5D6C JSR PRINTSTR
ASC "YES,"8D
ASC "NO ONIONS AND TO GO PLEASE!"8D00
JSR L655D
SED
CLC
LDA $4E1D
ADC #$01
STA $4E1D
CLD
JSR PRINTSTR
ASC "THANK YOU, COME AGAIN!"00
JMP L528B
L5DBC LDA $4E11
CMP #$01
BEQ L5DE3
JSR $4084
JSR PRINTSTR
ASC " YOU ARE NOT A CLERIC!"00
JMP L528B
L5DE3 JSR PRINTSTR
ASC "WELCOME "00
LDA $4E10
CMP #$01
BEQ L5E05
JSR PRINTSTR
ASC "BROTHER "00
JMP L5E10
L5E05 JSR PRINTSTR
ASC "SISTER "00
L5E10 JSR $4084
JSR PRINTSTR
ASC 8D
ASC "1-LIGHT, 2-L.D., 3-L.U.,"8D
ASC "4-PASS 5-SURFACE, 6-PRAYER."8D
ASC "YOUR INTEREST? "00
JSR L653E
BEQ L5E68
CMP #$07
BCS L5E68
JMP L5E88
L5E68 JSR PRINTSTR
ASC "FOLLOW THE LIGHT, FRIEND!"00
JMP L528B
L5E88 STA $F0
JSR PRINTSTR
ASC "FIVE "00
LDA $F0
CLC
ADC #$24
JSR $409C
JSR PRINTSTR
ASC "S FOR "00
LDA $F0
JSR L65A9
LDA $FC
LDX $FD
JSR PRNTAX
JSR PRINTSTR
ASC 8D
ASC "YES, FRIEND? "00
L5EC3 LDA KBD
BPL L5EC3
BIT KBDSTROBE
CMP #$D9
BEQ L5EED
JSR PRINTSTR
ASC "NO"8D
ASC "I'M SORRY, GOOD DAY."00
JMP L528B
L5EED JSR PRINTSTR
ASC "YES,"8D
ASC "I WILL TAKE 5!"00
JSR L655D
LDX $F0
LDA $4E80,X
CLC
SED
ADC #$05
CLD
STA $4E80,X
JMP L528B
L5F17 JSR $4084
LDA $4E11
CMP #$02
BEQ L5F3E
JSR PRINTSTR
ASC " YOU ARE NOT A WIZARD!"00
JMP L528B
L5F3E JSR PRINTSTR
ASC " MUSERREF OLDUM!"8D
ASC "1-LIGHT, 2-L.D., 3-L.U.,"8D
ASC "4-M.M., 5-BLINK, 6-KILL,"8D
ASC "BIR IKI UC...? "00
JSR L653E
BEQ L5FA0
CMP #$07
BCS L5FA0
JMP L5FB5
L5FA0 JSR PRINTSTR
ASC 8D
ASC "UGURLA OLSUN!"00
JMP L528B
L5FB5 CMP #$04
BCC L5FBC
CLC
ADC #$03
L5FBC STA $F0
JSR PRINTSTR
ASC "FIVE "00
LDA $F0
CLC
ADC #$24
JSR $409C
JSR PRINTSTR
ASC "S FOR "00
LDA $F0
JSR L65A9
LDA $FC
LDX $FD
JSR PRNTAX
JSR PRINTSTR
ASC 8D
ASC "LUTFEN EVET? "00
L5FF7 LDA KBD
BPL L5FF7
BIT KBDSTROBE
CMP #$D9 ; Y
BEQ L600D
JSR PRINTSTR
ASC "NO!"00
JMP L5FA0
L600D JSR PRINTSTR
ASC "YES"8D00
JSR L655D
SED
CLC
LDX $F0
LDA $4E80,X
ADC #$05
STA $4E80,X
CLD
JSR PRINTSTR
ASC "GULE GULE!"00
JMP L528B
L6036 JSR PRINTSTR
ASC "TIME AND TRAVEL MADE ME WISE,"0D
ASC "PRECIOUS GOLD, A CLUE IT BUYS!HOW MUCH "
ASC "WILL YOU PAY *100?"00
JSR L653E
STA $F0
STA $FC
LDA #$00
STA $FD
JSR L655D
LDY $F0
INY
LDA #<L60B5
STA $FC
LDA #>L60B5
STA $FD
LDX #$00
JSR L5B02
JMP L528B
JMP L528B
L60B5 ASC 00
ASC "ASK ME NO QUESTIONS,"8D
ASC "I'LL TELL YOU NO LIES."00
ASC "THE QUEEN IS THE KING"8D
ASC "AND THE KING IS A SPY."00
ASC "THE EVIL MEN DO"8D
ASC "IS A HORRABLE THING."00
ASC "BUT DISPELLING MEANS"8D
ASC "THAT YOU MUST HAVE THE RING."00
ASC "JUST WHERE IT IS,"8D
ASC "I CANNOT SAY."00
ASC "BUT I'LL TELL YOU RIGHT NOW,"8D
ASC "THERE IS NO OTHER WAY."00
ASC "I HEAR IN A TOWN"8D
ASC "WHERE THE WATER RUNS FREE."00
ASC "THERE IS AN OLD MAN"8D
ASC "LIVING UNDER A TREE."00
ASC "HE HAS NOT A NAME"8D
ASC "BUT HE DOES HAVE A CLUE"00
ASC "MAYHAPS IF YOU FIND HIM,"8D
ASC "HE'LL TELL IT TO YOU!"00
L6268 JSR PRINTSTR
ASC " THE ARMOUR SHOPPE:"0D
ASC "1-CLOTH, 2-LEATHER, 3-CHAIN,"0D
ASC "4-PLATE, 5-REFLECT, 6-POWER,"0D
ASC "YOUR INTEREST? "00
JSR L653E
BEQ L62D9
CMP #$07
BCS L62D9
JMP L62F7
L62D9 JSR PRINTSTR
ASC "THANKS FOR COMING BY..."00
JMP L528B
L62F7 STA $F0
JSR PRINTSTR
ASC "AH! YES! "00
LDA $F0
CLC
ADC #$1D
JSR $409C
JSR PRINTSTR
ASC 0D
ASC "FOR YOU ONLY "00
LDA $F0
ASL
JSR L65A9
LDA $FC
LDX $FD
JSR PRNTAX
JSR PRINTSTR
ASC 0D
ASC "HOW 'BOUT IT? "00
L6340 LDA KBD
BPL L6340
BIT KBDSTROBE
STA $F2
JSR COUT
LDA #$8D
JSR COUT
LDA $F2
CMP #$D9
BEQ L6368
JSR PRINTSTR
ASC "OH, WELL."00
JMP L528B
L6368 JSR L655D
JSR PRINTSTR
ASC "SOLD!"00
LDX $F0
LDA $4E60,X
SED
CLC
ADC #$01
CLD
STA $4E60,X
JMP L528B
L6384 JSR PRINTSTR
ASC " THE WEAPONS SHOPPE:"0D
ASC "1-DA, 2-MA, 3-AX, 4-BO,"0D
ASC "5-SW, 6-GR, 7-LI, 8-PH."0D
ASC "YOUR INTEREST? "00
JSR L653E
BEQ L63E9
CMP #$09
BEQ L63E9
JMP L6407
L63E9 JSR PRINTSTR
ASC "THANKS FOR COMING BY..."00
JMP L528B
L6407 STA $F0
JSR PRINTSTR
ASC "AH! YES! A "00
LDA $F0
CLC
ADC #$13
JSR $409C
JSR PRINTSTR
ASC 0D
ASC "FOR YOU ONLY "00
LDA $F0
JSR L65A9
LDA $FC
LDX $FD
JSR PRNTAX
JSR PRINTSTR
ASC 0D
ASC "HOW 'BOUT IT? "00
L6451 LDA KBD
BPL L6451
BIT KBDSTROBE
STA $F2
JSR COUT
LDA #$8D
JSR COUT
LDA $F2
CMP #$D9 ; Y
BEQ L6479
JSR PRINTSTR
ASC "OH, WELL."00
JMP L528B
L6479 JSR L655D
JSR PRINTSTR
ASC "SOLD!"00
LDX $F0
LDA $4E40,X
SED
CLC
ADC #$01
CLD
STA $4E40,X
JMP L528B
L6495 JSR PRINTSTR
ASC "WELCOME, TO THE TRANSPORT"0D
ASC "SHOPPE. I SELL YOU HORSE "00
LDA #$04
JSR L65A9
LDA $FC
LDX $FD
JSR PRNTAX
JSR PRINTSTR
ASC 0D
ASC "GOLD, DEAL, OK? --- "00
L64F1 LDA KBD
BPL L64F1
PHA
JSR COUT
LDA #$8D
JSR COUT
PLA
BIT KBDSTROBE
CMP #$D9 ; Y
BEQ L651F
JSR PRINTSTR
ASC 0D
ASC "O.K. BYE THEN..."00
JMP L528B
L651F JSR L655D
JSR PRINTSTR
ASC 8D
ASC "RIDE SWIFTLY!"00
LDA #$22
STA $11
JMP L528B
JMP L528B
L653E LDA KBD
CMP #$B0
BCC L653E
CMP #$BA
BCS L653E
SEC
SBC #$B0
TAX
CLC
ADC #$B0
JSR COUT
LDA #$8D
JSR COUT
BIT KBDSTROBE
TXA
RTS
L655D SED
SEC
LDA $4E23
SBC $FD
STA $4E23
LDA $4E22
SBC $FC
STA $4E22
BCS L65A5
CLC
LDA $4E23
ADC $FD
STA $4E23
LDA $4E22
ADC $FC
STA $4E22
CLD
PLA
PLA
JSR PRINTSTR
ASC "YOU DONT HAVE THAT MUCH!"8700
JMP L528B
L65A5 CLD
LDA #$00
RTS
L65A9 CLC
ADC #$08
STA $F1
LDA #$00
STA $FC
STA $FA
LDA #$04
STA $FD
STA $FB
LDA $4E1A
ADC $4E18
LDY #$00
L65C2 INY
LSR
BNE L65C2
LDA $F1
STY $F1
SEC
SBC $F1
TAX
SED
L65CF CLC
LDA $FB
ADC $FD
LDY $FD
STY $FB
STA $FD
LDA $FA
ADC $FC
LDY $FC
STY $FA
STA $FC
DEX
BNE L65CF
CLD
RTS
L65E9 LDA $4D40,X
CMP #$10
BCS L65F3
INC $4D40,X
L65F3 CLC
LDA $4D00,X
ADC $17
AND #$3F
STA $F4
CLC
LDA $4D20,X
ADC $18
AND #$3F
STA $F5
JSR $437B
JSR L6648
BNE L6612
JMP L669B
L6612 LDA $18
BEQ L6626
LDA $4D00,X
STA $F4
JSR $437B
JSR L6648
BNE L6626
JMP L669B
L6626 CLC
LDA $4D00,X
ADC $17
AND #$3F
STA $F4
LDA $4D20,X
STA $F5
JSR $437B
JSR L6648
BEQ L669B
L663D LDA $4E14
BEQ L6645
JMP L573E
L6645 JMP L52E6
L6648 STA $F0
LDA $D9
BEQ L6651
JMP L6698
L6651 LDA $4D60,X
CMP #$2C
BEQ L667F
CMP #$48
BEQ L667F
CMP #$78
BCS L6666
LDA $F0
CMP #$5C
BEQ L6688
L6666 LDA $F0
CMP #$10
BEQ L6698
CMP #$04
BEQ L6698
CMP #$00
BEQ L6698
CMP #$14
BCC L6688
CMP #$70
BEQ L6688
JMP L6698
L667F LDA $F0
CMP #$00
BNE L6698
JMP L6688
L6688 LDA $4E14
BEQ L6695
LDA $F4
BEQ L6698
LDA $F5
BEQ L6698
L6695 LDA #$00
RTS
L6698 LDA #$FF
RTS
L669B LDA $00
CMP $F4
BNE L66AA
LDA $01
CMP $F5
BNE L66AA
JMP L663D
L66AA LDA $F4
STA $FC
LDA $F5
STA $FD
LDA $4D00,X
STA $F4
LDA $4D20,X
STA $F5
JSR $437B
LDA $4D80,X
LDY #$00
STA ($06),Y
LDA $FC
STA $F4
STA $4D00,X
LDA $FD
STA $F5
STA $4D20,X
JSR $437B
STA $4D80,X
LDA $4D60,X
STA ($06),Y
LDA $4E14
BEQ L66E7
JMP L573E
L66E7 JMP L52E6
L66EA JSR PRINTSTR
ASC 87
ASC "-ILLEGAL COMMAND!"00
JMP L528B
L6703 JMP L5437
L6706 CLC
LDA $4E13
ADC #$B0
STA L6721+$B
STA L672F+$B
LDA $4E14
ADC #$B0
STA L6721+$C
STA L672F+$C
JSR PRINTSTR
ASC 0D
L6721 ASC 04
ASC "BLOAD MAP FF"0D
L672F ASC 04
ASC "BLOAD MON FF"0D00
RTS
L673F CLC
LDA $4E13
ADC #$B0
STA L6754+$B
LDA $4E14
ADC #$B0
STA L6754+$C
JSR PRINTSTR
ASC 0D
L6754 ASC 04
ASC "BLOAD TLK FF"0D00
RTS
L6764 LDA $4E37
BEQ L676A
RTS
L676A CLC
LDA $4E13
ADC #$B0
STA L678F+$B
STA L67AB+$B
LDA $4E14
ADC #$B0
STA L678F+$C
STA L67AB+$C
LDA $00
STA $4E24
LDA $01
STA $4E25
JSR PRINTSTR
ASC 0D
L678F ASC 04
ASC "BSAVE MAP FF,A$1000,L$1000"0D
L67AB ASC 04
ASC "BSAVE MON FF,A$4D00,L$100"0D00
JSR PRINTSTR
ASC 04
ASC "BSAVE PLAYER,A$4E00,L$100"0D00
RTS
L67E7 LDA #$00
STA $F0
STA $F1
STA $17
STA $18
L67F1 LDA KBD
BMI L6811
NOP
NOP
NOP
NOP
NOP
INC $F0
BNE L67F1
INC $F1
BNE L67F1
PLA
PLA
JSR PRINTSTR
ASC 87
ASC "PASS"00
JMP L528B
L6811 BIT KBDSTROBE
CMP #$8D
BEQ L6827
CMP #$AF
BEQ L6833
CMP #$95
BEQ L683F
CMP #$88
BEQ L684A
JMP L67F1
L6827 JSR PRINTSTR
ASC "NORTH"00
DEC $18
RTS
L6833 JSR PRINTSTR
ASC "SOUTH"00
INC $18
RTS
L683F JSR PRINTSTR
ASC "EAST"00
INC $17
RTS
L684A JSR PRINTSTR
ASC "WEST"00
DEC $17
RTS
L6855 LDX #$2E
L6857 LDA $0800,X
STA $F1
LDA $0880,X
STA $F0
LDA $F1
STA $0880,X
LDA $0900,X
STA $F1
LDA $F0
STA $0900,X
LDA $0980,X
STA $F0
LDA $F1
STA $0980,X
LDA $0A00,X
STA $F1
LDA $F0
STA $0A00,X
LDA $0A80,X
STA $F0
LDA $F1
STA $0A80,X
LDA $0B00,X
STA $F1
LDA $F0
STA $0B00,X
LDA $0B80,X
STA $F0
LDA $F1
STA $0B80,X
LDA $0C00,X
STA $F1
LDA $F0
STA $0C00,X
LDA $0C80,X
STA $F0
LDA $F1
STA $0C80,X
LDA $0D00,X
STA $F1
LDA $F0
STA $0D00,X
LDA $0D80,X
STA $F0
LDA $F1
STA $0D80,X
LDA $0E00,X
STA $F1
LDA $F0
STA $0E00,X
LDA $0E80,X
STA $F0
LDA $F1
STA $0E80,X
LDA $0F00,X
STA $F1
LDA $F0
STA $0F00,X
LDA $0F80,X
STA $F0
LDA $F1
STA $0F80,X
LDA $F0
STA $0800,X
INX
CPX #$30
BCS L68FF
JMP L6857
L68FF RTS
L6900 LDX #$00
L6902 LDA $0800,X
STA $F1
LDA $0880,X
STA $F0
LDA $F1
STA $0880,X
LDA $0900,X
STA $F1
LDA $F0
STA $0900,X
LDA $0980,X
STA $F0
LDA $F1
STA $0980,X
LDA $0A00,X
STA $F1
LDA $F0
STA $0A00,X
LDA $0A80,X
STA $F0
LDA $F1
STA $0A80,X
LDA $0B00,X
STA $F1
LDA $F0
STA $0B00,X
LDA $0B80,X
STA $F0
LDA $F1
STA $0B80,X
LDA $0C00,X
STA $F1
LDA $F0
STA $0C00,X
LDA $0C80,X
STA $F0
LDA $F1
STA $0C80,X
LDA $0D00,X
STA $F1
LDA $F0
STA $0D00,X
LDA $0D80,X
STA $F0
LDA $F1
STA $0D80,X
LDA $0E00,X
STA $F1
LDA $F0
STA $0E00,X
LDA $0E80,X
STA $F0
LDA $F1
STA $0E80,X
LDA $0F00,X
STA $F1
LDA $F0
STA $0F00,X
LDA $0F80,X
STA $F0
LDA $F1
STA $0F80,X
LDA $F0
STA $0800,X
INX
CPX #$02
BCS L69AA
JMP L6902
L69AA RTS
L69AB CLC
LDA $00
ADC $17
STA $F4
CLC
LDA $01
ADC $18
STA $F5
LDX #$1F
L69BB LDA $4D60,X
BEQ L69CF
LDA $4D00,X
CMP $F4
BNE L69CF
LDA $4D20,X
CMP $F5
BNE L69CF
RTS
L69CF DEX
BNE L69BB
RTS
L69D3 STA $FA
LDA $4E14
BEQ L6A36
LDA $00
CMP #$40
BCS L69E9
LDA $01
CMP #$40
BCS L69E9
JMP L6A36
L69E9 LDA $4E24
STA $00
LDA $4E25
STA $01
LDA #$00
STA $4E14
JSR L6706
LDA $4E37
BEQ L6A14
LDA $4E34
STA $F4
LDA $4E35
STA $F5
JSR $437B
LDA #$50
STA ($06),Y
JMP L528B
L6A14 JSR PRINTSTR
ASC 04
ASC "BSAVE PLAYER,A$4E00,L$100"8D00
JMP L528B
L6A36 LDA $FA
AND #$7F
CMP #$02
BNE L6A56
SED
SEC
LDA $4E1C
SBC #$05
STA $4E1C
LDA $4E1B
SBC #$00
STA $4E1B
CLD
BCS L6A56
JMP L5437
L6A56 CMP #$2E
BNE L6ABF
LDA $4EA0
BEQ L6A83
JSR PRINTSTR
ASC 8D
ASC "RING PROTECTS FROM FIELD!"00
JSR $4419
JMP L6ABF
L6A83 JSR PRINTSTR
ASC 8D
ASC "FIELD CAUSES 1000 DAMAGE!"00
LDA #$00
STA $17
STA $18
JSR $459D
JSR $4419
JSR $459D
SED
LDA $4E1B
SBC #$10
STA $4E1B
CLD
BCS L6ABF
JMP L5437
L6ABF LDA $DA
BEQ L6AD7
JSR PRINTSTR
ASC "--PARALIZED!"0D00
LDA #$FF
RTS
L6AD7 LDA $11
CMP #$28
BNE L6AE0
JMP L6B6C
L6AE0 CMP #$26
BNE L6AE7
JMP L6B76
L6AE7 CMP #$24
BNE L6AEE
JMP L6B88
L6AEE CMP #$22
BNE L6B02
JSR $43E9
LDX #$FF
L6AF7 LDY #$20
L6AF9 DEY
BNE L6AF9
DEX
BNE L6AF7
JMP L6B95
L6B02 JSR $43E9
LDX #$FF
L6B07 LDY #$20
L6B09 DEY
BNE L6B09
DEX
BNE L6B07
JSR $43E9
SED
SEC
LDA $4E1F
SBC #$19
STA $4E1F
LDA $4E1E
SBC #$00
STA $4E1E
LDA $4E1D
SBC #$00
STA $4E1D
CLD
BCS L6B32
JMP L6703
L6B32 LDA $FA
AND #$7F
CMP #$60
BNE L6B3D
JMP L6BDA
L6B3D CMP #$00
BEQ L6B70
CMP #$08
BEQ L6B70
CMP #$22
BEQ L6B73
CMP #$24
BEQ L6B73
CMP #$26
BEQ L6B73
CMP #$28
BEQ L6B73
CMP #$2A
BEQ L6B73
CMP #$2C
BEQ L6B73
CMP #$2E
BEQ L6B73
CMP #$38
BEQ L6B73
CMP #$16
BCS L6B70
JMP L6B73
L6B6C JSR L6B70
RTS
L6B70 LDA #$FF
RTS
L6B73 JMP L6BCB
L6B76 JSR L6B95
CMP #$FF
BEQ L6B70
LDA $FA
AND #$7F
CMP #$06
BEQ L6B70
JMP L6B73
L6B88 LDA $FA
CMP #$00
BEQ L6B73
CMP #$80
BEQ L6B73
JMP L6B70
L6B95 SED
SEC
LDA $4E1F
SBC #$19
STA $4E1F
LDA $4E1E
SBC #$00
STA $4E1E
LDA $4E1D
SBC #$00
STA $4E1D
CLD
BCS L6BB5
JMP L6703
L6BB5 JSR L6B02
CMP #$FF
BEQ L6B70
LDA $FA
AND #$7F
CMP #$02
BEQ L6B70
CMP #$60
BEQ L6B70
JMP L6B73
L6BCB LDA $00
AND #$3F
STA $00
LDA $01
AND #$3F
STA $01
LDA #$00
RTS
L6BDA LDA $11
STA $F0
LDA $00
STA $F4
LDA $01
STA $F5
JSR $437B
LDA $4E3A
STA ($06),Y
CLC
LSR
STA $11
JSR UPDATE
LDA $F0
STA $11
JSR $442A
LDA $00
STA $4E24
LDA $01
STA $4E25
JSR L6764
LDA $4E38
LSR
CMP $4E13
BCC L6C15
CLC
ADC #$01
L6C15 STA $4E13
JSR L6706
CLC
LDA $4E13
ASL
ASL
ASL
ADC $4E38
TAX
LDA L6CA6,X
STA $00
INX
LDA L6CA6,X
STA $01
JSR UPDATE
JSR $442A
PLA
PLA
JMP L528B
L6C3C LDA $4E37
BEQ L6C42
RTS
L6C42 DEC $4E39
BEQ L6C48
RTS
L6C48 CLC
LDA $4E13
ASL
ASL
ASL
STA $F0
ADC $4E38
TAX
LDA L6CA6,X
STA $F4
INX
LDA L6CA6,X
STA $F5
JSR $437B
CMP #$C0
BNE L6C6E
LDY #$00
LDA $4E3A
STA ($06),Y
L6C6E LDA #$08
STA $4E39
INC $4E38
INC $4E38
LDA $4E38
AND #$07
STA $4E38
CLC
ADC $F0
TAX
LDA L6CA6,X
STA $F4
INX
LDA L6CA6,X
STA $F5
JSR $437B
CMP #$14
BCC L6C98
RTS
L6C98 STA $4E3A
LDY #$00
LDA #$C0
STA ($06),Y
LDA $F4
LDX $F5
RTS
L6CA6 DA $381D
DA $381F
DA $3821
DA $3823
DA $0822
DA $1C2F
DA $3824
DA $2514
DA $1010
DA $1830
DA $182A
DA $3413
DA $3438
DA $0C1C
DA $1721
DA $3414
DA $1712
DA $2232
DA $1834
DA $0B08
L6CCE LDA $DC
BEQ L6CF2
JSR PRINTSTR
ASC "CMD: "00
LDA #$14
STA $FC
L6CDF JSR PRINTSTR
ASC "Z"00
LDX #$FF
L6CE6 DEX
BNE L6CE6
DEC $FC
BNE L6CDF
DEC $DC
JMP L528B
L6CF2 JSR PRINTSTR
ASC "CMD: "00
LDX #$FF
LDY #$FF
L6CFF LDA KBD
BMI L6D21
PHA
PLA
PHA
PLA
PHA
PLA
PHA
PLA
PHA
PLA
PHA
PLA
DEX
BNE L6CFF
DEY
BNE L6CFF
JSR PRINTSTR
ASC "PASS"00
JMP L528B
L6D21 BIT KBDSTROBE
CMP #$8D
BNE L6D2B
JMP L6D4A
L6D2B CMP #$88
BNE L6D32
JMP L6DFC
L6D32 CMP #$95
BNE L6D39
JMP L6E22
L6D39 CMP #$AF
BNE L6D40
JMP L6E49
L6D40 CMP #$A0
BNE L6D47
JMP L6E80
L6D47 JMP L521E
L6D4A JSR PRINTSTR
ASC "ADVANCE"00
LDA $13
AND #$0F
BEQ L6D6C
L6D5B JSR PRINTSTR
ASC "-BLOCKED!"8700
JMP L528B
L6D6C LDA $13
CMP #$80
BEQ L6D5B
CLC
LDA $00
ADC $02
AND #$3F
STA $00
CLC
LDA $01
ADC $03
AND #$3F
STA $01
JSR $4592
CMP $F6
BCC L6D8E
JMP L528B
L6D8E JSR L5917
LDA #$00
STA $FB
JSR PRINTSTR
ASC 8D
ASC "ARGH! A TRAP!"8D00
LDA #$10
STA $F0
L6DAC LDY #$10
L6DAE BIT SPKR
LDX $F0
L6DB3 DEX
BNE L6DB3
DEY
BNE L6DAE
INC $F0
BNE L6DAC
JSR $4419
JSR $4419
JSR $4419
JSR $4419
LDA $4E30
BNE L6DD1
JMP L5437
L6DD1 JSR PRINTSTR
ASC "ESCAPED! BY USE OF TOOLS!"00
SED
SEC
LDA $4E30
SBC #$01
STA $4E30
CLD
JMP L528B
L6DFC JSR PRINTSTR
ASC "TURN LEFT"00
LDA $03
BEQ L6E16
STA $02
LDA #$00
STA $03
JMP L528B
L6E16 SEC
SBC $02
STA $03
LDA #$00
STA $02
JMP L528B
L6E22 JSR PRINTSTR
ASC "TURN RIGHT"00
LDA $02
BEQ L6E3D
STA $03
LDA #$00
STA $02
JMP L528B
L6E3D SEC
SBC $03
STA $02
LDA #$00
STA $03
JMP L528B
L6E49 JSR PRINTSTR
ASC "RETREAT"00
LDA $14
AND #$8F
BEQ L6E6B
JSR PRINTSTR
ASC "-BLOCKED!"8700
JMP L528B
L6E6B LDA $00
SEC
SBC $02
AND #$3F
STA $00
LDA $01
SEC
SBC $03
AND #$3F
STA $01
JMP L528B
L6E80 JSR PRINTSTR
ASC "PASS"00
JMP L528B
L6E8B LDA #$00
STA L6F89
STA L6F8A
STA $17
STA $18
JSR L5917
L6E9A LDA L6F89
CLC
ADC $17
AND #$3F
STA $F4
LDA L6F8A
CLC
ADC $18
AND #$3F
STA $F5
JSR $437B
BNE L6EB6
JMP L6F5C
L6EB6 CMP #$10
BEQ L6ED5
CMP #$78
BCC L6EC2
CMP #$F0
BCC L6ED5
L6EC2 CMP #$08
BEQ L6EFF
CMP #$0C
BEQ L6EF1
CMP #$04
BEQ L6F10
CMP #$70
BEQ L6F21
JMP L6F40
L6ED5 LDX #$00
LDY #$00
JSR L6F72
LDX #$00
LDY #$01
JSR L6F72
LDX #$02
LDY #$01
JSR L6F72
LDX #$02
LDY #$00
JSR L6F72
L6EF1 LDX #$01
LDY #$01
JSR L6F72
LDX #$03
LDY #$00
JSR L6F72
L6EFF LDX #$01
LDY #$00
JSR L6F72
LDX #$03
LDY #$01
JSR L6F72
JMP L6F5C
L6F10 LDX #$01
LDY #$00
JSR L6F72
LDX #$03
LDY #$00
JSR L6F72
JMP L6F5C
L6F21 LDX #$00
LDY #$00
JSR L6F72
LDX #$00
LDY #$01
JSR L6F72
LDX #$02
LDY #$00
JSR L6F72
LDX #$02
LDY #$01
JSR L6F72
JMP L6F5C
L6F40 LDX #$01
LDY #$00
JSR L6F72
LDX #$02
LDY #$00
JSR L6F72
LDX #$02
LDY #$01
JSR L6F72
LDX #$01
LDY #$01
JSR L6F72
L6F5C INC $17
LDA $17
AND #$3F
STA $17
BEQ L6F69
L6F66 JMP L6E9A
L6F69 INC $18
LDA $18
CMP #$40
BCC L6F66
RTS
L6F72 STX $02
STY $03
LDA $17
ASL
ASL
ADC $02
STA $F0
LDA $18
ASL
ADC $03
STA $F1
JSR $4713
RTS
L6F89 HEX 53
L6F8A HEX 4E
L6F8B JSR PRINTSTR
ASC "ATTACK--"00
LDA $4E14
CMP #$04
BCC L6FA1
JMP L719A
L6FA1 LDA $DB
BEQ L6FB7
JSR PRINTSTR
ASC "PARALIZED!"8700
JMP L528B
L6FB7 JSR L67E7
JSR $44B2
JSR L69AB
STX $F1
CPX #$00
BNE L6FC9
JMP L718D
L6FC9 JSR $4592
LSR
CMP $4E16
BCC L6FD5
JMP L718D
L6FD5 JSR $459D
JSR L57F3
JSR PRINTSTR
ASC "--HIT!!!"00
JSR $4408
LDA $4E2B
ASL
ASL
ASL
ADC $4E15
LSR
LSR
STA $F0
LDX $F1
L6FF9 SEC
LDA $4D40,X
SBC $F0
BCC L7061
STA $4D40,X
JSR $459D
LDA $4D60,X
CMP #$40
BEQ L7011
JMP L528B
L7011 JSR $404D
JSR $442A
JSR $404D
LDX $F1
LDA $4D00,X
STA $F4
LDA $4D20,X
STA $F5
JSR $437B
LDA $4D80,X
STA ($06),Y
LDA $F4
STA $4D20,X
LDA $F5
STA $4D00,X
STA $F4
LDA $4D20,X
STA $F5
JSR $437B
LDA $4D60,X
STA ($06),Y
LDA #$84
STA $4DA0,X
JSR PRINTSTR
ASC 8D
ASC "SHE'S GONE!!!"00
JMP L528B
L7061 LDA $4D00,X
STA $F4
LDA $4D20,X
STA $F5
JSR $437B
LDY #$00
LDA $4D80,X
STA ($06),Y
LDA $4D60,X
CMP #$40
BNE L708D
JSR PRINTSTR
ASC 8D04
ASC "BRUN END"8D
JMP L528B
L708D CMP #$60
BNE L709F
SED
CLC
LDA $4E2F
ADC #$02
STA $4E2F
CLD
JMP L711B
L709F CMP #$FC
BNE L70CF
STX $F0
JSR $4592
CMP #$40
BCS L70B7
SED
CLC
LDA $4E30
ADC #$01
STA $4E30
CLD
L70B7 JSR $4592
AND #$0F
BEQ L70CA
TAX
SED
CLC
LDA $4EA0,X
ADC #$01
STA $4EA0,X
CLD
L70CA LDX $F0
JMP L711B
L70CF CMP #$F0
BNE L70FE
STX $F0
JSR $4592
CMP #$40
BCS L70E7
SED
CLC
LDA $4EA5
ADC #$01
STA $4EA5
CLD
L70E7 LDX $F0
JSR $4592
AND #$03
ADC #$01
SED
CLC
ADC $4E2E
STA $4E2E
CLD
LDX $F0
JMP L711B
L70FE CMP #$F8
BNE L711B
STX $F0
JSR $4592
AND #$01
TAX
INX
SED
CLC
LDA $4EA0,X
ADC #$01
STA $4EA0,X
CLD
LDX $F0
JMP L711B
L711B LDA #$00
STA $4D80,X
STA $4D40,X
STA $4D00,X
STA $4D20,X
STA $4D60,X
JSR PRINTSTR
ASC 0D
ASC "KILLED--GOLD+"00
JSR $4592
AND #$17
ORA #$01
STA $F0
JSR PRBYTE
SED
CLC
LDA $4E23
ADC $F0
STA $4E23
LDA $4E22
ADC #$00
STA $4E22
CLD
JSR PRINTSTR
ASC "--EXP.+"00
JSR $4592
AND #$03
ADC #$01
STA $F0
JSR PRBYTE
SED
CLC
LDA $4E21
ADC $F0
STA $4E21
LDA $4E20
ADC #$00
STA $4E20
CLD
JSR $459D
JMP L528B
L718D JSR PRINTSTR
ASC "--MISS"00
JMP L528B
L719A JSR $44B2
LDA $00
CLC
ADC $02
STA $F4
LDA $01
CLC
ADC $03
STA $F5
LDA $F6
JSR L5A60
AND #$07
BNE L71B7
JMP L7292
L71B7 LDX #$1F
STX $F0
L71BB LDA $4D00,X
CMP $F4
BNE L71D3
LDA $4D20,X
CMP $F5
BNE L71D3
LDA $4D80,X
CMP $F6
BNE L71D3
JMP L71DC
L71D3 DEC $F0
LDX $F0
BNE L71BB
JMP L7292
L71DC JSR $4592
LSR
CMP $4E16
BCC L71E8
JMP L7292
L71E8 JSR PRINTSTR
ASC "HIT!"00
JSR $459D
JSR $4408
JSR $459D
LDA $4E2B
ASL
ASL
ASL
ADC $4E15
LSR
LSR
LDX $F0
STA $F1
LDA $4D40,X
SEC
SBC $F1
BCC L7216
STA $4D40,X
JMP L528B
L7216 LDA #$00
STA $4D40,X
STA $4D60,X
STA $4D80,X
LDA $4D00,X
STA $F4
LDA $4D20,X
STA $F5
LDA $F6
JSR L5A60
LDA ($06),Y
AND #$F0
STA ($06),Y
JSR PRINTSTR
ASC 8D
ASC "KILLED--GOLD+"00
JSR $4592
AND #$17
ORA #$01
STA $F1
JSR PRBYTE
SED
CLC
LDA $4E23
ADC $F1
STA $4E23
LDA $4E22
ADC #$00
STA $4E22
CLD
JSR PRINTSTR
ASC "--EXP.+"00
JSR $4592
AND #$07
STA $F1
JSR PRBYTE
SED
CLC
LDA $4E21
ADC $F1
STA $4E21
LDA $4E20
ADC #$00
STA $4E20
CLD
JMP L528B
L7292 JSR PRINTSTR
ASC "MISS"00
JMP L528B
L729D JSR PRINTSTR
ASC "BOARD"00
LDA $4E14
CMP #$04
BCC L72C5
L72AD JSR PRINTSTR
ASC 8D
ASC 87
ASC "THINK AGAIN "00
JSR $4084
JMP L528B
L72C5 LDA $11
CMP #$78
BCC L72AD
LDA $00
STA $F4
LDA $01
STA $F5
JSR $437B
LDA $12
CMP #$22
BEQ L72FF
CMP #$24
BEQ L72F6
CMP #$26
BEQ L72F9
CMP #$28
BEQ L72FC
JSR PRINTSTR
ASC " WHAT?"8700
JMP L528B
L72F6 JMP L7316
L72F9 JMP L736E
L72FC JMP L73B2
L72FF JSR PRINTSTR
ASC " HORSE"00
LDA #$08
LDX #$00
STA ($06,X)
LDA #$22
STA $11
JMP L528B
L7316 LDA $4EAC
BNE L7356
JSR PRINTSTR
ASC " SHIP"8D
ASC "THE CREW OF THIS SHIP"8D
ASC "WILL NOT LET YOU BOARD!"8700
JMP L528B
L7356 JSR PRINTSTR
ASC " FRIGATE"00
LDA #$00
TAY
STA ($06),Y
LDA #$24
STA $11
JMP L528B
L736E LDA $4EA9
BNE L739B
JSR PRINTSTR
ASC " PLANE"8D
ASC "STRANGE YOU CAN'T GET IN!"8700
JMP L528B
L739B JSR PRINTSTR
ASC " PLANE"00
LDA #$08
LDY #$00
STA ($06),Y
LDA #$26
STA $11
JMP L528B
L73B2 JSR PRINTSTR
ASC " ROCKET"00
LDA $4EA7
BNE L73FA
JSR PRINTSTR
ASC "A METALIC VOICE COMMANDS:"8D
ASC "YOU MUST HAVE AN ANKH!"8700
JMP L528B
L73FA LDA #$08
LDY #$00
STA ($06),Y
LDA #$28
STA $11
JMP L528B
L7407 JSR PRINTSTR
ASC "CAST-"00
LDA $4E2D
CLC
ADC #$24
JSR $409C
LDA $4EA1
CLC
ADC $4EA2
BNE L7440
JSR PRINTSTR
ASC 8D
ASC "NEED WAND OR STAFF!"00
JSR $4399
JMP L528B
L7440 LDA $4E2D
BNE L7448
JMP L528B
L7448 TAX
LDA $4E80,X
BNE L7462
JSR PRINTSTR
ASC 8D
ASC "NO SPELL!"00
JSR $4399
JMP L528B
L7462 JSR $44A7
LDX $4E2D
SED
SEC
LDA $4E80,X
SBC #$01
STA $4E80,X
CLD
LDA $4E14
CMP #$04
BCS L748C
JSR PRINTSTR
ASC "-FAILED!"00
JSR $4399
JMP L528B
L748C LDA $4E2D
BNE L7494
JMP L528B
L7494 CMP #$01
BEQ L74C3
CMP #$02
BEQ L74CA
CMP #$03
BEQ L74F6
CMP #$04
BEQ L750E
CMP #$05
BEQ L74B7
CMP #$06
BEQ L74BA
CMP #$07
BEQ L74BD
CMP #$08
BNE L74C0
JMP L7559
L74B7 JMP L7531
L74BA JMP L7534
L74BD JMP L753C
L74C0 JMP L7580
L74C3 LDA #$96
STA $FB
JMP L528B
L74CA LDA $4E14
CMP #$04
BEQ L74FD
L74D1 LDA $F6
CMP #$0F
BCC L74E9
L74D7 JSR PRINTSTR
ASC "-FAILED!"00
JSR $4399
JMP L528B
L74E9 CLC
ADC #$01
JSR L5A60
BNE L74D7
INC $F6
JMP L7A42
L74F6 LDA $4E14
CMP #$04
BEQ L74D1
L74FD LDA $F6
BEQ L7531
SEC
SBC #$01
JSR L5A60
BNE L74D7
DEC $F6
JMP L7A42
L750E CLC
LDA $00
ADC $02
AND #$0F
BEQ L74D7
STA $F4
LDA $01
ADC $03
AND #$0F
BEQ L74D7
STA $F5
LDA $F6
JSR L5A60
BPL L74D7
LDA #$00
STA ($06),Y
JMP L528B
L7531 JMP L7A58
L7534 JSR $4592
BMI L74D7
JMP L7580
L753C JSR L758B
BEQ L74D7
LDA $4E20
ASL
ADC #$1E
STA $F1
LDA $4D40,X
SBC $F1
STA $4D40,X
BCS L7556
JMP L7216
L7556 JMP L528B
L7559 JSR $4592
AND #$0F
ORA #$01
STA $F4
JSR $4592
AND #$0F
ORA #$01
STA $F5
LDA $F6
JSR L5A60
BEQ L7575
JMP L74D7
L7575 LDA $F4
STA $00
LDA $F5
STA $01
JMP L528B
L7580 JSR L758B
BNE L7588
JMP L74D7
L7588 JMP L7216
L758B LDX #$1F
L758D LDA $4D60,X
BNE L7598
L7592 DEX
BNE L758D
LDA #$00
RTS
L7598 LDA $4D80,X
CMP $F6
BNE L7592
LDA $00
CLC
ADC $02
CMP $4D00,X
BNE L7592
LDA $01
CLC
ADC $03
CMP $4D20,X
BNE L7592
TXA
RTS
L75B5 JSR PRINTSTR
ASC "DESCEND"00
LDA $4E14
CMP #$05
BEQ L75D9
CMP #$04
BEQ L75D9
L75CB JSR PRINTSTR
ASC "-WHAT?"8700
JMP L528B
L75D9 LDA $12
AND #$20
BEQ L75CB
LDA $4E14
CMP #$04
BNE L75E9
JMP L7A3E
L75E9 INC $F6
JMP L7A42
L75EE JSR PRINTSTR
ASC "ENTER"00
LDA $4E14
BEQ L7609
JSR PRINTSTR
ASC " WHAT?"00
JMP L528B
L7609 LDA $11
CMP #$78
BCS L7625
JSR PRINTSTR
ASC "-ONLY ON FOOT!"8700
JMP L528B
L7625 LDA $12
LSR
SEC
SBC #$05
BNE L7630
JMP L7660
L7630 SBC #$01
BNE L7637
JMP L7693
L7637 SBC #$01
BNE L763E
JMP L76C3
L763E SBC #$01
BNE L7645
JMP L7709
L7645 SBC #$01
BNE L764C
JMP L773B
L764C SBC #$01
BNE L7653
JMP L7781
L7653 JSR PRINTSTR
ASC " WHAT?"00
JMP L528B
L7660 JSR PRINTSTR
ASC "-VILLAGE"00
LDA $00
STA $4E24
LDA $01
STA $4E25
JSR L6764
LDA #$1F
STA $00
LDA #$3E
STA $01
LDA #$01
STA $4E14
JSR L6706
JSR L673F
LDA #$04
STA $10
JMP L528B
L7693 JSR PRINTSTR
ASC "-TOWN"00
LDA $00
STA $4E24
LDA $01
STA $4E25
JSR L6764
LDA #$1F
STA $00
LDA #$3E
STA $01
LDA #$02
STA $4E14
JSR L6706
JSR L673F
LDA #$04
STA $10
JMP L528B
L76C3 JSR PRINTSTR
ASC "-TOWER"00
LDA $00
STA $4E24
LDA $01
STA $4E25
JSR L6764
LDA #$00
STA $F6
STA $03
LDA #$01
STA $02
LDA #$05
STA $00
STA $01
LDA #$04
STA $4E14
JSR L6706
JSR PRINTSTR
ASC 04
ASC "BLOAD MONSTERS!"00
JMP L528B
L7709 JSR PRINTSTR
ASC "-CASTLE"00
LDA $00
STA $4E24
LDA $01
STA $4E25
JSR L6764
LDA #$1F
STA $00
LDA #$3E
STA $01
LDA #$03
STA $4E14
JSR L6706
JSR L673F
LDA #$04
STA $10
JMP L528B
L773B JSR PRINTSTR
ASC "-DUNGEON"00
LDA $00
STA $4E24
LDA $01
STA $4E25
JSR L6764
LDA #$00
STA $F6
STA $03
LDA #$01
STA $02
LDA #$05
STA $00
STA $01
STA $4E14
JSR L6706
JSR PRINTSTR
ASC 04
ASC "BLOAD MONSTERS!"00
JMP L528B
L7781 JSR PRINTSTR
ASC "-THE SIGN READS:"0D00
LDX $4E13
BEQ L77BA
DEX
BEQ L77CF
DEX
BEQ L77EA
DEX
BEQ L7800
JSR PRINTSTR
ASC "ANOS: 2112 A.D."00
JMP L528B
L77BA JSR PRINTSTR
ASC "ANOS: LEGENDS!"00
JMP L528B
L77CF JSR PRINTSTR
ASC "ANOS: 9,000,000 B.C."00
JMP L528B
L77EA JSR PRINTSTR
ASC "ANOS: 1423 B.C."00
JMP L528B
L7800 JSR PRINTSTR
ASC "ANOS: 1990 A.D."00
JMP L528B
L7816 JSR PRINTSTR
ASC "FIRE"00
LDA $11
CMP #$24
BEQ L7832
JSR PRINTSTR
ASC " WHAT?"8700
JMP L528B
L7832 JSR PRINTSTR
ASC " DIRECT-"00
JSR L67E7
JSR L7862
JSR L69AB
STX $F1
CPX #$00
BNE L7850
JMP L718D
L7850 JSR $4592
ORA #$20
STA $F0
JSR $459D
JSR $4408
LDX $F1
JMP L6FF9
L7862 LDX #$01
L7864 TXA
TAY
L7866 DEY
NOP
NOP
NOP
NOP
BNE L7866
BIT SPKR
INX
BNE L7864
RTS
L7874 LDA $00
STA $F4
LDA $01
STA $F5
JSR $437B
LDA #$08
STA ($06),Y
RTS
L7884 JSR PRINTSTR
ASC "GET"00
LDA $4E14
CMP #$04
BCC L7895
JMP L7902
L7895 LDA $12
CMP #$2A
BEQ L78DE
CMP #$2C
BEQ L78AC
JSR PRINTSTR
ASC " WHAT?"00
JMP L528B
L78AC JSR PRINTSTR
ASC " WEAPON"00
JSR L7874
JSR $4592
AND #$07
BEQ L78D0
TAX
SED
CLC
LDA $4E40,X
ADC #$01
STA $4E40,X
CLD
JMP L528B
L78D0 JSR PRINTSTR
ASC " EMPTY!"00
JMP L528B
L78DE JSR PRINTSTR
ASC " ARMOUR"00
JSR L7874
JSR $4592
AND #$03
BEQ L78D0
TAX
SED
CLC
LDA $4E60,X
ADC #$01
STA $4E60,X
CLD
JMP L528B
L7902 LDA $12
CMP #$40
BEQ L7915
JSR PRINTSTR
ASC " WHAT?"00
JMP L528B
L7915 JSR PRINTSTR
ASC "CHEST!"8D
ASC "IT CONTAINS "00
LDA $00
STA $F4
LDA $01
STA $F5
LDA $F6
JSR L5A60
LDA #$00
STA ($06),Y
LDA $F6
CMP #$0F
BEQ L7983
JSR $4592
CMP #$40
BCC L7972
JSR PRINTSTR
ASC "GOLD!"00
JSR $4592
AND #$1F
ADC $F6
ADC $F6
AND #$77
SED
CLC
ADC $4E23
STA $4E23
LDA $4E22
ADC #$00
STA $4E22
CLD
JMP L528B
L7972 LDA $F6
LSR
BCC L797A
JMP L78DE
L797A JSR PRINTSTR
ASC "A "00
JMP L78AC
L7983 JSR PRINTSTR
ASC "TRI-LITHIUM!"00
SED
CLC
LDA $4EAF
ADC #$01
STA $4EAF
CLD
JMP L528B
L79A1 JSR PRINTSTR
ASC "HYPER WHAT?"00
JMP L528B
L79B3 JSR PRINTSTR
ASC "IGNITE TORCH"00
LDA $4E14
CMP #$04
BCS L79CD
JMP L528B
L79CD LDA $4E2E
BNE L79E6
JSR PRINTSTR
ASC 8D
ASC "NONE OWNED!"8700
JMP L528B
L79E6 SED
SEC
LDA $4E2E
SBC #$01
STA $4E2E
CLD
LDA #$96
STA $FB
JMP L528B
L79F8 JSR PRINTSTR
ASC "JUMP...WHEE..."00
JMP L528B
L7A0D JSR PRINTSTR
ASC "KLIMB"00
LDA $4E14
CMP #$05
BEQ L7A2E
CMP #$04
BEQ L7A2E
L7A21 JSR PRINTSTR
ASC "-WHAT?"00
JMP L528B
L7A2E LDA $12
AND #$10
BEQ L7A21
LDA $4E14
CMP #$04
BNE L7A3E
JMP L75E9
L7A3E DEC $F6
BMI L7A58
L7A42 JSR PRINTSTR
ASC 8D
ASC "TO LEVEL "00
LDA $F6
JSR PRBYTE
JMP L528B
L7A58 LDA $4E24
STA $00
LDA $4E25
STA $01
LDX #$00
LDA #$FF
L7A66 STA $4B00,X
STA $4C00,X
DEX
BNE L7A66
LDA #$00
STA $4E14
JSR L6706
JSR PRINTSTR
ASC 04
ASC "BLOAD SHAPES"8D00
LDA $4E24
STA $00
LDA $4E25
STA $01
LDA $4E37
BEQ L7AAC
LDA $4E34
STA $F4
LDA $4E35
STA $F5
JSR $437B
LDA #$50
STA ($06),Y
JMP L528B
L7AAC JSR PRINTSTR
ASC 04
ASC "BSAVE PLAYER,A$4E00,L$100"8D00
JMP L528B
L7ACE LDA $11
CMP #$26
BNE L7AD7
JMP L7C1B
L7AD7 CMP #$28
BEQ L7AEE
JSR PRINTSTR
ASC "LAUNCH WHAT?"00
JMP L528B
L7AEE JSR PRINTSTR
ASC "LAUNCH--ROCKET"00
LDA $4EAF
BNE L7B3D
JSR PRINTSTR
ASC 8D
ASC "A METALLIC VOICE SAYS:"8D
ASC "SHIP INCAPABLE OF LAUNCH!"00
JMP L528B
L7B3D JSR PRINTSTR
ASC 8D
ASC "PREPARE FOR LAUNCH!"8D
ASC 04
ASC "BLOAD STARS.OBJ"8D00
LDA $4E37
BNE L7B83
LDA $4E14
BNE L7B83
LDA $00
STA $4E34
LDA $01
STA $4E35
LDA #$01
STA $4E33
JSR L6764
L7B83 JSR $8900
JSR L6706
JSR PRINTSTR
ASC 04
ASC "BLOAD DNGDRAW.OBJ"0D00
LDX #$00
LDA #$FF
L7BA4 STA $4B00,X
STA $4C00,X
DEX
BNE L7BA4
STX $00
STX $01
STA $10
JSR PRINTSTR
ASC "(PRESS ANY KEY)"00
LDA KBDSTROBE
L7BC9 LDA $01
CLC
ADC #$02
AND #$3F
STA $01
AND #$07
BNE L7BDD
LDA $00
CLC
ADC #$01
STA $00
L7BDD JSR UPDATE
LDA KBD
BPL L7BC9
BIT KBDSTROBE
LDA $00
STA $F4
LDA $01
STA $F5
JSR $437B
AND #$7F
CMP #$08
BEQ L7BFC
JMP L5437
L7BFC LDA $4E37
BNE L7C09
LDA #$00
STA $4E33
JMP L528B
L7C09 LDA $00
STA $4E34
LDA $01
STA $4E35
LDA #$01
STA $4E33
JMP L528B
L7C1B JSR PRINTSTR
ASC "LAUNCH--PLANE"00
LDA $4EAB
BNE L7C65
JSR PRINTSTR
ASC 8D
ASC "FUNNY THIS PLANE IS"8D
ASC "MISSING A BRASS BUTTON!"8700
JMP L528B
L7C65 LDA #$00
STA $F2
LDA #$FF
STA $F3
JSR PRINTSTR
ASC 0D
ASC "CMD: "00
L7C77 JSR $43E9
LDA KBD
BIT KBDSTROBE
CMP #$8D
BNE L7C87
JMP L7CCE
L7C87 CMP #$AF
BNE L7C8E
JMP L7CE8
L7C8E CMP #$95
BNE L7C95
JMP L7D02
L7C95 CMP #$88
BNE L7C9C
JMP L7D1B
L7C9C CMP #$CC ; L
BNE L7CA3
JMP L7D34
L7CA3 CLC
LDA $00
ADC $F2
AND #$3F
STA $00
CLC
LDA $01
ADC $F3
AND #$3F
STA $01
LDA $4E14
BEQ L7CC8
LDA $00
BEQ L7CC5
LDA $01
BEQ L7CC5
JMP L7CC8
L7CC5 JMP L69E9
L7CC8 JSR UPDATE
JMP L7C77
L7CCE LDA #$00
STA $F2
LDA #$FF
STA $F3
JSR PRINTSTR
ASC "NORTH"0D
ASC "CMD: "00
JMP L7CA3
L7CE8 LDA #$00
STA $F2
LDA #$01
STA $F3
JSR PRINTSTR
ASC "SOUTH"0D
ASC "CMD: "00
JMP L7CA3
L7D02 LDA #$01
STA $F2
LDA #$00
STA $F3
JSR PRINTSTR
ASC "EAST"0D
ASC "CMD: "00
JMP L7CA3
L7D1B LDA #$FF
STA $F2
LDA #$00
STA $F3
JSR PRINTSTR
ASC "WEST"0D
ASC "CMD: "00
JMP L7CA3
L7D34 LDA $00
STA $F4
LDA $01
STA $F5
JSR $437B
CMP #$08
BNE L7D55
JSR PRINTSTR
ASC "LAND PLANE."00
JMP L528B
L7D55 JSR PRINTSTR
ASC "LAND--NOT HERE!!!!!"0D
ASC "CMD: "00
JMP L7CA3
L7D75 JSR PRINTSTR
ASC "MAGIC SPELL READY #"00
JSR L653E
STA $4E2D
JSR PRINTSTR
ASC "SPELL READY => "00
LDA $4E2D
CLC
ADC #$24
JSR $409C
JMP L528B
L7DB1 JSR PRINTSTR
ASC "NEGATE TIME"00
LDA $4EAD
BNE L7DE5
JSR PRINTSTR
ASC " HOW?"8D
ASC "YOU'RE NOT EINSTEIN"00
JMP L528B
L7DE5 SED
SEC
LDA $4EAD
SBC #$01
STA $4EAD
CLD
JSR PRINTSTR
ASC 8D
ASC "YOU RUB A COIN..."00
LDA #$14
STA $D9
JMP L528B
L7E0D JSR PRINTSTR
ASC "OFFER GOLD DIRECT-"00
JSR L67E7
JSR L69AB
STX $F0
LDA #$8D
JSR COUT
CPX #$00
BNE L7E49
JSR PRINTSTR
ASC "OFFER TO WHOM?"00
JMP L528B
L7E49 JSR PRINTSTR
ASC "HOW MUCH (*100) ? "00
JSR L653E
STA $FC
LDA #$00
STA $FD
JSR L655D
LDX $F0
LDA $4DA0,X
BPL L7E83
LDA $4E14
CMP #$02
BNE L7E83
LDA $4E13
CMP #$03
BNE L7E83
JMP L7E9E
L7E83 JSR PRINTSTR
ASC "THANK YOU VERY MUCH!"00
JMP L528B
L7E9E LDX $F0
LDA $4DA0,X
CMP #$81
BEQ L7EB2
CMP #$82
BEQ L7ED4
CMP #$83
BEQ L7F12
JMP L7F3A
L7EB2 LDA $FC
CMP #$05
BCC L7E83
JSR PRINTSTR
ASC "ENILNO IS YOURS!"00
LDA #$01
STA $4E49
JMP L528B
L7ED4 LDA $FC
CMP #$05
BCC L7E83
LDA $4E36
BNE L7EF4
JSR PRINTSTR
ASC "EARN THE RING!"00
JMP L528B
L7EF4 JSR PRINTSTR
ASC "THE RING IS YOURS!"00
LDA #$01
STA $4EA0
JMP L528B
L7F12 JSR $4592
AND #$07
SED
CLC
TAX
INX
LDA $4E40,X
ADC #$01
STA $4E40,X
CLD
JSR PRINTSTR
ASC "HERE TAKE THIS!"00
JMP L528B
L7F3A JSR $4592
AND #$07
CMP #$06
BCC L7F46
JMP L7E83
L7F46 TAX
INX
SED
CLC
LDA $4E15,X
ADC $FC
ADC $FC
ADC $FC
ADC $FC
STA $4E15,X
CLD
JSR PRINTSTR
ASC "ALAKAZAM!"00
JMP L528B
L7F69 JSR PRINTSTR
ASC "PASS"00
JMP L528B
L7F74 JSR PRINTSTR
ASC "QUIT OR SAVE GAME."00
LDA $4E14
BEQ L7FA6
JSR PRINTSTR
ASC 8D
ASC "ONLY OUTDOORS!"8700
JMP L528B
L7FA6 LDA $4E37
BEQ L7FC2
JSR PRINTSTR
ASC 8D
ASC "ONLY ON EARTH!"8700
JMP L528B
L7FC2 LDA $11
CMP #$78
BCS L7FDE
JSR PRINTSTR
ASC 8D
ASC "ONLY ON FOOT!"8700
JMP L528B
L7FDE JSR PRINTSTR
ASC 8D
ASC "ONE MOMENT PLEASE!"00
JSR L6764
JMP L528B
L7FFB JSR PRINTSTR
ASC "READY WEAPON:"0D
ASC "1-DA, 2-MA, 3-AX, 4-BO,"0D
ASC "5-SW, 6-GR, 7-LI, 8-PH."0D
ASC "9-QU, WHICH? "00
JSR L653E
STA $F0
CLC
ADC #$13
JSR $409C
LDX $F0
LDA $4E40,X
BNE L8073
LDA $F0
BEQ L8073
JSR PRINTSTR
ASC " NOT OWNED!"8700
JMP L528B
L8073 LDA $F0
ASL
ASL
ASL
CMP $4E16
BCC L80AB
JSR PRINTSTR
ASC " <-THOU ART NOT "8D
ASC "AGILE ENOUGH TO WIELD!"00
JMP L528B
L80AB JSR PRINTSTR
ASC " READY."00
LDA $F0
STA $4E2B
JMP L528B
L80BE JSR PRINTSTR
ASC "STEAL DIRECT-"00
JSR L67E7
CLC
LDA $00
ADC $17
STA $F4
CLC
LDA $01
ADC $18
STA $F5
LDA #$8D
JSR COUT
JSR $437B
BMI L80EE
CMP #$7C
BNE L8106
L80EE CLC
LDA $F4
ADC $17
STA $F4
CLC
LDA $F5
ADC $18
STA $F5
JSR $437B
CMP #$68
BNE L8106
JMP L811F
L8106 JSR PRINTSTR
ASC "NO LUCK!"00
JSR $4592
AND #$07
BNE L811C
JSR L57F3
L811C JMP L528B
L811F LDA $4E11
CMP #$03
BEQ L812B
JSR $4592
BMI L8106
L812B JSR $4592
BMI L8106
LDA $4DA0
CMP #$01
BEQ L8106
LDA $4E14
CMP #$01
BEQ L8151
CMP #$02
BNE L8106
LDA $01
CMP #$20
BCS L8106
LDA $00
CMP #$20
BCS L817A
JMP L81A0
L8151 LDA $01
CMP #$20
BCS L8106
LDA $00
CMP #$20
BCC L8106
JSR PRINTSTR
ASC "STEAL FOOD!"00
SED
CLC
LDA $4E1D
ADC #$01
STA $4E1D
CLD
JMP L528B
L817A JSR PRINTSTR
ASC "STEAL ARMOUR!"00
JSR $4592
AND #$03
TAX
INX
SED
CLC
LDA $4E60,X
ADC #$01
STA $4E60,X
CLD
JMP L528B
L81A0 JSR PRINTSTR
ASC "STEAL WEAPONS!"00
JSR $4592
AND #$07
TAX
INX
SED
CLC
LDA $4E40,X
ADC #$01
STA $4E40,X
CLD
JMP L528B
L81C7 JSR PRINTSTR
ASC "TRANSACT-"00
JSR L67E7
JSR L69AB
STX $F1
LDA #$8D
JSR COUT
LDA $4E14
BEQ L820B
CPX #$00
BNE L8225
JSR $437B
BMI L81F3
CMP #$7C
BNE L820B
L81F3 CLC
LDA $F4
ADC $17
STA $F4
CLC
LDA $F5
ADC $18
STA $F5
JSR $437B
CMP #$68
BNE L820B
JMP L5B2E
L820B JSR PRINTSTR
ASC "FUNNY, NO RESPONSE!"00
JMP L528B
L8225 LDA $4DA0,X
CMP #$80
BCC L822F
JMP L8369
L822F LDA $4D60,X
CMP #$6C
BNE L8239
JMP L839B
L8239 LDA $4D60,X
CMP #$60
BNE L8264
JSR PRINTSTR
ASC "A GUARD SAYS:"0D
ASC "PAY YOUR TAXES!"00
JMP L528B
L8264 CMP #$64
BNE L8288
JSR PRINTSTR
ASC "A JESTER SINGS:"0D
ASC "HO HO HO!"00
JMP L528B
L8288 CMP #$68
BNE L82BB
JSR PRINTSTR
ASC "A MERCHANT SAYS:"0D
ASC "WILL YOU BUY MY APPLES?"00
JMP L528B
L82BB CMP #$F0
BNE L82E4
JSR PRINTSTR
ASC "A FIGHTER SAYS:"0D
ASC "UGH, ME TOUGH!"00
JMP L528B
L82E4 CMP #$F4
BNE L8306
JSR PRINTSTR
ASC "A CLERIC SAYS:"0D
ASC "BELIEVE!"00
JMP L528B
L8306 CMP #$F8
BNE L8335
JSR PRINTSTR
ASC "A WIZARD SAYS:"0D
ASC "HEX-E-POO-HEX-ON-YOU!"00
JMP L528B
L8335 CMP #$FC
BNE L8366
JSR PRINTSTR
ASC "A THIEF SAYS:"0D
ASC "PSST, WANNA BUY A WATCH?"00
JMP L528B
L8366 JMP L820B
L8369 SEC
SBC #$80
JSR L5AF7
LDY #$07
L8371 INC $4E
BNE L8371
INC $4F
BNE L8371
DEY
BNE L8371
LDX $F1
LDA $4E37
CMP #$09
BNE L8398
LDA $4E14
CMP #$03
BNE L8398
LDA $4DA0,X
CMP #$81
BNE L8398
LDA #$01
STA $4E36
L8398 JMP L528B
L839B JSR PRINTSTR
ASC "WELCOME MY CHILD "00
JSR $4084
JSR PRINTSTR
ASC 8D
ASC "FIRST MY 50 G.P. TRIBUTE!"8D00
LDA #$50
STA $FD
LDA #$00
STA $FC
JSR L655D
JSR PRINTSTR
ASC "AND FOR IT I RAISE THEE "00
LDA $4E1B
LDX #$03
CMP #$50
BCC L8410
LDX #$02
CMP #$75
BCC L8410
LDX #$01
CMP #$99
BCC L8410
LDX #$00
L8410 STX $F0
TXA
LDX #$00
JSR PRNTAX
SED
CLC
LDA $4E1B
ADC $F0
STA $4E1B
CLD
JMP L528B
L8426 JSR PRINTSTR
ASC "UNLOCK DIRECTION-"00
JSR L67E7
LDA $17
BNE L8459
L8442 JSR PRINTSTR
ASC 8D
ASC "NO DOOR THERE!"8700
JMP L528B
L8459 LDA $01
STA $F5
LDA $00
CLC
ADC $17
STA $F4
JSR $437B
CMP #$A0
BNE L8442
LDA $4E2F
BNE L848A
JSR PRINTSTR
ASC 8D
ASC "NO KEYS THAT FIT!"8700
JMP L528B
L848A SED
SEC
LDA $4E2F
SBC #$01
STA $4E2F
CLD
LDA $12
ASL
LDX #$00
STA ($06,X)
JMP L528B
L849F LDA $4EA5
BNE L84B5
L84A4 JSR PRINTSTR
ASC "VIEW WHAT?"00
JMP L528B
L84B5 LDA $4E14
CMP #$04
BCS L84A4
JSR PRINTSTR
ASC "VIEW"8D
ASC "WITH MAGICAL HELM!"00
SED
SEC
LDA $4EA5
SBC #$01
STA $4EA5
CLD
LDA #$20
STA $F4
STA $F5
JSR L6E8B
BIT KBDSTROBE
L84EE LDA KBD
BPL L84EE
BIT KBDSTROBE
LDX #$FF
LDA #$FF
L84FA STA $4B00,X
STA $4C00,X
DEX
BNE L84FA
STA $4B00
STA $4C00
JMP L528B
L850C JSR PRINTSTR
ASC "WEAR ARMOUR:"0D
ASC "1-CLOTH, 2-LEATHER, 3-CHAIN,"0D
ASC "4-PLATE, 5-REFLECT, 6-POWER,"0D
ASC "WHICH? "00
JSR L653E
STA $F0
CMP #$07
BCC L856B
LDA #$00
STA $F0
L856B CLC
ADC #$1D
JSR $409C
LDX $F0
LDA $4E60,X
BNE L858E
LDA $F0
BEQ L858E
JSR PRINTSTR
ASC " NOT OWNED!"00
JMP L528B
L858E LDA $F0
ASL
ASL
ASL
CMP $4E15
BCC L85C5
JSR PRINTSTR
ASC " <-THOU ART NOT"0D
ASC "STRONG ENOUGH TO WEAR!"00
JMP L528B
L85C5 JSR PRINTSTR
ASC " READY."00
LDA $F0
STA $4E2C
JMP L528B
L85D8 JSR PRINTSTR
ASC "X-IT"00
LDA $11
CMP #$78
BCC L85F4
JSR PRINTSTR
ASC " WHAT?"8700
JMP L528B
L85F4 LDA $00
STA $F4
LDA $01
STA $F5
JSR $437B
LDA $12
CMP #$04
BEQ L8621
CMP #$00
BNE L860F
LDA $11
CMP #$24
BEQ L8621
L860F JSR PRINTSTR
ASC "-NOT HERE!"8700
JMP L528B
L8621 LDA $11
ASL
LDY #$00
STA ($06),Y
LDA $4E11
ASL
CLC
ADC #$78
STA $11
JMP L528B
L8634 JSR PRINTSTR
ASC "YELL WHAT?"8D00
L8643 LDA KBD
BPL L8643
CMP #$8D
BEQ L8655
JSR COUT
BIT KBDSTROBE
JMP L8643
L8655 JSR COUT
BIT KBDSTROBE
JMP L528B
L865E LDA #$28
STA $21
JSR HOME
LDA TXTSET
JSR $4084
JSR PRINTSTR
ASC 8D
ASC "A LEVEL "00
LDA $4E20
JSR PRBYTE
LDA #$A0
JSR COUT
LDA $4E10
JSR $4069
LDA #$A0
JSR COUT
LDA $4E12
CLC
ADC #$44
JSR $409C
LDA #$A0
JSR COUT
LDA $4E11
CLC
ADC #$48
JSR $409C
LDA #$8D
JSR COUT
LDA #$8D
JSR COUT
JSR PRINTSTR
ASC "WEAPON: "00
LDA $4E2B
CLC
ADC #$13
JSR $409C
LDX #$1B
LDY #$03
JSR $458A
JSR PRINTSTR
ASC "TORCHES-"00
LDA $4E2E
JSR PRBYTE
LDX #$00
LDY #$04
JSR $458A
JSR PRINTSTR
ASC "ARMOUR: "00
LDA $4E2C
CLC
ADC #$1D
JSR $409C
LDX #$1E
LDY #$04
JSR $458A
JSR PRINTSTR
ASC "KEYS-"00
LDA $4E2F
JSR PRBYTE
LDX #$01
LDY #$05
JSR $458A
JSR PRINTSTR
ASC "SPELL: "00
LDA $4E2D
CLC
ADC #$24
JSR $409C
LDX #$1D
LDY #$05
JSR $458A
JSR PRINTSTR
ASC "TOOLS-"00
LDA $4E30
JSR PRBYTE
LDX #$00
LDY #$07
JSR $458A
LDA #$3E
JSR $409C
LDA #$AD
JSR COUT
LDA $4E15
JSR PRBYTE
LDX #$01
LDY #$08
JSR $458A
LDA #$3F
JSR $409C
LDA #$AD
JSR COUT
LDA $4E16
JSR PRBYTE
LDX #$0E
LDY #$07
JSR $458A
LDA #$40
JSR $409C
LDA #$AD
JSR COUT
LDA $4E17
JSR PRBYTE
LDX #$0D
LDY #$08
JSR $458A
LDA #$41
JSR $409C
LDA #$AD
JSR COUT
LDA $4E18
JSR PRBYTE
LDX #$1F
LDY #$07
JSR $458A
LDA #$42
JSR $409C
LDA #$AD
JSR COUT
LDA $4E19
JSR PRBYTE
LDX #$1A
LDY #$08
JSR $458A
LDA #$43
JSR $409C
LDA #$AD
JSR COUT
LDA $4E1A
JSR PRBYTE
LDX #$00
LDY #$0A
JSR $458A
JSR PRINTSTR
ASC "WEAPONS: "00
LDX #$01
L87E1 LDA $4E40,X
BEQ L8802
STX $F0
TXA
CLC
ADC #$13
JSR $409C
JSR PRINTSTR
ASC "S-"00
LDX $F0
LDA $4E40,X
JSR PRBYTE
LDA #$A0
JSR COUT
L8802 INX
CPX #$0A
BCC L87E1
LDX #$00
LDY #$0D
JSR $458A
JSR PRINTSTR
ASC "ARMOUR: "00
LDX #$01
L881C LDA $4E60,X
BEQ L883C
STX $F0
TXA
CLC
ADC #$1D
JSR $409C
JSR PRINTSTR
ASC "-"00
LDX $F0
LDA $4E60,X
JSR PRBYTE
LDA #$A0
JSR COUT
L883C INX
CPX #$07
BCC L881C
LDX #$00
LDY #$0F
JSR $458A
JSR PRINTSTR
ASC "SPELLS: "00
LDX #$01
L8856 LDA $4E80,X
BEQ L8877
STX $F0
TXA
CLC
ADC #$24
JSR $409C
JSR PRINTSTR
ASC "S-"00
LDX $F0
LDA $4E80,X
JSR PRBYTE
LDA #$A0
JSR COUT
L8877 INX
CPX #$0A
BCC L8856
LDX #$00
LDY #$11
JSR $458A
JSR PRINTSTR
ASC "ITEMS: "00
LDX #$00
L8890 LDA $4EA0,X
BEQ L88B1
STX $F0
TXA
CLC
ADC #$2E
JSR $409C
JSR PRINTSTR
ASC "S-"00
LDX $F0
LDA $4EA0,X
JSR PRBYTE
LDA #$A0
JSR COUT
L88B1 INX
CPX #$10
BCC L8890
LDX #$00
L88B8 LDA KBD
BPL L88B8
BIT KBDSTROBE
JSR HOME
LDA TXTCLR
LDA HIRES
JSR $44DE
JMP L528B