You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

4450 lines
81 KiB

; rz (receive Zmodem) is a disassembly of CP/M 3 binaries by Wilfried Schmitten released in 1992.
; this file is an attempt to reconstruct the Z80 assembler source code which has been lost
; credit to Wilfried Schmitten for writing this program initially
;
; +-----------------------------------------------------------------+
; | This file is generated by The Interactive Disassembler (IDA) FW |
; | Copyright (c) 1997 by DataRescue sprl, <ida@datarescue.com> |
; | Professional version of IDA is at http://www.idapro.com |
; +-----------------------------------------------------------------+
;
; File Name C:\RZ.COM
; Format COM File
; Base Address: 0000h Range: 0100h - 1800h Loaded length: 1700h
; Processor: z80
; Target assembler: Table Driven Assembler (TASM) by Speech Technology Inc.
bdos .equ 0005h
A_READ .equ 3
A_STATIN .equ 7
C_WRITESTR .equ 9
S_BDOSVER .equ 12
DRV_SET .equ 14
F_USERNUM .equ 32
S_SYSVAR .equ 49
;----------------------------------------------------------------------------
.org 100h
start: ld sp, nstack ; Setup local stack
ld c, S_BDOSVER
call bdos ; Return CP/M version #
cp '0' ; Get CP/M vers. #
jp c, err_vern ; CP/M 2 or less?
ld de, str_welc
ld c, C_WRITESTR ;yes
call bdos ;"RZ for ..."; Output string
call sub_0_195 ;print string
ld hl, (word_0_179E)
xor a
ld b, 14h
call sub_0_1786
ld a, (80h)
or a
jr z, loc_0_174
ld (hl), 2
ld de, 82h
ex de, hl
ld a, 0FFh
call sub_0_172E
jp nz, err_exit
ld hl, (word_0_179E)
inc hl
ld a, (hl)
or a
jp z, loc_0_174
inc hl
ld e, (hl)
inc hl
ld d, (hl)
inc hl
ld a, (de)
cp 2Dh
jr nz, loc_0_152
call sub_0_39A
ld e, (hl)
inc hl
ld d, (hl)
ld a, d
or e
jr z, loc_0_174
loc_0_152: ; CODE XREF: start+46j
ld hl, 17A3h
ex de, hl
call sub_0_1492
ld hl, byte_0_17A3
xor a
or (hl)
jr nz, loc_0_164
ld a, (byte_0_17A1)
ld (hl), a
loc_0_164: ; CODE XREF: start+5Ej
ld bc, 0Dh
add hl, bc
dec de
ldi
ld de, 17A3h
call sub_0_1B0
call sub_0_3C9
loc_0_174: ; CODE XREF: start+25j start+3Bj
; ...
ld de, str_sxfr
ld c, C_WRITESTR
call bdos ; Output string
call sub_0_3EF
call sub_0_8D1
call sub_0_451
loc_0_185: ; DATA XREF: sub_0_195+17w
ld bc, 0
ld (word_0_17A2), bc
ld de, 17A3h
call sub_0_1B0
jp 0
; End of function start
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_195: ; CODE XREF: start+15p
ld a, (4)
ld b, a
rlca
rlca
rlca
rlca
and 0Fh
ld (byte_0_17A0), a
ld a, b
and 0Fh
inc a
ld (byte_0_17A1), a
ld hl, (byte_0_17A0)
ld (loc_0_185+1), hl
ret
; End of function sub_0_195
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1B0: ; CODE XREF: start+6Ep start+8Fp
ld a, (de)
push af
dec de
ld a, (de)
ld e, a
ld c, F_USERNUM
call bdos ; get/set user number
pop af
dec a
ld e, a
ld c, DRV_SET
jp 5 ; Select disc
; End of function sub_0_1B0
;----------------------------------------------------------------------------
err_vern: ld de, str_cpm3 ; Display version
ld c, C_WRITESTR ; error and exit
call bdos
err_exit: ld de, str_info ; Display usage
ld c, C_WRITESTR ; and exit to
call bdos ; CP/M
jp 0
;----------------------------------------------------------------------------
str_welc: .text "RZ for CP/M 3 V 1.04\r\n"
.text "(C) 92 wshbg\r\n\n$"
str_sxfr: .text "start your local X/Y/ZModem sending program\r\n\n$"
str_cpm3: .text "sorry, CP/M 3 Tool\r\n$"
str_info: .text "usage: rz [-?pbcrxyz] [du:fn]\r\n\n"
.text " options for ZModem:\r\n"
.text " ? this help\r\n"
.text " p protect File\r\n"
.text " b receive binary\r\n"
.text " c convert to local linefeed\r\n"
.text " r resume transmission\r\n"
.text " x,y,z Protokoll\r\n"
.text " du:fn defaults to XModem\r\n\n"
.text "these values override options from sender\r\n$"
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_39A: ; CODE XREF: start+48p
push hl
push de
loc_0_39C: ; CODE XREF: sub_0_39A+12j
inc de
ld a, (de)
or a
jr z, loc_0_3AE
ld hl,loc_0_3B1
ld bc, 8
cpir
call z, sub_0_67F
jr loc_0_39C
;----------------------------------------------------------------------------
loc_0_3AE: ; CODE XREF: sub_0_39A+5j
pop de
pop hl
ret
; End of function sub_0_39A
;----------------------------------------------------------------------------
loc_0_3B1: .text "?PBCXYZR"
.dw sub_0_3E9
.dw sub_0_3D1
.dw sub_0_3CD
.dw sub_0_3C9
.dw sub_0_3E3
.dw sub_0_3DD
.dw sub_0_3D7
.dw err_exit
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_3C9: ; CODE XREF: start+71p
ld a, 1
jr loc_0_3D3
sub_0_3CD: ld a,3
jr loc_0_3D3
sub_0_3D1: ld a,4
loc_0_3D3: ld (byte_0_8AF), a
ret
;----------------------------------------------------------------------------
sub_0_3D7: ld a,$ff
ld (08B0h),a
ret
sub_0_3DD: ld a,$ff
ld (08B2h),a
ret
sub_0_3E3: ld a,$ff
ld (08B1h),a
ret
sub_0_3E9: ld a,$ff
ld (08B3h),a
ret
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_3EF: ; CODE XREF: start+7Cp
xor a
ld (byte_0_460), a
ld (byte_0_464), a
ld c, S_SYSVAR
ld de, 45Fh
call bdos ; Access the system variables
ld a, h
cpl
ld h, a
ld a, l
cpl
ld l, a
ld (word_0_46F), hl
ld c, S_SYSVAR
ld de, 463h
call bdos ; Access the system variables
ld (word_0_46B), hl
ld de, (word_0_46F)
ld a, h
and d
ld h, a
ld a, l
and e
ld l, a
ld (word_0_465), hl
ld c, S_SYSVAR
ld de, 467h
call bdos ; Access the system variables
ld (word_0_46D), hl
ld de, (word_0_46F)
ld a, h
and d
ld h, a
ld a, l
and e
ld l, a
ld (word_0_469), hl
loc_0_437: ; CODE XREF: sub_0_451+Cj
ld a, 0FEh
ld (byte_0_464), a
ld de, 463h
ld c, S_SYSVAR
call bdos ; Access the system variables
ld a, 0FEh
ld (byte_0_468), a
ld de, 467h
ld c, S_SYSVAR
jp 5 ; Access the System Control Block
; End of function sub_0_3EF
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_451: ; CODE XREF: start+82p
ld hl, (word_0_46B)
ld (word_0_465), hl
ld hl, (word_0_46D)
ld (word_0_469), hl
jr loc_0_437
; End of function sub_0_451
;----------------------------------------------------------------------------
.db 28h ; (
byte_0_460: .db 0 ; DATA XREF: sub_0_3EF+1w
.db 0 ;
.db 0 ;
.db 24h ; $
byte_0_464: .db 0 ; DATA XREF: sub_0_3EF+4w sub_0_3EF+4Aw
word_0_465: .dw 0 ; DATA XREF: sub_0_3EF+2Dw
; sub_0_451+3w
.db 22h ; "
byte_0_468: .db 0 ; DATA XREF: sub_0_3EF+57w
word_0_469: .dw 0 ; DATA XREF: sub_0_3EF+45w
; sub_0_451+9w
word_0_46B: .dw 0 ; DATA XREF: sub_0_3EF+20w
; sub_0_451r
word_0_46D: .dw 0 ; DATA XREF: sub_0_3EF+38w
; sub_0_451+6r
word_0_46F: .dw 0 ; DATA XREF: sub_0_3EF+15w
; sub_0_3EF+23r ...
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_471: ; CODE XREF: sub_0_961+92p
; seg000:0A29p ...
call bdos
or a
ret
; End of function sub_0_471
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_476: ; CODE XREF: sub_0_4A4+37p
; sub_0_961+61p
push af
loc_0_477: ; CODE XREF: sub_0_476+8j
push bc
xor a
ld b, a
ld c, a
cpir
pop bc
djnz loc_0_477
pop af
ret
; End of function sub_0_476
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_482: ; CODE XREF: sub_0_1289+122p
ld a, (byte_0_2D04)
ld de, text495h ; Update error string with errors
call sub_0_16E7
ld de, text493h
ld c, C_WRITESTR
jp 5 ; Output string
; End of function sub_0_482
;----------------------------------------------------------------------------
text493h: .text "\r\n"
text495h: .db 0,0,0
.text " error(s)\r\n$"
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_4A4: ; CODE XREF: sub_0_961+82p
ld de, 17A3h
ld hl, 4F8h
ld (hl), 3Ah
inc hl
xor a
ld b, 0Dh
call sub_0_1786
inc de
call sub_0_16C4
dec de
ld a, (de)
add a, 40h
ld (byte_0_4F4), a
dec de
ld a, (de)
ld de, 4F5h
call sub_0_16E7
ld a, 24h
ld (byte_0_507), a
ld de, text4F2h
ld c, C_WRITESTR
call bdos ; Output string
ld hl, (2CD4h)
ld a, h
or l
ret z
ld b, 1
call sub_0_476
dec hl
ld (hl), 24h
ld de, (2CD4h)
ld c, C_WRITESTR
call bdos ; Output string
ld de, text508h
ld c, C_WRITESTR
jp 5 ; Output string
; End of function sub_0_4A4
;----------------------------------------------------------------------------
text4F2h: .text "\r\n"
byte_0_4F4: .db 0 ; DATA XREF: sub_0_4A4+17w
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 20h ;
byte_0_507: .db 0 ; DATA XREF: sub_0_4A4+24w
text508h: .text "\r\n$"
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_50B: ; CODE XREF: sub_0_D0Ep sub_0_D30+30p
; ...
ld hl, 2CABh
ld de, 51Fh
call loc_0_774
ld (hl), 24h
ld de, text51Eh
ld c, C_WRITESTR
jp 5 ; Output string
; End of function sub_0_50B
;----------------------------------------------------------------------------
text51Eh:
.db 0Dh ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
.db 0 ;
ld hl,str_busy
ld a,0
inc a
and 3
ld (052Dh),a
ld e,a
ld d,0
add hl,de
ld a,(hl)
ld (0549h),a
ld de,0548h
ld c,9
jp bdos
str_busy: .text "|/-\\ |\b\b$"
ld de,0569h
jr sub_0_555
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_552: ld de, text55Ah
sub_0_555: ld c, C_WRITESTR
jp bdos ; Output string
;----------------------------------------------------------------------------
text55Ah: .text "File skipped\r\n$"
text569h: .text "can't open any file\r\n$"
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_57F: ; CODE XREF: sub_0_DE7+Dp
ld hl,byte_0_586
ld (hl), a
inc hl
ld (hl), c
ret
; End of function sub_0_57F
;----------------------------------------------------------------------------
byte_0_586: .db 0 ;
byte_0_587: .db 0 ; DATA XREF: sub_0_5B4r
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_588: ; CODE XREF: sub_0_588+1Fj
; sub_0_5D4+4p ...
or a
ld hl, (word_0_1808)
ld de, 1000h
sbc hl, de
jr z, loc_0_5A9
ld c, A_STATIN
call bdos ; Auxiliary Input status
or a
jr z, loc_0_5A9
ld c, A_READ
call bdos ; Auxiliary (Reader) input
ld c, a
ld hl, 1808h
call sub_0_61C
jr sub_0_588
;----------------------------------------------------------------------------
loc_0_5A9: ; CODE XREF: sub_0_588+9j sub_0_588+11j
ld hl, 587h
or (hl)
ret nz
ld hl, (1808h)
ld a, h
or l
ret
; End of function sub_0_588
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_5B4: ; CODE XREF: sub_0_5D4+12p
ld a, (byte_0_587)
or a
ld hl, 1808h
jp z, loc_0_5F7
push af
ld hl, 587h
dec (hl)
dec hl
pop af
ld a, (hl)
ret
; End of function sub_0_5B4
;----------------------------------------------------------------------------
loc_0_5C7: LD C,4 ; punch out
LD E,A
JP bdos
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_5CD: ld c, 8 ; CODE XREF: seg000:1462p
call bdos ; BDOS function 8 (A_STATOUT) - Auxiliary Output status
or a
ret
; End of function sub_0_5CD
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_5D4: ; CODE XREF: sub_0_DE7+11p
push bc
ld b, 5Fh
loc_0_5D7: ; CODE XREF: sub_0_5D4+Dj
push bc
call sub_0_588
pop bc
jr nz, loc_0_5E6
call sub_0_5EB
djnz loc_0_5D7
call sub_0_588
loc_0_5E6: ; CODE XREF: sub_0_5D4+8j
call nz, sub_0_5B4
pop bc
ret
; End of function sub_0_5D4
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_5EB: ; CODE XREF: sub_0_5D4+Ap
push bc
ld a, 4
ld b, 0
loc_0_5F0: ; CODE XREF: sub_0_5EB+5j sub_0_5EB+8j
djnz loc_0_5F0
dec a
jr nz, loc_0_5F0
pop bc
ret
; End of function sub_0_5EB
;----------------------------------------------------------------------------
loc_0_5F7: ; CODE XREF: sub_0_5B4+7j
ld e, (hl)
inc hl
ld d, (hl)
ld a, d
or e
ret z
dec de
ld (hl), d
dec hl
ld (hl), e
ld de, 4
add hl, de
push hl
ld e, (hl)
inc hl
ld d, (hl)
inc hl
add hl, de
ex (sp), hl
inc de
ld a, e
and 0FFh
ld (hl), a
inc hl
ld a, d
and 0Fh
ld (hl), a
pop hl
ld a, 1
or a
ld a, (hl)
ret
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_61C: ; CODE XREF: sub_0_588+1Cp
or a
push hl
ld e, (hl)
inc hl
ld d, (hl)
ld hl, 1000h
sbc hl, de
pop hl
ret z
inc de
ld (hl), e
inc hl
ld (hl), d
inc hl
push hl
ld e, (hl)
inc hl
ld d, (hl)
inc hl
inc hl
inc hl
add hl, de
ex (sp), hl
inc de
ld a, e
and 0FFh
ld (hl), a
inc hl
ld a, d
and 0Fh
ld (hl), a
pop hl
ld (hl), c
ret
; End of function sub_0_61C
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_643: ; CODE XREF: sub_0_961+54p
; sub_0_11FA+69p
ld hl, 17A2h
ld b, 25h
jr loc_0_650
; End of function sub_0_643
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_64A: ; CODE XREF: sub_0_961+9Ep
; seg000:0A63p
ld b, 3
jr loc_0_650
; End of function sub_0_64A
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_64E: ; CODE XREF: sub_0_8D1+Cp sub_0_BD3+2Fp
ld b, 6
loc_0_650: ; CODE XREF: sub_0_643+5j sub_0_64A+2j
xor a
jp sub_0_1786
; End of function sub_0_64E
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_654: ; CODE XREF: seg000:0AAEp
xor a
or (hl)
ret z
dec (hl)
inc hl
inc hl
ld e, (hl)
ld d, 0
ld a, e
inc a
and 7Fh
ld (hl), a
inc hl
adc hl, de
ld a, (hl)
ret nc
ccf
ret
; End of function sub_0_654
;----------------------------------------------------------------------------
sub_0_669: LD A,80H
SUB (HL)
RET Z
INC (HL)
INC HL
LD E,(HL)
LD D,0
LD A,E
INC A
AND 7FH
LD (HL),A
INC HL
INC HL
ADC HL,DE
LD (HL),C
RET NC
CCF
RET
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_67F: ; CODE XREF: sub_0_39A+Fp sub_0_BD3+42j
; ...
add hl, bc
sla c
add hl, bc
ld c, (hl)
inc hl
ld h, (hl)
ld l, c
jp (hl)
; End of function sub_0_67F
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_688: ; CODE XREF: seg000:0726p sub_0_BD3+13p
; ...
xor a
push bc
push de
push hl
ld (hl), a
ld d, h
ld e, l
inc de
jr loc_0_697
; End of function sub_0_688
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_692: ; CODE XREF: seg000:077Bp seg000:07ADp
; ...
push bc
push de
push hl
ldi
loc_0_697: ldi ; CODE XREF: sub_0_688+8j
ldi
ldi
pop hl
pop de
pop bc
ret
; End of function sub_0_692
;----------------------------------------------------------------------------
loc_0_6A1: PUSH HL ;unref. ?
POP IX ;unref. ?
PUSH DE ;unref. ?
POP IY ;unref. ?
LD A,(IX+3) ;unref. ?
XOR (IY+3) ;unref. ?
JP P,loc_0_6B6 ;unref. ?
XOR (IX+3) ;unref. ?
loc_0_6B3: RET M ;unref. ?
CCF ;unref. ?
RET ;unref. ?
loc_0_6B6: XOR (IX+3) ;unref. ?
JP P,loc_0_6C2 ;unref. ?
CALL loc_0_6C2 ;unref. ?
SCF ;unref. ?
JR loc_0_6B3 ;unref. ?
loc_0_6C2: PUSH BC
PUSH DE ;unref. ?
PUSH HL ;unref. ?
EX DE,HL ;unref. ?
OR A ;unref. ?
LD B,4 ;unref. ?
loc_0_6C9: LD A,(DE) ;unref. ?
SBC A,(HL) ;unref. ?
INC DE ;unref. ?
INC HL ;unref. ?
DJNZ loc_0_6C9 ;unref. ?
POP HL ;unref. ?
POP DE ;unref. ?
POP BC ;unref. ?
RET ;unref. ?
loc_0_6D3: PUSH BC
PUSH DE
PUSH HL
LD B,4
loc_0_6D8: LD A,(DE)
XOR (HL)
JR NZ,loc_0_6E0
INC DE
INC HL
DJNZ loc_0_6D8
loc_0_6E0: POP HL
POP DE
POP BC
RET
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_6E4: ; CODE XREF: sub_0_11FA+4Bp
push bc
push de
push hl
or a
ex af, af'
ld a, 4
loc_0_6EB: ; CODE XREF: sub_0_6E4+10j
ex af, af'
ld a, (de)
adc a, (hl)
ld (bc), a
inc bc
inc de
inc hl
ex af, af'
dec a
jr nz, loc_0_6EB
pop hl
pop de
pop bc
ret
; End of function sub_0_6E4
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_6FA: ; CODE XREF: seg000:0799p
push bc
push de
push hl
ex de, hl
or a
ex af, af'
ld a, 4
loc_0_702: ex af, af' ; CODE XREF: sub_0_6FA+11j
ld a, (de)
sbc a, (hl)
ld (bc), a
inc bc
inc hl
inc de
ex af, af'
dec a
jr nz, loc_0_702
ex af, af'
pop hl
pop de
pop bc
ret
; End of function sub_0_6FA
;----------------------------------------------------------------------------
loc_0_712: PUSH BC
PUSH HL
LD A,1
ADD A,(HL)
LD (HL),A
JR NC,loc_0_723
LD B,3
loc_0_71C: INC HL
LD A,0
ADC A,(HL)
LD (HL),A
DJNZ loc_0_71C
loc_0_723: POP HL
POP BC
RET
;----------------------------------------------------------------------------
loc_0_726: ; CODE XREF: sub_0_8A0+Cj
call sub_0_688
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_729: ; CODE XREF: seg000:0A77p
push bc
push hl
ld a, (hl)
sub 1
ld (hl), a
ld b, 3
loc_0_731: ; CODE XREF: sub_0_729+Dj
inc hl
ld a, (hl)
sbc a, 0
ld (hl), a
djnz loc_0_731
pop hl
pop bc
ret
; End of function sub_0_729
;----------------------------------------------------------------------------
loc_0_73B: PUSH BC
PUSH DE
PUSH HL
EX DE,HL
LD A,004H
loc_0_741: PUSH AF
LD A,(DE)
AND (HL)
LD (BC),A
INC BC
INC DE
INC HL
POP AF
DEC A
JR NZ,loc_0_741
POP HL
POP DE
POP BC
RET
;----------------------------------------------------------------------------
loc_0_750: .db 0, 0CAh, 9Ah, 3Bh
.db 0, 0E1h, 0F5h, 5
.db 80h, 96h, 98h, 0
.db 40h, 42h, 0Fh, 0
.db 0A0h, 86h, 1, 0
.db 10h, 27h, 0, 0
.db 0E8h, 3, 0, 0
.db 64h, 0, 0, 0
.db 0Ah, 0, 0, 0
loc_0_774: ld (smod_w_7BF), de; CODE XREF: sub_0_50B+6p
ld de, 2891h
call sub_0_692
ld c,+(loc_0_774-loc_0_750)/4
ld de,loc_0_750-4
xor a
ld (smod_b_7BA), a
ld a, 30h
ld (smod_b_7B4), a
inc de
inc de
inc de
inc de
ld b, 0Ah
loc_0_792: push bc ; CODE XREF: seg000:07B1j
ld hl, 2891h
ld bc, 2895h
call sub_0_6FA
pop bc
jr c, loc_0_7B3
push de
ld a, (smod_b_7B4)
inc a
ld (smod_b_7B4), a
ld de, 2891h
ld hl, 2895h
call sub_0_692
pop de
djnz loc_0_792
;----------------------------------------------------------------------------
smod_b_7B4: .EQU $+1
loc_0_7B3: LD A,30H ; self modifying
CP 30H
JR NZ,7BEH
smod_b_7BA: .EQU $+1
LD A,0
OR A
JR Z,7CBH
smod_w_7BF: .EQU $+1
LD HL,0
LD (HL),A
INC HL
LD (7BFH),HL
LD A,30H
LD (7BAH),A
DEC C
JR NZ,787H
LD A,(2891H)
AND 0FH
ADD A,30H
LD HL,(7BFH)
LD (HL),A
INC HL
LD (HL),0
RET
PUSH AF
smod_b_7DF: .EQU $+1
ADD A,0
LD (smod_b_7DF),A
POP AF
RET
loc_0_7E5: .db 20h ;
.db 83h ; ?
.db 0B8h ; ¸
.db 0EDh ; í
.db 0E3h ; ã
.db 20h ;
.db 0BBh ; »
.db 0DEh ; Þ
loc_0_7ED: PUSH AF
smod_w_7F0: .EQU $+2
LD IY,289DH
LD IX,2899H
XOR (ix+0)
LD H,0
LD L,A
ADD HL,HL
ADD HL,HL
LD B,H
LD C,L
ADD IY,BC
LD A,(IY)
XOR (IX+1)
LD (ix+0),A
LD A,(IY+1)
XOR (IX+2)
LD (IX+1),A
LD A,(IY+2)
XOR (IX+3)
LD (IX+2),A
LD A,(IY+3)
LD (IX+3),A
POP AF
RET
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_825: ; CODE XREF: sub_0_8D1+Fp
push de
push hl
ld hl, (smod_w_7F0)
ld bc, 3FFh
add hl, bc
push hl
pop iy
ld ix, loc_0_7E5
xor a
loc_0_836: ; CODE XREF: sub_0_825+5Bj
push af
ld hl, 0FFFFh
ld de, 0FFFFh
xor e
ld e, a
ld b, 8
loc_0_841: scf ; CODE XREF: sub_0_825+3Bj
rr h
rr l
rr d
rr e
jr nc, loc_0_860
ld a, e
xor (ix+0)
ld e, a
ld a, d
xor (ix+1)
ld d, a
ld a, l
xor (ix+2)
ld l, a
ld a, h
xor (ix+3)
ld h, a
loc_0_860: djnz loc_0_841 ; CODE XREF: sub_0_825+25j
ld a, h
cpl
ld (iy+0), a
dec iy
ld a, l
cpl
ld (iy+0), a
dec iy
ld a, d
cpl
ld (iy+0), a
dec iy
ld a, e
cpl
ld (iy+0), a
dec iy
pop af
inc a
jr nz, loc_0_836
pop hl
pop de
ret
; End of function sub_0_825
;----------------------------------------------------------------------------
; CODE XREF: sub_0_13BA+Fp
; sub_0_13BA+1Ep
loc_0_885: PUSH AF
smod_w_887: .equ $+1 ; self modifying
LD HL,0
LD DE,1021H
XOR H
LD H,A
LD B,8
loc_0_890: ADD HL,HL
JR NC,loc_0_899
LD A,H
XOR D
LD H,A
LD A,L
XOR E
LD L,A
loc_0_899: DJNZ loc_0_890
LD (smod_w_887),HL
POP AF
RET
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_8A0: ; CODE XREF: sub_0_13BA+9p
xor a
ld h, a
ld l, a
ld (smod_b_7DF), a
ld (smod_w_887), hl
ld hl, 2899h
jp loc_0_726
; End of function sub_0_8A0
;----------------------------------------------------------------------------
byte_0_8AF: .db 4 ; DATA XREF: sub_0_3C9+Aw sub_0_8D1+34r
; ...
byte_0_8B0: .db 0 ; DATA XREF: sub_0_8D1+23r
byte_0_8B1: .db 0 ; DATA XREF: sub_0_961r
byte_0_8B2: .db 0 ; DATA XREF: sub_0_961+14r
byte_0_8B3: .db 0 ; DATA XREF: seg000:0A3Cr
word_0_8B4: .dw 0 ; DATA XREF: sub_0_8B6+17w
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_8B6: ; CODE XREF: sub_0_8D1+20p
xor a
ld c, a
ld b, 8
ld a, h
loc_0_8BB: ; CODE XREF: sub_0_8B6+Cj
rlca
set 7, c
jr c, loc_0_8C4
rr c
djnz loc_0_8BB
loc_0_8C4: ; CODE XREF: sub_0_8B6+8j
ld a, h
and c
ld h, a
ld l, 0
ld (2CEBh), hl
dec hl
ld (word_0_8B4), hl
ret
; End of function sub_0_8B6
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_8D1: ; CODE XREF: start+7Fp
xor a
ld hl, 2C9Dh
ld b, 61h
call sub_0_1786
ld hl, 1808h
call sub_0_64E
call sub_0_825
ld hl, (word_0_179E)
ld (2CE9h), hl
ld de, (6)
ex de, hl
or a
sbc hl, de
call sub_0_8B6
ld a, (byte_0_8B0)
cp 0
jr z, loc_0_8FD
ld a, 7
loc_0_8FD: ; CODE XREF: sub_0_8D1+28j
ld (2CA4h), a
ld a, 10h
ld (2C9Eh), a
ld a, (byte_0_8AF)
cp 3
jr c, loc_0_947
ld a, 1
ld (smod_b_B0A), a
call loc_0_ACF
jp c, loc_0_954
or a
jr z, loc_0_92B
cp 4
jr z, loc_0_924
cp 0Fh
jr nz, loc_0_924
jr locret_0_953
;----------------------------------------------------------------------------
loc_0_924: ; CODE XREF: sub_0_8D1+4Bj
; sub_0_8D1+4Fj
call sub_0_BB4
jr c, loc_0_954
jr locret_0_953
;----------------------------------------------------------------------------
loc_0_92B: ; CODE XREF: sub_0_8D1+47j
; sub_0_8D1+74j
ld a, 3
ld (byte_0_8AF), a
xor a
ld (byte_0_2D04), a
call sub_0_11C1
jr c, loc_0_954
call sub_0_961
jr c, loc_0_954
jr z, locret_0_953
call sub_0_11FA
jr c, loc_0_954
jr loc_0_92B
;----------------------------------------------------------------------------
loc_0_947: ; CODE XREF: sub_0_8D1+39j
call sub_0_961
jr c, loc_0_954
jr z, locret_0_953
call sub_0_11FA
jr c, loc_0_954
locret_0_953: ; CODE XREF: sub_0_8D1+51j
; sub_0_8D1+58j ...
ret
;----------------------------------------------------------------------------
loc_0_954: ; CODE XREF: sub_0_8D1+43j
; sub_0_8D1+56j ...
call sub_0_DD9
ld a, (2CA5h)
cp 0FFh
call z, sub_0_D0E
jr locret_0_953
; End of function sub_0_8D1
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_961: ; CODE XREF: sub_0_8D1+68p
; sub_0_8D1+76p ...
ld a, (byte_0_8B1)
cpl
ld hl, 8B2h
or (hl)
ld (2CA3h), a
ld a, (2CA4h)
or a
jr z, loc_0_975
ld (2CA1h), a
loc_0_975: ; CODE XREF: sub_0_961+Fj
ld a, (byte_0_8B2)
cp 0FFh
jr z, loc_0_988
ld a, (2CA2h)
cp 2
jr nz, loc_0_988
ld a, 0
ld (2CA3h), a
loc_0_988: ; CODE XREF: sub_0_961+19j
; sub_0_961+20j
ld a, (2CA2h)
cp 1
jr nz, loc_0_994
ld a, 0FFh
ld (2CA3h), a
loc_0_994: ; CODE XREF: sub_0_961+2Cj
ld a, (2CA1h)
cp 7
jr z, loc_0_9AE
ld a, (2CA1h)
cp 3
jr nz, loc_0_9AE
ld a, (2CA3h)
cp 0FFh
jr nz, loc_0_9AE
ld a, 7
ld (2CA1h), a
loc_0_9AE: ; CODE XREF: sub_0_961+38j
; sub_0_961+3Fj ...
ld a, (byte_0_8AF)
cp 3
jr c, loc_0_9E3
call sub_0_643
ld hl, (2CE9h)
xor a
or (hl)
scf
ret z
push hl
ld b, 1
call sub_0_476
dec hl
ld (hl), 20h
pop hl
ld de, 2CD0h
ld a, 7
ld (de), a
ld a, 0FFh
call sub_0_172E
ld hl, (2CD2h)
ld de, 17A3h
call sub_0_1492
ld hl, (byte_0_17A0)
ld (word_0_17A2), hl
loc_0_9E3: ; CODE XREF: sub_0_961+52j
; seg000:0A2Cj
call sub_0_4A4
ld de, 17A3h
call sub_0_169E
jr nz, loc_0_A11
ld de, 17A3h
ld c, 16h
call sub_0_471
ret c
ld a, 0FFh
ld (2CA5h), a
ld hl, 280Eh
call sub_0_64A
ld a, (2CD1h)
cp 2
jr c, loc_0_A0D
; End of function sub_0_961
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_A09: ; CODE XREF: seg000:0A11p
ld de, (2CD4h)
loc_0_A0D: ; CODE XREF: sub_0_961+A6j
ld a, 1
or a
ret
; End of function sub_0_A09
;----------------------------------------------------------------------------
loc_0_A11: ; CODE XREF: sub_0_961+8Bj
call sub_0_A09
ld a, (byte_0_8AF)
cp 4
jr nz, loc_0_A24
ld a, (2CA1h)
cp 7
jr nz, loc_0_A35
jr loc_0_A2E
;----------------------------------------------------------------------------
loc_0_A24: ; CODE XREF: seg000:0A19j seg000:0A41j
ld de, 17A3h
ld c, 13h
call sub_0_471
jr nc, loc_0_9E3
loc_0_A2E: ; CODE XREF: seg000:0A22j
call sub_0_552
ld a, 5
scf
ret
;----------------------------------------------------------------------------
loc_0_A35: ; CODE XREF: seg000:0A20j
ld a, (2CA1h)
cp 3
jr z, loc_0_A43
ld a, (byte_0_8B3)
cp 0FFh
jr nz, loc_0_A24
loc_0_A43: ; CODE XREF: seg000:0A3Aj
ld de, 2811h
ld c, 1Ah
call bdos ; BDOS function 26 (F_DMAOFF) - Set DMA address
ld e, 1
ld c, 2Ch
call bdos ; BDOS function 44 (F_MULTISEC) - Set number of records to read/write at once
ld de, 17A3h
ld c, 0Fh
call sub_0_471
ret c
ld a, 0FFh
ld (2CA5h), a
ld hl, 280Eh
call sub_0_64A
ld de, 17A3h
ld c, 23h
call sub_0_471
ret c
ld hl, 17C7h
ld (hl), 0
ld hl, 17C4h
call sub_0_729
ld de, 2CABh
call sub_0_692
ex de, hl
ld b, 7
loc_0_A83: ; CODE XREF: seg000:0A90j
push hl
sla (hl)
inc hl
rl (hl)
inc hl
rl (hl)
inc hl
rl (hl)
pop hl
djnz loc_0_A83
ld de, 17A3h
ld c, 21h
call sub_0_471
ret c
ld a, (2CA1h)
cp 3
jr z, loc_0_AA6
ld a, 9
or a
ret
;----------------------------------------------------------------------------
loc_0_AA6: ; CODE XREF: seg000:0AA0j
ld a, 80h
ld (280Eh), a
loc_0_AAB: ; CODE XREF: seg000:0AB5j
ld hl, 280Eh
call sub_0_654
jr z, loc_0_AC6
cp 1Ah
jr nz, loc_0_AAB
ld a, (2810h)
dec a
ld (280Fh), a
ld hl, 280Eh
ld a, 7Fh
sub (hl)
jr loc_0_AC8
;----------------------------------------------------------------------------
loc_0_AC6: ; CODE XREF: seg000:0AB1j
ld a, 80h
loc_0_AC8: ; CODE XREF: seg000:0AC4j
ld (280Eh), a
ld a, 1
or a
ret
;----------------------------------------------------------------------------
loc_0_ACF: ; CODE XREF: sub_0_8D1+40p
; sub_0_BB4+Ep
xor a
ld (byte_0_2D04), a
ld a, 4
ld hl, 8AFh
cp (hl)
ld a, 0
ret nz
ld hl, 2CEDh
ld b, 11h
xor a
call sub_0_1786
call sub_0_FAA
ld a, (2CA6h)
cp 0FFh
ld b, 5
jr z, loc_0_AF3
ld b, 0Ah
loc_0_AF3: push bc
ld ix, 2CE0h ; CODE XREF: seg000:0AEFj
ld (ix+3), 20h
ld (ix+2), 0
ld hl, (2CEBh)
ld (ix+0), l
ld (ix+1), h
smod_b_B0A: .equ $+1 ; DATA XREF: sub_0_8D1+3Dw
ld a,1 ; self modifying value
CALL sub_0_13BA
LD A,(smod_b_B0A)
CP 5
JR NZ,0B1AH
LD A,1
LD (smod_b_B0A),A
loc_0_B1A: CALL 0FD1H
LD HL,loc_0_B96
LD BC,0AH
CPIR
JP Z,sub_0_67F
loc_0_B28: LD HL,byte_0_2D04
INC (HL)
CALL 482H
loc_0_B2F: POP BC
DJNZ loc_0_AF3
XOR A
RET
loc_0_B34: POP BC
LD A,0FFH
SCF
RET
loc_0_B39: POP BC
CALL 0D9BH
LD A,0FH
RET
loc_0_B40: LD HL,2CE0H
CALL sub_0_688
JR 0B68H
loc_0_B48: LD IX,2CA7H
LD A,(IX+3)
AND 40H
LD (2C9DH),A
CALL 0EC7H
CP 0EBH
LD A,6
JR NZ,loc_0_B6A
LD HL,(2CE9H)
LD DE,2CAFH
LD BC,20H
LDIR
LD A,3
loc_0_B6A: PUSH AF
LD HL,2CE0H
CALL sub_0_688
POP AF
CALL sub_0_13BA
CALL 0FC9H
JP 0B28H
loc_0_B7B: LD HL,2CA7H
LD DE,2C9FH
CALL 692H
LD A,1
LD (smod_b_B0A),A
CALL 0EC7H
CP 0EBH
LD A,6
JR NZ,loc_0_B6A
POP BC
LD A,4
RET
loc_0_B96: .db 0 ;
.db 0Bh ;
.db 0FEh ; þ
.db 4 ;
.db 2 ;
.db 11h ;
.db 12h ;
.db 0Fh ;
.db 8 ;
.db 10h ;
loc_0_BA0: .dw loc_0_B34
.dw loc_0_B39
.dw loc_0_B1A
.dw loc_0_B34
.dw loc_0_B40
.dw loc_0_B48
.dw loc_0_B7B
.dw loc_0_B28
.dw loc_0_B2F
.dw loc_0_B2F
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_BB4: ; CODE XREF: sub_0_8D1+53p
; sub_0_BB4+14j
call sub_0_BD3
ret c
cp 0Bh
jr z, loc_0_BC2
cp 5
jr z, loc_0_BC2
or a
ret
;----------------------------------------------------------------------------
loc_0_BC2: ; CODE XREF: sub_0_BB4+6j sub_0_BB4+Aj
call loc_0_ACF
ret c
cp 4
jr z, sub_0_BB4
cp 0Fh
ld a, 0
ret z
ld a, 0FFh
scf
ret
; End of function sub_0_BB4
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_BD3: ; CODE XREF: sub_0_BB4p
call sub_0_961
jr nc, loc_0_BDF
ld a, 5
ld (smod_b_B0A), a
or a
ret
;----------------------------------------------------------------------------
loc_0_BDF: ; CODE XREF: sub_0_BD3+3j
cp 9
jr z, loc_0_BE9
ld hl, 2CABh
call sub_0_688
loc_0_BE9: ; CODE XREF: sub_0_BD3+Ej
xor a
ld (byte_0_2D04), a
call sub_0_FAA
call sub_0_FC9
call sub_0_D30
ld hl, 2CABh
ld de, 2CE0h
call sub_0_692
ld hl, 1808h
call sub_0_64E
ld a, 9
call sub_0_13BA
call sub_0_FD1
ld hl, loc_0_CE4
ld bc, 7
cpir
jp z, sub_0_67F
ld a, 0FFh
scf
ret
; End of function sub_0_BD3
;----------------------------------------------------------------------------
loc_0_C1C: LD HL,byte_0_2D04
INC (HL)
CALL 482H
LD HL,byte_0_2D04
LD A,0AH
CP (HL)
JP NZ,0BF0H
LD A,0FFH
SCF
RET
CALL 0EC7H
JP 0BF0H
LD DE,2CA7H
LD HL,2CABH
CALL 6D3H
JP NZ,0BF0H
CALL 0D0EH
JR Z,0C50H
LD A,0CH
LD (0B0AH),A
LD A,0FFH
SCF
RET
CALL 643H
LD A,0BH
OR A
RET
loc_0_C57: LD HL,byte_0_2D04
INC (HL)
CALL 482H
LD HL,byte_0_2D04
LD A,0AH
CP (HL)
JR NZ,0C6AH
LD A,0FFH
SCF
RET
loc_0_C6A: LD HL,2CAFH
CALL 0DDCH
JP 0BF0H
loc_0_C73: LD DE,2CA7H
LD HL,2CABH
CALL 6D3H
JP NZ,0C57H
CALL 529H
CALL 0EC7H
LD HL,0CF9H
LD BC,7
CPIR
JP Z,67FH
JP 0C1CH
loc_0_C93: LD A,0FFH
SCF
RET
loc_0_C97: XOR A
LD (byte_0_2D04),A
LD DE,2CF9H
LD HL,2CABH
LD BC,2CABH
CALL 6E4H
JP 0FBAH
loc_0_CAA: CALL 0C97H
JP 0C0AH
loc_0_CB0: CALL 0C97H
JP 0C7FH
loc_0_CB6: CALL 0C97H
LD HL,2CABH
LD DE,2CE0H
CALL 692H
LD A,3
CALL sub_0_13BA
JP 0C7FH
loc_0_CCA: CALL 0C97H
CALL 0D30H
JP C,0C47H
LD HL,2CABH
LD DE,2CE0H
CALL 692H
LD A,3
CALL sub_0_13BA
JP 0C0AH
loc_0_CE4: .db 6 ;
.db 0FEh ; þ
.db 4 ;
.db 0Bh ;
.db 0FFh ; ÿ
.db 0Ah ;
.db 0FCh ; ü
.db 1Ch ;
.db 0Ch ;
.db 73h ; s
.db 0Ch ;
.db 57h ; W
.db 0Ch ;
.db 36h ; 6
.db 0Ch ;
.db 30h ; 0
.db 0Ch ;
.db 1Ch ;
.db 0Ch ;
.db 1Ch ;
.db 0Ch ;
.db 0EBh ; ë
.db 0EAh ; ê
.db 0E9h ; é
.db 0E8h ; è
.db 0FFh ; ÿ
.db 0FEh ; þ
.db 10h ;
.dw loc_0_C93
.dw loc_0_C1C
.dw loc_0_C57
.dw loc_0_CAA
.dw loc_0_CB0
.dw loc_0_CB6
.dw loc_0_CCA
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_D0E: ; CODE XREF: sub_0_8D1+8Bp
; sub_0_11FA+64p
call sub_0_50B
call sub_0_D30
ret c
loc_0_D15: ld a, 1Ah ; CODE XREF: sub_0_D0E+13j
call loc_0_D68
ret c
ld hl, 280Eh
ld a, 1
cp (hl)
jr nz, loc_0_D15
ld a, 0
ld (2CA5h), a
ld c, 10h
ld de, 17A3h
jp sub_0_471
; End of function sub_0_D0E
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_D30: ; CODE XREF: sub_0_BD3+20p
; sub_0_D0E+3p ...
ld bc, (2CF5h)
ld a, b
or c
ret z
ld hl, (2CE9h)
loc_0_D3A: ; CODE XREF: sub_0_D30+2Ej
ld a, (2CA3h)
cp 0FFh
jr z, loc_0_D52
loc_0_D41:
ld a, 0 ; DATA XREF: sub_0_D30+23w
cp 0Dh
jr z, loc_0_D52
ld a, (hl)
cp 0Ah
jr nz, loc_0_D52
ld a, 0Dh
call loc_0_D68
ret c
loc_0_D52: ; CODE XREF: sub_0_D30+Fj sub_0_D30+15j
; ...
ld a, (hl)
ld (loc_0_D41+1), a
inc hl
dec bc
call loc_0_D68
ret c
ld a, b
or c
jr nz, loc_0_D3A
call sub_0_50B
call sub_0_FAA
xor a
ret
; End of function sub_0_D30
;----------------------------------------------------------------------------
loc_0_D68: ; CODE XREF: sub_0_D0E+9p sub_0_D30+1Ep
; ...
ld (byte_0_D6F), a
push bc
push de
push hl
;----------------------------------------------------------------------------
.db 0Eh ;
byte_0_D6F: .db 0 ; DATA XREF: seg000:0D68w
.db 21h ; !
.db 0Eh ;
.db 28h ; (
.db 0CDh ; Í
.db 69h ; i
.db 6 ;
.db 20h ;
.db 1Fh ;
.db 21h ; !
.db 0Eh ;
.db 28h ; (
.db 0CDh ; Í
.db 4Ah ; J
.db 6 ;
.db 0Eh ;
.db 1Ah ;
.db 11h ;
.db 11h ;
.db 28h ; (
.db 0CDh ; Í
.db 5 ;
.db 0 ;
.db 0Eh ;
.db 2Ch ; ,
.db 1Eh ;
.db 1 ;
.db 0CDh ; Í
.db 5 ;
.db 0 ;
.db 0Eh ;
.db 15h ;
.db 11h ;
.db 0A3h ; £
.db 17h ;
.db 0CDh ; Í
.db 71h ; q
.db 4 ;
.db 30h ; 0
.db 0D7h ; ×
.db 0E1h ; á
.db 0D1h ; Ñ
.db 0C1h ; Á
.db 0C9h ; É
.db 21h ; !
.db 0E0h ; à
.db 2Ch ; ,
.db 0CDh ; Í
.db 88h ; ?
.db 6 ;
.db 6 ;
.db 4 ;
.db 0C5h ; Å
.db 3Eh ; >
.db 8 ;
.db 0CDh ; Í
.db 0BAh ; º
.db 13h ;
.db 6 ;
.db 64h ; d
.db 0CDh ; Í
.db 0E7h ; ç
.db 0Dh ;
.db 38h ; 8
.db 8 ;
.db 0FEh ; þ
.db 4Fh ; O
.db 28h ; (
.db 8 ;
.db 0FEh ; þ
.db 0FDh ; ý
.db 28h ; (
.db 4 ;
.db 0C1h ; Á
.db 10h ;
.db 0E8h ; è
.db 0C5h ; Å
.db 0C1h ; Á
.db 6 ;
.db 1 ;
.db 0CDh ; Í
.db 0E7h ; ç
.db 0Dh ;
.db 0AFh ; ¯
.db 0C9h ; É
.db 18h ;
.db 18h ;
.db 18h ;
.db 18h ;
.db 18h ;
.db 18h ;
.db 18h ;
.db 18h ;
.db 18h ;
.db 18h ;
.db 8 ;
.db 8 ;
.db 8 ;
.db 8 ;
.db 8 ;
.db 8 ;
.db 8 ;
.db 8 ;
.db 8 ;
.db 8 ;
.db 0 ;
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_DD9: ; CODE XREF: sub_0_8D1+83p
ld hl, 0DC4h
; End of function sub_0_DD9
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_DDC: ; CODE XREF: sub_0_DDC+9j sub_0_13BA+6p
ld a, (hl)
inc hl
or a
ret z
push hl
call loc_0_145C
pop hl
jr sub_0_DDC
; End of function sub_0_DDC
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_DE7: ; CODE XREF: sub_0_FD1+11p
; sub_0_11C1+2Dp ...
push bc
call sub_0_16AA
call nz, sub_0_16A5
cp 1Bh
ld a, 18h
ld c, 0Ah
call z, sub_0_57F
pop bc
loc_0_DF8: ; CODE XREF: sub_0_DE7+16j
call sub_0_5D4
jr nz, loc_0_E03
djnz loc_0_DF8
ld a, 0FEh
scf
ret
;----------------------------------------------------------------------------
loc_0_E03: ; CODE XREF: sub_0_DE7+14j
or a
ret
; End of function sub_0_DE7
;----------------------------------------------------------------------------
loc_0_E05: LD B,64H
CALL sub_0_DE7
RET C
AND 7FH
LD HL,loc_0_E2A
LD BC,2
CPIR
JR Z,loc_0_E05
LD BC,3
CPIR
RET Z
LD B,A
AND 60H
JR NZ,loc_0_E28
LD A,(2C9DH)
OR A
JR NZ,loc_0_E05
loc_0_E28: LD A,B
RET
loc_0_E2A: .db 11h ; dc1
.db 13h ; dc3
.db 0dh ; cr
.db 0ah ; lf
.db 18h ; can
loc_0_E2F: ld b,64H
CALL sub_0_DE7
RET C
LD E,A
loc_0_E36: AND 60H
LD A,E
RET NZ
CP 18H
JR Z,loc_0_E50
LD HL,0EA2H
LD BC,4
CPIR
JR Z,0E2FH
LD A,(2C9DH)
OR A
JR NZ,loc_0_E2F
LD A,E
RET
loc_0_E50: LD B,64H ; 0e50 06 64
CALL sub_0_DE7 ; 0e52 cd e7 0d
RET C ; 0e55 d8
CP 18H ; 0e56 fe 18
JR NZ,loc_0_0E74 ; 0e58 20 1a
LD B,64h ; 0e5a 06 64
CALL sub_0_DE7 ; 0e5c cd e7 0d
RET C ; 0e5f d8
CP 18H ; 0e60 fe 18
JR NZ,loc_0_0E74 ; 0e62 20 10
LD B,64H ; 0e64 06 64
CALL sub_0_DE7 ; 0e66 cd e7 0d
RET C ; 0e69 d8
CP 18H ; 0e6a fe 18
JR NZ,loc_0_0E74 ; 0e6c 20 06
LD B,64H ; 0e6e 06 64
CALL sub_0_DE7 ; 0e70 cd e7 0d
RET C ; 0e73 d8
loc_0_0E74: LD HL,0EA6H ; 0e74 21 a6 0e
LD BC,0BH ; 0e77 01 0b 00
CPIR ; 0e7a ed b1
JP Z,67FH ; 0e7c ca 7f 06
LD L,A ; 0e7f 6f
LD A,(2C9DH) ; 0e80 3a 9d 2c
OR A ; 0e83 b7
JR Z,loc_0_E8B ; 0e84 28 05
LD A,L ; 0e86 7d
AND 60H ; 0e87 e6 60
JR Z,loc_0_E50 ; 0e89 28 c5
loc_0_E8B: LD A,L ; 0e8b 7d
AND 60H ; 0e8c e6 60
CP 40H ; 0e8e fe 40
JR NZ,loc_0_E9C ; 0e90 20 0a
LD A,L ; 0e92 7d
XOR 40H ; 0e93 ee 40
RET ; 0e95 c9
LD A,7FH ;0e96 3e 7f
RET ;0e98 c9
LD A,0FFH ;0e99 3e ff
RET ;0e9b c9
loc_0_E9C: LD A,0FFH ;0e9c 3e ff
OR 80H ;0e9e f6 80
SCF ;0ea0 37
RET ;0ea1 c9
.db 11h ;
.db 91h ; ?
.db 13h ;
.db 93h ; ?
.db 11h ;
.db 91h ; ?
.db 13h ;
.db 93h ; ?
.db 18h ;
.db 68h ; h
.db 69h ; i
.db 6Ah ; j
.db 6Bh ; k
.db 6Ch ; l
.db 6Dh ; m
.db 99h ; ?
.db 0Eh ;
.db 96h ; ?
.db 0Eh ;
.db 9Eh ; ?
.db 0Eh ;
.db 9Eh ; ?
.db 0Eh ;
.db 9Eh ; ?
.db 0Eh ;
.db 9Eh ; ?
.db 0Eh ;
.db 9Eh ; ?
.db 0Eh ;
.db 50h ; P
.db 0Eh ;
.db 50h ; P
.db 0Eh ;
.db 50h ; P
.db 0Eh ;
.db 50h ; P
.db 0Eh ;
.db 0B7h ; ·
.db 2Ah ; *
.db 0EBh ; ë
.db 2Ch ; ,
.db 0EDh ; í
.db 5Bh ; [
.db 0EFh ; ï
.db 2Ch ; ,
.db 0EDh ; í
.db 52h ; R
.db 0DAh ; Ú
.db 4Eh ; N
.db 0Fh ;
.db 0CDh ; Í
.db 0A0h ;
.db 8 ;
.db 21h ; !
.db 0 ;
.db 0 ;
.db 22h ; "
.db 0F9h ; ù
.db 2Ch ; ,
.db 0CDh ; Í
.db 2Fh ; /
.db 0Eh ;
.db 0DAh ; Ú
.db 38h ; 8
.db 0Fh ;
.db 0CDh ; Í
.db 0A2h ; ¢
.db 0Fh ;
.db 0CCh ; Ì
.db 0EDh ; í
.db 7 ;
.db 0C4h ; Ä
.db 85h ; ?
.db 8 ;
.db 2Ah ; *
.db 0EBh ; ë
.db 2Ch ; ,
.db 0EDh ; í
.db 4Bh ; K
.db 0EFh ; ï
.db 2Ch ; ,
.db 0EDh ; í
.db 42h ; B
.db 0CAh ; Ê
.db 4Eh ; N
.db 0Fh ;
.db 3 ;
.db 0EDh ; í
.db 43h ; C
.db 0EFh ; ï
.db 2Ch ; ,
.db 2Ah ; *
.db 0F9h ; ù
.db 2Ch ; ,
.db 23h ; #
.db 22h ; "
.db 0F9h ; ù
.db 2Ch ; ,
.db 2Ah ; *
.db 0EDh ; í
.db 2Ch ; ,
.db 77h ; w
.db 23h ; #
.db 22h ; "
.db 0EDh ; í
.db 2Ch ; ,
.db 18h ;
.db 0CFh ; Ï
.db 0E8h ; è
.db 0E9h ; é
.db 0EAh ; ê
.db 0EBh ; ë
.db 98h ; ?
.db 0FFh ; ÿ
.db 0FEh ; þ
.db 52h ; R
.db 0Fh ;
.db 4Eh ; N
.db 0Fh ;
.db 54h ; T
.db 0Fh ;
.db 58h ; X
.db 0Fh ;
.db 58h ; X
.db 0Fh ;
.db 58h ; X
.db 0Fh ;
.db 58h ; X
.db 0Fh ;
.db 0E8h ; è
.db 0E9h ; é
.db 0EAh ; ê
.db 0EBh ; ë
.db 98h ; ?
.db 0FFh ; ÿ
.db 0FEh ; þ
.db 52h ; R
.db 0Fh ;
.db 4Eh ; N
.db 0Fh ;
.db 54h ; T
.db 0Fh ;
.db 7Ch ; |
.db 0Fh ;
.db 7Ch ; |
.db 0Fh ;
.db 7Ch ; |
.db 0Fh ;
.db 7Ch ; |
.db 0Fh ;
.db 21h ; !
.db 23h ; #
.db 0Fh ;
.db 1 ;
.db 7 ;
.db 0 ;
.db 0CDh ; Í
.db 0A2h ; ¢
.db 0Fh ;
.db 28h ; (
.db 6 ;
.db 21h ; !
.db 0Eh ;
.db 0Fh ;
.db 1 ;
.db 7 ;
.db 0 ;
.db 0EDh ; í
.db 0B1h ; ±
.db 0CAh ; Ê
.db 7Fh ; 
.db 6 ;
.db 3Eh ; >
.db 0FFh ; ÿ
.db 37h ; 7
.db 0C9h ; É
.db 37h ; 7
.db 0C9h ; É
.db 3Eh ; >
.db 10h ;
.db 37h ; 7
.db 0C9h ; É
.db 32h ; 2
.db 0FDh ; ý
.db 2Ch ; ,
.db 0E6h ; æ
.db 7Fh ; 
.db 0CDh ; Í
.db 85h ; ?
.db 8 ;
.db 6 ;
.db 2 ;
.db 0C5h ; Å
.db 0CDh ; Í
.db 2Fh ; /
.db 0Eh ;
.db 0CDh ; Í
.db 85h ; ?
.db 8 ;
.db 0C1h ; Á
.db 0DAh ; Ú
.db 38h ; 8
.db 0Fh ;
.db 10h ;
.db 0F3h ; ó
.db 7Ch ; |
.db 0B5h ; µ
.db 28h ; (
.db 4 ;
.db 3Eh ; >
.db 0FFh ; ÿ
.db 37h ; 7
.db 0C9h ; É
.db 3Ah ; :
.db 0FDh ; ý
.db 2Ch ; ,
.db 0B7h ; ·
.db 0C9h ; É
.db 32h ; 2
.db 0FDh ; ý
.db 2Ch ; ,
.db 0E6h ; æ
.db 7Fh ; 
.db 0CDh ; Í
.db 0EDh ; í
.db 7 ;
.db 6 ;
.db 4 ;
.db 0C5h ; Å
.db 0CDh ; Í
.db 2Fh ; /
.db 0Eh ;
.db 0CDh ; Í
.db 0EDh ; í
.db 7 ;
.db 0C1h ; Á
.db 0DAh ; Ú
.db 38h ; 8
.db 0Fh ;
.db 10h ;
.db 0F3h ; ó
.db 21h ; !
.db 99h ; ?
.db 28h ; (
.db 11h ;
.db 0E9h ; é
.db 7 ;
.db 0CDh ; Í
.db 0D3h ; Ó
.db 6 ;
.db 0CAh ; Ê
.db 77h ; w
.db 0Fh ;
.db 0C3h ; Ã
.db 73h ; s
.db 0Fh ;
.db 5Fh ; _
.db 3Ah ; :
.db 9Eh ; ?
.db 2Ch ; ,
.db 0FEh ; þ
.db 20h ;
.db 7Bh ; {
.db 0C9h ; É
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_FAA: ; CODE XREF: seg000:0AE5p sub_0_BD3+1Ap
; ...
ld hl, 2CE9h
ld de, 2CEDh
ldi
ldi
ld hl, 0
ld (2CEFh), hl
; End of function sub_0_FAA
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_FBA: ; CODE XREF: sub_0_11FA+4Ep
ld hl, 2CEDh
ld de, 2CF3h
loc_0_FC0: ; CODE XREF: sub_0_FC9+6j
ldi
ldi
ldi
ldi
ret
; End of function sub_0_FBA
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_FC9: ; CODE XREF: sub_0_BD3+1Dp
; sub_0_11FA+56p ...
ld hl, 2CF3h
ld de, 2CEDh
jr loc_0_FC0
; End of function sub_0_FC9
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_FD1: ; CODE XREF: sub_0_BD3+37p
xor a
ld (2D01h), a
ld hl, 400h
ld (2CFEh), hl
loc_0_FDB: ; CODE XREF: sub_0_FD1+61j
ld a, 5
ld (byte_0_2D00), a
ld b, 64h
call sub_0_DE7
jp c, loc_0_108A
ld hl, 109Eh
ld bc, 3
cpir
jp z, sub_0_67F
jr loc_0_1024
;----------------------------------------------------------------------------
LD HL,byte_0_2D00
DEC (HL)
LD A,10H
JP Z,108AH
LD B,0AH
CALL sub_0_DE7
JR C,0FE0H
LD HL,10A7H
LD BC,2
CPIR
JP Z,67FH
JR 1024H
LD HL,byte_0_2D00
DEC (HL)
LD A,10H
JP Z,108AH
JR 0FE0H
LD B,0AH
CALL 0DE7H
JR C,1035H
;----------------------------------------------------------------------------
loc_0_1024: ld hl, (2CFEh) ; CODE XREF: sub_0_FD1+22j
dec hl
ld (2CFEh), hl
ld a, h
or l
ld a, 0FCh
jp z, loc_0_108A
jp loc_0_FDB
;----------------------------------------------------------------------------
.db 3Eh ; >
.db 0FFh ; ÿ
.db 0C3h ; Ã
.db 8Ah ; ?
.db 10h ;
.db 3Eh ; >
.db 5 ;
.db 32h ; 2
.db 0 ;
.db 2Dh ; -
.db 0CDh ; Í
.db 5 ;
.db 0Eh ;
.db 38h ; 8
.db 46h ; F
.db 21h ; !
.db 0ADh ; ­
.db 10h ;
.db 1 ;
.db 2 ;
.db 0 ;
.db 0EDh ; í
.db 0B1h ; ±
.db 0CAh ; Ê
.db 7Fh ; 
.db 6 ;
.db 18h ;
.db 0D3h ; Ó
.db 0CDh ; Í
.db 5 ;
.db 0Eh ;
.db 38h ; 8
.db 34h ; 4
.db 21h ; !
.db 0B3h ; ³
.db 10h ;
.db 1 ;
.db 4 ;
.db 0 ;
.db 0EDh ; í
.db 0B1h ; ±
.db 0CAh ; Ê
.db 7Fh ; 
.db 6 ;
.db 18h ;
.db 0C1h ; Á
.db 3Eh ; >
.db 10h ;
.db 32h ; 2
.db 9Eh ; ?
.db 2Ch ; ,
.db 0CDh ; Í
.db 3Fh ; ?
.db 11h ;
.db 18h ;
.db 12h ;
.db 3Eh ; >
.db 10h ;
.db 32h ; 2
.db 9Eh ; ?
.db 2Ch ; ,
.db 0CDh ; Í
.db 0 ;
.db 11h ;
.db 18h ;
.db 8 ;
.db 3Eh ; >
.db 20h ;
.db 32h ; 2
.db 9Eh ; ?
.db 2Ch ; ,
.db 0CDh ; Í
.db 0C5h ; Å
.db 10h ;
.db 0F5h ; õ
.db 21h ; !
.db 0A7h ; §
.db 2Ch ; ,
.db 11h ;
.db 0E4h ; ä
.db 2Ch ; ,
.db 0CDh ; Í
.db 92h ; ?
.db 6 ;
.db 0F1h ; ñ
;----------------------------------------------------------------------------
loc_0_108A: ; CODE XREF: sub_0_FD1+14j
; sub_0_FD1+5Ej
ld hl, 10BFh
ld bc, 6
cpir
jr nz, loc_0_109C
cp 98h
jr nz, loc_0_109A
ld a, 10h
loc_0_109A: ; CODE XREF: sub_0_FD1+C5j
scf
ret
;----------------------------------------------------------------------------
loc_0_109C: ; CODE XREF: sub_0_FD1+C1j
or a
ret
; End of function sub_0_FD1
;----------------------------------------------------------------------------
.db 18h ;
.db 0AAh ; ª
.db 2Ah ; *
.db 3Ah ; :
.db 10h ;
.db 3Ah ; :
.db 10h ;
.db 0F5h ; õ
.db 0Fh ;
.db 6Bh ; k
.db 18h ;
.db 12h ;
.db 10h ;
.db 1Dh ;
.db 10h ;
.db 2Ah ; *
.db 18h ;
.db 51h ; Q
.db 10h ;
.db 3Fh ; ?
.db 10h ;
.db 43h ; C
.db 41h ; A
.db 42h ; B
.db 18h ;
.db 0F5h ; õ
.db 0Fh ;
.db 63h ; c
.db 10h ;
.db 6Dh ; m
.db 10h ;
.db 77h ; w
.db 10h ;
.db 98h ; ?
.db 6 ;
.db 10h ;
.db 0FFh ; ÿ
.db 0FEh ; þ
.db 0FCh ; ü
.db 0CDh ; Í
.db 0A0h ;
.db 8 ;
.db 0CDh ; Í
.db 2Fh ; /
.db 0Eh ;
.db 0D8h ; Ø
.db 32h ; 2
.db 1 ;
.db 2Dh ; -
.db 0CDh ; Í
.db 0EDh ; í
.db 7 ;
.db 21h ; !
.db 0A7h ; §
.db 2Ch ; ,
.db 6 ;
.db 4 ;
.db 0C5h ; Å
.db 0E5h ; å
.db 0CDh ; Í
.db 2Fh ; /
.db 0Eh ;
.db 0CDh ; Í
.db 0EDh ; í
.db 7 ;
.db 0E1h ; á
.db 0C1h ; Á
.db 77h ; w
.db 23h ; #
.db 0D8h ; Ø
.db 10h ;
.db 0F1h ; ñ
.db 6 ;
.db 4 ;
.db 0C5h ; Å
.db 0CDh ; Í
.db 2Fh ; /
.db 0Eh ;
.db 0CDh ; Í
.db 0EDh ; í
.db 7 ;
.db 0C1h ; Á
.db 0D8h ; Ø
.db 10h ;
.db 0F5h ; õ
.db 21h ; !
.db 99h ; ?
.db 28h ; (
.db 11h ;
.db 0E9h ; é
.db 7 ;
.db 0CDh ; Í
.db 0D3h ; Ó
.db 6 ;
.db 28h ; (
.db 34h ; 4
.db 18h ;
.db 3Bh ; ;
.db 0CDh ; Í
.db 0A0h ;
.db 8 ;
.db 0CDh ; Í
.db 2Fh ; /
.db 0Eh ;
.db 0D8h ; Ø
.db 32h ; 2
.db 1 ;
.db 2Dh ; -
.db 0CDh ; Í
.db 85h ; ?
.db 8 ;
.db 21h ; !
.db 0A7h ; §
.db 2Ch ; ,
.db 6 ;
.db 4 ;
.db 0C5h ; Å
.db 0E5h ; å
.db 0CDh ; Í
.db 2Fh ; /
.db 0Eh ;
.db 0CDh ; Í
.db 85h ; ?
.db 8 ;
.db 0E1h ; á
.db 0C1h ; Á
.db 77h ; w
.db 23h ; #
.db 0D8h ; Ø
.db 10h ;
.db 0F1h ; ñ
.db 6 ;
.db 2 ;
.db 0C5h ; Å
.db 0CDh ; Í
.db 2Fh ; /
.db 0Eh ;
.db 0CDh ; Í
.db 85h ; ?
.db 8 ;
.db 0C1h ; Á
.db 0D8h ; Ø
.db 10h ;
.db 0F5h ; õ
.db 7Ch ; |
.db 0B5h ; µ
.db 20h ;
.db 9 ;
.db 3Eh ; >
.db 0FFh ; ÿ
.db 32h ; 2
.db 0A6h ; ¦
.db 2Ch ; ,
.db 3Ah ; :
.db 1 ;
.db 2Dh ; -
.db 0C9h ; É
.db 3Eh ; >
.db 0FFh ; ÿ
.db 37h ; 7
.db 0C9h ; É
.db 0CDh ; Í
.db 0A0h ;
.db 8 ;
.db 0CDh ; Í
.db 94h ; ?
.db 11h ;
.db 0D8h ; Ø
.db 32h ; 2
.db 1 ;
.db 2Dh ; -
.db 0CDh ; Í
.db 85h ; ?
.db 8 ;
.db 21h ; !
.db 0A7h ; §
.db 2Ch ; ,
.db 6 ;
.db 4 ;
.db 0C5h ; Å
.db 0E5h ; å
.db 0CDh ; Í
.db 94h ; ?
.db 11h ;
.db 30h ; 0
.db 3 ;
.db 0E1h ; á
.db 0C1h ; Á
.db 0C9h ; É
.db 0CDh ; Í
.db 85h ; ?
.db 8 ;
.db 0E1h ; á
.db 0C1h ; Á
.db 77h ; w
.db 23h ; #
.db 10h ;
.db 0EDh ; í
.db 6 ;
.db 2 ;
.db 0C5h ; Å
.db 0CDh ; Í
.db 94h ; ?
.db 11h ;
.db 30h ; 0
.db 2 ;
.db 0C1h ; Á
.db 0C9h ; É
.db 0CDh ; Í
.db 85h ; ?
.db 8 ;
.db 0C1h ; Á
.db 10h ;
.db 0F2h ; ò
.db 7Ch ; |
.db 0B5h ; µ
.db 20h ;
.db 18h ;
.db 6 ;
.db 0Ah ;
.db 0CDh ; Í
.db 0E7h ; ç
.db 0Dh ;
.db 0FEh ; þ
.db 0Dh ;
.db 20h ;
.db 5 ;
.db 6 ;
.db 0Ah ;
.db 0CDh ; Í
.db 0E7h ; ç
.db 0Dh ;
.db 0B7h ; ·
.db 3Eh ; >
.db 0FFh ; ÿ
.db 32h ; 2
.db 0A6h ; ¦
.db 2Ch ; ,
.db 3Ah ; :
.db 1 ;
.db 2Dh ; -
.db 0C9h ; É
.db 3Eh ; >
.db 0FFh ; ÿ
.db 37h ; 7
.db 0C9h ; É
.db 0CDh ; Í
.db 5 ;
.db 0Eh ;
.db 0D8h ; Ø
.db 0CDh ; Í
.db 0B3h ; ³
.db 11h ;
.db 20h ;
.db 12h ;
.db 7 ;
.db 7 ;
.db 7 ;
.db 7 ;
.db 47h ; G
.db 0C5h ; Å
.db 0CDh ; Í
.db 5 ;
.db 0Eh ;
.db 0C1h ; Á
.db 0D8h ; Ø
.db 0CDh ; Í
.db 0B3h ; ³
.db 11h ;
.db 20h ;
.db 2 ;
.db 0B0h ; °
.db 0C9h ; É
.db 3Eh ; >
.db 0FFh ; ÿ
.db 37h ; 7
.db 0C9h ; É
.db 6Fh ; o
.db 0D6h ; Ö
.db 30h ; 0
.db 0FEh ; þ
.db 0Ah ;
.db 38h ; 8
.db 2 ;
.db 0D6h ; Ö
.db 27h ; '
.db 6Fh ; o
.db 0E6h ; æ
.db 0F0h ; ð
.db 7Dh ; }
.db 0C9h ; É
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_11C1: ; CODE XREF: sub_0_8D1+63p
; sub_0_11C1+30j
ld a, 0FFh
ld (2D02h), a
call sub_0_FAA
ld a, (2C9Eh)
cp 10h
ld a, 43h
jr z, loc_0_11D4
ld a, 15h
loc_0_11D4: ; CODE XREF: sub_0_11C1+Fj
call loc_0_145C
ld b, 64h
call sub_0_1289
or a
jr z, loc_0_11F3
cp 0F6h
jr z, loc_0_11E7
ld a, 0FFh
scf
ret
;----------------------------------------------------------------------------
loc_0_11E7: ; CODE XREF: sub_0_11C1+20j
ld a, 6
call loc_0_145C
ld b, 0Ah
call sub_0_DE7
jr sub_0_11C1
;----------------------------------------------------------------------------
loc_0_11F3: ; CODE XREF: sub_0_11C1+1Cj
ld a, 6
call loc_0_145C
xor a
ret
; End of function sub_0_11C1
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_11FA: ; CODE XREF: sub_0_8D1+6Fp
; sub_0_8D1+7Dp ...
ld a, 0FFh
ld (2D02h), a
ld (2CA3h), a
xor a
ld (2D07h), a
call sub_0_FAA
ld hl, 2CABh
call sub_0_688
ld a, (2C9Eh)
cp 10h
ld a, 43h
jr z, loc_0_121A
ld a, 15h
loc_0_121A: call loc_0_145C ; CODE XREF: sub_0_11FA+1Cj
loc_0_121D: ld a, (2D07h) ; CODE XREF: sub_0_11FA+5Ej
or a
ld b, 82h
jr z, loc_0_1227
ld b, 32h
loc_0_1227: call sub_0_1289 ; CODE XREF: sub_0_11FA+29j
jr c, loc_0_125A
push af
call sub_0_50B
pop af
ld hl, 2D07h
cp (hl)
jr z, loc_0_1250
dec a
cp (hl)
jr nz, loc_0_126D
inc (hl)
ld de, 2CEFh
ld hl, 2CABh
ld bc, 2CABh
call sub_0_6E4
call sub_0_FBA
call sub_0_D30
jr c, loc_0_1285
loc_0_1250: call sub_0_FC9 ; CODE XREF: sub_0_11FA+3Bj
ld a, 6
call loc_0_145C
jr loc_0_121D
;----------------------------------------------------------------------------
loc_0_125A: cp 0F6h ; CODE XREF: sub_0_11FA+30j
jr nz, loc_0_126D
call sub_0_D0E
jr c, loc_0_1285
call sub_0_643
ld a, 6
call loc_0_145C
xor a
ret
;----------------------------------------------------------------------------
loc_0_126D: ; CODE XREF: sub_0_11FA+3Fj
; sub_0_11FA+62j
cp 0FFh
jr nz, loc_0_1285
ld a, (2D02h)
cp 0FFh
jr nz, loc_0_1285
ld a, (2C9Eh)
or a
jr z, loc_0_1285
xor a
ld (2C9Eh), a
jp sub_0_11FA
;----------------------------------------------------------------------------
loc_0_1285: ; CODE XREF: sub_0_11FA+54j
; sub_0_11FA+67j ...
ld a, 0FFh
scf
ret
; End of function sub_0_11FA
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1289: ; CODE XREF: sub_0_11C1+18p
; sub_0_11FA+2Dp
ld a, b
ld (byte_0_2D03), a
xor a
ld (byte_0_2D04), a
ld a, 0
ld (2D09h), a
loc_0_1296: ; CODE XREF: sub_0_1289+12Aj
ld a, (byte_0_2D03)
ld b, a
call sub_0_DE7
ld (2D08h), a
ld hl, 12AEh
ld bc, 4
cpir
jp z, sub_0_67F
jp loc_0_137A
;----------------------------------------------------------------------------
.db 2 ;
.db 1 ;
.db 4 ;
.db 18h ;
.db 6Ah ; j
.db 13h ;
.db 5Fh ; _
.db 13h ;
.db 0BFh ; ¿
.db 12h ;
.db 0BAh ; º
.db 12h ;
.db 21h ; !
.db 0 ;
.db 4 ;
.db 18h ;
.db 3 ;
.db 21h ; !
.db 80h ; ?
.db 0 ;
.db 22h ; "
.db 5 ;
.db 2Dh ; -
.db 6 ;
.db 0Ah ;
.db 0CDh ; Í
.db 0E7h ; ç
.db 0Dh ;
.db 32h ; 2
.db 0D9h ; Ù
.db 12h ;
.db 0DAh ; Ú
.db 7Ah ; z
.db 13h ;
.db 6 ;
.db 0Ah ;
.db 0CDh ; Í
.db 0E7h ; ç
.db 0Dh ;
.db 0DAh ; Ú
.db 7Ah ; z
.db 13h ;
.db 0C6h ; Æ
.db 0 ;
.db 0FEh ; þ
.db 0FFh ; ÿ
.db 0C2h ; Â
.db 7Ah ; z
.db 13h ;
.db 0CDh ; Í
.db 0A0h ;
.db 8 ;
.db 0DDh ; Ý
.db 2Ah ; *
.db 0EDh ; í
.db 2Ch ; ,
.db 6 ;
.db 0Ah ;
.db 0DDh ; Ý
.db 0E5h ; å
.db 0CDh ; Í
.db 0E7h ; ç
.db 0Dh ;
.db 0DDh ; Ý
.db 0E1h ; á
.db 32h ; 2
.db 8 ;
.db 2Dh ; -
.db 0DAh ; Ú
.db 7Ah ; z
.db 13h ;
.db 0DDh ; Ý
.db 77h ; w
.db 0 ;
.db 0DDh ; Ý
.db 23h ; #
.db 0CDh ; Í
.db 0DDh ; Ý
.db 7 ;
.db 0CDh ; Í
.db 85h ; ?
.db 8 ;
.db 0EDh ; í
.db 4Bh ; K
.db 0EFh ; ï
.db 2Ch ; ,
.db 3 ;
.db 0EDh ; í
.db 43h ; C
.db 0EFh ; ï
.db 2Ch ; ,
.db 0EDh ; í
.db 5Bh ; [
.db 5 ;
.db 2Dh ; -
.db 1Bh ;
.db 0EDh ; í
.db 53h ; S
.db 5 ;
.db 2Dh ; -
.db 7Ah ; z
.db 0B3h ; ³
.db 20h ;
.db 0D0h ; Ð
.db 0DDh ; Ý
.db 22h ; "
.db 0EDh ; í
.db 2Ch ; ,
.db 6 ;
.db 0Ah ;
.db 0CDh ; Í
.db 0E7h ; ç
.db 0Dh ;
.db 32h ; 2
.db 8 ;
.db 2Dh ; -
.db 0DAh ; Ú
.db 7Ah ; z
.db 13h ;
.db 3Ah ; :
.db 9Eh ; ?
.db 2Ch ; ,
.db 0FEh ; þ
.db 10h ;
.db 20h ;
.db 26h ; &
.db 3Ah ; :
.db 8 ;
.db 2Dh ; -
.db 0CDh ; Í
.db 85h ; ?
.db 8 ;
.db 6 ;
.db 0Ah ;
.db 0CDh ; Í
.db 0E7h ; ç
.db 0Dh ;
.db 32h ; 2
.db 8 ;
.db 2Dh ; -
.db 0DAh ; Ú
.db 7Ah ; z
.db 13h ;
.db 0CDh ; Í
.db 85h ; ?
.db 8 ;
.db 7Ch ; |
.db 0B5h ; µ
.db 0C2h ; Â
.db 7Ah ; z
.db 13h ;
.db 0AFh ; ¯
.db 32h ; 2
.db 4 ;
.db 2Dh ; -
.db 3Eh ; >
.db 0 ;
.db 32h ; 2
.db 2 ;
.db 2Dh ; -
.db 3Ah ; :
.db 0D9h ; Ù
.db 12h ;
.db 0C9h ; É
.db 3Ah ; :
.db 8 ;
.db 2Dh ; -
.db 6Fh ; o
.db 3Ah ; :
.db 0DFh ; ß
.db 7 ;
.db 95h ; ?
.db 28h ; (
.db 0E9h ; é
.db 0C3h ; Ã
.db 7Ah ; z
.db 13h ;
.db 6 ;
.db 0Ah ;
.db 0CDh ; Í
.db 0E7h ; ç
.db 0Dh ;
.db 3Eh ; >
.db 0F6h ; ö
.db 0D8h ; Ø
.db 0C3h ; Ã
.db 7Ah ; z
.db 13h ;
.db 3Eh ; >
.db 0FFh ; ÿ
.db 21h ; !
.db 9 ;
.db 2Dh ; -
.db 0BEh ; ¾
.db 20h ;
.db 4 ;
.db 3Eh ; >
.db 0FFh ; ÿ
.db 37h ; 7
.db 0C9h ; É
.db 77h ; w
.db 0C3h ; Ã
.db 0A4h ; ¤
.db 13h ;
;----------------------------------------------------------------------------
loc_0_137A: ; CODE XREF: sub_0_1289+22j
ld a, 0
ld (2D09h), a
loc_0_137F: ; CODE XREF: sub_0_1289+FBj
ld b, 0Ah
call sub_0_DE7
jr nc, loc_0_137F
ld a, (2D02h)
cp 0FFh
jr nz, loc_0_139A
ld a, (2C9Eh)
cp 10h
ld a, 43h
jr z, loc_0_13A1
ld a, 15h
jr loc_0_13A1
;----------------------------------------------------------------------------
loc_0_139A: ; CODE XREF: sub_0_1289+102j
ld a, 28h
ld (byte_0_2D03), a
ld a, 15h
loc_0_13A1: ; CODE XREF: sub_0_1289+10Bj
; sub_0_1289+10Fj
call loc_0_145C
call sub_0_FC9
ld hl, byte_0_2D04
inc (hl)
call sub_0_482
ld a, (byte_0_2D04)
cp 5
jp nz, loc_0_1296
ld a, 0FFh
scf
ret
; End of function sub_0_1289
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_13BA: ; CODE XREF: sub_0_BD3+34p
ld (2CE8h), a
ld hl, 1403h
call sub_0_DDC
call sub_0_8A0
ld a, (2CE8h)
call loc_0_885
call sub_0_1418
ld hl, 2CE0h
ld b, 4
loc_0_13D4: ; CODE XREF: sub_0_13BA+26j
push bc
ld a, (hl)
inc hl
push hl
call loc_0_885
call sub_0_1418
pop hl
pop bc
djnz loc_0_13D4
ld a, (smod_w_887+1)
call sub_0_1418
ld a, (smod_w_887)
call sub_0_1418
ld a, 0Dh
call loc_0_145C
ld a, 0Ah
call loc_0_145C
ld a, (2CE8h)
cp 8
ret z
ld a, 11h
jp loc_0_145C
; End of function sub_0_13BA
;----------------------------------------------------------------------------
.db 2Ah ; *
.db 2Ah ; *
.db 18h ;
.db 42h ; B
.db 0 ;
loc_0_1408: .text "0123456789abcdef"
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1418: ; CODE XREF: sub_0_13BA+12p
; sub_0_13BA+21p ...
push af
ld hl,loc_0_1408
ld b, 0
rra
rra
rra
rra
and 0Fh
ld c, a
add hl, bc
ld a, (hl)
call loc_0_145C
pop af
ld hl,loc_0_1408
ld b, 0
and 0Fh
ld c, a
add hl, bc
ld a, (hl)
jp loc_0_145C
; End of function sub_0_1418
;----------------------------------------------------------------------------
LD (smod_b_145B),A
LD BC,+(loc_0_1480-stab_0_7B3)
LD HL,stab_0_7B3
CPIR
JP Z,sub_0_67F
AND 60H
JR NZ,loc_0_145A
LD A,(2C9DH)
OR A
JR Z,loc_0_145A
loc_0_1450: LD HL,smod_b_145B
SET 6,(HL)
LD A,18H
CALL loc_0_145C
smod_b_145B: .equ $+1
loc_0_145A: LD A,0
loc_0_145C: LD (smod_b_1468),A
loc_0_145F: CALL sub_0_588
CALL sub_0_5CD
JR Z,loc_0_145F
smod_b_1468: .equ $+1
LD A,0
JP loc_0_5C7
loc_0_146C: LD A,(smod_b_1468)
AND 7FH
CP 40H
JR NZ,loc_0_145A
JR loc_0_1450
stab_0_7B3: .db 18h
.db 0Dh
.db 8Dh
.db 10h
.db 90h
.db 11h
.db 91h
.db 13h
.db 93h
loc_0_1480: .dw loc_0_1450
.dw loc_0_1450
.dw loc_0_1450
.dw loc_0_1450
.dw loc_0_1450
.dw loc_0_1450
.dw loc_0_146C
.dw loc_0_146C
.dw loc_0_1450
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1492: ; CODE XREF: start+56p sub_0_961+79p
push bc
ld (2D0Ah), a
call sub_0_171E
push de
call sub_0_162C
ld (de), a
pop de
push de
call sub_0_14A7
pop de
pop bc
jr loc_0_151D
; End of function sub_0_1492
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_14A7: ; CODE XREF: sub_0_1492+Ep
xor a
ld (de), a
ld (2D0Dh), a
ld (2D0Ch), a
call sub_0_1687
ld a, c
ld (2D0Eh), a
push de
ld a, (hl)
cp 3Ah
jr nz, loc_0_14BD
inc hl
loc_0_14BD: ; CODE XREF: sub_0_14A7+13j
ld b, 8
call sub_0_1522
pop de
ld a, (hl)
ld (2D0Bh), a
cp 3Ah
jr nz, loc_0_14FE
inc hl
ld a, (2D0Ah)
or a
jr z, loc_0_14D7
call sub_0_154A
jr z, loc_0_14E5
loc_0_14D7: ; CODE XREF: sub_0_14A7+29j
call sub_0_159D
jr z, loc_0_14E5
ld a, (2D0Ah)
or a
jr nz, loc_0_14E5
call sub_0_154A
loc_0_14E5: ; CODE XREF: sub_0_14A7+2Ej
; sub_0_14A7+33j ...
ld a, (2D0Dh)
ld (de), a
push de
inc de
call sub_0_1632
pop de
xor a
ld (2D0Ch), a
push de
ld b, 8
call sub_0_1522
pop de
ld a, (hl)
ld (2D0Bh), a
loc_0_14FE: ; CODE XREF: sub_0_14A7+22j
ld a, (2D0Bh)
ex de, hl
ld bc, 8
add hl, bc
ex de, hl
ld b, 3
cp 2Eh
jr nz, loc_0_1513
inc hl
push de
call sub_0_1522
pop de
loc_0_1513: ; CODE XREF: sub_0_14A7+64j
ex de, hl
ld bc, 5
add hl, bc
ex de, hl
ld a, (2D0Eh)
ld (de), a
loc_0_151D: ; CODE XREF: sub_0_1492+13j
ld a, (2D0Ch)
or a
ret
; End of function sub_0_14A7
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1522: ; CODE XREF: sub_0_14A7+18p
; sub_0_14A7+4Fp ...
call sub_0_15D9
ret z
inc de
cp 2Ah
jr nz, loc_0_1533
ld a, 3Fh
ld (de), a
call sub_0_1543
jr loc_0_153A
;----------------------------------------------------------------------------
loc_0_1533: ; CODE XREF: sub_0_1522+7j
ld (de), a
inc hl
cp 3Fh
call z, sub_0_1543
loc_0_153A: ; CODE XREF: sub_0_1522+Fj
djnz sub_0_1522
loc_0_153C: ; CODE XREF: sub_0_1522+1Fj
call sub_0_15D9
ret z
inc hl
jr loc_0_153C
; End of function sub_0_1522
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1543: ; CODE XREF: sub_0_1522+Cp
; sub_0_1522+15p
push hl
ld hl, 2D0Ch
inc (hl)
pop hl
ret
; End of function sub_0_1543
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_154A: ; CODE XREF: sub_0_14A7+2Bp
; sub_0_14A7+3Bp
push hl
push de
call sub_0_1552
pop de
pop hl
ret
; End of function sub_0_154A
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1552: ; CODE XREF: sub_0_154A+2p
call sub_0_164A
jr z, loc_0_15CA
ex de, hl
inc hl
call sub_0_1652
ld b, a
inc b
ld a, (hl)
cp 41h
jr c, loc_0_1574
sub 40h
cp b
jr nc, loc_0_15CA
ld (2D0Dh), a
inc hl
ld a, (hl)
cp 20h
ret z
call sub_0_1625
ret c
loc_0_1574: ; CODE XREF: sub_0_1552+Fj
push hl
ld b, 2
loc_0_1577: ; CODE XREF: sub_0_1552+30j
ld a, (hl)
cp 20h
jr z, loc_0_1589
call sub_0_1625
jr c, loc_0_159A
inc hl
djnz loc_0_1577
ld a, (hl)
cp 20h
jr nz, loc_0_159A
loc_0_1589: ; CODE XREF: sub_0_1552+28j
pop hl
call sub_0_165A
ld c, a
inc c
call sub_0_15FA
cp c
jr nc, loc_0_15CA
ld (2D0Eh), a
xor a
ret
;----------------------------------------------------------------------------
loc_0_159A: ; CODE XREF: sub_0_1552+2Dj
; sub_0_1552+35j
pop hl
jr loc_0_15CA
; End of function sub_0_1552
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_159D: ; CODE XREF: sub_0_14A7+30p
push hl
push de
call sub_0_15A5
pop de
pop hl
ret
; End of function sub_0_159D
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_15A5: ; CODE XREF: sub_0_159D+2p
call sub_0_1662
jr z, loc_0_15CA
ex de, hl
inc hl
loc_0_15AC: ; CODE XREF: sub_0_15A5+23j
ld a, (de)
or a
jr z, loc_0_15CA
inc de
inc de
push hl
push de
ld b, 8
loc_0_15B6: ; CODE XREF: sub_0_15A5+17j
ld a, (de)
cp (hl)
jr nz, loc_0_15BE
inc hl
inc de
djnz loc_0_15B6
loc_0_15BE: ; CODE XREF: sub_0_15A5+13j
pop de
pop hl
jr z, loc_0_15CD
ex de, hl
ld bc, 10h
add hl, bc
ex de, hl
jr loc_0_15AC
;----------------------------------------------------------------------------
loc_0_15CA: ; CODE XREF: sub_0_1552+3j
; sub_0_1552+14j ...
or 0FFh
ret
;----------------------------------------------------------------------------
loc_0_15CD: ; CODE XREF: sub_0_15A5+1Bj
dec de
ld a, (de)
ld (2D0Eh), a
dec de
ld a, (de)
ld (2D0Dh), a
xor a
ret
; End of function sub_0_15A5
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_15D9: ; CODE XREF: sub_0_1522p sub_0_1522+1Ap
; ...
ld a, (hl)
cp 21h
jr c, loc_0_15F8
cp 3Dh
ret z
cp 5Fh
ret z
cp 2Eh
ret z
cp 3Ah
ret z
cp 2Ch
ret z
cp 3Ch
ret z
cp 3Eh
ret z
or a
ret z
cp 3Bh
ret
;----------------------------------------------------------------------------
loc_0_15F8: ; CODE XREF: sub_0_15D9+3j
xor a
ret
; End of function sub_0_15D9
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_15FA: ; CODE XREF: sub_0_1552+3Dp
push bc
ld bc, 1100h
loc_0_15FE: ; CODE XREF: sub_0_15FA+22j
ld a, (hl)
call sub_0_15D9
jr z, loc_0_161E
inc hl
call sub_0_1625
jr c, loc_0_1622
ld d, a
ld a, c
rlca
jr c, loc_0_1622
rlca
jr c, loc_0_1622
add a, c
jr c, loc_0_1622
rlca
jr c, loc_0_1622
add a, d
jr c, loc_0_1622
ld c, a
djnz loc_0_15FE
loc_0_161E: ; CODE XREF: sub_0_15FA+8j
ld a, c
pop bc
or a
ret
;----------------------------------------------------------------------------
loc_0_1622: ; CODE XREF: sub_0_15FA+Ej
; sub_0_15FA+13j ...
pop bc
scf
ret
; End of function sub_0_15FA
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1625: ; CODE XREF: sub_0_1552+1Ep
; sub_0_1552+2Ap ...
sub 30h
ret c
cp 0Ah
ccf
ret
; End of function sub_0_1625
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_162C: ; CODE XREF: sub_0_1492+8p
xor a
ld (de), a
inc de
call sub_0_1632
; End of function sub_0_162C
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1632: ; CODE XREF: sub_0_14A7+44p
ld b, 0Bh
ld a, 20h
call sub_0_1645
xor a
ld (de), a
inc de
call sub_0_1687
ld a, c
ld (de), a
inc de
ld b, 3
xor a
; End of function sub_0_1632
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1645: ; CODE XREF: sub_0_1632+4p
; sub_0_1645+2j
ld (de), a
inc de
djnz sub_0_1645
ret
; End of function sub_0_1645
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_164A: ; CODE XREF: sub_0_1552p
push hl
push de
ld de, 2Eh
jp loc_0_1669
; End of function sub_0_164A
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1652: ; CODE XREF: sub_0_1552+7p
push hl
push de
ld de, 2Ch
jp loc_0_1669
; End of function sub_0_1652
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_165A: ; CODE XREF: sub_0_1552+38p
push hl
push de
ld de, 2Dh
jp loc_0_1669
; End of function sub_0_165A
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1662: ; CODE XREF: sub_0_15A5p
push de
ld de, 15h
jp loc_0_1676
;----------------------------------------------------------------------------
loc_0_1669: ; CODE XREF: sub_0_164A+5j
; sub_0_1652+5j ...
ld hl, (word_0_2D0F)
ld a, h
or l
jr z, loc_0_1671
add hl, de
loc_0_1671: ; CODE XREF: sub_0_1662+Cj
ld a, (hl)
pop de
pop hl
or a
ret
;----------------------------------------------------------------------------
loc_0_1676: ; CODE XREF: sub_0_1662+4j
ld hl, (word_0_2D0F)
add hl, de
ld e, (hl)
inc hl
ld d, (hl)
inc hl
ld a, (hl)
ex de, hl
pop de
or a
ret
; End of function sub_0_1662
;----------------------------------------------------------------------------
ld (word_0_2D0F),hl
ret
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1687: ; CODE XREF: sub_0_14A7+8p
; sub_0_1632+Ap
push af
push de
push hl
ld c, 19h
call sub_0_16AF
push af
ld e, 0FFh
ld c, F_USERNUM
call sub_0_16AF
ld c, a
pop af
ld b, a
pop hl
pop de
pop af
ret
; End of function sub_0_1687
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_169E: ; CODE XREF: sub_0_961+88p
ld a, 11h
call sub_0_16B8
inc a
ret
; End of function sub_0_169E
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_16A5: ; CODE XREF: sub_0_DE7+4p
ld a, 1
jp sub_0_16B8
; End of function sub_0_16A5
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_16AA: ; CODE XREF: sub_0_DE7+1p
ld a, 0Bh
jp sub_0_16B8
; End of function sub_0_16AA
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_16AF: ; CODE XREF: sub_0_1687+5p
; sub_0_1687+Dp
push de
push bc
call bdos
pop bc
pop de
or a
ret
; End of function sub_0_16AF
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_16B8: ; CODE XREF: sub_0_169E+2p
; sub_0_16A5+2j ...
push hl
push de
push bc
ld c, a
call bdos
or a
pop bc
pop de
pop hl
ret
; End of function sub_0_16B8
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_16C4: ; CODE XREF: sub_0_4A4+10p
push bc
push hl
push de
push af
ld b, 8
call sub_0_16DA
ld (hl), 2Eh
inc hl
ld b, 3
call sub_0_16DA
pop af
pop de
pop hl
pop bc
ret
; End of function sub_0_16C4
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_16DA: ; CODE XREF: sub_0_16C4+6p
; sub_0_16C4+Ep ...
ld a, (de)
and 7Fh
cp 20h
jr z, loc_0_16E3
ld (hl), a
inc hl
loc_0_16E3: ; CODE XREF: sub_0_16DA+5j
inc de
djnz sub_0_16DA
ret
; End of function sub_0_16DA
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_16E7: ; CODE XREF: sub_0_482+6p sub_0_4A4+1Fp
push bc
ld b, 0
jp loc_0_16F0
;----------------------------------------------------------------------------
sub_0_16ED: PUSH BC ; unref. ?
LD B,0FFH
loc_0_16F0: ; CODE XREF: sub_0_16E7+3j
push hl
push af
ld h, 64h
call sub_0_1703
ld h, 0Ah
call sub_0_1703
call sub_0_1717
pop af
pop hl
pop bc
ret
; End of function sub_0_16E7
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1703: ; CODE XREF: sub_0_16E7+Dp
; sub_0_16E7+12p
ld l, 0FFh
loc_0_1705: ; CODE XREF: sub_0_1703+4j
sub h
inc l
jr nc, loc_0_1705
add a, h
ld h, a
ld a, l
or a
jr nz, sub_0_1717
or b
ld a, h
ret m
ld a, 20h
jr z, loc_0_171A
xor a
; End of function sub_0_1703
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1717: ; CODE XREF: sub_0_16E7+15p
; sub_0_1703+Aj
add a, 30h
ld b, a
loc_0_171A: ; CODE XREF: sub_0_1703+11j
ld (de), a
inc de
ld a, h
ret
; End of function sub_0_1717
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_171E: ; CODE XREF: sub_0_1492+4p
push af
push hl
loc_0_1720: ld a, (hl)
or a
jr z, loc_0_172B
call sub_0_1793
ld (hl), a
inc hl
jr loc_0_1720
loc_0_172B: pop hl
pop af
ret
; End of function sub_0_171E
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_172E: ; CODE XREF: start+2Fp sub_0_961+70p
push bc
push de
push hl
ld c, a
ex de, hl
ld b, (hl)
push hl
inc hl
inc hl
loc_0_1737: ; CODE XREF: sub_0_172E+25j
call sub_0_176B
or a
jr z, loc_0_1760
ld (hl), e
inc hl
ld (hl), d
inc hl
dec b
jr z, loc_0_1755
call sub_0_1779
or a
jr z, loc_0_1760
ld a, c
or a
jr z, loc_0_1751
xor a
ld (de), a
inc de
loc_0_1751: ; CODE XREF: sub_0_172E+1Ej
ld a, b
or a
jr nz, loc_0_1737
loc_0_1755: ; CODE XREF: sub_0_172E+14j
call sub_0_1779
call sub_0_176B
or a
jr z, loc_0_1760
or 0FFh
loc_0_1760: ; CODE XREF: sub_0_172E+Dj
; sub_0_172E+1Aj ...
pop hl
push af
ld a, (hl)
sub b
inc hl
ld (hl), a
pop af
pop hl
pop de
pop bc
ret
; End of function sub_0_172E
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_176B: ; CODE XREF: sub_0_172E+9p
; sub_0_172E+2Ap ...
ld a, (de)
and 7Fh
inc de
cp 20h
jr z, sub_0_176B
cp 9
jr z, sub_0_176B
dec de
ret
; End of function sub_0_176B
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1779: ; CODE XREF: sub_0_172E+16p
; sub_0_172E+27p ...
ld a, (de)
and 7Fh
ret z
cp 20h
ret z
cp 9
ret z
inc de
jr sub_0_1779
; End of function sub_0_1779
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1786: ; CODE XREF: start+1Ep sub_0_4A4+Cp
; ...
push hl
call sub_0_178C
pop hl
ret
; End of function sub_0_1786
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_178C: ; CODE XREF: sub_0_1786+1p
push bc
loc_0_178D: ; CODE XREF: sub_0_178C+3j
ld (hl), a
inc hl
djnz loc_0_178D
pop bc
ret
; End of function sub_0_178C
;----------------------------------------------------------------------------
; S u b r o u t i n e
sub_0_1793: ; CODE XREF: sub_0_171E+6p
and 7Fh
cp 61h
ret c
cp 7Bh
ret nc
and 5Fh
ret
; End of function sub_0_1793
;----------------------------------------------------------------------------
word_0_179E: .dw 2D11h ; DATA XREF: start+18r start+35r
byte_0_17A0: .db 0 ; DATA XREF: sub_0_195+Aw sub_0_195+14r
byte_0_17A1: .db 0 ; DATA XREF: start+60r sub_0_195+11w
word_0_17A2: .db 0 ; DATA XREF: start+88w sub_0_961+7Fw
byte_0_17A3: .db 0
.fill $1800-$,0
.ds 8
nstack:
word_0_1808: .ds 2
.ds 14F6h
byte_0_2D00: .ds 1
.ds 2
byte_0_2D03: .ds 1
byte_0_2D04: .ds 1
.ds 10
word_0_2D0F: .ds 2
.end ; start