Page7D_2CAC:
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	p7Dsub_6FAC
		jp	c, relockFlashBack
		push	af
		call	p7Dsub_576D
		pop	af
		call	Page7D_2BE6
		jp	relockFlashBack

; =============== S U B	R O U T	I N E =======================================


DeleteApp:				; CODE XREF: seg001:6A61p
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	p7Dsub_6FAC
		jp	c, relockFlashBack
		call	Page7D_2BE6
		jp	relockFlashBack
; End of function DeleteApp


; =============== S U B	R O U T	I N E =======================================


Page7D_2BE6:				; CODE XREF: seg001:401Cp
		; DeleteApp+17p ...
		ld	b, a
		ld	hl, 4000h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		cp	0FFh
		ld	a, b
		jr	z, locret_4077
		call	FindAppNumPages
		ld	b, c
		push	af
		ld	a, c
		or	a
		jr	z, p7Dloc_4078
		res	6, (iy+24h)
		res	7, (iy+24h)
		xor	a
		ld	(unk_9C87), a
		pop	af

p7Dloc_4061:				; CODE XREF: Page7D_2BE6+33j
		set	0, (iy+25h)
		push	af
		push	bc
		ld	de, 4000h
		ld	b, 0
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80C6h
; ---------------------------------------------------------------------------
		pop	bc
		pop	af
		dec	a
		djnz	p7Dloc_4061
		ld	(appSearchPage+1), a

locret_4077:				; CODE XREF: Page7D_2BE6+Aj
		ret
; ---------------------------------------------------------------------------

p7Dloc_4078:				; CODE XREF: Page7D_2BE6+13j
		pop	af
		ret
; End of function Page7D_2BE6


; =============== S U B	R O U T	I N E =======================================


Page7D_2BB0:				; CODE XREF: p7Dsub_7240:p7Dloc_7549p
		; p7Dsub_7CDA:p7Dloc_7D01p
		push	hl
		call	p7Dsub_4894
		call	p7Dsub_457C
		pop	hl
		ret
; End of function Page7D_2BB0


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4083:				; CODE XREF: Page7D_2B62+86p
		; p7Dsub_430E+2Ap
		call	p7Dsub_7700
		push	bc
		push	hl
		push	de
		push	af

p7Dloc_408A:				; CODE XREF: p7Dsub_4083+1Cj
		pop	af
		push	hl
		push	bc
		push	af
		call	Page7D_2CD0
		ld	b, a
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		pop	af
		pop	bc
		pop	hl
		inc	hl
		push	af
		dec	bc
		ld	a, b
		or	c
		jr	nz, p7Dloc_408A
		pop	af
		pop	de
		pop	hl
		pop	bc
		ret
; End of function p7Dsub_4083


; =============== S U B	R O U T	I N E =======================================


p7Dsub_40A6:				; CODE XREF: seg001:5807p seg001:595Ep
		call	p7Dsub_7700
; End of function p7Dsub_40A6


p7Dloc_40A9:				; CODE XREF: seg001:58A2p
		push	bc
		push	hl
		push	de
		push	af

p7Dloc_40AD:				; CODE XREF: seg001:40C5j
		pop	af
		push	hl
		push	bc
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		ld	b, a
		pop	af
		push	af
		ld	a, (OP2)
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		pop	af
		pop	bc
		pop	hl
		inc	hl
		push	af
		dec	bc
		ld	a, b
		or	c
		jr	nz, p7Dloc_40AD
		pop	af
		pop	de
		pop	hl
		pop	bc
		ret

; =============== S U B	R O U T	I N E =======================================


Page7D_2B62:				; CODE XREF: p7Dsub_430E+4p p7Dsub_519D+19p	...
		ld	(unk_9C20), a
		push	de
		push	bc
		push	hl
		call	p7Dsub_4894
		call	p7Dsub_4566
		cp	0FFh
		jr	nz, p7Dloc_40E5
		ld	bc, 0
		ld	(OP6), bc
		jr	p7Dloc_4105
; ---------------------------------------------------------------------------

p7Dloc_40E5:				; CODE XREF: Page7D_2B62+Ej
		ld	bc, 1
		ld	(OP6), bc
		push	hl
		call	p7Dsub_4574
		add	hl, bc
		call	p7Dsub_4574
		add	hl, bc
		pop	bc
		sbc	hl, bc
		push	hl
		pop	bc
		call	p7Dsub_4894
		ld	de, 4000h
		push	de
		push	bc
		call	p7Dsub_42DF

p7Dloc_4105:				; CODE XREF: Page7D_2B62+17j
		call	p7Dsub_4894
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8060h
; ---------------------------------------------------------------------------
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8057h
; ---------------------------------------------------------------------------
		push	hl
		push	hl
		call	Page7D_2BEC
		ex	de, hl
		pop	hl
		inc	de
		inc	hl

p7Dloc_4117:				; CODE XREF: Page7D_2B62+8Dj
		; Page7D_2B62:p7Dloc_4178j
		call	p7Dsub_4566
		cp	0
		jr	z, p7Dloc_415C
		cp	0FFh
		jp	z, p7Dloc_417B
		push	hl
		push	bc
		push	hl
		call	p7Dsub_521D
		call	NZIf83Plus
		jr	nz, p7Dloc_4131
		call	p7Dsub_522B

p7Dloc_4131:				; CODE XREF: Page7D_2B62+60j
		push	hl
		pop	bc
		pop	hl
		sbc	hl, bc
		jr	nc, p7Dloc_417B
		pop	bc
		pop	hl
		push	hl
		ld	(arcInfo), de
		call	p7Dsub_4574
		pop	de
		push	de
		or	a
		sbc	hl, de
		ld	a, l
		add	a, c
		ld	c, a
		jr	nc, p7Dloc_414D
		inc	b

p7Dloc_414D:				; CODE XREF: Page7D_2B62+7Ej
		pop	hl
		ld	de, (arcInfo)
		call	p7Dsub_4083
		add	hl, bc
		ex	de, hl
		add	hl, bc
		ex	de, hl
		jp	p7Dloc_4117
; ---------------------------------------------------------------------------

p7Dloc_415C:				; CODE XREF: Page7D_2B62+50j
		push	de
		call	p7Dsub_4574
		pop	de
		add	hl, bc
		call	p7Dsub_4566
		cp	2
		jr	nz, p7Dloc_4178
		push	de
		push	hl
		call	p7Dsub_4574
		pop	de
		sbc	hl, de
		adc	hl, bc
		push	hl
		pop	bc
		ex	de, hl
		pop	de
		add	hl, bc

p7Dloc_4178:				; CODE XREF: Page7D_2B62+9Bj
		jp	p7Dloc_4117
; ---------------------------------------------------------------------------

p7Dloc_417B:				; CODE XREF: Page7D_2B62+54j
		; Page7D_2B62+6Aj
		call	NZIf83Plus
		jr	nz, p7Dloc_41DF
		ld	a, (unk_9C20)
		or	a
		jr	z, p7Dloc_41DF
		cp	1
		jr	z, p7Dloc_41A4
		cp	3
		jr	z, p7Dloc_41B2
		cp	4
		jr	z, p7Dloc_41C0
		cp	5
		jr	z, p7Dloc_41D1
		call	p7Dsub_427F
		call	p7Dsub_4211
		call	p7Dsub_425E
		call	p7Dsub_4228
		jr	p7Dloc_41E2
; ---------------------------------------------------------------------------

p7Dloc_41A4:				; CODE XREF: Page7D_2B62+BCj
		call	p7Dsub_4261
		call	p7Dsub_4211
		call	p7Dsub_427C
		call	p7Dsub_4230
		jr	p7Dloc_41E2
; ---------------------------------------------------------------------------

p7Dloc_41B2:				; CODE XREF: Page7D_2B62+C0j
		call	p7Dsub_4214
		call	p7Dsub_425E
		call	p7Dsub_427C
		call	p7Dsub_4238
		jr	p7Dloc_41E2
; ---------------------------------------------------------------------------

p7Dloc_41C0:				; CODE XREF: Page7D_2B62+C4j
		call	p7Dsub_4214
		call	p7Dsub_42A2
		call	p7Dsub_4269
		call	p7Dsub_428F
		call	p7Dsub_4238
		jr	p7Dloc_41E2
; ---------------------------------------------------------------------------

p7Dloc_41D1:				; CODE XREF: Page7D_2B62+C8j
		call	p7Dsub_42A2
		call	p7Dsub_425E
		call	p7Dsub_428F
		call	p7Dsub_4211
		jr	p7Dloc_41E2
; ---------------------------------------------------------------------------

p7Dloc_41DF:				; CODE XREF: Page7D_2B62+B2j
		; Page7D_2B62+B8j
		call	p7Dsub_427F

p7Dloc_41E2:				; CODE XREF: Page7D_2B62+D6j
		; Page7D_2B62+E4j ...
		call	p7Dsub_4894
		ex	de, hl
		ld	b, 8Fh ; '�'
		call	p7Dsub_456D
		pop	hl
		ex	de, hl
		call	p7Dsub_4894
		ex	de, hl
		push	de
		call	p7Dsub_457C
		pop	de
		ld	b, 0
		call	p7Dsub_456D
		ld	bc, (OP6)
		ld	a, c
		cp	1
		jr	nz, p7Dloc_420D
		call	p7Dsub_4894
		ex	de, hl
		pop	bc
		pop	hl
		call	p7Dsub_42AE

p7Dloc_420D:				; CODE XREF: Page7D_2B62+136j
		pop	hl
		pop	bc
		pop	de
		ret
; End of function Page7D_2B62


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4211:				; CODE XREF: Page7D_2B62+CDp
		; Page7D_2B62+DBp ...
		call	p7Dsub_4243
; End of function p7Dsub_4211


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4214:				; CODE XREF: Page7D_2B62:p7Dloc_41B2p
		; Page7D_2B62:p7Dloc_41C0p
		call	p7Dsub_522B
		ld	bc, 66h	; 'f'

p7Dloc_421A:				; CODE XREF: p7Dsub_4261+6j p7Dsub_427F+6j ...
		ld	de, tempSwapArea

p7Dloc_421D:				; CODE XREF: p7Dsub_4269+9j p7Dsub_42A2+9j
		call	Page7D_2BEC
		ex	de, hl
		call	p7Dsub_7700
		call	p7Dsub_7666
		ret
; End of function p7Dsub_4214


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4228:				; CODE XREF: Page7D_2B62+D3p
		call	p7Dsub_521D
		ld	bc, 0E8h ; '�'
		jr	p7Dloc_423E
; End of function p7Dsub_4228


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4230:				; CODE XREF: Page7D_2B62+E1p
		call	p7Dsub_5236
		ld	bc, 0C8h ; '�'
		jr	p7Dloc_423E
; End of function p7Dsub_4230


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4238:				; CODE XREF: Page7D_2B62+EFp
		; Page7D_2B62+100p
		call	p7Dsub_522B
		ld	bc, 66h	; 'f'

p7Dloc_423E:				; CODE XREF: p7Dsub_4228+6j p7Dsub_4230+6j
		call	Page7D_2BEC
		jr	p7Dloc_4249
; End of function p7Dsub_4238


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4243:				; CODE XREF: p7Dsub_4211p	Page7D_2B86+13p
		call	p7Dsub_522B
		ld	bc, 66h	; 'f'

p7Dloc_4249:				; CODE XREF: p7Dsub_4238+9j p7Dsub_4274+6j ...
		ld	de, tempSwapArea
; End of function p7Dsub_4243


; =============== S U B	R O U T	I N E =======================================


p7Dsub_424C:				; CODE XREF: p7Dsub_4253+9j p7Dsub_42DF+12p	...
		call	p7Dsub_7700
		call	FlashToRam
		ret
; End of function p7Dsub_424C


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4253:				; CODE XREF: Page7D_2B86+16p
		; Page7D_2B86+1Ep
		call	Page7D_2B80
		ld	bc, 20h	; ' '
		ld	de, 836Dh
		jr	p7Dsub_424C
; End of function p7Dsub_4253


; =============== S U B	R O U T	I N E =======================================


p7Dsub_425E:				; CODE XREF: Page7D_2B62+D0p
		; Page7D_2B62+E9p ...
		call	p7Dsub_4274
; End of function p7Dsub_425E


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4261:				; CODE XREF: Page7D_2B62:p7Dloc_41A4p
		call	p7Dsub_5236
		ld	bc, 0C8h ; '�'
		jr	p7Dloc_421A
; End of function p7Dsub_4261


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4269:				; CODE XREF: Page7D_2B62+FAp
		call	p7Dsub_5236
		ld	bc, 0C8h ; '�'
		ld	de, ramStart
		jr	p7Dloc_421D
; End of function p7Dsub_4269


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4274:				; CODE XREF: p7Dsub_425Ep
		; Page7D_2B86:p7Dloc_47D1p
		call	p7Dsub_5236
		ld	bc, 0C8h ; '�'
		jr	p7Dloc_4249
; End of function p7Dsub_4274


; =============== S U B	R O U T	I N E =======================================


p7Dsub_427C:				; CODE XREF: Page7D_2B62+DEp
		; Page7D_2B62+ECp
		call	p7Dsub_4287
; End of function p7Dsub_427C


; =============== S U B	R O U T	I N E =======================================


p7Dsub_427F:				; CODE XREF: Page7D_2B62+CAp
		; Page7D_2B62:p7Dloc_41DFp
		call	p7Dsub_521D
		ld	bc, 0E8h ; '�'
		jr	p7Dloc_421A
; End of function p7Dsub_427F


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4287:				; CODE XREF: p7Dsub_427Cp
		; Page7D_2B86:p7Dloc_47D9p
		call	p7Dsub_521D
		ld	bc, 0E8h ; '�'
		jr	p7Dloc_4249
; End of function p7Dsub_4287


; =============== S U B	R O U T	I N E =======================================


p7Dsub_428F:				; CODE XREF: Page7D_2B62+FDp
		; Page7D_2B62+10Bp
		call	p7Dsub_429A
		call	p7Dsub_521D
		ld	bc, 0C8h ; '�'
		jr	p7Dloc_421A
; End of function p7Dsub_428F


; =============== S U B	R O U T	I N E =======================================


p7Dsub_429A:				; CODE XREF: p7Dsub_428Fp
		call	p7Dsub_521D
		ld	bc, 0C8h ; '�'
		jr	p7Dloc_4249
; End of function p7Dsub_429A


; =============== S U B	R O U T	I N E =======================================


p7Dsub_42A2:				; CODE XREF: Page7D_2B62+F7p
		; Page7D_2B62:p7Dloc_41D1p
		call	p7Dsub_523C
		ld	bc, 20h	; ' '
		ld	de, 836Dh
		jp	p7Dloc_421D
; End of function p7Dsub_42A2


; =============== S U B	R O U T	I N E =======================================


p7Dsub_42AE:				; CODE XREF: Page7D_2B62+13Ep
		; p7Dsub_42AE+23j	...
		push	bc
		push	hl
		push	de
		call	FindSwapSector
		inc	a
		ld	de, OP1
		ld	bc, 1
		call	FlashToRam
		pop	de
		push	de
		ld	hl, OP1
		call	p7Dsub_7700
		call	p7Dsub_7663
		pop	de
		pop	hl
		inc	hl
		inc	de
		pop	bc
		dec	bc
		ld	a, c
		or	b
		jr	nz, p7Dsub_42AE
; End of function p7Dsub_42AE


; =============== S U B	R O U T	I N E =======================================


p7Dsub_42D3:				; CODE XREF: p7Dsub_42DF+3p seg001:57F5p
		call	FindSwapSector
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8084h
; ---------------------------------------------------------------------------
		pop	af
		call	Page7D_2C40
		ret
; End of function p7Dsub_42D3


; =============== S U B	R O U T	I N E =======================================


p7Dsub_42DF:				; CODE XREF: Page7D_2B62+36p
		; p7Dsub_468A+19p
		push	bc
		push	hl
		push	de
		call	p7Dsub_42D3
		pop	de
		pop	hl
		pop	bc

p7Dloc_42E8:				; CODE XREF: p7Dsub_42DF+2Cj
		push	bc
		push	hl
		push	de
		ld	de, OP1
		ld	bc, 1
		call	p7Dsub_424C
		pop	de
		push	de
		ld	hl, OP1
		call	FindSwapSector
		inc	a
		ld	bc, 1
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		pop	de
		pop	hl
		inc	hl
		inc	de
		pop	bc
		dec	bc
		ld	a, c
		or	b
		jr	nz, p7Dloc_42E8
		ret
; End of function p7Dsub_42DF


; =============== S U B	R O U T	I N E =======================================


p7Dsub_430E:				; CODE XREF: p7Dsub_468A+33p p7Dsub_5083-Fp
		push	bc
		push	de
		ld	a, 2
		call	Page7D_2B62
		rst	28h
; ---------------------------------------------------------------------------
		.dw 802Dh
; ---------------------------------------------------------------------------
		push	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8057h
; ---------------------------------------------------------------------------
		ld	de, 1F18h
		call	NZIf83Plus
		jr	nz, p7Dloc_4327
		ld	de, 1DEAh

p7Dloc_4327:				; CODE XREF: p7Dsub_430E+14j
		add	hl, de
		pop	de
		or	a
		sbc	hl, de
		jr	c, p7Dloc_433D
		sbc	hl, bc
		jr	c, p7Dloc_433D
		rst	28h
; ---------------------------------------------------------------------------
		.dw 802Dh
; ---------------------------------------------------------------------------
		pop	de
		ex	de, hl
		pop	bc
		call	p7Dsub_4083
		xor	a
		ret
; ---------------------------------------------------------------------------

p7Dloc_433D:				; CODE XREF: p7Dsub_430E+1Ej p7Dsub_430E+22j
		pop	de
		pop	de
		ret
; End of function p7Dsub_430E

; ---------------------------------------------------------------------------

Page7D_2BCE:
		push	hl
		call	p7Dsub_4894
		call	p7Dsub_4574
		push	bc
		push	hl
		call	p7Dsub_4894
		push	hl
		pop	bc
		pop	hl
		sbc	hl, bc
		push	hl
		pop	bc
		pop	hl
		adc	hl, bc
		push	hl
		pop	bc
		call	p7Dsub_4894
		rst	28h
; ---------------------------------------------------------------------------
		.dw 808Dh
; ---------------------------------------------------------------------------

p7Dloc_435E:				; CODE XREF: seg001:4378j
		push	hl
		push	bc
		ld	bc, 1
		ld	de, tempSwapArea
		call	p7Dsub_424C
		ld	bc, 1
		ld	hl, tempSwapArea
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8090h
; ---------------------------------------------------------------------------
		pop	bc
		pop	hl
		inc	hl
		dec	bc
		ld	a, b
		or	c
		jr	nz, p7Dloc_435E
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8018h
; ---------------------------------------------------------------------------
		call	p7Dsub_4894
		call	p7Dsub_7700
		call	p7Dsub_55CE
		jp	nz, p7Dloc_43EC
		ld	hl, tempSwapArea
		push	af
		push	bc
		push	de
		push	hl
		call	p7Dsub_4894
		inc	hl
		call	p7Dsub_4566
		and	0F0h ; '�'
		ld	hl, 310h
		cp	l
		jr	nz, p7Dloc_43B9
		call	p7Dsub_7700
		call	p7Dsub_762A
		call	p7Dsub_4442
		jr	nz, p7Dloc_43DA
		adc	hl, bc
		call	p7Dsub_7700
		ld	de, 830h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_43DA
		jr	p7Dloc_43CF
; ---------------------------------------------------------------------------

p7Dloc_43B9:				; CODE XREF: seg001:439Dj
		ld	hl, 320h
		cp	l
		jr	nz, p7Dloc_43C4
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80CCh
; ---------------------------------------------------------------------------
		jr	p7Dloc_43DA
; ---------------------------------------------------------------------------

p7Dloc_43C4:				; CODE XREF: seg001:43BDj
		ld	de, 0A20h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8027h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_43DA
		call	p7Dsub_4574

p7Dloc_43CF:				; CODE XREF: seg001:43B7j
		dec	hl
		inc	bc
		call	p7Dsub_7700
		ld	de, ramStart
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------

p7Dloc_43DA:				; CODE XREF: seg001:43A8j seg001:43B5j ...
		pop	hl
		pop	de
		pop	bc
		pop	af
		rst	28h
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p7Dsub_4442
		.dw 801Bh
; ---------------------------------------------------------------------------
		ld	de, OP1
		ld	hl, 8291h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 801Eh
; ---------------------------------------------------------------------------
		jr	z, p7Dloc_43F4

p7Dloc_43EC:				; CODE XREF: seg001:4386j
		push	af
		call	p7Dsub_4894
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8060h
; ---------------------------------------------------------------------------
		pop	af

p7Dloc_43F4:				; CODE XREF: p7Dsub_4442-58j
		pop	hl
		ret
; END OF FUNCTION CHUNK	FOR p7Dsub_4442

; =============== S U B	R O U T	I N E =======================================


p7Dsub_43F6:				; CODE XREF: seg001:7739p
		push	af
		call	p7Dsub_5525
		jr	nz, P1orAret
		push	af
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		add	hl, bc
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		ld	(unk_83E6), a
		inc	hl
		pop	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		ld	(unk_83E7), a
		pop	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 809Fh
; ---------------------------------------------------------------------------
		ld	hl, tempSwapArea
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80A2h
; ---------------------------------------------------------------------------
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80A5h
; ---------------------------------------------------------------------------
		ld	de, MD5Buffer
		ld	hl, OP1
		rst	28h
; ---------------------------------------------------------------------------
		.dw 801Eh
; ---------------------------------------------------------------------------
		ret
; ---------------------------------------------------------------------------

P1orAret:				; CODE XREF: p7Dsub_43F6+4j
		pop	af
		or	a
		ret
; End of function p7Dsub_43F6

; ---------------------------------------------------------------------------

p7Dloc_442C:				; CODE XREF: seg001:44C9p p7Dsub_5B4D+1Dp
		push	hl
		push	af
		ld	c, a
		ld	de, 400h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Dh
; ---------------------------------------------------------------------------
		jr	nz, locret_4441
		inc	hl
		ld	a, c
		push	de
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		pop	de
		ex	de, hl
		pop	af
		pop	hl

locret_4441:				; CODE XREF: seg001:4435j
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_4442:				; CODE XREF: seg001:43A5p p7Dsub_4490+2p	...

; FUNCTION CHUNK AT 43DF SIZE 00000017 BYTES

		push	hl
		push	bc
		call	p7Dsub_70D1
		ld	de, 800h
		call	p7Dsub_777E
		call	p7Dsub_4574
		pop	bc
		pop	de

p7Dloc_4452:				; CODE XREF: p7Dsub_4442+45j
		push	de
		push	bc
		push	bc
		push	de
		ld	de, 810h
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		pop	de
		ld	a, c
		pop	bc
		jr	nz, p7Dloc_4489
		cp	c
		push	hl
		ld	c, a
		ld	b, 0
		push	bc
		jr	nz, p7Dloc_4482
		ld	b, c

p7Dloc_446D:				; CODE XREF: p7Dsub_4442+35j
		call	p7Dsub_7700
		call	p7Dsub_4C73
		jr	nz, p7Dloc_4482
		inc	de
		inc	hl
		djnz	p7Dloc_446D
		pop	bc
		pop	hl
		pop	bc
		pop	de
		ld	a, 0
		bit	7, a
		ret
; ---------------------------------------------------------------------------

p7Dloc_4482:				; CODE XREF: p7Dsub_4442+28j p7Dsub_4442+31j
		pop	bc
		pop	hl
		add	hl, bc
		pop	bc
		pop	de
		jr	p7Dloc_4452
; ---------------------------------------------------------------------------

p7Dloc_4489:				; CODE XREF: p7Dsub_4442+20j
		pop	bc
		pop	de
		ld	a, 0FFh
		bit	7, a
		ret
; End of function p7Dsub_4442


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4490:				; CODE XREF: seg001:4722p
		push	hl
		push	bc
		call	p7Dsub_4442
		pop	bc
		pop	hl
		ret
; End of function p7Dsub_4490


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4498:				; CODE XREF: seg001:45A1p
		call	p7Dsub_7700
		call	p7Dsub_4894
		call	p7Dsub_7700
		call	p7Dsub_4873
		call	p7Dsub_70D1
		jr	nz, p7Dloc_44B8
		call	p7Dsub_7700
		push	bc
		call	p7Dsub_4873
		push	bc
		pop	hl
		pop	bc
		or	a
		sbc	hl, bc
		jr	nc, p7Dloc_44BE

p7Dloc_44B8:				; CODE XREF: p7Dsub_4498+Fj
		ld	a, 0
		bit	7, a
		jr	locret_44C2
; ---------------------------------------------------------------------------

p7Dloc_44BE:				; CODE XREF: p7Dsub_4498+1Ej
		ld	a, 0FFh
		bit	7, a

locret_44C2:				; CODE XREF: p7Dsub_4498+24j
		ret
; End of function p7Dsub_4498

; ---------------------------------------------------------------------------

p7Dloc_44C3:				; CODE XREF: seg001:459Cp
		call	p7Dsub_4894
		call	p7Dsub_7700
		call	p7Dloc_442C
		push	de
		push	bc
		ld	de, 0A10h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8027h
; ---------------------------------------------------------------------------
		push	de
		call	p7Dsub_4574
		pop	de
		ld	a, c
		pop	bc
		cp	c
		jr	nz, p7Dloc_44F7
		ex	de, hl
		pop	hl
		ld	b, c

p7Dloc_44E1:				; CODE XREF: seg001:44F5j
		ex	de, hl
		call	p7Dsub_4566
		ld	c, a
		ex	de, hl
		call	p7Dsub_4566
		cp	c
		jr	nz, locret_44F8
		dec	b
		ld	a, b
		cp	0
		jr	z, locret_44F8
		inc	hl
		inc	de
		jr	p7Dloc_44E1
; ---------------------------------------------------------------------------

p7Dloc_44F7:				; CODE XREF: seg001:44DCj
		pop	bc

locret_44F8:				; CODE XREF: seg001:44EBj seg001:44F1j
		ret
; ---------------------------------------------------------------------------

Page7D_2BFE:
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	p7Dsub_7700
		call	p7Dsub_4894
		call	p7Dsub_4574
		call	p7Dsub_7700
		call	p7Dsub_50C5
		jr	nz, p7Dloc_4530
		ld	de, 320h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8027h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_4529
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 802Ah
; ---------------------------------------------------------------------------

p7Dloc_4529:				; CODE XREF: seg001:4521j
		call	p7Dsub_4894
		call	p7Dsub_5083
		xor	a

p7Dloc_4530:				; CODE XREF: seg001:4519j
		jp	relockFlashBack

; =============== S U B	R O U T	I N E =======================================


p7Dsub_4533:				; CODE XREF: seg001:4599p
		call	Page7D_2B80
		call	p7Dsub_4566
		ld	(unk_8439+1), a
		inc	hl
		call	p7Dsub_4566
		ld	(unk_843B), a
		call	NZIf83Plus
		ret	nz
		inc	hl
		call	p7Dsub_7700
		ld	bc, 0Bh
		ld	de, 9C9Eh
		call	FlashToRam
		ld	hl, 9CA8h
		ld	a, 0FEh	; '�'
		or	(hl)
		ld	(hl), a
		ret
; End of function p7Dsub_4533


; =============== S U B	R O U T	I N E =======================================


p7Dsub_455C:				; CODE XREF: p7Dsub_7D67+5Cp p7Dsub_7D67+8Ap
		call	p7Dsub_4565
		ld	e, a
		call	p7Dsub_4565
		ld	d, a
		ret
; End of function p7Dsub_455C


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4565:				; CODE XREF: p7Dsub_455Cp	p7Dsub_455C+4p ...
		inc	hl
; End of function p7Dsub_4565


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4566:				; CODE XREF: Page7D_2B62+9p
		; Page7D_2B62:p7Dloc_4117p ...
		call	p7Dsub_7700
		call	Page7D_2CD0
		ret
; End of function p7Dsub_4566


; =============== S U B	R O U T	I N E =======================================


p7Dsub_456D:				; CODE XREF: Page7D_2B62+11Cp
		; Page7D_2B62+12Cp ...
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		ret
; End of function p7Dsub_456D


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4574:				; CODE XREF: Page7D_2B62+21p
		; Page7D_2B62+25p ...
		inc	hl

p7Dloc_4575:				; CODE XREF: p7Dsub_4F95+47p seg001:5F60p
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		ret
; End of function p7Dsub_4574


; =============== S U B	R O U T	I N E =======================================


p7Dsub_457C:				; CODE XREF: Page7D_2BB0+4p
		; Page7D_2B62+126p ...
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8024h
; ---------------------------------------------------------------------------
		ret
; End of function p7Dsub_457C

; ---------------------------------------------------------------------------

Page7D_2BD4:
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		push	bc
		push	de
		push	hl
		push	ix
		call	p7Dsub_4533
		call	p7Dloc_44C3
		jr	nz, p7Dloc_45D9
		call	p7Dsub_4498
		jr	nz, p7Dloc_45D9
		call	p7Dsub_50A8

p7Dloc_45A9:
		call	p7Dsub_4C8B
		res	6, (iy+24h)
		xor	a
		ld	(unk_9C87), a
		call	p7Dsub_70D1
		ld	bc, 0
		jr	nz, p7Dloc_45BF
		rst	28h
; ---------------------------------------------------------------------------
		.dw 802Ah
; ---------------------------------------------------------------------------

p7Dloc_45BF:				; CODE XREF: seg001:45BAj
		call	p7Dsub_468A
		call	p7Dsub_70D1
		call	p7Dsub_45E4
		ld	a, 0
		bit	7, a

p7Dloc_45CC:				; CODE XREF: seg001:45E2j
		push	af
		call	p7Dsub_4926
		pop	af
		pop	ix
		pop	hl
		pop	de
		pop	bc
		jp	relockFlashBack
; ---------------------------------------------------------------------------

p7Dloc_45D9:				; CODE XREF: seg001:459Fj seg001:45A4j
		call	p7Dsub_4894
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8060h
; ---------------------------------------------------------------------------
		ld	a, 0FFh
		or	a
		jr	p7Dloc_45CC

; =============== S U B	R O U T	I N E =======================================


p7Dsub_45E4:				; CODE XREF: seg001:45C5p seg001:4794p
		push	bc
		push	de
		ld	a, (unk_8439+1)
		ld	b, a
		call	Page7D_2B80
		ex	de, hl
		call	p7Dsub_456D
		ld	a, (unk_843B)
		ld	b, a
		call	p7Dsub_456D
		call	NZIf83Plus
		jr	nz, p7Dloc_4609
		call	p7Dsub_7700
		ld	bc, 0Bh
		ld	hl, 9C9Eh
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------

p7Dloc_4609:				; CODE XREF: p7Dsub_45E4+17j
		call	p7Dsub_70D1
		jr	nz, p7Dloc_464B
		call	p7Dsub_464E
		call	p7Dsub_4574
		add	hl, bc
		call	p7Dsub_70D1
		ld	de, 800h
		call	p7Dsub_777E
		call	p7Dsub_4574

p7Dloc_4621:				; CODE XREF: p7Dsub_45E4+65j
		ld	de, 810h
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_464B
		push	hl
		push	bc
		ld	b, c
		ld	(OP2), bc
		ld	b, 0
		call	p7Dsub_7700
		ld	de, 8484h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8066h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_4646
		call	p7Dsub_464E

p7Dloc_4646:				; CODE XREF: p7Dsub_45E4+5Dj
		pop	bc
		pop	hl
		add	hl, bc
		jr	p7Dloc_4621
; ---------------------------------------------------------------------------

p7Dloc_464B:				; CODE XREF: p7Dsub_45E4+28j p7Dsub_45E4+46j
		pop	de
		pop	bc
		ret
; End of function p7Dsub_45E4


; =============== S U B	R O U T	I N E =======================================


p7Dsub_464E:				; CODE XREF: p7Dsub_45E4+2Ap p7Dsub_45E4+5Fp
		push	af
		push	bc
		push	de
		push	hl
		push	ix
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8099h
; ---------------------------------------------------------------------------
		ld	de, 700h
		call	p7Dsub_777E
		call	p7Dsub_4574

p7Dloc_4660:				; CODE XREF: p7Dsub_464E+33j
		ld	de, 710h
		call	p7Dsub_705E
		jr	nz, p7Dloc_4683
		call	p7Dsub_4574
		push	bc
		push	hl
		call	p7Dsub_7700
		ld	de, 838Fh
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80A8h
; ---------------------------------------------------------------------------
		jr	z, p7Dloc_467E
		call	p7Dsub_51C3

p7Dloc_467E:				; CODE XREF: p7Dsub_464E+2Bj
		pop	hl
		pop	bc
		add	hl, bc
		jr	p7Dloc_4660
; ---------------------------------------------------------------------------

p7Dloc_4683:				; CODE XREF: p7Dsub_464E+18j
		pop	ix
		pop	hl
		pop	de
		pop	bc
		pop	af
		ret
; End of function p7Dsub_464E


; =============== S U B	R O U T	I N E =======================================


p7Dsub_468A:				; CODE XREF: seg001:p7Dloc_45BFp
		; seg001:477Cp
		call	p7Dsub_4894
		push	hl
		call	p7Dsub_4574
		add	hl, bc
		call	p7Dsub_4574
		add	hl, bc
		pop	bc
		push	bc
		or	a
		sbc	hl, bc
		push	hl
		pop	bc
		pop	hl
		push	bc
		push	hl
		ld	de, 4000h
		call	p7Dsub_42DF
		pop	hl
		push	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8060h
; ---------------------------------------------------------------------------
		pop	de
		pop	bc
		ld	hl, 4000h
		push	bc
		call	p7Dsub_42AE
		call	p7Dsub_4894
		pop	bc
		ex	de, hl
		ld	a, d
		xor	20h ; ' '
		ld	d, a
		call	p7Dsub_430E
		ret	z
; End of function p7Dsub_468A

; START	OF FUNCTION CHUNK FOR p7Dsub_5083

p7Dloc_46C1:				; CODE XREF: p7Dsub_5083-Cj
		call	relockFlashBack
		jp	JErrorNo
; END OF FUNCTION CHUNK	FOR p7Dsub_5083
; ---------------------------------------------------------------------------

p7Dloc_46C7:				; CODE XREF: seg001:4728p seg001:4738p
		push	de
		push	bc
		call	p7Dsub_762A
		ld	(OP2), bc
		ld	de, 8484h
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8066h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_4715
		push	hl
		ld	de, 100h
		call	p7Dsub_777E
		jr	nz, p7Dloc_4714
		call	p7Dsub_4574
		push	hl
		call	p7Dsub_4894
		ld	de, 100h
		call	p7Dsub_777E
		call	p7Dsub_4574
		pop	de
		ex	de, hl
		call	p7Dsub_7700
		call	p7Dsub_5CFF
		call	p7Dsub_5D1E
		ex	de, hl
		call	p7Dsub_7700
		call	p7Dsub_5CFF
		call	p7Dsub_5D43
		ex	de, hl
		or	a
		sbc	hl, bc
		ld	a, 0
		bit	7, a

p7Dloc_4714:				; CODE XREF: seg001:46E5j
		pop	hl

p7Dloc_4715:				; CODE XREF: seg001:46DCj
		pop	bc
		pop	de
		ret
; ---------------------------------------------------------------------------

Page7D_2C04:
		push	bc
		push	de
		push	hl
		call	p7Dsub_7634
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		call	p7Dsub_4490
		jp	nz, p7Dloc_47A5
		call	p7Dloc_46C7
		jr	nz, p7Dloc_4746
		jp	nc, p7Dloc_47A5
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8066h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_4746
		call	p7Dsub_50A8
		call	p7Dloc_46C7
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8066h
; ---------------------------------------------------------------------------
		call	p7Dsub_47E3
		rst	28h
; ---------------------------------------------------------------------------
		.dw 802Ah
; ---------------------------------------------------------------------------
		jr	p7Dloc_474C
; ---------------------------------------------------------------------------

p7Dloc_4746:				; CODE XREF: seg001:472Bj seg001:4733j
		call	p7Dsub_50A8
		call	p7Dsub_5124

p7Dloc_474C:				; CODE XREF: seg001:4744j
		ld	de, 836Dh
		call	Page7D_2B80
		ld	bc, 20h	; ' '
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		call	p7Dsub_521D
		ld	bc, 0Dh
		sla	c
		call	p7Dsub_7700
		ld	de, tempSwapArea
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		call	p7Dsub_762A
		ld	(appID), bc
		ld	de, 838Eh
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		call	p7Dsub_468A
		ld	bc, (appID)
		ld	b, 0
		ld	(OP2), bc
		ld	hl, 838Eh
		ld	de, 8484h
		ldir
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8066h
; ---------------------------------------------------------------------------
		call	p7Dsub_45E4
		call	p7Dsub_4894
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8060h
; ---------------------------------------------------------------------------

p7Dloc_479D:
		call	p7Dsub_4926
		pop	hl
		pop	de
		pop	bc
		xor	a
		ret
; ---------------------------------------------------------------------------

p7Dloc_47A5:				; CODE XREF: seg001:4725j seg001:472Dj
		call	p7Dsub_4894
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8060h
; ---------------------------------------------------------------------------
		call	p7Dsub_4926
		pop	hl
		pop	de
		pop	bc
		ld	a, 0FFh
		or	a
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_47B5:				; CODE XREF: p7Dsub_47E3+4p p7Dsub_5124+4p
		xor	a
; End of function p7Dsub_47B5


; =============== S U B	R O U T	I N E =======================================


Page7D_2B86:				; CODE XREF: p7Dsub_5185+12p p7Dsub_576D+3p
		push	af
		push	bc
		push	de
		push	hl
		push	ix
		call	NZIf83Plus
		jr	nz, p7Dloc_47D9
		cp	1
		jr	z, p7Dloc_47D1
		cp	3
		jr	nz, p7Dloc_47D9
		call	p7Dsub_4243
		call	p7Dsub_4253
		jr	p7Dloc_47DC
; ---------------------------------------------------------------------------

p7Dloc_47D1:				; CODE XREF: Page7D_2B86+Dj
		call	p7Dsub_4274
		call	p7Dsub_4253
		jr	p7Dloc_47DC
; ---------------------------------------------------------------------------

p7Dloc_47D9:				; CODE XREF: Page7D_2B86+9j
		; Page7D_2B86+11j
		call	p7Dsub_4287

p7Dloc_47DC:				; CODE XREF: Page7D_2B86+19j
		; Page7D_2B86+21j
		pop	ix
		pop	hl
		pop	de
		pop	bc
		pop	af
		ret
; End of function Page7D_2B86


; =============== S U B	R O U T	I N E =======================================


p7Dsub_47E3:				; CODE XREF: seg001:473Ep
		push	hl
		push	bc
		push	de
		push	af
		call	p7Dsub_47B5
		ld	de, 700h
		call	p7Dsub_777E
		call	p7Dsub_4574
		push	hl
		call	p7Dsub_4894
		ld	de, 700h
		call	p7Dsub_777E
		call	p7Dsub_4574
		pop	de
		push	hl
		push	de
		call	p7Dsub_762A
		push	hl
		push	bc
		call	p7Dsub_484E
		inc	ix
		pop	bc
		pop	hl
		push	ix
		call	p7Dsub_4442
		add	hl, bc
		call	p7Dsub_7700
		ld	de, 810h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_4825
		call	p7Dsub_484E
		jr	p7Dloc_483E
; ---------------------------------------------------------------------------

p7Dloc_4825:				; CODE XREF: p7Dsub_47E3+3Bj
		ld	hl, appID
		ld	a, 0FFh
		ld	b, 5

p7Dloc_482C:				; CODE XREF: p7Dsub_47E3+4Bj
		ld	(hl), a
		inc	hl
		djnz	p7Dloc_482C
		ld	hl, OP6
		ld	(hl), 1
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8069h
; ---------------------------------------------------------------------------
		call	p7Dsub_764E
		push	hl
		pop	ix

p7Dloc_483E:				; CODE XREF: p7Dsub_47E3+40j
		push	ix
		pop	bc
		pop	ix
		pop	hl
		pop	de
		push	bc
		call	p7Dsub_4D5E
		inc	ix
		jp	p7Dloc_5156
; End of function p7Dsub_47E3


; =============== S U B	R O U T	I N E =======================================


p7Dsub_484E:				; CODE XREF: p7Dsub_47E3+25p p7Dsub_47E3+3Dp ...
		ld	d, c
		set	4, d
		ld	e, 7
		ld	(appID), de
		ld	de, 838Fh
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		ld	hl, OP6
		ld	(hl), 1
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8069h
; ---------------------------------------------------------------------------
		jr	z, p7Dloc_486C
		dec	ix

p7Dloc_486C:				; CODE XREF: p7Dsub_484E+1Aj
		call	p7Dsub_764E
		push	hl
		pop	ix
		ret
; End of function p7Dsub_484E


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4873:				; CODE XREF: p7Dsub_4498+9p p7Dsub_4498+15p	...
		push	hl
		push	af
		push	de
		push	af
		ld	de, 100h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Dh
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_488F
		pop	af
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		call	p7Dsub_7700
		call	p7Dsub_5CFF
		call	p7Dsub_5D43
		jr	p7Dloc_4890
; ---------------------------------------------------------------------------

p7Dloc_488F:				; CODE XREF: p7Dsub_4873+Aj
		pop	af

p7Dloc_4890:				; CODE XREF: p7Dsub_4873+1Aj
		pop	de
		pop	af
		pop	hl
		ret
; End of function p7Dsub_4873


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4894:				; CODE XREF: Page7D_2BB0+1p
		; Page7D_2B62+6p ...
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8057h
; End of function p7Dsub_4894


; =============== S U B	R O U T	I N E =======================================


Page7D_2BEC:				; CODE XREF: Page7D_2B62+44p
		; p7Dsub_4214:p7Dloc_421Dp ...
		push	af
		ld	a, h
		xor	20h ; ' '
		ld	h, a
		pop	af
		ret
; End of function Page7D_2BEC

; ---------------------------------------------------------------------------

Page7D_2CA6:
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	p7Dsub_48B5
		jp	relockFlashBack

; =============== S U B	R O U T	I N E =======================================


p7Dsub_48B5:				; CODE XREF: seg001:48AFp p7Dsub_4A5A+4Fp ...
		call	Page7D_2B68
		call	p7Dsub_48BC
		ret
; End of function p7Dsub_48B5


; =============== S U B	R O U T	I N E =======================================


p7Dsub_48BC:				; CODE XREF: p7Dsub_48B5+3p
		push	ix
		push	hl
		push	de
		push	bc
		push	hl
		push	bc
		push	ix
		pop	hl
		ld	bc, 0C9h ; '�'
		or	a
		sbc	hl, bc
		jp	nc, Page0Call_2541
		add	hl, bc
		ld	bc, 0
		or	a
		sbc	hl, bc
		jp	m, Page0Call_2541
		pop	bc
		pop	hl
		jp	p7Dloc_48EB
; End of function p7Dsub_48BC


; =============== S U B	R O U T	I N E =======================================


p7Dsub_48DE:				; CODE XREF: p7Dsub_4AC9+44p seg001:4BABp ...
		push	ix
		push	hl
		push	de
		push	bc
		call	p7Dsub_521D
		ld	bc, 0Dh
		add	ix, bc

p7Dloc_48EB:				; CODE XREF: p7Dsub_48BC+1Fj
		push	ix
		pop	bc
		sla	c
		add	hl, bc
		call	p7Dsub_4566
		cp	80h ; '�'
		scf
		jr	z, p7Dloc_4902
		cp	0
		jr	nz, p7Dloc_4902
		call	p7Dsub_4565
		cp	0

p7Dloc_4902:				; CODE XREF: p7Dsub_48DE+19j p7Dsub_48DE+1Dj
		pop	bc
		pop	de
		pop	hl
		pop	ix
		ret
; End of function p7Dsub_48DE

; ---------------------------------------------------------------------------

Page7D_3E9A:
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	Page7D_2B56
		ld	a, b
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80CFh
; ---------------------------------------------------------------------------
		call	p7Dsub_4926
		jp	relockFlashBack

; =============== S U B	R O U T	I N E =======================================


p7Dsub_4926:				; CODE XREF: seg001:45CDp
		; seg001:p7Dloc_479Dp ...
		push	af
		push	bc
		push	hl
		push	de
		push	ix
		ld	a, 0
		ld	(ioFlag), a
		call	p7Dsub_4AC9
		jr	nz, p7Dloc_4939
		call	p7Dloc_4B82

p7Dloc_4939:				; CODE XREF: p7Dsub_4926+Ej
		call	p7Dsub_4A5A
		ld	a, (ioFlag)
		cp	0
		jr	z, p7Dloc_498B
		ld	hl, aHaveExpired_
		ld	a, 4Dh ; 'M'
		bit	1, (iy+35h)
		call	nz, Page0Call_3C45
		call	p7Dsub_7045
		call	Page0Call_3CD5
		ld	hl, aDeleting___
		ld	a, 4Eh ; 'N'
		bit	1, (iy+35h)
		call	nz, Page0Call_3C45
		call	p7Dsub_7045
		call	Page0Call_3CD5
		call	page0_B93
		ld	b, 5

p7Dloc_496C:				; CODE XREF: p7Dsub_4926+54j
		ld	c, b
		ld	b, 0FFh

p7Dloc_496F:				; CODE XREF: p7Dsub_4926+51j
		ld	a, 0FFh

p7Dloc_4971:				; CODE XREF: p7Dsub_4926+4Fj
		call	page0_AC4
		dec	a
		jr	nz, p7Dloc_4971
		djnz	p7Dloc_496F
		ld	b, c
		djnz	p7Dloc_496C
		call	page0_BA2
		call	Page0Call_2E65
		ld	hl, 0
		ld	(curRow), hl
		call	Page0Call_3D05

p7Dloc_498B:				; CODE XREF: p7Dsub_4926+1Bj
		pop	ix
		pop	de
		pop	hl
		pop	bc
		pop	af
		ret
; End of function p7Dsub_4926


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4992:				; CODE XREF: p7Dsub_4AC9+52p
		push	af
		push	bc
		push	de
		push	hl
		call	p7Dsub_4565
		push	af
		and	0F0h ; '�'
		ld	c, a
		pop	af
		xor	c
		ld	(appID), a
		inc	hl
		ld	c, a
		ld	b, 0
		call	p7Dsub_7700
		ld	de, 838Eh
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		call	p7Dsub_6021
		jr	c, p7Dloc_49B7
		call	Page7D_2BE6

p7Dloc_49B7:				; CODE XREF: p7Dsub_4992+20j
		pop	hl
		pop	de
		pop	bc
		pop	af
		ret
; End of function p7Dsub_4992

; ---------------------------------------------------------------------------

p7Dloc_49BC:				; CODE XREF: seg001:49D1j
		push	bc
		push	af
		call	p7Dsub_4A21
		jr	nz, p7Dloc_49D5
		pop	af
		call	CopyFlashPage
		pop	bc
		push	af
		ld	a, 0
		dec	c
		or	c
		jr	z, p7Dloc_49D3
		pop	af
		inc	a
		jr	p7Dloc_49BC
; ---------------------------------------------------------------------------

p7Dloc_49D3:				; CODE XREF: seg001:49CDj
		pop	af
		ret
; ---------------------------------------------------------------------------

p7Dloc_49D5:				; CODE XREF: seg001:49C1j
		pop	bc
		pop	bc
		ret

; =============== S U B	R O U T	I N E =======================================


CopyFlashPage:				; CODE XREF: seg001:49C4p
		push	hl
		ld	hl, 4000h
		push	af
		call	Page7D_2CD0
		cp	0FFh
		jr	z, p7Dloc_4A1E
		pop	af
		push	af
		cp	7Eh ; '~'
		jr	z, p7Dloc_4A1E
		cp	7Fh ; ''
		jr	z, p7Dloc_4A1E
		ld	a, b
		cp	7Eh ; '~'
		jr	z, p7Dloc_4A1E
		cp	7Fh ; ''
		jr	z, p7Dloc_4A1E
		pop	af

p7Dloc_49F8:				; CODE XREF: CopyFlashPage+44j
		push	bc
		ld	bc, 100h
		ld	de, ramStart
		push	hl
		push	de
		push	af
		call	FlashToRam
		pop	af
		pop	de
		pop	hl
		pop	bc
		push	af
		ld	a, b
		ld	bc, 100h
		ex	de, hl
		push	af
		call	p7Dsub_7666
		pop	af
		ex	de, hl
		ld	b, a
		ld	a, 80h ; '�'
		cp	h
		jr	z, p7Dloc_4A1E
		pop	af
		jr	p7Dloc_49F8
; ---------------------------------------------------------------------------

p7Dloc_4A1E:				; CODE XREF: CopyFlashPage+Aj
		; CopyFlashPage+10j ...
		pop	af
		pop	hl
		ret
; End of function CopyFlashPage


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4A21:				; CODE XREF: seg001:49BEp
		push	hl
		ld	a, 8
		ld	hl, 4000h

p7Dloc_4A27:				; CODE XREF: p7Dsub_4A21+13j
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		cp	0FEh ; '�'
		jr	z, p7Dloc_4A3C
		pop	af
		inc	a
		call	p7Dsub_75E1
		jr	nz, p7Dloc_4A27
		ld	a, 0FFh
		bit	7, a
		pop	hl
		ret
; ---------------------------------------------------------------------------

p7Dloc_4A3C:				; CODE XREF: p7Dsub_4A21+Cj
		pop	bc
		pop	hl
		ret
; End of function p7Dsub_4A21


; =============== S U B	R O U T	I N E =======================================


FindAppNumPages:			; CODE XREF: Page7D_2BE6+Cp
		; Page7D_2B56+1Cp ...
		push	hl
		push	af
		ld	hl, 4000h
		ld	de, 8080h
		or	a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80ABh
; ---------------------------------------------------------------------------
		ld	c, 0
		jr	nz, p7Dloc_4A57
		inc	hl
		inc	hl
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		ld	c, a

p7Dloc_4A57:				; CODE XREF: FindAppNumPages+Ej
		pop	af
		pop	hl
		ret
; End of function FindAppNumPages


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4A5A:				; CODE XREF: p7Dsub_4926:p7Dloc_4939p
		call	p7Dsub_7643
		ld	b, c
		call	p7Dsub_75EC

p7Dloc_4A61:				; CODE XREF: p7Dsub_4A5A+1Fj
		push	af
		ld	hl, 4000h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		cp	0FFh
		jr	z, p7Dloc_4A77
		cp	0
		jr	z, p7Dloc_4A77
		cp	80h ; '�'
		jr	nz, p7Dloc_4A77
		pop	af
		jr	p7Dloc_4A80
; ---------------------------------------------------------------------------

p7Dloc_4A77:				; CODE XREF: p7Dsub_4A5A+10j p7Dsub_4A5A+14j ...
		pop	af

p7Dloc_4A78:				; CODE XREF: p7Dsub_4A5A+6Dj
		dec	a
		djnz	p7Dloc_4A61
		ret
; ---------------------------------------------------------------------------

p7Dloc_4A7C:				; CODE XREF: p7Dsub_4A5A+2Cj
		pop	af
		pop	bc
		jr	p7Dloc_4A77
; ---------------------------------------------------------------------------

p7Dloc_4A80:				; CODE XREF: p7Dsub_4A5A+1Bj
		push	af
		push	bc
		push	af
		call	Page0Call_3E31
		jr	nz, p7Dloc_4A7C
		pop	af
		push	af
		call	p7Dsub_5E31
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80A8h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_4AC4
		pop	af
		push	af
		call	p7Dsub_52D9
		jr	c, p7Dloc_4AC4
		jr	z, p7Dloc_4AC4
		pop	af
		push	af
		ld	b, a
		call	p7Dsub_75EC
		sub	b
		ld	bc, 0
		ld	c, a
		push	bc
		pop	ix
		call	p7Dsub_48B5
		jr	c, p7Dloc_4AC4
		jr	nz, p7Dloc_4AC4
		ld	a, (ioFlag)
		cp	0
		jr	nz, p7Dloc_4ABF
		call	Page0Call_2C7F
		ld	a, 0FFh
		ld	(ioFlag), a

p7Dloc_4ABF:				; CODE XREF: p7Dsub_4A5A+5Bj
		pop	af
		push	af
		call	Page7D_2BE6

p7Dloc_4AC4:				; CODE XREF: p7Dsub_4A5A+36j p7Dsub_4A5A+3Dj ...
		pop	af
		pop	bc
		pop	af
		jr	p7Dloc_4A78
; End of function p7Dsub_4A5A


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4AC9:				; CODE XREF: p7Dsub_4926+Bp
		call	p7Dsub_70D1
		jp	nz, p7Dloc_4B69
		ld	de, 700h
		call	p7Dsub_777E
		call	p7Dsub_4574
		ld	ix, 0

p7Dloc_4ADC:				; CODE XREF: p7Dsub_4AC9+93j p7Dsub_4AC9+9Dj
		ld	de, 710h
		call	p7Dsub_705E
		jp	nz, p7Dloc_4B6E
		push	hl
		call	p7Dsub_4574
		ld	a, c
		ld	(appID+1), a
		ld	de, 838Fh
		call	p7Dsub_424C
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80A8h
; ---------------------------------------------------------------------------
		pop	hl
		push	hl
		jr	z, p7Dloc_4B5F
		ld	de, 740h
		call	p7Dsub_705E
		jr	nz, p7Dloc_4B14
		call	p7Dsub_7700
		call	p7Dsub_50C5
		jr	z, p7Dloc_4B14
		call	p7Dsub_536F
		call	p7Dsub_48DE
		jr	c, p7Dloc_4B14
		jr	z, p7Dloc_4B20

p7Dloc_4B14:				; CODE XREF: p7Dsub_4AC9+37j p7Dsub_4AC9+3Fj ...
		call	p7Dsub_540C
		jr	z, p7Dloc_4B5F
		pop	hl
		push	hl
		call	p7Dsub_4992
		jr	p7Dloc_4B5F
; ---------------------------------------------------------------------------

p7Dloc_4B20:				; CODE XREF: p7Dsub_4AC9+49j
		ld	a, (ioFlag)
		cp	0
		jr	nz, p7Dloc_4B3D
		pop	de
		push	de
		push	hl
		call	p7Dsub_4B73
		call	p7Dsub_6021
		jr	c, p7Dloc_4B51
		pop	hl
		pop	de
		push	de
		call	Page0Call_2C7F
		ld	a, 0FFh
		ld	(ioFlag), a

p7Dloc_4B3D:				; CODE XREF: p7Dsub_4AC9+5Cj
		pop	de
		push	de
		push	hl
		call	p7Dsub_4B73
		call	p7Dsub_6021
		jr	c, p7Dloc_4B51
		call	Page0Call_2C8B
		call	Page0Call_3CD5
		call	Page7D_2BE6

p7Dloc_4B51:				; CODE XREF: p7Dsub_4AC9+67j p7Dsub_4AC9+7Dj
		pop	hl
		pop	de
		ex	de, hl
		push	de
		call	p7Dsub_4574
		pop	de
		add	hl, bc
		inc	ix
		jp	p7Dloc_4ADC
; ---------------------------------------------------------------------------

p7Dloc_4B5F:				; CODE XREF: p7Dsub_4AC9+2Fj p7Dsub_4AC9+4Ej ...
		pop	hl
		call	p7Dsub_4574
		add	hl, bc
		inc	ix
		jp	p7Dloc_4ADC
; ---------------------------------------------------------------------------

p7Dloc_4B69:				; CODE XREF: p7Dsub_4AC9+3j
		ld	a, 0FFh
		bit	7, a
		ret
; ---------------------------------------------------------------------------

p7Dloc_4B6E:				; CODE XREF: p7Dsub_4AC9+19j
		ld	a, 0
		bit	7, a
		ret
; End of function p7Dsub_4AC9


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4B73:				; CODE XREF: p7Dsub_4AC9+61p p7Dsub_4AC9+77p
		ex	de, hl
		call	p7Dsub_4574
		ld	a, c
		ld	(appID), a
		ld	de, 838Eh
		call	p7Dsub_424C
		ret
; End of function p7Dsub_4B73

; ---------------------------------------------------------------------------

p7Dloc_4B82:				; CODE XREF: p7Dsub_4926+10p
		call	p7Dsub_70D1
		ld	de, 800h
		call	p7Dsub_777E
		call	p7Dsub_4574

p7Dloc_4B8E:				; CODE XREF: seg001:4C08j
		ld	de, 810h
		call	p7Dsub_705E
		jp	nz, locret_4C0B
		push	hl
		ld	de, 840h
		call	p7Dsub_705E
		jr	nz, p7Dloc_4BC9
		call	p7Dsub_7700
		call	p7Dsub_50C5
		jr	z, p7Dloc_4BE4
		call	p7Dsub_536F
		call	p7Dsub_48DE
		jr	c, p7Dloc_4BC9
		jr	nz, p7Dloc_4BE4
		ld	a, (ioFlag)
		cp	0
		jr	nz, p7Dloc_4BC9
		call	Page0Call_2C7F
		ld	a, 0FFh
		ld	(ioFlag), a
		pop	de
		push	de
		call	Page0Call_2C85
		call	Page0Call_3CD5

p7Dloc_4BC9:				; CODE XREF: seg001:4B9Ej seg001:4BAEj ...
		pop	de
		ex	de, hl
		push	hl
		call	p7Dsub_4574
		ld	de, 8484h
		ld	(OP2), bc
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8066h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_4BE4
		rst	28h
; ---------------------------------------------------------------------------
		.dw 802Ah
; ---------------------------------------------------------------------------

p7Dloc_4BE4:				; CODE XREF: seg001:4BA6j seg001:4BB0j ...
		pop	de
		ex	de, hl
		push	hl
		call	p7Dsub_4574
		ld	de, 8484h
		ld	(OP2), bc
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8066h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_4C01
		inc	ix
		call	p7Dsub_4C0C

p7Dloc_4C01:				; CODE XREF: seg001:4BFAj
		pop	hl
		call	p7Dsub_4574
		add	hl, bc
		inc	ix
		jp	p7Dloc_4B8E
; ---------------------------------------------------------------------------

locret_4C0B:				; CODE XREF: seg001:4B94j
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_4C0C:				; CODE XREF: seg001:4BFEp
		ld	de, 700h
		call	p7Dsub_777E
		call	p7Dsub_4574

p7Dloc_4C15:				; CODE XREF: p7Dsub_4C0C+62j
		ld	de, 710h
		call	p7Dsub_705E
		jr	nz, p7Dloc_4C70
		push	hl
		ld	de, 740h
		call	p7Dsub_705E
		jr	nz, p7Dloc_4C38
		call	p7Dsub_7700
		call	p7Dsub_50C5
		jr	z, p7Dloc_4C38
		call	p7Dsub_536F
		call	p7Dsub_48DE
		jr	c, p7Dloc_4C38
		jr	z, p7Dloc_4C3B

p7Dloc_4C38:				; CODE XREF: p7Dsub_4C0C+18j p7Dsub_4C0C+20j ...
		pop	hl
		jr	p7Dloc_4C68
; ---------------------------------------------------------------------------

p7Dloc_4C3B:				; CODE XREF: p7Dsub_4C0C+2Aj
		ld	a, (ioFlag)
		cp	0
		jr	nz, p7Dloc_4C55
		pop	de
		push	de
		push	hl
		call	p7Dsub_6021
		jr	c, p7Dloc_4C66
		pop	hl
		pop	de
		push	de
		call	Page0Call_2C7F
		ld	a, 0FFh
		ld	(ioFlag), a

p7Dloc_4C55:				; CODE XREF: p7Dsub_4C0C+34j
		pop	de
		push	de
		push	hl
		call	p7Dsub_6021
		jr	c, p7Dloc_4C66
		call	Page0Call_2C8B
		call	Page0Call_3CD5
		call	Page7D_2BE6

p7Dloc_4C66:				; CODE XREF: p7Dsub_4C0C+3Cj p7Dsub_4C0C+4Fj
		pop	hl
		pop	de

p7Dloc_4C68:				; CODE XREF: p7Dsub_4C0C+2Dj
		call	p7Dsub_4574
		add	hl, bc
		inc	ix
		jr	p7Dloc_4C15
; ---------------------------------------------------------------------------

p7Dloc_4C70:				; CODE XREF: p7Dsub_4C0C+Fj
		dec	ix
		ret
; End of function p7Dsub_4C0C


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4C73:				; CODE XREF: p7Dsub_4442+2Ep p7Dsub_4F95+27p
		push	bc
		push	de
		push	hl
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		ld	(OP2), a
		ex	de, hl
		pop	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		ld	bc, (OP2)
		cp	c
		pop	hl
		pop	de
		pop	bc
		ret
; End of function p7Dsub_4C73


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4C8B:				; CODE XREF: seg001:p7Dloc_45A9p
		push	hl
		push	de
		push	bc
		push	af
		call	p7Dsub_4F62
		call	p7Dloc_4D38
		call	p7Dsub_4CAE
		call	p7Dsub_521D
		ld	bc, 0Dh
		sla	c
		call	p7Dsub_7700
		ld	de, tempSwapArea
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		pop	af
		pop	bc
		pop	de
		pop	hl
		ret
; End of function p7Dsub_4C8B


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4CAE:				; CODE XREF: p7Dsub_4C8B+Ap
		call	p7Dsub_70D1
		jr	nz, p7Dloc_4CF7
		ld	de, 800h
		call	p7Dsub_777E
		jr	nz, p7Dloc_4CF7
		call	p7Dsub_4574
		push	hl
		call	p7Dsub_4894
		ld	de, 800h
		call	p7Dsub_777E
		jp	nz, p7Dloc_4D36
		call	p7Dsub_4574
		pop	de
		ex	de, hl
		inc	ix

p7Dloc_4CD2:				; CODE XREF: p7Dsub_4CAE+85j
		push	hl

p7Dloc_4CD3:				; CODE XREF: p7Dsub_4CAE+47j
		call	p7Dsub_4F95
		jr	nz, p7Dloc_4CDD
		call	p7Dsub_4F10
		jr	p7Dloc_4D1D
; ---------------------------------------------------------------------------

p7Dloc_4CDD:				; CODE XREF: p7Dsub_4CAE+28j
		push	de
		push	ix
		ld	de, 810h
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		add	hl, bc
		call	p7Dsub_705E
		pop	ix
		pop	de

p7Dloc_4CF0:
		call	nz, p7Dsub_4E44
		jr	nz, p7Dloc_4D1D
		jr	p7Dloc_4CD3
; ---------------------------------------------------------------------------

p7Dloc_4CF7:				; CODE XREF: p7Dsub_4CAE+3j p7Dsub_4CAE+Bj
		call	p7Dsub_4894
		ld	de, 800h
		call	p7Dsub_777E
		jr	nz, locret_4D35
		inc	ix
		call	p7Dsub_4574

p7Dloc_4D07:				; CODE XREF: p7Dsub_4CAE+6Dj
		ld	de, 810h
		call	p7Dsub_705E
		jr	nz, locret_4D35
		push	hl
		ex	de, hl
		call	p7Dsub_4E44
		pop	hl
		call	p7Dsub_4574
		add	hl, bc
		inc	ix
		jr	p7Dloc_4D07
; ---------------------------------------------------------------------------

p7Dloc_4D1D:				; CODE XREF: p7Dsub_4CAE+2Dj p7Dsub_4CAE+45j
		pop	hl
		ex	de, hl
		push	de
		call	p7Dsub_7700
		ld	de, 810h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		add	hl, bc
		call	p7Dsub_705E
		pop	de
		inc	ix
		jr	nz, locret_4D35
		ex	de, hl
		jr	p7Dloc_4CD2
; ---------------------------------------------------------------------------

locret_4D35:				; CODE XREF: p7Dsub_4CAE+52j p7Dsub_4CAE+5Fj ...
		ret
; ---------------------------------------------------------------------------

p7Dloc_4D36:				; CODE XREF: p7Dsub_4CAE+1Aj
		pop	hl
		ret
; End of function p7Dsub_4CAE

; ---------------------------------------------------------------------------

p7Dloc_4D38:				; CODE XREF: p7Dsub_4C8B+7p
		call	p7Dsub_70D1
		jr	nz, p7Dloc_4D82
		ld	de, 700h
		call	p7Dsub_777E
		jr	nz, p7Dloc_4D82
		call	p7Dsub_4574
		push	hl
		call	p7Dsub_4894
		ld	de, 700h
		call	p7Dsub_777E
		jp	nz, p7Dloc_4DCB
		call	p7Dsub_4574
		pop	de
		ex	de, hl
		ld	ix, 0Dh

; =============== S U B	R O U T	I N E =======================================


p7Dsub_4D5E:				; CODE XREF: p7Dsub_47E3+63p
		; seg001:p7Dloc_4D80j
		push	hl

p7Dloc_4D5F:				; CODE XREF: p7Dsub_4D5E+20j
		call	p7Dsub_4F6E
		call	z, p7Dsub_4EBD
		jr	z, p7Dloc_4DAF
		push	de
		push	ix
		ld	de, 710h
		ld	a, 7Eh ; '~'
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		add	hl, bc
		call	p7Dsub_705E
		pop	ix
		pop	de
		call	nz, p7Dsub_4DCD
		jr	nz, p7Dloc_4DAF
		jr	p7Dloc_4D5F
; End of function p7Dsub_4D5E

; ---------------------------------------------------------------------------

p7Dloc_4D80:				; CODE XREF: p7Dsub_4DCD-7j
		jr	p7Dsub_4D5E
; ---------------------------------------------------------------------------

p7Dloc_4D82:				; CODE XREF: seg001:4D3Bj seg001:4D43j
		ld	ix, 0Ch
		call	p7Dsub_4894
		ld	de, 700h
		call	p7Dsub_777E
		jp	nz, locret_4DCA
		inc	ix
		call	p7Dsub_4574

p7Dloc_4D97:				; CODE XREF: seg001:4DADj
		ld	de, 710h
		call	p7Dsub_705E
		jr	nz, p7Dloc_4DC8
		push	hl
		ex	de, hl
		call	p7Dsub_4DCD
		pop	hl
		call	p7Dsub_4574
		or	a
		adc	hl, bc
		inc	ix
		jr	p7Dloc_4D97
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p7Dsub_4DCD

p7Dloc_4DAF:				; CODE XREF: p7Dsub_4D5E+7j p7Dsub_4D5E+1Ej
		pop	hl
		ex	de, hl
		push	de
		ld	a, 7Eh ; '~'
		ld	de, 710h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		or	a
		adc	hl, bc
		call	p7Dsub_705E
		pop	de
		jr	nz, locret_4DCA
		ex	de, hl
		inc	ix
		jr	p7Dloc_4D80
; END OF FUNCTION CHUNK	FOR p7Dsub_4DCD
; ---------------------------------------------------------------------------

p7Dloc_4DC8:				; CODE XREF: seg001:4D9Dj
		dec	ix
; START	OF FUNCTION CHUNK FOR p7Dsub_4DCD

locret_4DCA:				; CODE XREF: seg001:4D8Fj p7Dsub_4DCD-Cj
		ret
; END OF FUNCTION CHUNK	FOR p7Dsub_4DCD
; ---------------------------------------------------------------------------

p7Dloc_4DCB:				; CODE XREF: seg001:4D52j
		pop	hl
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_4DCD:				; CODE XREF: p7Dsub_4D5E+1Bp seg001:4DA1p ...

; FUNCTION CHUNK AT 4DAF SIZE 00000019 BYTES
; FUNCTION CHUNK AT 4DCA SIZE 00000001 BYTES

		push	bc
		push	hl
		push	de
		push	ix

p7Dloc_4DD2:
		res	7, (iy+25h)
		ex	de, hl
		push	hl
		ld	a, 7Eh ; '~'
		ld	de, 740h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_4DE6
		set	7, (iy+25h)

p7Dloc_4DE6:				; CODE XREF: p7Dsub_4DCD+13j
		pop	hl
		ld	a, 7Eh ; '~'
		ld	de, 760h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		jr	z, p7Dloc_4E01
		bit	7, (iy+25h)
		jr	z, p7Dloc_4DFC
		ld	de, 0
		jr	p7Dloc_4E27
; ---------------------------------------------------------------------------

p7Dloc_4DFC:				; CODE XREF: p7Dsub_4DCD+28j
		ld	de, 80h	; '�'
		jr	p7Dloc_4E27
; ---------------------------------------------------------------------------

p7Dloc_4E01:				; CODE XREF: p7Dsub_4DCD+22j
		ld	a, c
		or	b
		ld	a, 0
		jr	z, p7Dloc_4E0A
		call	p7Dsub_4566

p7Dloc_4E0A:				; CODE XREF: p7Dsub_4DCD+38j
		push	af
		ld	b, 9
		sub	b
		jr	c, p7Dloc_4E20
		pop	af
		ld	b, 8
		sub	b
		call	p7Dsub_4E9B
		ld	d, a
		ld	a, 8
		call	p7Dsub_4E9B
		ld	e, a
		jr	p7Dloc_4E27
; ---------------------------------------------------------------------------

p7Dloc_4E20:				; CODE XREF: p7Dsub_4DCD+41j
		ld	d, 0
		pop	af
		call	p7Dsub_4E9B
		ld	e, a

p7Dloc_4E27:				; CODE XREF: p7Dsub_4DCD+2Dj p7Dsub_4DCD+32j ...
		ld	hl, tempSwapArea
		push	ix
		pop	bc
		sla	c
		ld	b, 0
		or	a
		adc	hl, bc
		ld	(hl), e
		inc	hl
		ld	(hl), d
		ld	a, 0FFh
		or	a
		res	7, (iy+25h)
		pop	ix
		pop	de
		pop	hl
		pop	bc
		ret
; End of function p7Dsub_4DCD


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4E44:				; CODE XREF: p7Dsub_4CAE:p7Dloc_4CF0p
		; p7Dsub_4CAE+63p
		push	af
		push	bc
		push	hl
		push	de
		push	ix
		ex	de, hl
		ld	a, 7Eh ; '~'
		ld	de, 860h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		jr	z, p7Dloc_4E5A
		ld	de, 80h	; '�'
		jr	p7Dloc_4E80
; ---------------------------------------------------------------------------

p7Dloc_4E5A:				; CODE XREF: p7Dsub_4E44+Fj
		ld	a, c
		or	b
		ld	a, 0
		jr	z, p7Dloc_4E63
		call	p7Dsub_4566

p7Dloc_4E63:				; CODE XREF: p7Dsub_4E44+1Aj
		push	af
		ld	b, 9
		sub	b
		jr	c, p7Dloc_4E79
		pop	af
		ld	b, 8
		sub	b
		call	p7Dsub_4E9B
		ld	d, a
		ld	a, 8
		call	p7Dsub_4E9B
		ld	e, a
		jr	p7Dloc_4E80
; ---------------------------------------------------------------------------

p7Dloc_4E79:				; CODE XREF: p7Dsub_4E44+23j
		ld	d, 0
		pop	af
		call	p7Dsub_4E9B
		ld	e, a

p7Dloc_4E80:				; CODE XREF: p7Dsub_4E44+14j p7Dsub_4E44+33j
		ld	hl, tempSwapArea
		push	ix
		pop	bc
		sla	c
		ld	b, 0
		or	a
		adc	hl, bc
		ld	(hl), e
		inc	hl
		ld	(hl), d
		ld	a, 0FFh
		bit	7, a
		pop	ix
		pop	de
		pop	hl
		pop	bc
		pop	af
		ret
; End of function p7Dsub_4E44


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4E9B:				; CODE XREF: p7Dsub_4DCD+47p p7Dsub_4DCD+4Dp ...
		push	bc
		ld	c, 11h
		sub	c
		jp	nc, p7Dloc_4EB9
		or	a
		adc	a, c
		cp	0
		jr	z, p7Dloc_4EB9
		cp	1
		jr	z, p7Dloc_4EBB
		ld	b, a
		dec	b
		ld	a, 2

p7Dloc_4EB0:				; CODE XREF: p7Dsub_4E9B+17j
		sla	a
		djnz	p7Dloc_4EB0
		ld	b, 1
		sub	b
		jr	p7Dloc_4EBB
; ---------------------------------------------------------------------------

p7Dloc_4EB9:				; CODE XREF: p7Dsub_4E9B+4j p7Dsub_4E9B+Bj
		ld	a, 0

p7Dloc_4EBB:				; CODE XREF: p7Dsub_4E9B+Fj p7Dsub_4E9B+1Cj
		pop	bc
		ret
; End of function p7Dsub_4E9B


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4EBD:				; CODE XREF: p7Dsub_4D5E+4p
		; p7Dsub_4F10:p7Dloc_4F47p
		push	af
		push	hl
		push	de
		push	ix
		ld	de, 710h
		call	p7Dsub_4ECE
		pop	ix
		pop	de
		pop	hl
		pop	af
		ret
; End of function p7Dsub_4EBD


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4ECE:				; CODE XREF: p7Dsub_4EBD+8p p7Dsub_4F10+8p
		call	p7Dsub_705E
		call	p7Dsub_4574
		ld	de, 838Fh
		call	p7Dsub_424C
		push	hl
		ld	hl, OP6
		ld	(hl), 1
		pop	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8069h
; ---------------------------------------------------------------------------
		jr	z, p7Dloc_4EE8
		dec	ix

p7Dloc_4EE8:				; CODE XREF: p7Dsub_4ECE+16j
		call	p7Dsub_764E
		push	hl
		pop	ix
		push	ix
		pop	bc
		sla	c
		call	p7Dsub_521D
		or	a
		adc	hl, bc
		ld	a, 7Eh ; '~'

p7Dloc_4EFB:
		ld	de, tempSwapArea
		ex	de, hl
		pop	bc
		push	bc
		sla	c
		ld	b, 0
		or	a
		adc	hl, bc
		ex	de, hl
		ld	bc, 2
		call	FlashToRam
		ret
; End of function p7Dsub_4ECE


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4F10:				; CODE XREF: p7Dsub_4CAE+2Ap
		push	af
		push	hl
		push	de
		push	ix
		ld	de, 810h
		call	p7Dsub_4ECE
		ld	bc, (appID+1)
		ld	b, 0
		ld	a, c
		push	af
		and	0F0h ; '�'
		ld	c, a
		pop	af
		xor	c
		ld	c, a
		ld	(OP2), bc

p7Dloc_4F2D:
		ld	hl, 838Fh
		ld	de, 8484h
		ldir
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8066h
; ---------------------------------------------------------------------------
		pop	ix
		jr	nz, p7Dloc_4F5E
		inc	ix
		ld	de, 700h
		call	p7Dsub_777E
		call	p7Dsub_4574

p7Dloc_4F47:				; CODE XREF: p7Dsub_4F10+4Aj
		call	p7Dsub_4EBD
		inc	ix
		ld	a, 7Eh ; '~'
		ld	de, 710h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		or	a
		adc	hl, bc
		call	p7Dsub_705E
		jr	z, p7Dloc_4F47
		dec	ix

p7Dloc_4F5E:				; CODE XREF: p7Dsub_4F10+2Aj
		pop	de
		pop	hl
		pop	af
		ret
; End of function p7Dsub_4F10


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4F62:				; CODE XREF: p7Dsub_4C8B+4p
		ld	hl, tempSwapArea
		ld	a, 0FFh
		ld	b, 0E8h	; '�'

p7Dloc_4F69:				; CODE XREF: p7Dsub_4F62+9j
		ld	(hl), a
		inc	hl
		djnz	p7Dloc_4F69
		ret
; End of function p7Dsub_4F62


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4F6E:				; CODE XREF: p7Dsub_4D5E:p7Dloc_4D5Fp
		push	hl
		push	de
		push	bc
		push	ix
		push	de
		ld	a, 7Eh ; '~'
		ld	de, 710h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		pop	de
		push	hl
		push	bc
		ex	de, hl
		ld	a, 7Eh ; '~'
		ld	de, 710h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		pop	de
		ld	a, e
		pop	de
		cp	c
		jr	nz, p7Dloc_4FE9
		ld	a, c
		or	b
		jr	z, p7Dloc_4FEF
		jp	p7Dloc_4FB9
; End of function p7Dsub_4F6E


; =============== S U B	R O U T	I N E =======================================


p7Dsub_4F95:				; CODE XREF: p7Dsub_4CAE:p7Dloc_4CD3p
		push	hl
		push	de
		push	bc
		push	ix
		push	de
		ld	a, 7Eh ; '~'
		ld	de, 810h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		pop	de
		push	hl
		push	bc
		ex	de, hl
		ld	a, 7Eh ; '~'
		ld	de, 810h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		pop	de
		ld	a, e
		pop	de
		cp	c
		jr	nz, p7Dloc_4FE9
		ld	a, c
		or	b
		jr	z, p7Dloc_4FEF

p7Dloc_4FB9:				; CODE XREF: p7Dsub_4F6E+24j
		ld	b, c

p7Dloc_4FBA:				; CODE XREF: p7Dsub_4F95+2Ej p7Dsub_4F95+52j
		ld	a, 7Eh ; '~'
		call	p7Dsub_4C73
		jr	nz, p7Dloc_4FE9
		inc	hl
		inc	de
		djnz	p7Dloc_4FBA
		call	p7Dsub_4565
		and	0F0h ; '�'
		cp	10h
		jr	z, p7Dloc_4FEF
		cp	0
		jr	z, p7Dloc_4FEF
		dec	hl
		inc	de
		push	de
		call	p7Dsub_4574
		pop	de
		ex	de, hl
		push	bc
		push	de
		call	p7Dloc_4575
		pop	de
		ex	de, hl
		ld	a, c
		pop	bc
		cp	c
		jr	nz, p7Dloc_4FE9
		ld	b, c
		jr	p7Dloc_4FBA
; ---------------------------------------------------------------------------

p7Dloc_4FE9:				; CODE XREF: p7Dsub_4F6E+1Ej p7Dsub_4F95+1Ej ...
		ld	a, 0FFh
		bit	7, a
		jr	p7Dloc_4FF3
; ---------------------------------------------------------------------------

p7Dloc_4FEF:				; CODE XREF: p7Dsub_4F6E+22j p7Dsub_4F95+22j ...
		ld	a, 0
		bit	7, a

p7Dloc_4FF3:				; CODE XREF: p7Dsub_4F95+58j
		pop	ix
		pop	bc
		pop	de
		pop	hl
		ret
; End of function p7Dsub_4F95

; ---------------------------------------------------------------------------

p7Dloc_4FF9:				; CODE XREF: p7Dsub_533B+24p
		push	af
		push	de
		push	hl
		push	bc
		push	af
		push	hl
		push	af
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		or	a
		adc	hl, bc
		pop	af
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		or	a
		adc	hl, bc
		pop	de
		or	a
		sbc	hl, de
		push	hl
		pop	bc
		ex	de, hl
		pop	af
		ld	de, tempSwapArea
		push	bc
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		pop	bc
		ld	a, 7Eh ; '~'
		call	p7Dsub_4894
		push	hl
		push	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8060h
; ---------------------------------------------------------------------------
		pop	hl
		ex	de, hl
		ld	hl, tempSwapArea
		ld	a, 7Eh ; '~'
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		ld	de, 320h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8027h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_503E
		rst	28h
; ---------------------------------------------------------------------------
		.dw 802Ah
; ---------------------------------------------------------------------------

p7Dloc_503E:				; CODE XREF: seg001:5039j
		pop	hl
; START	OF FUNCTION CHUNK FOR p7Dsub_5083

p7Dloc_503F:				; CODE XREF: p7Dsub_5083+4j
		scf

p7Dloc_5040:				; CODE XREF: p7Dsub_508A+1Cj
		ld	a, 7Eh ; '~'
		push	af
		push	af
		push	hl
		push	hl
		push	af
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		or	a
		adc	hl, bc
		pop	af
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		or	a
		adc	hl, bc
		pop	de
		or	a
		sbc	hl, de
		push	hl
		pop	bc
		pop	hl
		pop	af
		push	bc
		push	hl
		call	p7Dsub_521D
		ld	bc, 0E8h ; '�'
		ld	a, 7Eh ; '~'
		ld	de, tempSwapArea
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		pop	de
		pop	bc
		ld	a, d
		xor	20h ; ' '
		ld	d, a
		call	p7Dsub_430E
		jp	nz, p7Dloc_46C1
		pop	af
		call	c, p7Dsub_4926
		pop	bc
		pop	hl
		pop	de
		pop	af
		ret
; END OF FUNCTION CHUNK	FOR p7Dsub_5083

; =============== S U B	R O U T	I N E =======================================


p7Dsub_5083:				; CODE XREF: seg001:452Cp

; FUNCTION CHUNK AT 46C1 SIZE 00000006 BYTES
; FUNCTION CHUNK AT 503F SIZE 00000044 BYTES

		push	af
		push	de
		push	hl
		push	bc
		jp	p7Dloc_503F
; End of function p7Dsub_5083


; =============== S U B	R O U T	I N E =======================================


p7Dsub_508A:				; CODE XREF: p7Dsub_50A8+15p
		push	af
		push	de
		push	hl
		push	bc
		call	p7Dsub_4894
		ld	de, 320h
		call	p7Dsub_777E
		push	hl
		ld	de, 320h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8027h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_50A3
		rst	28h
; ---------------------------------------------------------------------------
		.dw 802Ah
; ---------------------------------------------------------------------------

p7Dloc_50A3:				; CODE XREF: p7Dsub_508A+14j
		pop	hl
		scf
		ccf
		jr	p7Dloc_5040
; End of function p7Dsub_508A


; =============== S U B	R O U T	I N E =======================================


p7Dsub_50A8:				; CODE XREF: seg001:45A6p seg001:4735p ...
		push	af
		push	bc
		push	hl
		push	de
		call	p7Dsub_4894
		ld	de, 320h
		call	p7Dsub_777E
		call	p7Dsub_4574
		ld	a, 7Eh ; '~'
		call	p7Dsub_50C5
		call	z, p7Dsub_508A
		pop	de
		pop	hl
		pop	bc
		pop	af
		ret
; End of function p7Dsub_50A8


; =============== S U B	R O U T	I N E =======================================


p7Dsub_50C5:				; CODE XREF: seg001:4516p p7Dsub_4AC9+3Cp ...
		push	ix
		push	hl
		push	de
		push	af
		push	hl
		ld	de, 320h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8027h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_5119
		call	p7Dsub_4574
		ex	de, hl
		pop	hl
		inc	hl
		inc	de
		pop	af
		ld	b, a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		push	af
		and	0F0h ; '�'
		ld	c, a
		pop	af
		xor	c
		push	af
		ex	de, hl
		call	p7Dsub_4566
		ld	c, a
		pop	af
		sub	c
		jr	z, p7Dloc_50F3
		jr	nc, p7Dloc_511B
		jr	c, p7Dloc_5113

p7Dloc_50F3:				; CODE XREF: p7Dsub_50C5+28j
		ld	a, b
		inc	de
		inc	hl
		ld	b, c
		ex	de, hl

p7Dloc_50F8:				; CODE XREF: p7Dsub_50C5+49j
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		push	af
		ex	de, hl
		call	p7Dsub_4566
		ld	c, a
		pop	af
		sub	c
		jr	z, p7Dloc_510A
		jr	nc, p7Dloc_511A
		jr	c, p7Dloc_5112

p7Dloc_510A:				; CODE XREF: p7Dsub_50C5+3Fj
		pop	af
		inc	de
		inc	hl
		ex	de, hl
		djnz	p7Dloc_50F8
		jr	p7Dloc_5113
; ---------------------------------------------------------------------------

p7Dloc_5112:				; CODE XREF: p7Dsub_50C5+43j
		pop	af

p7Dloc_5113:				; CODE XREF: p7Dsub_50C5+2Cj p7Dsub_50C5+4Bj
		ld	a, 0FFh
		bit	7, a
		jr	p7Dloc_511F
; ---------------------------------------------------------------------------

p7Dloc_5119:				; CODE XREF: p7Dsub_50C5+Cj
		pop	af

p7Dloc_511A:				; CODE XREF: p7Dsub_50C5+41j
		pop	af

p7Dloc_511B:				; CODE XREF: p7Dsub_50C5+2Aj
		ld	a, 0
		bit	7, a

p7Dloc_511F:				; CODE XREF: p7Dsub_50C5+52j
		pop	de
		pop	hl
		pop	ix
		ret
; End of function p7Dsub_50C5


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5124:				; CODE XREF: seg001:4749p
		push	hl
		push	bc
		push	de
		push	af
		call	p7Dsub_47B5
		call	p7Dsub_762A
		call	p7Dsub_484E
		inc	ix
		push	ix
		call	p7Dsub_4894
		ld	de, 700h
		call	p7Dsub_777E
		call	p7Dsub_4574

p7Dloc_5141:				; CODE XREF: p7Dsub_5124+30j
		ld	de, 710h
		call	p7Dsub_705E
		jr	nz, p7Dloc_5156
		ex	de, hl
		call	p7Dsub_4DCD
		ex	de, hl
		inc	ix
		call	p7Dsub_4574
		add	hl, bc
		jr	p7Dloc_5141
; ---------------------------------------------------------------------------

p7Dloc_5156:				; CODE XREF: p7Dsub_47E3+68j p7Dsub_5124+23j
		ld	hl, tempSwapArea
		push	ix
		pop	bc
		sla	c
		add	hl, bc
		pop	de
		push	hl
		sla	e
		call	p7Dsub_521D
		add	hl, de
		push	hl
		ld	a, c
		sub	e
		jr	nc, p7Dloc_516F
		ld	a, e
		ld	e, c
		sub	e

p7Dloc_516F:				; CODE XREF: p7Dsub_5124+46j
		ld	c, a
		ld	hl, 0C8h ; '�'
		sbc	hl, de
		sbc	hl, bc
		push	hl
		pop	bc
		pop	hl
		pop	de
		ld	a, 7Eh ; '~'
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		pop	af
		pop	de
		pop	bc
		pop	hl
		ret
; End of function p7Dsub_5124


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5185:				; CODE XREF: p7Dsub_519D+14p
		push	bc
		push	hl
		call	p7Dsub_521D
		pop	de
		ex	de, hl
		or	a
		sbc	hl, de
		ex	de, hl
		ld	hl, tempSwapArea
		add	hl, de
		ld	a, (unk_9C20)
		call	Page7D_2B86
		pop	bc
		ld	(hl), b
		ret
; End of function p7Dsub_5185


; =============== S U B	R O U T	I N E =======================================


p7Dsub_519D:				; CODE XREF: p7Dsub_7240+227p
		push	af
		push	bc
		push	hl
		call	p7Dsub_51DB
		call	p7Dsub_7BCC
		ld	c, a
		call	p7Dsub_4566
		push	af
		or	c
		ld	b, a
		pop	af
		and	c
		jr	nz, p7Dloc_51BB
		call	p7Dsub_5185
		ld	a, 5
		call	Page7D_2B62
		jr	p7Dloc_51BF
; ---------------------------------------------------------------------------

p7Dloc_51BB:				; CODE XREF: p7Dsub_519D+12j
		ex	de, hl
		call	p7Dsub_456D

p7Dloc_51BF:				; CODE XREF: p7Dsub_519D+1Cj
		pop	hl
		pop	bc
		pop	af
		ret
; End of function p7Dsub_519D


; =============== S U B	R O U T	I N E =======================================


p7Dsub_51C3:				; CODE XREF: p7Dsub_464E+2Dp seg001:7758p
		push	af
		push	bc
		push	hl
		call	p7Dsub_51DB
		call	p7Dsub_7BCC
		cpl
		ld	c, a
		call	p7Dsub_4566
		and	c
		ld	b, a
		ex	de, hl
		call	p7Dsub_456D
		pop	hl
		pop	bc
		pop	af
		ret
; End of function p7Dsub_51C3


; =============== S U B	R O U T	I N E =======================================


p7Dsub_51DB:				; CODE XREF: p7Dsub_519D+3p p7Dsub_51C3+3p
		push	de
		push	af
		ld	b, a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80A8h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_51ED
		call	p7Dsub_75EC
		sub	b
		inc	a
		ld	c, a
		ld	b, 0
		jr	p7Dloc_5202
; ---------------------------------------------------------------------------

p7Dloc_51ED:				; CODE XREF: p7Dsub_51DB+6j
		push	hl
		ld	hl, OP6
		ld	(hl), 0
		pop	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8069h
; ---------------------------------------------------------------------------
		inc	ix
		push	ix
		pop	hl
		call	p7Dsub_7643
		add	hl, bc
		push	hl
		pop	bc

p7Dloc_5202:				; CODE XREF: p7Dsub_51DB+10j
		push	bc
		call	Page7D_2B80
		sra	c
		sra	c
		sra	c
		or	a
		adc	hl, bc
		pop	bc
		ld	a, c
		and	7
		ld	c, a
		pop	af
		pop	de
		ret
; End of function p7Dsub_51DB


; =============== S U B	R O U T	I N E =======================================


Page7D_2B80:				; CODE XREF: p7Dsub_4253p	p7Dsub_4533p ...
		push	bc
		ld	bc, 1FE0h
		jr	p7Dloc_5221
; End of function Page7D_2B80


; =============== S U B	R O U T	I N E =======================================


p7Dsub_521D:				; CODE XREF: Page7D_2B62+5Ap p7Dsub_4228p ...
		push	bc
		ld	bc, 1F18h

p7Dloc_5221:				; CODE XREF: Page7D_2B80+4j
		; p7Dsub_522B+4j ...
		push	ix
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8057h
; ---------------------------------------------------------------------------
		add	hl, bc
		pop	ix
		pop	bc
		ret
; End of function p7Dsub_521D


; =============== S U B	R O U T	I N E =======================================


p7Dsub_522B:				; CODE XREF: Page7D_2B62+62p p7Dsub_4214p ...
		push	bc
		ld	bc, 1DEAh
		jr	p7Dloc_5221
; End of function p7Dsub_522B


; =============== S U B	R O U T	I N E =======================================


Page7D_2B68:				; CODE XREF: p7Dsub_48B5p	p7Dsub_5365+5p ...
		call	NZIf83Plus
		jr	nz, p7Dsub_521D
; End of function Page7D_2B68


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5236:				; CODE XREF: p7Dsub_4230p	p7Dsub_4261p ...
		push	bc
		ld	bc, 1E50h
		jr	p7Dloc_5221
; End of function p7Dsub_5236


; =============== S U B	R O U T	I N E =======================================


p7Dsub_523C:				; CODE XREF: p7Dsub_42A2p
		push	bc
		ld	bc, 1FE0h
		jr	p7Dloc_5221
; End of function p7Dsub_523C


; =============== S U B	R O U T	I N E =======================================


FindSwapSector:				; CODE XREF: p7Dsub_42AE+3p p7Dsub_42D3p ...
		push	hl
		push	bc
		push	ix
		ld	a, (OP1)
		push	af
		ld	a, 8

p7Dloc_524C:				; CODE XREF: FindSwapSector+1Bj
		push	af
		ld	hl, 4000h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		cp	0FEh ; '�'
		jr	z, p7Dloc_527B
		pop	af
		add	a, 4
		call	p7Dsub_75E1
		jr	c, p7Dloc_524C
		ld	a, 8

p7Dloc_5261:				; CODE XREF: FindSwapSector+30j
		push	af
		ld	hl, 4000h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		cp	0FFh
		jr	z, p7Dloc_5278
		pop	af
		add	a, 4
		call	p7Dsub_75E1
		jr	c, p7Dloc_5261
		ld	a, 8
		jr	p7Dloc_5279
; ---------------------------------------------------------------------------

p7Dloc_5278:				; CODE XREF: FindSwapSector+28j
		pop	af

p7Dloc_5279:				; CODE XREF: FindSwapSector+34j
		jr	p7Dloc_527C
; ---------------------------------------------------------------------------

p7Dloc_527B:				; CODE XREF: FindSwapSector+13j
		pop	af

p7Dloc_527C:				; CODE XREF: FindSwapSector:p7Dloc_5279j
		ld	b, a
		pop	af
		ld	(OP1), a
		ld	a, b
		pop	ix
		pop	bc
		pop	hl
		ret
; End of function FindSwapSector


; =============== S U B	R O U T	I N E =======================================


Page7D_2C40:				; CODE XREF: p7Dsub_42D3+8p
		push	af
		push	hl
		push	bc
		push	de
		ld	b, 0FEh	; '�'
		ld	de, 4000h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		pop	de
		pop	bc
		pop	hl
		pop	af
		ret
; End of function Page7D_2C40

; ---------------------------------------------------------------------------

Page7D_2C22:
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8066h
; ---------------------------------------------------------------------------
		jr	nz, locret_52D8
		ld	a, 7Eh ; '~'

p7Dloc_529F:				; CODE XREF: seg001:5BDAp
		ld	(appSearchPage), a
		push	hl
		push	hl
		ld	a, (appSearchPage)
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		or	a
		adc	hl, bc
		inc	hl
		ld	a, (appSearchPage)
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		or	a
		adc	hl, bc
		pop	de
		sbc	hl, de
		push	hl
		pop	bc
		call	p7Dsub_4894
		ex	de, hl
		pop	hl

p7Dloc_52C2:				; CODE XREF: seg001:52D6j
		push	bc
		ld	a, (appSearchPage)
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		ld	b, a
		push	hl
		call	p7Dsub_456D
		pop	hl
		pop	bc
		dec	bc
		ld	a, b
		or	c
		jr	z, locret_52D8
		inc	hl
		jr	p7Dloc_52C2
; ---------------------------------------------------------------------------

locret_52D8:				; CODE XREF: seg001:529Bj seg001:52D3j
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_52D9:				; CODE XREF: p7Dsub_4A5A+3Ap seg001:630Dp ...
		ld	de, 8050h
		ld	hl, 4000h
		push	af
		or	a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_52ED
		pop	af
		call	p7Dsub_50C5
		scf
		ccf
		ret
; ---------------------------------------------------------------------------

p7Dloc_52ED:				; CODE XREF: p7Dsub_52D9+Bj
		pop	af
		scf
		ret
; End of function p7Dsub_52D9

; ---------------------------------------------------------------------------

Page7D_2CA0:				; CODE XREF: seg001:6221p seg001:626Bp
		ld	de, 8050h
		push	de
		jp	p7Dloc_52F7

p7Dloc_52F7:
		ld	hl, 4000h
		pop	de
		push	af
		or	a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_5338
		pop	af
		ld	(Abackup), a
		ld	a, i
		di
		push	af
		ld	a, (Abackup)
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	p7Dsub_50C5
		call	p7Dsub_6006
		call	relockFlashBack
		ld	(Abackup), a
		pop	af
		jp	po, p7Dloc_532F
		ei

p7Dloc_532F:				; CODE XREF: seg001:532Bj
		ld	a, (Abackup)
		call	p7Dsub_6011
		scf
		ccf
		ret
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p7Dsub_533B

p7Dloc_5338:				; CODE XREF: seg001:5300j p7Dsub_533B+4j	...
		pop	af
		scf
		ret
; END OF FUNCTION CHUNK	FOR p7Dsub_533B

; =============== S U B	R O U T	I N E =======================================


p7Dsub_533B:				; CODE XREF: seg001:7764p

; FUNCTION CHUNK AT 5338 SIZE 00000003 BYTES

		push	af
		call	p7Dsub_6021
		jr	c, p7Dloc_5338
		ld	hl, 4000h
		ld	de, 320h
		pop	af
		push	af
		or	a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_5338
		pop	af
		push	af
		push	hl
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		call	p7Dsub_50C5
		jr	nz, p7Dloc_5362
		pop	hl
		pop	af
		push	af
		push	hl
		call	p7Dloc_4FF9

p7Dloc_5362:				; CODE XREF: p7Dsub_533B+1Ej
		pop	hl
		pop	af
		ret
; End of function p7Dsub_533B


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5365:				; CODE XREF: p7Dsub_5E78+13p
		push	ix
		push	hl
		push	de
		push	bc
		call	Page7D_2B68
		jr	p7Dloc_537C
; End of function p7Dsub_5365


; =============== S U B	R O U T	I N E =======================================


p7Dsub_536F:				; CODE XREF: p7Dsub_4AC9+41p seg001:4BA8p ...
		push	ix
		push	hl
		push	de
		push	bc
		call	p7Dsub_521D
		ld	bc, 0Dh
		add	ix, bc

p7Dloc_537C:				; CODE XREF: p7Dsub_5365+8j
		push	ix
		pop	bc
		sla	c
		or	a
		adc	hl, bc
		push	hl
		call	p7Dsub_4566
		cp	80h ; '�'
		jr	z, p7Dloc_53AC
		push	af
		call	p7Dsub_4565
		cp	0
		pop	bc
		jr	z, p7Dloc_5399
		srl	a
		jr	p7Dloc_539B
; ---------------------------------------------------------------------------

p7Dloc_5399:				; CODE XREF: p7Dsub_536F+24j
		srl	b

p7Dloc_539B:				; CODE XREF: p7Dsub_536F+28j
		pop	de
		ld	c, a
		push	bc
		call	p7Dsub_456D
		pop	bc
		ld	b, c
		call	p7Dsub_456D
		pop	bc
		pop	de
		pop	hl
		pop	ix
		ret
; ---------------------------------------------------------------------------

p7Dloc_53AC:				; CODE XREF: p7Dsub_536F+1Bj
		pop	de
		pop	bc
		pop	de
		pop	hl
		pop	ix
		ret
; End of function p7Dsub_536F


; =============== S U B	R O U T	I N E =======================================


p7Dsub_53B3:				; CODE XREF: p7Dsub_638B+72p
		ld	(Abackup), a
		ld	a, i
		di
		push	af
		ld	a, (Abackup)
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	Page7D_2B5C

p7Dloc_53D1:				; CODE XREF: seg001:5522j
		call	p7Dsub_6006
		call	relockFlashBack
		ld	(Abackup), a
		pop	af
		jp	po, p7Dloc_53DF
		ei

p7Dloc_53DF:				; CODE XREF: p7Dsub_53B3+28j
		ld	a, (Abackup)
		jp	p7Dsub_6011
; End of function p7Dsub_53B3


; =============== S U B	R O U T	I N E =======================================


Page7D_2B5C:				; CODE XREF: p7Dsub_53B3+1Bp p7Dsub_607A+3Fp ...
		push	de
		push	hl
		push	bc
		push	ix
		ld	b, a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80A8h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_53FA
		call	p7Dsub_75EC
		sub	b
		inc	a
		ld	c, a
		ld	b, 0
		jr	p7Dloc_541E
; ---------------------------------------------------------------------------

p7Dloc_53FA:				; CODE XREF: Page7D_2B5C+9j
		ld	hl, OP6
		ld	(hl), 0
		ld	a, (appSearchPage)
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8069h
; ---------------------------------------------------------------------------
		pop	af
		ld	(appSearchPage), a
		jr	p7Dloc_5411
; End of function Page7D_2B5C


; =============== S U B	R O U T	I N E =======================================


p7Dsub_540C:				; CODE XREF: p7Dsub_4AC9:p7Dloc_4B14p
		push	de
		push	hl
		push	bc
		push	ix

p7Dloc_5411:				; CODE XREF: Page7D_2B5C+25j
		inc	ix
		push	ix
		pop	hl
		call	p7Dsub_7643
		or	a
		adc	hl, bc
		push	hl
		pop	bc

p7Dloc_541E:				; CODE XREF: Page7D_2B5C+13j
		push	bc
		call	Page7D_2B80
		sra	c
		sra	c
		sra	c
		or	a
		adc	hl, bc
		pop	bc
		ld	a, c
		and	7
		call	p7Dsub_7BCC
		ld	c, a
		call	p7Dsub_4566
		and	c
		pop	ix
		pop	bc
		pop	hl
		pop	de
		ret
; End of function p7Dsub_540C

; ---------------------------------------------------------------------------

p7Dloc_543D:				; CODE XREF: seg001:6272p
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		ld	b, a
		ld	de, 8060h
		ld	hl, 4000h
		or	a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_549D
		call	p7Dsub_75EC
		ld	c, b
		sub	c
		ld	bc, 0
		ld	c, a
		sla	c
		call	Page7D_2B68
		or	a
		adc	hl, bc
		ld	a, 7Eh ; '~'
		ld	de, OP1
		ld	bc, 2
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		ld	a, (OP1)
		ld	bc, 0

p7Dloc_547D:				; CODE XREF: seg001:5484j
		cp	0
		jr	z, p7Dloc_5486
		srl	a
		inc	c
		jr	p7Dloc_547D
; ---------------------------------------------------------------------------

p7Dloc_5486:				; CODE XREF: seg001:547Fj
		ld	a, (OP1+1)

p7Dloc_5489:				; CODE XREF: seg001:5490j
		cp	0
		jr	z, p7Dloc_5492
		srl	a
		inc	c
		jr	p7Dloc_5489
; ---------------------------------------------------------------------------

p7Dloc_5492:				; CODE XREF: seg001:548Bj
		ld	a, c
		ld	(OP1), a
		ld	a, 0
		ld	(OP1+1), a
		bit	7, a

p7Dloc_549D:				; CODE XREF: seg001:5459j
		jp	relockFlashBack
; ---------------------------------------------------------------------------

p7Dloc_54A0:				; CODE XREF: seg001:621Ap seg001:6248p
		ld	b, a
		ld	de, 8050h
		ld	hl, 4000h
		or	a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jr	nz, locret_54BE
		ld	a, b
		push	af
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		pop	af
		ld	de, OP1
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		ld	a, 0
		bit	7, a

locret_54BE:				; CODE XREF: seg001:54ABj
		ret
; ---------------------------------------------------------------------------
		push	hl
		ld	de, 8020h
		ld	hl, 4000h
		ld	a, 7Ah ; 'z'
		or	a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		ld	a, 7Ah ; 'z'
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		ld	d, a
		ld	a, 7Ah ; 'z'
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		ld	e, a
		pop	hl
		ret
; ---------------------------------------------------------------------------

Page7D_3C66:
		ld	(Abackup), a
		ld	a, i
		di
		push	af
		ld	a, (Abackup)
		push	hl
		push	de
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		ld	de, 510h
		push	de
		jr	p7Dloc_54FD

p7Dloc_54FD:
		call	p7Dsub_70D1
		jr	nz, p7Dloc_551F
		ld	de, 500h
		call	p7Dsub_777E
		jr	nz, p7Dloc_551F
		call	p7Dsub_4574
		ld	a, 7Eh ; '~'
		pop	de
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_5520
		ld	de, tempSwapArea
		ld	b, c
		push	bc
		ld	a, 7Eh ; '~'
		call	p7Dsub_761F

p7Dloc_551F:				; CODE XREF: seg001:5500j seg001:5508j
		pop	bc

p7Dloc_5520:				; CODE XREF: seg001:5513j
		pop	de
		pop	hl
		jp	p7Dloc_53D1

; =============== S U B	R O U T	I N E =======================================


p7Dsub_5525:				; CODE XREF: p7Dsub_43F6+1p seg001:5703p	...
		push	af
		ld	hl, 4000h
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw _LoadAIndPaged
; ---------------------------------------------------------------------------
		call	p7Dsub_75FD
		jp	nz, p7Dloc_55C8
		inc	hl
		pop	af
		call	p7Dsub_761F
		ld	bc, 4000h
		or	a
		sbc	hl, bc
		push	hl
		push	af
		ld	hl, 4000h
		ld	de, 8080h
		or	a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		inc	hl
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------

p7Dloc_5555:				; DATA XREF: seg001:76C0w
		dec	a
		or	a
		jr	z, p7Dloc_5574
		ld	c, a
		pop	af
		sub	c
		push	af
		ld	hl, (unk_83A1)
		call	p7Dsub_57C5
		ld	b, c

p7Dloc_5564:				; CODE XREF: p7Dsub_5525+47j
		push	bc
		ld	bc, 4000h
		or	a
		sbc	hl, bc
		pop	bc
		djnz	p7Dloc_5564
		call	p7Dsub_57C5
		ld	(unk_83A1), hl

p7Dloc_5574:				; CODE XREF: p7Dsub_5525+32j
		ld	hl, (unk_83A1)
		call	p7Dsub_57C5
		push	hl
		pop	bc
		ld	hl, 4000h
		or	a
		adc	hl, bc
		pop	af
		pop	bc
		or	a
		adc	hl, bc
		push	af

p7Dloc_5588:				; CODE XREF: p7Dsub_5525+81j
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		cp	2
		jr	nz, p7Dloc_55C8
		pop	af
		push	hl
		push	af
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		and	0F0h ; '�'
		cp	20h ; ' '
		jr	z, p7Dloc_55A8
		pop	af
		pop	hl
		push	af
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		or	a
		adc	hl, bc
		jr	p7Dloc_5588
; ---------------------------------------------------------------------------

p7Dloc_55A8:				; CODE XREF: p7Dsub_5525+75j
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		dec	hl
		inc	bc
		ld	de, tempSwapArea

p7Dloc_55B2:				; CODE XREF: p7Dsub_5525+98j
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		ld	(de), a
		inc	hl
		inc	de
		dec	bc
		ld	a, c
		or	b
		jr	nz, p7Dloc_55B2
		pop	af
		pop	hl
		ld	b, a
		ld	a, 0
		bit	7, a
		ld	a, b
		ret
; ---------------------------------------------------------------------------

p7Dloc_55C8:				; CODE XREF: p7Dsub_5525+Bj p7Dsub_5525+68j
		pop	af
		ld	a, 0FFh
		bit	7, a
		ret
; End of function p7Dsub_5525


; =============== S U B	R O U T	I N E =======================================


p7Dsub_55CE:				; CODE XREF: seg001:4383p
		inc	hl
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		or	a
		adc	hl, bc

p7Dloc_55D6:				; CODE XREF: p7Dsub_55CE+25j
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		cp	2
		jr	nz, p7Dloc_5609
		inc	hl
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		and	0F0h ; '�'
		cp	0
		jr	z, p7Dloc_55F5
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		or	a
		adc	hl, bc
		jr	p7Dloc_55D6
; ---------------------------------------------------------------------------

p7Dloc_55F5:				; CODE XREF: p7Dsub_55CE+1Bj
		pop	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		dec	hl
		inc	bc
		ld	de, tempSwapArea
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		ld	b, c
		ld	c, 0
		ld	a, 0
		bit	7, a
		ret
; ---------------------------------------------------------------------------

p7Dloc_5609:				; CODE XREF: p7Dsub_55CE+Fj
		pop	af
		ret
; End of function p7Dsub_55CE

; ---------------------------------------------------------------------------

p7Dloc_560B:				; CODE XREF: seg001:p7Dloc_5650p
		; seg001:5661p
		push	de
		push	hl
		push	bc
		rst	28h
; ---------------------------------------------------------------------------
		.dw 807Eh
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_5640
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8057h
; ---------------------------------------------------------------------------
		ld	a, 7Eh ; '~'
		ld	de, 410h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8027h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_5640
		call	p7Dsub_4574
		ld	a, 7Eh ; '~'
		ld	de, 849Eh
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		ld	a, 0
		bit	7, a

p7Dloc_5640:				; CODE XREF: seg001:5611j seg001:562Fj
		pop	bc
		pop	hl
		pop	de
		jp	relockFlashBack
; ---------------------------------------------------------------------------

Page7D_2B98:
		call	Page0Call_23DE
		jr	nc, p7Dloc_5650
		call	Page0Call_23E3
		jr	p7Dloc_565A
; ---------------------------------------------------------------------------

p7Dloc_5650:				; CODE XREF: seg001:5649j
		call	p7Dloc_560B
		jr	nz, p7Dloc_5695
		call	Page7D_2C34
		jr	nz, p7Dloc_5695

p7Dloc_565A:				; CODE XREF: seg001:564Ej
		ld	a, 1
		call	Page0Call_38EB
		push	de
		push	hl
		call	p7Dloc_560B
		jr	nz, p7Dloc_5689
		call	OP1Set0
		ld	de, OP1M
		ld	hl, OP4
		ld	c, 7
		ld	b, 0
		ldir
		pop	hl
		pop	de
		push	de
		call	Page0Call_3AE9
		ex	de, hl
		ld	hl, OP1
		ld	a, (hl)
		call	mov9B2
		pop	hl
		ld	a, 0
		bit	7, a
		ret
; ---------------------------------------------------------------------------

p7Dloc_5689:				; CODE XREF: seg001:5664j
		pop	hl
		pop	hl
		push	bc
		push	de
		push	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 807Eh
; ---------------------------------------------------------------------------
		pop	hl
		pop	de
		pop	bc
		ret
; ---------------------------------------------------------------------------

p7Dloc_5695:				; CODE XREF: seg001:5653j seg001:5658j
		push	bc
		push	de
		push	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 807Eh
; ---------------------------------------------------------------------------
		pop	hl
		pop	de
		pop	bc
		ex	de, hl
		ret

; =============== S U B	R O U T	I N E =======================================


Page7D_2C34:				; CODE XREF: seg001:5655p
		push	bc
		push	hl
		push	de
		call	Page0Call_23DE
		ex	de, hl
		ld	c, (hl)
		inc	hl
		ld	b, (hl)
		dec	hl
		ex	de, hl
		ld	a, b
		or	c
		jr	z, p7Dloc_56D6
		ld	hl, 1

p7Dloc_56B3:				; CODE XREF: Page7D_2C34+34j
		push	de
		push	hl
		push	bc
		call	Page0Call_3B07
		ld	de, OP4
		ld	hl, OP2M
		ld	b, 7

p7Dloc_56C1:				; CODE XREF: Page7D_2C34+27j
		ld	a, (de)
		cp	(hl)
		jr	nz, p7Dloc_56CB
		inc	de
		inc	hl
		djnz	p7Dloc_56C1
		jr	p7Dloc_56DA
; ---------------------------------------------------------------------------

p7Dloc_56CB:				; CODE XREF: Page7D_2C34+23j
		pop	bc
		pop	hl
		pop	de
		inc	hl
		dec	bc
		ld	a, c
		or	b
		jr	z, p7Dloc_56D6
		jr	p7Dloc_56B3
; ---------------------------------------------------------------------------

p7Dloc_56D6:				; CODE XREF: Page7D_2C34+Ej
		; Page7D_2C34+32j
		pop	de
		pop	hl
		pop	bc
		ret
; ---------------------------------------------------------------------------

p7Dloc_56DA:				; CODE XREF: Page7D_2C34+29j
		ld	a, 0FFh
		bit	7, a
		pop	bc
		pop	hl
		pop	hl
		pop	de
		pop	hl
		pop	bc
		ret
; End of function Page7D_2C34

; ---------------------------------------------------------------------------

Page7D_2C2E:
		push	hl
		push	de
		push	bc
		push	af
		ld	hl, 4000h
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		call	p7Dsub_75FD
		jr	nz, p7Dloc_5737
		inc	hl
		pop	af
		call	p7Dsub_761F
		ld	hl, (unk_839F)
		push	hl
		ld	hl, (unk_83A1)
		push	hl
		push	af
		call	p7Dsub_5525
		push	hl
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		or	a
		adc	hl, bc
		pop	bc
		or	a
		sbc	hl, bc
		pop	af
		pop	bc
		ld	(unk_83A1), bc
		pop	bc
		ld	(unk_839F), bc
		push	af
		push	hl
		ld	hl, 4000h
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		ld	bc, 4000h
		or	a
		sbc	hl, bc
		push	hl
		pop	bc
		call	p7Dsub_573C
		pop	bc
		inc	bc
		inc	bc
		call	p7Dsub_573C

p7Dloc_5737:				; CODE XREF: seg001:56F3j
		pop	af
		pop	bc
		pop	de
		pop	hl
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_573C:				; CODE XREF: seg001:572Ep seg001:5734p
		ld	hl, (unk_83A1)
		call	p7Dsub_57C5
		or	a
		adc	hl, bc
		call	p7Dsub_57C5
		ld	(unk_83A1), hl
		ret	nc
		ld	hl, (unk_839F)
		inc	h
		jr	nz, p7Dloc_5753
		inc	l

p7Dloc_5753:				; CODE XREF: p7Dsub_573C+14j
		ld	(unk_839F), hl
		ret
; End of function p7Dsub_573C


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5757:				; CODE XREF: p7Dsub_7240+230p
		push	hl
		push	de
		push	bc
		push	af
		inc	hl
		ld	a, (hl)
		call	p7Dsub_75FD
		jr	nz, p7Dloc_5768

p7Dloc_5762:				; CODE XREF: p7Dsub_5757+Fj
		inc	hl
		ld	a, (hl)
		ld	(de), a
		inc	de
		djnz	p7Dloc_5762

p7Dloc_5768:				; CODE XREF: p7Dsub_5757+9j
		pop	af
		pop	bc
		pop	de
		pop	hl
		ret
; End of function p7Dsub_5757


; =============== S U B	R O U T	I N E =======================================


p7Dsub_576D:				; CODE XREF: seg001:4018p seg001:632Fp
		push	af
		ld	a, 1
		call	Page7D_2B86
		ld	b, a
		call	p7Dsub_75EC
		sub	b
		ld	b, 0
		ld	c, a
		ld	hl, tempSwapArea
		sla	c
		add	hl, bc
		ld	a, 0FFh
		ld	(hl), a
		inc	hl
		ld	(hl), a
		ld	a, 1
		call	Page7D_2B62
		pop	af
		ret
; End of function p7Dsub_576D


; =============== S U B	R O U T	I N E =======================================


p7Dsub_578D:				; CODE XREF: seg001:58DFp p7Dsub_7CBB+7p
		push	af
		ld	a, (unk_83A4)
		or	a
		jr	z, p7Dloc_57C3
		ld	hl, (unk_83A1)
		call	p7Dsub_57C5
		ld	a, h
		or	l
		jr	nz, p7Dloc_57B2
		ld	hl, (unk_839F)
		ld	a, h
		or	l
		jr	z, p7Dloc_57C3
		call	p7Dsub_57C5
		dec	hl
		call	p7Dsub_57C5
		ld	(unk_839F), hl
		ld	hl, 0

p7Dloc_57B2:				; CODE XREF: p7Dsub_578D+Fj
		dec	hl
		call	p7Dsub_57C5
		ld	(unk_83A1), hl
		ld	hl, (unk_839F)
		ld	a, l
		or	h
		jr	nz, p7Dloc_57C3
		ld	hl, (unk_83A1)

p7Dloc_57C3:				; CODE XREF: p7Dsub_578D+5j p7Dsub_578D+16j	...
		pop	af
		ret
; End of function p7Dsub_578D


; =============== S U B	R O U T	I N E =======================================


p7Dsub_57C5:				; CODE XREF: p7Dsub_5525+3Bp p7Dsub_5525+49p ...
		push	af
		ld	a, l
		ld	l, h
		ld	h, a
		pop	af
		ret
; End of function p7Dsub_57C5

; ---------------------------------------------------------------------------

Page7D_2B9E:
		push	bc
		push	de
		call	p7Dsub_5980
		jp	z, p7Dloc_5973
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8057h
; ---------------------------------------------------------------------------
		push	hl
		push	hl
		pop	bc
		rst	28h
; ---------------------------------------------------------------------------
		.dw 802Dh
; ---------------------------------------------------------------------------
		or	a
		sbc	hl, bc
		dec	hl
		ld	(appInfo), hl
		push	hl
		pop	bc
		pop	hl
		push	hl
		call	p7Dsub_4565
		dec	hl
		cp	0FFh
		jp	z, p7Dloc_5972
		cp	0
		jp	z, JErrorNo
		call	p7Dsub_42D3
		call	p7Dsub_5980
		jp	z, p7Dloc_5972
		pop	de
		inc	de
		ex	de, hl
		call	p7Dsub_597A
		ld	(OP2), a
		call	p7Dsub_40A6
		or	a
		ex	de, hl
		adc	hl, bc
		push	hl
		ld	de, 0A20h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8027h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_5832
		ld	a, h
		and	0Fh
		or	40h ; '@'
		ld	h, a
		call	p7Dsub_597A
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------

p7Dloc_5823:				; CODE XREF: seg001:5830j
		ld	b, 0
		push	bc
		call	p7Dsub_597A
		ex	de, hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		ex	de, hl
		pop	bc
		dec	c
		jr	nz, p7Dloc_5823

p7Dloc_5832:				; CODE XREF: seg001:5815j
		call	p7Dsub_5980
		jp	z, p7Dloc_5972
		ld	hl, 4000h
		ld	a, 7Ah ; 'z'
		ld	de, 8070h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		inc	hl
		ld	a, 7Ah ; 'z'
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		ld	bc, 4000h
		or	a
		sbc	hl, bc
		push	hl
		pop	bc
		ld	de, ramStart
		ld	hl, 4000h
		ld	a, 7Ah ; 'z'
		push	bc
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		pop	bc
		pop	de
		ld	hl, ramStart
		call	p7Dsub_597A
		push	bc
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		pop	bc
		push	de
		ld	hl, (appInfo)
		or	a
		adc	hl, bc
		ld	(appInfo), hl
		call	p7Dsub_75F5

p7Dloc_5877:				; CODE XREF: seg001:58ABj
		call	ZeroOP1
		call	p7Dsub_638B
		call	OP2ToOP1
		jr	c, p7Dloc_58AD
		call	p7Dloc_61A4
		pop	de
		ld	bc, 4000h
		or	a
		sbc	hl, bc
		push	hl
		pop	bc
		or	a
		ld	hl, (appInfo)
		adc	hl, bc
		ld	(appInfo), hl
		ld	hl, 4000h
		push	af
		call	p7Dsub_597A
		ld	(OP2), a
		pop	af
		call	p7Dloc_40A9
		or	a
		ex	de, hl
		adc	hl, bc
		ex	de, hl
		push	de
		jr	p7Dloc_5877
; ---------------------------------------------------------------------------

p7Dloc_58AD:				; CODE XREF: seg001:5880j
		pop	de
		rst	28h
; ---------------------------------------------------------------------------
		.dw 808Dh
; ---------------------------------------------------------------------------
		ld	hl, 4000h
		push	hl
		ld	hl, 0
		ld	(unk_839F), hl
		ld	hl, (appInfo)
		call	p7Dsub_57C5
		ld	(unk_83A1), hl
		pop	hl
		ld	a, 1
		ld	(unk_83A4), a

p7Dloc_58CA:				; CODE XREF: seg001:58E6j
		ld	a, 1
		ld	(unk_83A3), a
		call	p7Dsub_597A
		ld	de, ramStart
		ld	bc, 1
		push	hl
		call	FlashToRam
		call	p7Dsub_5E0A
		call	p7Dsub_578D
		ld	a, h
		or	l
		pop	hl
		inc	hl
		jr	nz, p7Dloc_58CA
		inc	hl
		inc	hl
		push	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8018h
; ---------------------------------------------------------------------------
		ld	hl, 0D02h
		ld	(OP1), hl
		ld	hl, OP1
		pop	de
		push	de
		dec	de
		dec	de
		ld	bc, 2
		call	p7Dsub_597A
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		call	p7Dsub_5980
		jp	z, p7Dloc_5972
		ld	de, 0A20h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8027h
; ---------------------------------------------------------------------------
		call	p7Dsub_4574
		inc	bc
		dec	hl
		ld	de, ramStart
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		ld	de, bigInteger1
		ld	b, 0
		ld	a, (unk_8291)
		ld	c, a
		ld	hl, 8291h
		inc	bc
		ldir
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80C0h
; ---------------------------------------------------------------------------
		pop	de
		ld	hl, OP1
		ld	b, 0
		ld	a, (hl)
		ld	c, a
		inc	bc
		call	p7Dsub_597A
		push	bc
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		ld	hl, (appInfo)
		pop	bc
		inc	bc
		inc	bc
		or	a
		adc	hl, bc
		ld	(unk_839F), hl
		call	p7Dsub_597A
		ld	(OP2), a
		call	p7Dsub_7700
		push	de
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8057h
; ---------------------------------------------------------------------------
		ld	bc, 1D00h
		add	hl, bc
		pop	de
		ld	bc, 300h
		call	p7Dsub_40A6
		ld	hl, (unk_839F)
		ld	bc, 300h
		add	hl, bc
		ld	(unk_839F), hl
		ld	hl, 4000h
		xor	a
		pop	de
		pop	bc
		ret
; ---------------------------------------------------------------------------

p7Dloc_5972:				; CODE XREF: seg001:57EDj seg001:57FBj ...
		pop	hl

p7Dloc_5973:				; CODE XREF: seg001:57D0j
		pop	de
		pop	bc
		ld	a, 0FFh
		bit	7, a
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_597A:				; CODE XREF: seg001:5801p seg001:581Dp ...
		call	FindSwapSector
		inc	a
		inc	a
		ret
; End of function p7Dsub_597A


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5980:				; CODE XREF: seg001:57CDp seg001:57F8p ...
		set	2, (iy+16h)
		in	a, (2)
		bit	0, a
		ret	nz
		res	2, (iy+16h)
		ret
; End of function p7Dsub_5980


; =============== S U B	R O U T	I N E =======================================


p7Dsub_598E:				; CODE XREF: seg001:6252p seg001:625Cp ...
		push	bc
		ld	de, 847Ch
		ld	b, 5

p7Dloc_5994:				; CODE XREF: p7Dsub_598E+Dj
		call	DivHLBy10
		add	a, 30h ; '0'
		ld	(de), a
		dec	de
		djnz	p7Dloc_5994
		sub	a
		ld	(unk_847C+1), a
		ex	de, hl
		ld	a, 30h ; '0'
		ld	b, 4

p7Dloc_59A6:				; CODE XREF: p7Dsub_598E+1Ej
		inc	hl
		cp	(hl)
		jr	nz, p7Dloc_59AE
		ld	(hl), 20h ; ' '
		djnz	p7Dloc_59A6

p7Dloc_59AE:				; CODE XREF: p7Dsub_598E+1Aj
		pop	bc
		call	Page0Call_3D4D
		ret
; End of function p7Dsub_598E

; ---------------------------------------------------------------------------

p7Dloc_59B3:				; CODE XREF: seg001:624Bp
		push	af
		ld	de, 0E10h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80B1h
; ---------------------------------------------------------------------------
		ld	de, 18h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80B1h
; ---------------------------------------------------------------------------
		ld	hl, (OP1M)
		call	p7Dsub_57C5
		ld	de, 16Dh
		rst	28h
; ---------------------------------------------------------------------------
		.dw 804Bh
; ---------------------------------------------------------------------------
		push	de
		pop	hl
		ld	bc, 7CDh
		or	a
		adc	hl, bc
		call	p7Dsub_5A68
		or	a
		ld	hl, (OP1M)
		call	p7Dsub_57C5
		sbc	hl, bc
		call	p7Dsub_57C5
		ld	(OP1M), hl
		call	p7Dsub_57C5
		ld	de, 16Dh
		rst	28h
; ---------------------------------------------------------------------------
		.dw 804Bh
; ---------------------------------------------------------------------------
		push	de
		pop	hl
		ld	bc, 7CDh
		or	a
		adc	hl, bc
		push	hl
		ld	(tempSwapArea), hl
		ld	a, e
		ld	de, 16Dh
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8045h
; ---------------------------------------------------------------------------
		push	hl
		pop	bc
		ld	hl, (OP1M)
		call	p7Dsub_57C5
		or	a
		sbc	hl, bc
		ld	bc, 0

p7Dloc_5A10:				; CODE XREF: seg001:5A3Aj
		push	hl
		ld	a, 2
		cp	c
		jr	nz, p7Dloc_5A26
		ld	hl, (tempSwapArea)
		call	p7Dsub_5AA5
		jr	nz, p7Dloc_5A26
		ld	hl, end_of_7D_table
		ld	e, (hl)
		inc	hl
		ld	d, (hl)
		jr	p7Dloc_5A31
; ---------------------------------------------------------------------------

p7Dloc_5A26:				; CODE XREF: seg001:5A14j seg001:5A1Cj
		or	a
		ld	hl, start_of_7D_table
		adc	hl, bc
		adc	hl, bc
		ld	e, (hl)
		inc	hl
		ld	d, (hl)

p7Dloc_5A31:				; CODE XREF: seg001:5A24j
		or	a
		pop	hl
		push	hl
		sbc	hl, de
		jr	c, p7Dloc_5A3C
		pop	hl
		inc	bc
		jr	p7Dloc_5A10
; ---------------------------------------------------------------------------

p7Dloc_5A3C:				; CODE XREF: seg001:5A36j
		pop	hl
		push	hl
		dec	bc
		ld	a, 2
		cp	c
		jr	nz, p7Dloc_5A54
		ld	hl, (tempSwapArea)
		call	p7Dsub_5AA5
		jr	nz, p7Dloc_5A54
		ld	hl, end_of_7D_table
		ld	e, (hl)
		inc	hl
		ld	d, (hl)
		jr	p7Dloc_5A5F
; ---------------------------------------------------------------------------

p7Dloc_5A54:				; CODE XREF: seg001:5A42j seg001:5A4Aj
		ld	hl, start_of_7D_table
		or	a
		adc	hl, bc
		adc	hl, bc
		ld	e, (hl)
		inc	hl
		ld	d, (hl)

p7Dloc_5A5F:				; CODE XREF: seg001:5A52j
		pop	hl
		or	a
		sbc	hl, de
		pop	de
		inc	hl
		inc	bc
		pop	af
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_5A68:				; CODE XREF: seg001:59D4p
		push	af
		push	hl
		push	de
		push	hl
		ld	bc, 7CDh
		or	a
		sbc	hl, bc
		pop	hl
		ret	c
		jr	z, p7Dloc_5A77
		dec	hl

p7Dloc_5A77:				; CODE XREF: p7Dsub_5A68+Cj
		push	hl
		ld	de, 4
		rst	28h
; ---------------------------------------------------------------------------
		.dw 804Bh
; ---------------------------------------------------------------------------
		pop	hl
		push	de
		push	hl
		ld	de, 64h	; 'd'
		rst	28h
; ---------------------------------------------------------------------------
		.dw 804Bh
; ---------------------------------------------------------------------------
		pop	hl
		push	de
		ld	de, 190h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 804Bh
; ---------------------------------------------------------------------------
		pop	bc
		pop	hl
		push	de
		or	a
		sbc	hl, bc
		pop	bc
		or	a
		adc	hl, bc
		ld	bc, 1E4h
		or	a
		sbc	hl, bc
		push	hl
		pop	bc
		pop	de
		pop	hl
		pop	af
		ret
; End of function p7Dsub_5A68


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5AA5:				; CODE XREF: seg001:5A19p seg001:5A47p
		push	hl
		ld	de, 4
		rst	28h
; ---------------------------------------------------------------------------
		.dw 804Bh
; ---------------------------------------------------------------------------
		ld	a, l
		or	h
		jr	nz, p7Dloc_5ACA
		pop	hl
		push	hl
		ld	de, 64h	; 'd'
		rst	28h
; ---------------------------------------------------------------------------
		.dw 804Bh
; ---------------------------------------------------------------------------
		ld	a, l
		or	h
		jr	nz, p7Dloc_5AC6
		pop	hl
		push	hl
		ld	de, 190h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 804Bh
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_5ACA

p7Dloc_5AC6:				; CODE XREF: p7Dsub_5AA5+15j
		ld	a, 0
		bit	7, a

p7Dloc_5ACA:				; CODE XREF: p7Dsub_5AA5+9j p7Dsub_5AA5+1Fj
		pop	hl
		ret
; End of function p7Dsub_5AA5

; ---------------------------------------------------------------------------

Page7D_2BAA:
		push	hl
		push	bc
		push	de
		push	af
		ld	de, ramStart
		ld	bc, 100h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		pop	af
		pop	de
		pop	bc
		pop	hl
		ret
; ---------------------------------------------------------------------------

Page7D_2C0A:
		push	hl
		push	bc
		push	af
		call	Page0Call_3D0B
		call	Page0Call_3D2F
		ld	hl, aIdlist
		ld	a, 3Dh ; '='
		bit	1, (iy+35h)
		call	nz, Page0Call_3C45
		call	p7Dsub_7045
		call	Page0Call_23DE
		jr	c, p7Dloc_5B0D
		ld	a, (de)
		ld	hl, (curRow+1)
		ld	bc, 5
		adc	hl, bc
		ld	(curRow+1), hl
		ld	l, a
		ld	h, 0
		call	Page0Call_3C7B

p7Dloc_5B0D:				; CODE XREF: seg001:5AF9j
		pop	af
		pop	bc
		pop	hl
		ret
; ---------------------------------------------------------------------------

Page7D_2E56:				; CODE XREF: seg001:5B28j
		call	Page0Call_23DE
		jr	c, locret_5B2E
		push	af
		ld	a, (de)
		ld	l, a
		inc	de
		ld	a, (de)
		ld	h, a
		dec	de
		ld	a, l
		or	h
		jr	z, p7Dloc_5B2A
		pop	af
		ld	bc, 1
		call	Page0Call_31D7
		jr	Page7D_2E56
; ---------------------------------------------------------------------------

p7Dloc_5B2A:				; CODE XREF: seg001:5B1Fj
		pop	af
		call	Page0Call_23D4

locret_5B2E:				; CODE XREF: seg001:5B14j
		ret
; ---------------------------------------------------------------------------

Page7D_2BC2:
		push	af
		ld	de, 0A10h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8027h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_5B49
		call	p7Dsub_4574
		ld	de, OP2
		ld	b, c
		ld	a, 7Eh ; '~'
		call	p7Dsub_761F
		pop	af
		call	p7Dsub_5B4D
		ret
; ---------------------------------------------------------------------------

p7Dloc_5B49:				; CODE XREF: seg001:5B36j
		pop	af
		scf
		ccf
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_5B4D:				; CODE XREF: seg001:5B45p
		push	bc
		push	de
		call	p7Dsub_7656
		ld	hl, 4003h
		ld	(appSearchPage), a

p7Dloc_5B58:				; CODE XREF: p7Dsub_5B4D+59j p7Dsub_5B4D+73j
		push	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		cp	3
		jr	z, p7Dloc_5B67
		cp	0FFh
		jr	z, p7Dloc_5BA8
		pop	hl
		jr	p7Dloc_5BC2
; ---------------------------------------------------------------------------

p7Dloc_5B67:				; CODE XREF: p7Dsub_5B4D+11j
		ld	a, (appSearchPage)
		call	p7Dloc_442C
		push	bc
		push	de
		ld	hl, OP2
		pop	de
		pop	bc
		jr	nz, p7Dloc_5BC2
		ld	b, c

p7Dloc_5B77:				; CODE XREF: p7Dsub_5B4D+39j
		ld	a, (hl)
		ld	c, a
		ex	de, hl
		ld	a, (appSearchPage)
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		ex	de, hl
		cp	c
		jr	nz, p7Dloc_5B8E
		inc	de
		inc	hl
		djnz	p7Dloc_5B77
		pop	hl
		ld	a, (appSearchPage)
		jr	p7Dloc_5BC6
; ---------------------------------------------------------------------------

p7Dloc_5B8E:				; CODE XREF: p7Dsub_5B4D+35j
		pop	hl
		inc	hl
		ld	a, (appSearchPage)
		push	de
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		pop	de
		or	a
		adc	hl, bc
		inc	hl
		ld	a, (appSearchPage)
		push	de
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		pop	de
		adc	hl, bc
		jr	p7Dloc_5B58
; ---------------------------------------------------------------------------

p7Dloc_5BA8:				; CODE XREF: p7Dsub_5B4D+15j
		pop	hl
		ld	a, (appSearchPage)
		inc	a
		ld	(appSearchPage), a
		call	NZIf83Plus
		jr	nz, p7Dloc_5BB9
		cp	6Ch ; 'l'
		jr	p7Dloc_5BBB
; ---------------------------------------------------------------------------

p7Dloc_5BB9:				; CODE XREF: p7Dsub_5B4D+66j
		cp	18h

p7Dloc_5BBB:				; CODE XREF: p7Dsub_5B4D+6Aj
		jr	z, p7Dloc_5BC2
		ld	hl, 4000h
		jr	p7Dloc_5B58
; ---------------------------------------------------------------------------

p7Dloc_5BC2:				; CODE XREF: p7Dsub_5B4D+18j p7Dsub_5B4D+27j ...
		scf
		ccf
		jr	p7Dloc_5BC7
; ---------------------------------------------------------------------------

p7Dloc_5BC6:				; CODE XREF: p7Dsub_5B4D+3Fj
		scf

p7Dloc_5BC7:				; CODE XREF: p7Dsub_5B4D+77j
		pop	de
		pop	bc
		ret
; End of function p7Dsub_5B4D

; ---------------------------------------------------------------------------

Page7D_2BC8:
		push	de
		push	bc
		push	hl
		ld	(appSearchPage), a
		call	p7Dsub_4894
		call	p7Dsub_457C
		ld	a, (appSearchPage)
		pop	hl
		call	p7Dloc_529F
		pop	bc
		pop	de
		ret
; ---------------------------------------------------------------------------

Page7D_3C54:
		ld	(Abackup), a
		ld	a, i
		di
		push	af
		ld	a, (Abackup)
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		push	de
		push	bc

p7Dloc_5BFD:				; CODE XREF: seg001:5C08j
		ld	de, 410h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8027h
; ---------------------------------------------------------------------------
		jr	z, p7Dloc_5C0A
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80AEh
; ---------------------------------------------------------------------------
		jr	p7Dloc_5BFD
; ---------------------------------------------------------------------------

p7Dloc_5C0A:				; CODE XREF: seg001:5C03j
		call	p7Dsub_4574
		ld	de, OP2
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		ld	(de), a
		inc	de
		call	p7Dsub_4565
		ld	(de), a
		ld	hl, OP2
		pop	bc
		pop	de
		call	relockFlashBack
		ld	(Abackup), a
		pop	af
		jp	po, p7Dloc_5C29
		ei

p7Dloc_5C29:				; CODE XREF: seg001:5C25j
		ld	a, (Abackup)
		ret
; ---------------------------------------------------------------------------

p7Dloc_5C2D:				; CODE XREF: seg001:635Bp
		ld	hl, 4000h
		ld	de, 8090h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		ret
; ---------------------------------------------------------------------------

Page7D_2C1C:
		push	hl
		call	p7Dsub_7656
		ld	hl, 4000h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		cp	0
		pop	hl
		ret
; ---------------------------------------------------------------------------

Page7D_2BDA:
		push	de
		push	bc
		push	af
		push	hl
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		ld	de, 4000h
		ld	b, 0
		call	p7Dsub_7656
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80C6h
; ---------------------------------------------------------------------------
		pop	hl
		push	hl
		ld	b, l
		call	p7Dsub_7656
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80C6h
; ---------------------------------------------------------------------------
		pop	hl
		ld	b, h
		call	p7Dsub_7656
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80C6h
; ---------------------------------------------------------------------------
		pop	af
		pop	bc
		pop	de
		jp	relockFlashBack
; ---------------------------------------------------------------------------

Page7D_3C4E:
		push	hl

p7Dloc_5C7D:				; CODE XREF: seg001:5C87j
		ld	a, (ix+0)
		push	bc
		call	p7Dsub_5C8E
		pop	bc
		inc	ix
		djnz	p7Dloc_5C7D
		call	p7Dsub_6503
		pop	hl
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_5C8E:				; CODE XREF: seg001:5C81p
		ld	a, (ix+0)
		push	af
		and	0F0h ; '�'
		srl	a
		srl	a
		srl	a
		srl	a
		ld	b, 2

p7Dloc_5C9E:				; CODE XREF: p7Dsub_5C8E+22j p7Dsub_5C8E+31j
		push	af
		sub	0Ah
		jr	c, p7Dloc_5CB2
		pop	af
		add	a, 37h ; '7'
		ld	(hl), a
		inc	hl
		dec	b
		ld	a, b
		or	b
		jr	z, p7Dloc_5CC1
		pop	af
		and	0Fh
		jr	p7Dloc_5C9E
; ---------------------------------------------------------------------------

p7Dloc_5CB2:				; CODE XREF: p7Dsub_5C8E+13j
		pop	af
		add	a, 30h ; '0'
		ld	(hl), a
		inc	hl
		dec	b
		ld	a, b
		or	b
		jr	z, p7Dloc_5CC1
		pop	af
		and	0Fh
		jr	p7Dloc_5C9E
; ---------------------------------------------------------------------------

p7Dloc_5CC1:				; CODE XREF: p7Dsub_5C8E+1Dj p7Dsub_5C8E+2Cj
		ld	a, 0
		ld	(hl), a
		ret
; End of function p7Dsub_5C8E

; ---------------------------------------------------------------------------

Page7D_3C5A:
		push	hl
		push	bc
		push	de
		ld	a, (hl)
		push	af
		and	0F0h ; '�'
		srl	a
		srl	a
		srl	a
		srl	a
		ld	b, 2

p7Dloc_5CD6:				; CODE XREF: seg001:5CE9j seg001:5CF9j
		push	af
		sub	0Ah
		jr	c, p7Dloc_5CEB
		pop	af
		add	a, 37h ; '7'
		call	Page0Call_3D47
		dec	b
		ld	a, b
		or	b
		jr	z, p7Dloc_5CFB
		pop	af
		and	0Fh
		jr	p7Dloc_5CD6
; ---------------------------------------------------------------------------

p7Dloc_5CEB:				; CODE XREF: seg001:5CD9j
		pop	af
		add	a, 30h ; '0'
		call	Page0Call_3D47
		dec	b
		ld	a, b
		or	b
		jr	z, p7Dloc_5CFB
		pop	af
		and	0Fh
		jr	p7Dloc_5CD6
; ---------------------------------------------------------------------------

p7Dloc_5CFB:				; CODE XREF: seg001:5CE4j seg001:5CF4j
		pop	de
		pop	bc
		pop	hl
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_5CFF:				; CODE XREF: seg001:46FCp seg001:4706p ...
		push	af
		push	bc
		push	hl
		push	de
		push	af
		ld	a, c
		or	b
		jr	z, p7Dloc_5D18
		ld	de, MD5Buffer

p7Dloc_5D0B:				; CODE XREF: p7Dsub_5CFF+17j
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		ld	(de), a
		inc	de
		inc	hl
		dec	bc
		ld	a, c
		or	b
		jr	nz, p7Dloc_5D0B

p7Dloc_5D18:				; CODE XREF: p7Dsub_5CFF+7j
		pop	af
		pop	de
		pop	hl
		pop	bc
		pop	af
		ret
; End of function p7Dsub_5CFF


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5D1E:				; CODE XREF: seg001:46FFp
		push	bc
		push	de
		push	af
		ld	b, a
		ld	a, 0
		or	c
		jr	z, p7Dloc_5D3D
		ld	a, b
		ld	de, MD5Buffer
		ld	b, c
		ld	hl, 0
		ld	a, (de)
		ld	l, a
		dec	b
		ld	a, b
		or	b
		jr	z, p7Dloc_5D3F
		inc	de
		ld	a, l
		ld	h, a
		ld	a, (de)
		ld	h, a
		jr	p7Dloc_5D3F
; ---------------------------------------------------------------------------

p7Dloc_5D3D:				; CODE XREF: p7Dsub_5D1E+7j
		ld	h, a
		ld	l, a

p7Dloc_5D3F:				; CODE XREF: p7Dsub_5D1E+16j p7Dsub_5D1E+1Dj
		pop	af
		pop	de
		pop	bc
		ret
; End of function p7Dsub_5D1E


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5D43:				; CODE XREF: seg001:4709p p7Dsub_4873+17p
		push	hl
		push	de
		push	af
		ld	b, a
		ld	a, 0
		or	c
		jr	z, p7Dloc_5D62
		ld	a, b
		ld	hl, MD5Buffer
		ld	e, c
		ld	bc, 0
		ld	a, (hl)
		ld	c, a
		dec	e
		ld	a, e
		or	e
		jr	z, p7Dloc_5D64
		inc	hl
		ld	a, c
		ld	b, a
		ld	a, (hl)
		ld	c, a
		jr	p7Dloc_5D64
; ---------------------------------------------------------------------------

p7Dloc_5D62:				; CODE XREF: p7Dsub_5D43+7j
		ld	b, a
		ld	c, a

p7Dloc_5D64:				; CODE XREF: p7Dsub_5D43+16j p7Dsub_5D43+1Dj
		pop	af
		pop	de
		pop	hl
		ret
; End of function p7Dsub_5D43


; =============== S U B	R O U T	I N E =======================================


Page7D_2E44:				; CODE XREF: p7Dsub_5DC7p
		push	af
		push	hl
		call	Page7D_2B56
		ld	e, b
		ld	d, 0
		push	de
		inc	b
		ld	c, 0
		ld	a, 8

p7Dloc_5D76:				; CODE XREF: Page7D_2E44+23j
		cp	b
		jr	z, p7Dloc_5DC2
		jr	nc, p7Dloc_5DC0
		push	bc
		ld	hl, 4000h
		push	af
		call	Page7D_2CD0
		cp	0FEh ; '�'
		jr	nz, p7Dloc_5D8D
		pop	af
		add	a, 4

p7Dloc_5D8A:				; CODE XREF: Page7D_2E44+51j
		pop	bc
		jr	p7Dloc_5D76
; ---------------------------------------------------------------------------

p7Dloc_5D8D:				; CODE XREF: Page7D_2E44+1Dj
		cp	0FFh
		jr	z, p7Dloc_5D9F
		pop	af
		pop	bc
		pop	de
		push	af
		ld	a, c
		add	a, d
		ld	d, a
		pop	af
		push	de
		ld	c, 0
		push	bc
		push	af
		inc	hl

p7Dloc_5D9F:				; CODE XREF: Page7D_2E44+27j
		pop	af
		ld	c, 0FFh
		call	Page7D_2B6E
		ld	bc, 4000h
		or	a
		sbc	hl, bc
		jr	nz, p7Dloc_5DB0
		pop	bc
		inc	c
		push	bc

p7Dloc_5DB0:				; CODE XREF: Page7D_2E44+43j
		; Page7D_2E44+56j
		inc	a
		pop	bc
		cp	b
		jr	z, p7Dloc_5DC2
		push	bc
		call	p7Dsub_67EC
		jr	z, p7Dloc_5D8A
		pop	bc
		inc	c
		push	bc
		jr	p7Dloc_5DB0
; ---------------------------------------------------------------------------

p7Dloc_5DC0:				; CODE XREF: Page7D_2E44+11j
		xor	a
		ld	c, a

p7Dloc_5DC2:				; CODE XREF: Page7D_2E44+Fj
		; Page7D_2E44+4Bj
		ld	b, c
		pop	de
		pop	hl
		pop	af
		ret
; End of function Page7D_2E44


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5DC7:				; CODE XREF: p7Dsub_7BEA+9p p7Dsub_7BEA+21p
		call	Page7D_2E44
		ld	c, e
		push	bc
		push	de
		ld	a, 1
		ld	hl, ramStart
		ld	de, 8080h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		inc	hl
		ld	a, 1
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		ld	a, (hl)
		pop	de
		ld	e, d
		ld	d, a
		pop	bc
		sub	b
		ret
; End of function p7Dsub_5DC7

; ---------------------------------------------------------------------------

Page7D_2BF2:
		push	hl
		push	bc
		push	de
		push	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 802Dh
; ---------------------------------------------------------------------------
		ex	de, hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8057h
; ---------------------------------------------------------------------------
		ex	de, hl
		or	a
		sbc	hl, de
		ex	de, hl
		ld	hl, 1F18h
		call	NZIf83Plus
		jr	nz, p7Dloc_5E00
		ld	hl, 1DEAh

p7Dloc_5E00:				; CODE XREF: seg001:5DFBj
		or	a
		sbc	hl, de
		pop	bc
		sbc	hl, bc
		pop	de
		pop	bc
		pop	hl
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_5E0A:				; CODE XREF: seg001:58DCp
		; p7Dsub_7240:p7Dloc_739Bp
		ld	a, (unk_83A3)
		ld	b, a
		ld	c, 0
		or	c
		jr	z, p7Dloc_5E23
		ld	hl, ramStart

p7Dloc_5E16:				; CODE XREF: p7Dsub_5E0A+17j
		push	bc
		push	hl
		ld	bc, 1
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8090h
; ---------------------------------------------------------------------------
		pop	hl
		inc	hl
		pop	bc
		djnz	p7Dloc_5E16

p7Dloc_5E23:				; CODE XREF: p7Dsub_5E0A+7j
		ld	a, 0
		ld	(unk_83A3), a
		ret
; End of function p7Dsub_5E0A

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR Page7D_2C9A

p7Dloc_5E29:				; CODE XREF: Page7D_2C9A+9j
		; p7Dsub_5E59+9j
		ld	a, 0Ch
		call	Page0Call_2C49
		jp	JErrorNo
; END OF FUNCTION CHUNK	FOR Page7D_2C9A

; =============== S U B	R O U T	I N E =======================================


p7Dsub_5E31:				; CODE XREF: p7Dsub_4A5A+30p p7Dsub_607A+3Cp ...
		ld	hl, 4000h
; End of function p7Dsub_5E31


; =============== S U B	R O U T	I N E =======================================


Page7D_2C9A:				; CODE XREF: Page7D_2C10+3Cp
		; p7Dsub_7240+1FBp ...

; FUNCTION CHUNK AT 5E29 SIZE 00000008 BYTES

		push	af
		ld	de, 8010h
		push	af
		or	a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jp	nz, p7Dloc_5E29
		inc	hl
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		ld	de, appID
		ld	a, 7
		ld	(de), a
		ld	de, 838Fh
		ld	(appID+1), bc
		pop	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		pop	af
		ret
; End of function Page7D_2C9A


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5E59:				; CODE XREF: seg001:630Ap seg001:7744p ...
		push	af
		ld	de, 8010h
		push	af
		or	a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jp	nz, p7Dloc_5E29
		inc	hl
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		ld	de, 838Eh
		ld	(appID), bc
		pop	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		pop	af
		ret
; End of function p7Dsub_5E59


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5E78:				; CODE XREF: seg001:6316p
		ld	b, a
		call	p7Dsub_75EC
		sub	b
		ld	b, 0
		ld	c, a
		push	bc
		pop	ix
		call	p7Dsub_48B5
		jr	c, locret_5E8F
		jr	z, locret_5E8F
		push	af
		call	p7Dsub_5365
		pop	af

locret_5E8F:				; CODE XREF: p7Dsub_5E78+Ej p7Dsub_5E78+10j
		ret
; End of function p7Dsub_5E78


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5E90:				; CODE XREF: p7Dsub_7240+22Ap
		push	af
		push	af
		ld	a, 1
		or	a
		ld	hl, ramStart
		ld	de, 8060h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jr	z, p7Dloc_5EB5
		ld	hl, ramStart
		ld	de, 8050h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jr	z, p7Dloc_5EB0
		ld	de, 80h	; '�'
		jr	p7Dloc_5EDD
; ---------------------------------------------------------------------------

p7Dloc_5EB0:				; CODE XREF: p7Dsub_5E90+19j
		ld	de, 0
		jr	p7Dloc_5EDD
; ---------------------------------------------------------------------------

p7Dloc_5EB5:				; CODE XREF: p7Dsub_5E90+Ej
		inc	hl
		ld	a, 1
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		ld	a, 1
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		push	af
		ld	b, 9
		sub	b
		jr	c, p7Dloc_5ED6
		pop	af
		ld	b, 8
		sub	b
		call	p7Dsub_4E9B
		ld	d, a
		ld	a, 8
		call	p7Dsub_4E9B
		ld	e, a
		jr	p7Dloc_5EDD
; ---------------------------------------------------------------------------

p7Dloc_5ED6:				; CODE XREF: p7Dsub_5E90+34j
		ld	d, 0
		pop	af
		call	p7Dsub_4E9B
		ld	e, a

p7Dloc_5EDD:				; CODE XREF: p7Dsub_5E90+1Ej p7Dsub_5E90+23j ...
		pop	af
		ld	b, a
		call	p7Dsub_75EC
		sub	b
		ld	bc, 0
		ld	c, a
		call	Page7D_2B68
		sla	c
		add	hl, bc
		ld	b, e
		ex	de, hl
		push	hl
		call	p7Dsub_456D
		pop	hl
		ex	de, hl
		ld	b, d
		ex	de, hl
		call	p7Dsub_456D
		pop	af
		ret
; End of function p7Dsub_5E90


; =============== S U B	R O U T	I N E =======================================


p7Dsub_5EFC:				; CODE XREF: seg001:7137p seg001:71DDp
		push	hl
		push	bc
		push	de
		push	hl
		pop	de
		ld	b, a
		ld	c, 8
		sub	c
		jr	c, p7Dloc_5F25
		call	p7Dsub_75EC
		inc	a
		ld	c, a
		ld	a, b
		sub	c
		jr	nc, p7Dloc_5F25
		ld	bc, 4000h
		or	a
		sbc	hl, bc
		jr	c, p7Dloc_5F25
		push	de
		pop	hl
		or	a
		ld	bc, ramStart
		sbc	hl, bc
		jr	nc, p7Dloc_5F25
		or	a
		jr	p7Dloc_5F26
; ---------------------------------------------------------------------------

p7Dloc_5F25:				; CODE XREF: p7Dsub_5EFC+9j p7Dsub_5EFC+12j	...
		scf

p7Dloc_5F26:				; CODE XREF: p7Dsub_5EFC+27j
		pop	de
		pop	bc
		pop	hl
		ret
; End of function p7Dsub_5EFC

; ---------------------------------------------------------------------------

Page7D_2BF8:
		push	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8057h
; ---------------------------------------------------------------------------
		ld	de, 0A10h
		call	p7Dsub_777E
		jp	z, JError
		pop	hl
		ld	de, 0A10h
		call	p7Dsub_777E
		jp	nz, JError
		ex	de, hl
		push	de
		rst	28h
; ---------------------------------------------------------------------------
		.dw 802Dh
; ---------------------------------------------------------------------------
		pop	de
		ld	bc, 2
		ex	de, hl

p7Dloc_5F4B:				; CODE XREF: seg001:5F9Cj
		push	bc
		call	p7Dsub_4566
		ld	b, a
		push	hl
		call	p7Dsub_456D
		pop	hl
		call	p7Dsub_4565
		ld	b, a
		push	hl
		call	p7Dsub_456D
		pop	hl
		push	de
		push	hl
		call	p7Dloc_4575
		pop	de
		push	bc
		push	hl
		sbc	hl, de
		ld	b, l
		dec	b
		pop	hl
		ld	a, 0
		cp	b
		jr	z, p7Dloc_5F74

p7Dloc_5F70:				; CODE XREF: seg001:5F72j
		inc	a
		dec	hl
		djnz	p7Dloc_5F70

p7Dloc_5F74:				; CODE XREF: seg001:5F6Ej
		pop	bc
		pop	de
		or	a
		adc	a, c
		ld	c, a
		ld	a, 7Eh ; '~'
		push	de
		push	bc
		ld	de, MD5Buffer
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		push	hl
		ld	hl, MD5Buffer
		call	p7Dsub_5F9F
		pop	hl
		pop	bc
		pop	de
		push	hl
		ld	hl, MD5Buffer
		ld	a, 7Eh ; '~'
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		pop	hl
		pop	bc
		dec	c
		ld	a, c
		cp	0
		jr	nz, p7Dloc_5F4B
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_5F9F:				; CODE XREF: seg001:5F87p
		push	hl
		ld	a, (hl)
		cp	0
		jr	nz, p7Dloc_5FBD
		push	hl
		ld	d, (hl)
		inc	hl
		ld	e, (hl)
		push	de
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80C3h
; ---------------------------------------------------------------------------
		push	de
		pop	bc
		pop	de
		ex	de, hl
		ld	h, b
		ld	a, l
		and	0Fh
		or	a
		adc	a, c
		ld	l, a
		ex	de, hl
		pop	hl
		ld	(hl), e
		inc	hl
		ld	(hl), d

p7Dloc_5FBD:				; CODE XREF: p7Dsub_5F9F+4j
		pop	hl
		ret
; End of function p7Dsub_5F9F

; ---------------------------------------------------------------------------
start_of_7D_table:
		.db    0
		.db    0
		.db  1Fh
		.db    0
		.db  3Bh	; ;
		.db    0
		.db  5Ah	; Z
		.db    0
		.db  78h	; x
		.db    0
		.db  97h	; �
		.db    0
		.db 0B5h	; �
		.db    0
		.db 0D4h	; �
		.db    0
		.db 0F3h	; �
		.db    0
		.db  11h
		.db    1
		.db  30h	; 0
		.db    1
		.db  4Eh	; N
		.db    1
		.db 0FFh
		.db 0FFh
end_of_7D_table:
		.db  3Ch	; <
		.db    0

; =============== S U B	R O U T	I N E =======================================


relockFlashBack:			; CODE XREF: seg001:4014j seg001:401Fj ...
		push	af
		xor	a
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		or	a
		jp	nz, 0
		pop	af
		ret
; End of function relockFlashBack


; =============== S U B	R O U T	I N E =======================================


Page7D_3E10:				; CODE XREF: seg001:70CDp
		ld	(Abackup), a
		ld	a, i
		di
		push	af
		ld	a, (Abackup)
		call	relockFlashBack
		ld	(Abackup), a
		pop	af
		jp	po, p7Dloc_6002
		ei

p7Dloc_6002:				; CODE XREF: Page7D_3E10+11j
		ld	a, (Abackup)
		ret
; End of function Page7D_3E10


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6006:				; CODE XREF: seg001:5321p
		; p7Dsub_53B3:p7Dloc_53D1p
		push	af
		push	bc
		push	af
		pop	bc
		ld	a, c
		ld	(unk_83EA), a
		pop	bc
		pop	af
		ret
; End of function p7Dsub_6006


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6011:				; CODE XREF: seg001:5332p p7Dsub_53B3+2Fj
		ld	(unk_83EC), a
		push	bc
		ld	b, a
		ld	a, (unk_83EA)
		ld	c, a
		push	bc
		pop	af
		pop	bc
		ld	a, (unk_83EC)
		ret
; End of function p7Dsub_6011


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6021:				; CODE XREF: p7Dsub_4992+1Dp p7Dsub_4AC9+64p ...
		call	p7Dsub_75F5

p7Dloc_6024:				; CODE XREF: p7Dsub_6021+44j
		ld	a, (appID)
		ld	c, a
		ld	b, 0
		ld	hl, 838Eh
		ld	de, ramStart
		ld	(de), a
		inc	de
		ldir
		call	p7Dsub_607A
		push	af
		ld	a, (ramStart)
		ld	c, a
		ld	b, 0
		ld	hl, 8001h
		ld	de, appID
		ld	(de), a
		inc	de
		ldir
		pop	af
		ret	c
		call	p7Dsub_6067
		jr	nz, p7Dloc_6053
		or	a
		jp	p7Dloc_61A4
; ---------------------------------------------------------------------------

p7Dloc_6053:				; CODE XREF: p7Dsub_6021+2Cj
		push	af
		ld	a, (ramStart)
		ld	c, a
		ld	b, 0
		ld	hl, 8001h
		ld	de, appID
		ld	(de), a
		inc	de
		ldir
		pop	af
		jr	p7Dloc_6024
; End of function p7Dsub_6021


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6067:				; CODE XREF: p7Dsub_6021+29p
		ld	de, OP2
		ld	hl, appID
		ld	a, (de)
		ld	c, (hl)
		cp	c
		ret	nz
		ld	b, c

p7Dloc_6072:				; CODE XREF: p7Dsub_6067+10j
		inc	hl
		inc	de
		ld	a, (de)
		cp	(hl)
		ret	nz
		djnz	p7Dloc_6072
		ret
; End of function p7Dsub_6067


; =============== S U B	R O U T	I N E =======================================


p7Dsub_607A:				; CODE XREF: p7Dsub_6021+13p p7Dsub_607A+19j ...
		ld	de, appSearchPage
		ld	a, (de)
		or	a
		jr	z, locret_60E4
		dec	a
		ld	(de), a
		cp	7
		jr	nz, p7Dloc_608A
		scf
		jr	locret_60E4
; ---------------------------------------------------------------------------

p7Dloc_608A:				; CODE XREF: p7Dsub_607A+Bj
		ld	a, (appSearchPage)
		ld	hl, 4000h
		call	Page0Call_3E31
		jr	nz, p7Dsub_607A
		ld	de, 8010h
		or	a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jr	nz, p7Dsub_607A
		ld	a, (appSearchPage)
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		ld	a, (appSearchPage)
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		or	a
		jr	z, p7Dsub_607A
		inc	a
		jr	z, p7Dsub_607A
		ld	a, (appSearchPage)
		push	hl
		push	bc
		call	p7Dsub_5E31
		call	Page7D_2B5C
		jr	z, p7Dloc_60C2
		pop	bc
		pop	hl
		jr	p7Dsub_607A
; ---------------------------------------------------------------------------

p7Dloc_60C2:				; CODE XREF: p7Dsub_607A+42j
		call	ZeroOP2
		pop	bc
		pop	hl
		ld	a, b
		or	a
		jr	nz, p7Dloc_60D2
		xor	a
		ld	a, c
		ld	e, 9
		sub	e
		jr	c, p7Dloc_60D5

p7Dloc_60D2:				; CODE XREF: p7Dsub_607A+4Fj
		ld	bc, 8

p7Dloc_60D5:				; CODE XREF: p7Dsub_607A+56j
		ld	a, c
		ld	(OP2), a
		ld	a, (appSearchPage)
		ld	de, 8484h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		scf
		ccf

locret_60E4:				; CODE XREF: p7Dsub_607A+5j p7Dsub_607A+Ej
		ret
; End of function p7Dsub_607A

; ---------------------------------------------------------------------------

FindAppUp:
		ld	a, 1
		jr	p7Dloc_60EA
; ---------------------------------------------------------------------------

FindAppDn:
		xor	a

p7Dloc_60EA:				; CODE XREF: seg001:60E7j
		ld	bc, 0
		push	bc
		call	OP1ToOP3
		push	af
		ld	a, (unk_9C87)
		cp	69h ; 'i'
		call	nz, p7Dsub_7BA4
		call	p7Dsub_75F5
		pop	af

p7Dloc_60FE:				; CODE XREF: seg001:611Aj seg001:6121j ...
		push	af
		call	p7Dsub_6388
		pop	hl
		ld	a, h
		jr	c, p7Dloc_6140
		push	af
		ld	a, (unk_9C87)
		cp	69h ; 'i'
		ld	a, (appSearchPage)
		call	nz, p7Dsub_7BAF
		pop	af
		call	p7Dsub_6172
		jr	c, p7Dloc_612E
		bit	3, c
		jr	nz, p7Dloc_60FE
		pop	bc
		inc	b
		push	bc
		bit	0, a
		jr	nz, p7Dloc_60FE
		bit	1, a
		jr	z, p7Dloc_6163
		call	p7Dloc_6177
		jr	c, p7Dloc_6165
		jr	p7Dloc_60FE
; ---------------------------------------------------------------------------

p7Dloc_612E:				; CODE XREF: seg001:6116j
		pop	bc
		inc	c
		push	bc
		bit	0, a
		jr	z, p7Dloc_60FE
		bit	1, a
		jr	z, p7Dloc_6163
		call	p7Dloc_6177
		jr	c, p7Dloc_60FE
		jr	p7Dloc_6165
; ---------------------------------------------------------------------------

p7Dloc_6140:				; CODE XREF: seg001:6104j
		call	OP3ToOP1
		res	0, a
		sub	2
		pop	bc
		push	af
		ld	a, (unk_8497)
		ld	d, a
		xor	a
		ld	(unk_8497), a
		ld	(unk_8481), a
		ld	a, (unk_9C87)
		cp	1
		ld	a, 69h ; 'i'
		jr	nz, p7Dloc_615E
		xor	a

p7Dloc_615E:				; CODE XREF: seg001:615Bj
		ld	(unk_9C87), a
		pop	af
		ret
; ---------------------------------------------------------------------------

p7Dloc_6163:				; CODE XREF: seg001:6125j seg001:6137j
		set	1, a

p7Dloc_6165:				; CODE XREF: seg001:612Aj seg001:613Ej
		call	OP2ToOP3
		push	af
		ld	a, (appSearchPage)
		ld	(unk_8497), a
		pop	af
		jr	p7Dloc_60FE

; =============== S U B	R O U T	I N E =======================================


p7Dsub_6172:				; CODE XREF: seg001:6113p p7Dsub_6186+7p	...
		ld	de, 8480h
		jr	p7Dloc_617A
; ---------------------------------------------------------------------------

p7Dloc_6177:				; CODE XREF: seg001:6127p seg001:6139p
		ld	de, 8496h

p7Dloc_617A:				; CODE XREF: p7Dsub_6172+3j
		push	af
		ld	hl, 848Bh
		ld	b, 8
		call	Page0Call_3E3D
		pop	hl
		ld	a, h
		ret
; End of function p7Dsub_6172


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6186:				; CODE XREF: p7Dsub_6428+3p p7Dsub_7B41+21p
		call	p7Dsub_75F5

p7Dloc_6189:				; CODE XREF: p7Dsub_6186+Cj
		call	p7Dsub_638B
		ret	c
		call	p7Dsub_6172
		bit	3, c
		jr	z, p7Dloc_6189
		jr	p7Dloc_61A4
; ---------------------------------------------------------------------------

FindApp:				; CODE XREF: seg001:62CEp
		call	p7Dsub_75F5

p7Dloc_6199:				; CODE XREF: p7Dsub_6186+1Cj
		call	p7Dsub_6388
		ret	c
		call	p7Dsub_6172
		bit	3, c
		jr	z, p7Dloc_6199

p7Dloc_61A4:				; CODE XREF: seg001:5882p p7Dsub_6021+2Fj ...
		ld	a, (appSearchPage)
		or	a
		push	bc
		ld	de, 8070h
		ld	hl, 4000h
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		pop	af
		inc	hl
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		pop	af
		pop	bc
		ret
; End of function p7Dsub_6186

; ---------------------------------------------------------------------------

p7Dloc_61BC:				; CODE XREF: seg001:6363p
		call	Page0Call_2D2D
		res	1, (iy+5)
		push	af
		call	Page0Call_3CFF
		pop	af
		push	af
		ld	hl, 4000h
		ld	de, 8040h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		inc	hl
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		pop	af
		push	af
		call	p7Dsub_5CFF
		ld	hl, MD5Buffer
		or	a
		adc	hl, bc
		ld	(hl), 0
		ld	a, 24h ; '$'
		sub	c
		ld	l, a
		ld	h, 5
		ld	(penCol), hl
		ld	hl, MD5Buffer
		call	Page0Call_3D4D
		bit	1, (iy+35h)
		jr	z, p7Dloc_6201
		ld	a, 50h ; 'P'
		call	Page0Call_3C45
		jr	z, p7Dloc_620C

p7Dloc_6201:				; CODE XREF: seg001:61F8j
		ld	hl, aCCopyright1998-2
		ld	de, tempSwapArea
		ld	bc, 19h
		ldir

p7Dloc_620C:				; CODE XREF: seg001:61FFj
		ld	hl, tempSwapArea
		call	p7Dsub_62B3
		ld	hl, aTexasInstrumentsInc-2
		call	p7Dsub_62B3
		pop	af
		push	af
		call	p7Dloc_54A0
		jr	nz, p7Dloc_6270
		pop	af
		push	af
		call	Page7D_2CA0
		jr	z, p7Dloc_6237
		ld	hl, aExpiredOn-2
		ld	a, 51h ; 'Q'
		bit	1, (iy+35h)
		call	nz, Page0Call_3C45
		call	p7Dsub_62B3
		jr	p7Dloc_6246
; ---------------------------------------------------------------------------

p7Dloc_6237:				; CODE XREF: seg001:6224j
		ld	hl, aExpirationDate-2
		ld	a, 52h ; 'R'
		bit	1, (iy+35h)
		call	nz, Page0Call_3C45
		call	p7Dsub_62B3

p7Dloc_6246:				; CODE XREF: seg001:6235j
		pop	af
		push	af
		call	p7Dloc_54A0
		call	p7Dloc_59B3
		push	de
		push	hl
		push	bc
		pop	hl
		call	p7Dsub_598E
		ld	a, (p7Dloc_6385)
		call	Page0Call_3D47
		pop	hl
		call	p7Dsub_598E
		ld	a, (p7Dloc_6385)
		call	Page0Call_3D47
		pop	hl
		call	p7Dsub_598E
		pop	af
		push	af
		call	Page7D_2CA0
		jr	z, p7Dloc_629B

p7Dloc_6270:				; CODE XREF: seg001:621Dj
		pop	af
		push	af
		call	p7Dloc_543D
		jr	nz, p7Dloc_629B
		ld	hl, aTrialsRemaining-2
		ld	a, 53h ; 'S'
		bit	1, (iy+35h)
		call	nz, Page0Call_3C45
		call	p7Dsub_62B3
		ld	a, (OP1)
		ld	hl, OP1
		call	p7Dsub_650D
		ld	a, (OP1)
		call	Page0Call_3D47
		ld	a, (OP1+1)
		call	Page0Call_3D47

p7Dloc_629B:				; CODE XREF: seg001:626Ej seg001:6275j
		pop	af
		ld	hl, aPressAnyKey___-2
		ld	a, 54h ; 'T'
		bit	1, (iy+35h)
		call	nz, Page0Call_3C45
		call	p7Dsub_62B3
		ei
		call	Page0Call_3F21
		call	Page0Call_3837
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_62B3:				; CODE XREF: seg001:620Fp seg001:6215p ...
		push	hl
		call	ldHLind
		ld	(penCol), hl
		pop	hl
		inc	hl
		inc	hl
		call	Page0Call_3D4D
		ret
; End of function p7Dsub_62B3

; ---------------------------------------------------------------------------

Page7D_2CB2:
		call	Page0Call_2E65
		ld	hl, progToEdit
		ld	de, 8479h
		call	Mov8B
		xor	a
		call	FindApp
		jr	c, p7Dloc_6345
		push	hl
		push	af
		call	FillBasePageTable
		call	Page0Call_3F09
		di
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		pop	af
		push	af
		call	p7Dsub_5E31
		call	Page7D_2B5C
		jr	nz, p7Dloc_631D
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80A8h
; ---------------------------------------------------------------------------
		jr	z, p7Dloc_6305
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8096h
; ---------------------------------------------------------------------------
		jr	z, p7Dloc_6348

p7Dloc_6305:				; CODE XREF: seg001:62FCj
		pop	af
		push	af
		ld	hl, 4000h
		call	p7Dsub_5E59
		call	p7Dsub_52D9
		jr	c, p7Dloc_6314
		jr	z, p7Dloc_6348

p7Dloc_6314:				; CODE XREF: seg001:6310j
		pop	af
		push	af
		call	p7Dsub_5E78
		jr	c, p7Dloc_6348
		jr	nz, p7Dloc_6348

p7Dloc_631D:				; CODE XREF: seg001:62F5j
		pop	af
		pop	hl
		push	af
		call	p7Dsub_5E31
		call	Chk_Batt_Low
		jr	z, p7Dloc_6344
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80A8h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_6332
		pop	af
		push	af
		call	p7Dsub_576D

p7Dloc_6332:				; CODE XREF: seg001:632Bj
		pop	af
		call	Page7D_2BE6
		call	Page0Call_2E65
		call	Page0Call_3E8B
		ld	hl, 0
		ld	(curRow), hl
		jr	p7Dloc_6345
; ---------------------------------------------------------------------------

p7Dloc_6344:				; CODE XREF: seg001:6326j
		pop	af

p7Dloc_6345:				; CODE XREF: seg001:62D1j seg001:6342j
		jp	Page0Call_2539
; ---------------------------------------------------------------------------

p7Dloc_6348:				; CODE XREF: seg001:6303j seg001:6312j ...
		pop	af
		ld	(appPage), a
		call	p7Dsub_6FC0
		jp	nz, Page0Call_2555
		call	NZIf83Plus
		call	z, p7Dsub_6FF9
		ld	a, (appPage)
		call	p7Dloc_5C2D
		jr	z, p7Dloc_6366
		ld	a, (appPage)
		call	p7Dloc_61BC

p7Dloc_6366:				; CODE XREF: seg001:635Ej
		call	relockFlashBack
		ld	a, (appPage)
		pop	hl
		ei
		ret
; ---------------------------------------------------------------------------
		.dw 0D14h
aCCopyright1998:.asc '(c) Copyright 1998',0
; ---------------------------------------------------------------------------

p7Dloc_6384:
		nop

p7Dloc_6385:				; DATA XREF: seg001:6255r seg001:625Fr
		cpl
		nop
		nop

; =============== S U B	R O U T	I N E =======================================


p7Dsub_6388:				; CODE XREF: seg001:60FFp
		; p7Dsub_6186:p7Dloc_6199p
		scf
		jr	p7Dloc_638D
; End of function p7Dsub_6388


; =============== S U B	R O U T	I N E =======================================


p7Dsub_638B:				; CODE XREF: seg001:587Ap
		; p7Dsub_6186:p7Dloc_6189p ...
		scf
		ccf

p7Dloc_638D:				; CODE XREF: p7Dsub_6388+1j
		push	af

p7Dloc_638E:				; CODE XREF: p7Dsub_638B+1Dj p7Dsub_638B+32j ...
		ld	de, appSearchPage
		ld	a, (de)
		dec	a
		ld	(de), a
		cp	7
		jr	nz, p7Dloc_639B
		pop	af
		scf
		ret
; ---------------------------------------------------------------------------

p7Dloc_639B:				; CODE XREF: p7Dsub_638B+Bj
		ld	a, (unk_9C87)
		cp	69h ; 'i'
		jr	nz, p7Dloc_63C8
		ld	a, (appSearchPage)
		call	p7Dsub_7BB5
		jr	z, p7Dloc_638E
		ld	a, (appSearchPage)
		ld	hl, 4000h

p7Dloc_63B0:
		ld	de, 8040h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jr	z, p7Dloc_63BF

p7Dloc_63B8:
		ld	a, 1
		ld	(unk_9C87), a
		jr	p7Dloc_638E
; ---------------------------------------------------------------------------

p7Dloc_63BF:				; CODE XREF: p7Dsub_638B+2Bj
		inc	hl
		ld	a, (appSearchPage)
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		jr	p7Dloc_6407
; ---------------------------------------------------------------------------

p7Dloc_63C8:				; CODE XREF: p7Dsub_638B+15j
		ld	a, (de)
		ld	hl, 4000h
		call	Page0Call_3E31
		jr	nz, p7Dloc_638E
		ld	de, 8040h
		or	a
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_638E
		inc	hl
		ld	a, (appSearchPage)
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		pop	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		or	a
		jr	z, p7Dloc_638E
		inc	a
		jr	z, p7Dloc_638E
		ld	a, (appSearchPage)
		push	hl
		push	bc
		call	p7Dsub_5E31
		pop	bc
		pop	hl
		pop	af
		push	af
		ld	a, (appSearchPage)
		jr	nc, p7Dloc_6402
		call	p7Dsub_53B3
		jr	p7Dloc_6405
; ---------------------------------------------------------------------------

p7Dloc_6402:				; CODE XREF: p7Dsub_638B+70j
		call	Page7D_2B5C

p7Dloc_6405:				; CODE XREF: p7Dsub_638B+75j
		jr	nz, p7Dloc_638E

p7Dloc_6407:				; CODE XREF: p7Dsub_638B+3Bj
		pop	af
		push	hl
		push	bc
		call	ZeroOP2
		pop	bc
		pop	hl
		ld	a, b
		or	a
		jr	nz, p7Dloc_6419
		ld	a, c
		ld	e, 9
		sub	e
		jr	c, p7Dloc_641C

p7Dloc_6419:				; CODE XREF: p7Dsub_638B+86j
		ld	bc, 8

p7Dloc_641C:				; CODE XREF: p7Dsub_638B+8Cj
		ld	de, 8484h
		ld	a, (appSearchPage)
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		scf
		ccf
		ret
; End of function p7Dsub_638B


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6428:				; CODE XREF: p7Dsub_75B8+21p
		push	hl
		push	bc
		push	de
		call	p7Dsub_6186
		jr	c, p7Dloc_6468
		ld	(appInfo+1), a
		call	p7Dsub_7CB2
		jr	z, p7Dloc_6462
		call	p7Dsub_7124
		jr	z, p7Dloc_644E
		call	OP1ToOP4
		ld	a, 14h
		ld	(OP4), a
		rst	18h
		call	relockFlashBack
		call	Page0Call_2C67
		jr	p7Dloc_646B
; ---------------------------------------------------------------------------

p7Dloc_644E:				; CODE XREF: p7Dsub_6428+13j
		ld	de, 5
		ld	a, 2
		ld	(unk_867E), a
		call	Page0Call_2C4F
		call	Page0Call_2C6D
		ld	a, (appInfo)
		or	a
		jr	nz, p7Dloc_6468

p7Dloc_6462:				; CODE XREF: p7Dsub_6428+Ej
		ld	a, (appInfo+1)
		call	Page7D_2BE6

p7Dloc_6468:				; CODE XREF: p7Dsub_6428+6j p7Dsub_6428+38j
		call	relockFlashBack

p7Dloc_646B:				; CODE XREF: p7Dsub_6428+24j
		pop	de
		pop	bc
		pop	hl
		ret
; End of function p7Dsub_6428

; ---------------------------------------------------------------------------

Page7D_3EE8:
		push	hl
		push	de
		push	bc
		push	af
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		ld	hl, 4000h
		call	p7Dsub_4566
		cp	0
		jr	z, p7Dloc_64AE
		ld	hl, 6000h
		call	p7Dsub_4566
		cp	0
		jr	z, p7Dloc_64AE
		cp	8Fh ; '�'
		jr	z, p7Dloc_64A6
		ld	hl, 4000h
		call	p7Dsub_4566
		cp	8Fh ; '�'
		jr	z, p7Dloc_64A6

p7Dloc_64A6:				; CODE XREF: seg001:649Aj
		ld	b, 0
		ex	de, hl
		call	p7Dsub_456D
		jr	p7Dloc_64CE
; ---------------------------------------------------------------------------

p7Dloc_64AE:				; CODE XREF: seg001:648Cj seg001:6496j
		ld	a, h
		xor	20h ; ' '
		ld	h, a
		call	p7Dsub_4566
		cp	8Fh ; '�'
		jr	z, p7Dloc_64C0
		cp	0
		jp	z, p7Dloc_64E1
		jr	p7Dloc_64CE
; ---------------------------------------------------------------------------

p7Dloc_64C0:				; CODE XREF: seg001:64B7j
		push	hl
		ld	a, h
		xor	20h ; ' '
		ld	h, a
		call	p7Dsub_457C
		pop	de
		ld	b, 0
		call	p7Dsub_456D

p7Dloc_64CE:				; CODE XREF: seg001:64ACj seg001:64BEj ...
		pop	af
		cp	0Fh
		jr	nz, p7Dloc_64D8
		call	Page0Call_2B8F
		jr	p7Dloc_64DB
; ---------------------------------------------------------------------------

p7Dloc_64D8:				; CODE XREF: seg001:64D1j
		call	Page0Call_2B89

p7Dloc_64DB:				; CODE XREF: seg001:64D6j
		pop	bc
		pop	de
		pop	hl
		jp	relockFlashBack
; ---------------------------------------------------------------------------

p7Dloc_64E1:				; CODE XREF: seg001:64BBj
		ld	hl, 4001h
		ld	de, 6001h

p7Dloc_64E7:				; CODE XREF: seg001:64F4j
		call	p7Dsub_4566
		cp	0
		jr	z, p7Dloc_64F2
		cp	0FFh
		jr	nz, p7Dloc_64F6

p7Dloc_64F2:				; CODE XREF: seg001:64ECj
		inc	hl
		ex	de, hl
		jr	p7Dloc_64E7
; ---------------------------------------------------------------------------

p7Dloc_64F6:				; CODE XREF: seg001:64F0j
		ld	a, h
		xor	20h ; ' '
		and	0F0h ; '�'
		ld	h, a
		xor	a
		ld	l, a
		call	p7Dsub_457C
		jr	p7Dloc_64CE

; =============== S U B	R O U T	I N E =======================================


p7Dsub_6503:				; CODE XREF: seg001:5C89p
		ld	a, d
		or	a
		jr	nz, p7Dloc_650A
		call	p7Dsub_651E

p7Dloc_650A:				; CODE XREF: p7Dsub_6503+2j
		xor	a
		ld	(hl), a
		ret
; End of function p7Dsub_6503


; =============== S U B	R O U T	I N E =======================================


p7Dsub_650D:				; CODE XREF: seg001:628Cp
		call	Page0Call_32E5
		call	p7Dsub_6523
		jr	z, p7Dloc_6519
		add	a, 30h ; '0'
		ld	(hl), a
		inc	hl

p7Dloc_6519:				; CODE XREF: p7Dsub_650D+6j
		ld	a, b
		call	p7Dsub_6523
		ret	z
; End of function p7Dsub_650D


; =============== S U B	R O U T	I N E =======================================


p7Dsub_651E:				; CODE XREF: p7Dsub_6503+4p
		add	a, 30h ; '0'
		ld	(hl), a
		inc	hl
		ret
; End of function p7Dsub_651E


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6523:				; CODE XREF: p7Dsub_650D+3p p7Dsub_650D+Dp
		or	a
		jr	z, p7Dloc_6529
		ld	d, 1
		ret
; ---------------------------------------------------------------------------

p7Dloc_6529:				; CODE XREF: p7Dsub_6523+1j
		ld	e, a
		ld	a, d
		or	a
		ld	a, e
		ret
; End of function p7Dsub_6523


; =============== S U B	R O U T	I N E =======================================


p7Dsub_652E:				; CODE XREF: p7Dsub_662F+22p p7Dsub_662F+28p ...
		push	af
		push	bc
		push	de
		ld	hl, (unk_83A1)
		call	p7Dsub_57C5
		or	a
		adc	hl, de
		call	p7Dsub_57C5
		ld	(unk_83A1), hl
		jr	nc, p7Dloc_654C
		ld	hl, (unk_839F)
		inc	h
		jr	nz, p7Dloc_6549
		inc	l

p7Dloc_6549:				; CODE XREF: p7Dsub_652E+18j
		ld	(unk_839F), hl

p7Dloc_654C:				; CODE XREF: p7Dsub_652E+12j
		pop	de
		pop	bc
		pop	af
		ret
; End of function p7Dsub_652E


; =============== S U B	R O U T	I N E =======================================


Page7D_2CE2:				; CODE XREF: seg001:6706p
		; Page7D_2B6E+32p ...
		push	de
		ld	de, 1
		call	Page7D_2CCA
		pop	de
		ret
; End of function Page7D_2CE2


; =============== S U B	R O U T	I N E =======================================


Page7D_2CCA:				; CODE XREF: Page7D_2CE2+4p
		; p7Dsub_662F+58p	...
		push	af
		push	bc
		push	de
		push	de
		ex	de, hl
		ld	de, 4000h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 804Bh
; ---------------------------------------------------------------------------
		ld	a, (arcPage)
		add	a, e
		ld	(arcPage), a
		ld	a, e
		ld	de, 4000h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8045h
; ---------------------------------------------------------------------------
		push	hl
		pop	bc
		pop	hl
		or	a
		sbc	hl, bc
		push	hl
		pop	bc
		ld	hl, (arcPtr)
		or	a
		adc	hl, bc
		bit	7, h
		jr	z, p7Dloc_6591
		ld	a, (arcPage)
		inc	a
		ld	(arcPage), a
		ld	bc, 4000h
		or	a
		sbc	hl, bc

p7Dloc_6591:				; CODE XREF: Page7D_2CCA+29j
		ld	(arcPtr), hl
		pop	de
		pop	bc
		pop	af
		ret
; End of function Page7D_2CCA


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6598:				; CODE XREF: Page7D_2B6Ep
		push	af
		push	bc
		push	hl
		ld	hl, arcPage
		jr	p7Dloc_65A6
; ---------------------------------------------------------------------------

p7Dloc_65A0:				; CODE XREF: seg001:65B9p seg001:65F8p
		push	af
		push	bc
		push	hl
		ld	hl, 839Fh

p7Dloc_65A6:				; CODE XREF: p7Dsub_6598+6j
		xor	a
		ld	b, 4

p7Dloc_65A9:				; CODE XREF: p7Dsub_6598+13j
		ld	(hl), a
		inc	hl
		djnz	p7Dloc_65A9
		pop	hl
		pop	bc
		pop	af
		ret
; End of function p7Dsub_6598

; ---------------------------------------------------------------------------

ArcChk:
		push	af
		push	hl
		bit	6, (iy+24h)
		jr	nz, p7Dloc_65F2
		call	p7Dloc_65A0
		ld	(Abackup), a
		ld	a, i
		di
		push	af
		ld	a, (Abackup)
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	Page7D_2C10
		call	relockFlashBack
		ld	(Abackup), a
		pop	af
		jp	po, p7Dloc_65E5
		ei

p7Dloc_65E5:				; CODE XREF: seg001:65E1j
		ld	a, (Abackup)
		ld	de, 9C96h
		call	p7Dsub_6621
		set	6, (iy+24h)

p7Dloc_65F2:				; CODE XREF: seg001:65B7j
		bit	7, (iy+24h)
		jr	nz, p7Dloc_6608
		call	p7Dloc_65A0
		call	p7Dsub_662F
		ld	de, 9C9Ah
		call	p7Dsub_6621
		set	7, (iy+24h)

p7Dloc_6608:				; CODE XREF: seg001:65F6j
		ld	hl, 9C9Ah
		call	p7Dsub_6626
		ld	de, 83A2h
		ld	hl, 9C99h
		ld	b, 4
		or	a

p7Dloc_6617:				; CODE XREF: seg001:661Cj
		ld	a, (de)
		adc	a, (hl)
		ld	(de), a
		dec	hl
		dec	de
		djnz	p7Dloc_6617
		pop	hl
		pop	af
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_6621:				; CODE XREF: seg001:65EBp seg001:6601p
		ld	hl, 839Fh
		jr	p7Dloc_6629
; End of function p7Dsub_6621


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6626:				; CODE XREF: seg001:660Bp
		ld	de, 839Fh

p7Dloc_6629:				; CODE XREF: p7Dsub_6621+3j
		ld	bc, 4
		ldir
		ret
; End of function p7Dsub_6626


; =============== S U B	R O U T	I N E =======================================


p7Dsub_662F:				; CODE XREF: seg001:65FBp
		call	Page7D_2B56
		inc	b
		ld	a, 8
		ld	de, 0

p7Dloc_6638:				; CODE XREF: p7Dsub_662F+33j p7Dsub_662F+38j
		call	p7Dsub_7BD4
		cp	b
		ret	nc
		ld	hl, 4000h
		push	af
		call	Page7D_2CD0
		cp	0FEh ; '�'
		jr	z, p7Dloc_6664
		cp	0FFh
		jr	nz, p7Dloc_665C
		pop	af
		push	af
		call	Page7D_2B74
		call	p7Dsub_652E
		ld	de, 1
		call	p7Dsub_652E
		jr	p7Dloc_6664
; ---------------------------------------------------------------------------

p7Dloc_665C:				; CODE XREF: p7Dsub_662F+1Bj
		cp	0F0h ; '�'
		jr	z, p7Dloc_6669
		pop	af
		inc	a
		jr	p7Dloc_6638
; ---------------------------------------------------------------------------

p7Dloc_6664:				; CODE XREF: p7Dsub_662F+17j p7Dsub_662F+2Bj ...
		pop	af
		add	a, 4
		jr	p7Dloc_6638
; ---------------------------------------------------------------------------

p7Dloc_6669:				; CODE XREF: p7Dsub_662F+2Fj
		inc	hl
		pop	af
		push	af

p7Dloc_666C:				; CODE XREF: p7Dsub_662F+65j
		push	af
		push	hl
		ld	c, 0F0h	; '�'
		push	bc
		call	Page7D_2B6E
		push	bc
		pop	de
		pop	bc
		jr	z, p7Dloc_6696
		inc	sp
		inc	sp
		inc	sp
		inc	sp
		ld	(arcPage), a
		ld	(arcPtr), hl
		inc	de
		inc	de
		inc	de
		push	de
		call	Page7D_2CCA
		pop	de
		call	p7Dsub_652E
		ld	a, (arcPage)
		ld	hl, (arcPtr)
		jr	p7Dloc_666C
; ---------------------------------------------------------------------------

p7Dloc_6696:				; CODE XREF: p7Dsub_662F+48j
		pop	hl
		pop	af
		ld	c, 0FFh
		push	bc
		call	Page7D_2B6E
		pop	bc
		jr	z, p7Dloc_66A7
		call	Page7D_2B74
		call	p7Dsub_652E

p7Dloc_66A7:				; CODE XREF: p7Dsub_662F+70j
		jr	p7Dloc_6664
; End of function p7Dsub_662F


; =============== S U B	R O U T	I N E =======================================


p7Dsub_66A9:				; CODE XREF: seg001:6723p
		push	af
		push	bc
		push	hl
		ld	bc, (freeArcBlock)
		or	a
		sbc	hl, bc
		jr	c, p7Dloc_66BB
		or	a
		adc	hl, bc
		ld	(freeArcBlock), hl

p7Dloc_66BB:				; CODE XREF: p7Dsub_66A9+Aj
		pop	hl
		pop	bc
		pop	af
		ret
; End of function p7Dsub_66A9

; ---------------------------------------------------------------------------

Page7D_2EB6:
		push	bc
		push	de
		ld	a, (OP1)
		push	af
		push	bc
		ld	bc, 0
		ld	(freeArcBlock), bc
		call	Page7D_2B56
		ld	a, b
		ld	(unk_83FF), a
		pop	bc
		ld	a, 8

p7Dloc_66D7:				; CODE XREF: seg001:66F9j
		push	af
		ld	hl, 4000h
		call	Page7D_2CD0
		cp	0FEh ; '�'
		jr	nz, p7Dloc_66E7

p7Dloc_66E2:				; CODE XREF: seg001:670Dj
		pop	af
		add	a, 3
		jr	p7Dloc_66F0
; ---------------------------------------------------------------------------

p7Dloc_66E7:				; CODE XREF: seg001:66E0j
		cp	0F0h ; '�'
		jr	z, p7Dloc_66FB
		cp	0FFh
		jr	z, p7Dloc_6711
		pop	af

p7Dloc_66F0:				; CODE XREF: seg001:66E5j seg001:672Dj
		push	hl
		ld	hl, 83FFh
		cp	(hl)
		pop	hl
		jr	nc, p7Dloc_672F
		inc	a
		jr	p7Dloc_66D7
; ---------------------------------------------------------------------------

p7Dloc_66FB:				; CODE XREF: seg001:66E9j
		pop	af
		push	af
		push	bc
		ld	c, 0FFh
		ld	(arcPage), a
		ld	(arcPtr), hl
		call	Page7D_2CE2
		call	Page7D_2B6E
		pop	bc
		jr	z, p7Dloc_66E2
		pop	de
		push	af

p7Dloc_6711:				; CODE XREF: seg001:66EDj
		pop	af
		ld	(tempSwapArea), hl
		push	bc
		push	af
		ld	a, (unk_83FF)
		ld	b, a
		inc	b
		pop	af
		call	Page7D_2B74
		ex	de, hl
		pop	bc
		or	a
		call	p7Dsub_66A9
		sbc	hl, bc
		ld	hl, (tempSwapArea)
		jr	nc, p7Dloc_6733
		jr	p7Dloc_66F0
; ---------------------------------------------------------------------------

p7Dloc_672F:				; CODE XREF: seg001:66F6j
		ld	a, 0FFh
		add	a, 10h

p7Dloc_6733:				; CODE XREF: seg001:672Bj
		pop	bc
		ld	c, a
		ld	a, b
		ld	(OP1), a
		ld	a, c
		pop	de
		pop	bc
		ret

; =============== S U B	R O U T	I N E =======================================


Page7D_2B74:				; CODE XREF: p7Dsub_662F+1Fp p7Dsub_662F+72p ...
		push	hl
		push	bc
		push	af
		push	hl
		pop	de
		ld	hl, 7FFFh
		or	a
		sbc	hl, de

p7Dloc_6748:				; CODE XREF: Page7D_2B74+25j
		ex	de, hl
		inc	a
		call	p7Dsub_67EC
		jr	z, p7Dloc_6765
		cp	b
		jr	nc, p7Dloc_6765
		ld	hl, 4000h
		push	af
		call	Page7D_2CD0
		cp	0FFh
		jr	nz, p7Dloc_6764
		ld	hl, 4000h
		add	hl, de
		pop	af
		jr	p7Dloc_6748
; ---------------------------------------------------------------------------

p7Dloc_6764:				; CODE XREF: Page7D_2B74+1Ej
		pop	af

p7Dloc_6765:				; CODE XREF: Page7D_2B74+10j
		; Page7D_2B74+13j
		pop	af
		pop	bc
		pop	hl
		ret
; End of function Page7D_2B74


; =============== S U B	R O U T	I N E =======================================


Page7D_2B6E:				; CODE XREF: Page7D_2E44+3Ap
		; p7Dsub_662F+42p	...
		call	p7Dsub_6598
		ld	(arcPage), a
		ld	(arcPtr), hl
		push	bc
		push	hl
		push	af
		or	3
		ld	b, 15h
		call	NZIf83Plus
		jr	nz, p7Dloc_6780
		ld	b, 69h ; 'i'

p7Dloc_6780:				; CODE XREF: Page7D_2B6E+13j
		cp	b
		jr	c, p7Dloc_6784
		ld	a, b

p7Dloc_6784:				; CODE XREF: Page7D_2B6E+18j
		ld	(unk_8390), a
		pop	af
		pop	hl
		pop	bc

p7Dloc_678A:				; CODE XREF: Page7D_2B6E+57j
		push	bc
		ld	a, (arcPage)
		call	Page7D_2CD0
		cp	c
		jr	z, p7Dloc_67C8
		cp	0FFh
		jr	z, p7Dloc_67C2
		ld	(arcPtr), hl
		call	Page7D_2CE2
		ld	a, (arcPage)
		call	Page7D_2CD0
		ld	e, a
		call	Page7D_2CE2
		ld	a, (arcPage)
		call	Page7D_2CD0
		ld	d, a
		inc	de
		call	Page7D_2CCA
		ld	a, (unk_8390)
		ld	b, a
		ld	a, (arcPage)
		cp	b
		jr	c, p7Dloc_67BF
		jr	nz, p7Dloc_67C2

p7Dloc_67BF:				; CODE XREF: Page7D_2B6E+52j
		pop	bc
		jr	p7Dloc_678A
; ---------------------------------------------------------------------------

p7Dloc_67C2:				; CODE XREF: Page7D_2B6E+2Dj
		; Page7D_2B6E+54j
		xor	a
		ld	a, (arcPage)
		pop	bc
		ret
; ---------------------------------------------------------------------------

p7Dloc_67C8:				; CODE XREF: Page7D_2B6E+29j
		pop	bc
		ld	a, (arcPage)
		push	af
		push	hl
		ld	(arcPtr), hl
		call	Page7D_2CE2
		ld	a, (arcPage)
		call	Page7D_2CD0
		ld	c, a
		ld	a, (arcPage)
		call	Page7D_2CE2
		ld	a, (arcPage)
		call	Page7D_2CD0
		ld	b, a
		pop	hl
		pop	af
		or	a
		ret
; End of function Page7D_2B6E


; =============== S U B	R O U T	I N E =======================================


p7Dsub_67EC:				; CODE XREF: Page7D_2E44+4Ep
		; Page7D_2B74+Dp
		push	bc
		ld	b, a
		and	3
		ld	a, b
		jr	z, p7Dloc_67FE
		call	NZIf83Plus
		jr	nz, p7Dloc_67FC
		cp	6Ah ; 'j'
		jr	p7Dloc_67FE
; ---------------------------------------------------------------------------

p7Dloc_67FC:				; CODE XREF: p7Dsub_67EC+Aj
		cp	16h

p7Dloc_67FE:				; CODE XREF: p7Dsub_67EC+5j p7Dsub_67EC+Ej
		pop	bc
		ret
; End of function p7Dsub_67EC


; =============== S U B	R O U T	I N E =======================================


Page7D_2B56:				; CODE XREF: seg001:4919p
		; Page7D_2E44+2p ...
		push	af
		push	hl
		push	de
		call	p7Dsub_75EC
		ld	hl, 4000h

p7Dloc_6809:				; CODE XREF: Page7D_2B56+25j
		push	af
		call	Page7D_2CD0
		cp	80h ; '�'
		jr	z, p7Dloc_6815
		cp	0
		jr	nz, p7Dloc_6827

p7Dloc_6815:				; CODE XREF: Page7D_2B56+Fj
		pop	af
		push	af
		call	Page0Call_3E31
		jr	nz, p7Dloc_6827
		call	FindAppNumPages
		ld	a, c
		or	c
		jr	z, p7Dloc_6827
		pop	af
		sub	c
		jr	p7Dloc_6809
; ---------------------------------------------------------------------------

p7Dloc_6827:				; CODE XREF: Page7D_2B56+13j
		; Page7D_2B56+1Aj ...
		pop	af
		ld	b, a
		pop	de
		pop	hl
		pop	af
		ret
; End of function Page7D_2B56

; ---------------------------------------------------------------------------

Page7D_2EC2:
		res	7, (iy+24h)
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		ld	a, (arcInfo)
		ld	hl, (arcInfo+1)
		call	p7Dsub_69E8
		ld	de, (unk_83F3)
		ld	bc, (unk_83F9)
		call	Page7D_2C46
		jp	c, Page0Call_2541
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		ld	de, (arcInfo+1)
		ld	a, (arcInfo)
		ld	b, 0F0h	; '�'
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		ld	de, (unk_83F3)
		ld	(arcInfo+1), de
		ld	a, 0
		ld	(arcInfo), a
		ld	hl, (unk_83F1)
		call	Page0Call_2EDD
		jp	relockFlashBack
; ---------------------------------------------------------------------------

Page7D_2D06:
		res	7, (iy+24h)
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		ex	de, hl
		jp	p7Dloc_692E

; =============== S U B	R O U T	I N E =======================================


Page7D_2EB0:				; CODE XREF: p7Dsub_7CDA+84p
		res	7, (iy+24h)
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		ld	a, (arcInfo)
		ld	hl, (arcInfo+1)
		call	p7Dsub_69D4
		jr	nz, p7Dloc_68D2
		ld	b, 0F0h	; '�'
		ld	a, (arcInfo)
		ld	de, (arcInfo+1)
		call	p7Dsub_6F82
		jp	c, Page0Call_2541
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		ld	hl, (arcInfo+1)
		inc	hl
		ld	(arcInfo+1), hl
		jr	p7Dloc_68D6
; ---------------------------------------------------------------------------

p7Dloc_68D2:				; CODE XREF: Page7D_2EB0+1Ej
		ld	de, (arcInfo+1)

p7Dloc_68D6:				; CODE XREF: Page7D_2EB0+39j
		ld	b, 0FEh	; '�'
		ld	a, (arcInfo)
		ld	(unk_8404), a
		ld	(unk_8402), de
		call	p7Dsub_6F82
		jp	c, Page0Call_2541
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		ld	a, (arcInfo)
		ld	de, (unk_8402)
		ld	(arcPage), a
		ld	(arcPtr), de
		call	Page7D_2CE2
		ld	a, (arcPage)
		ld	de, (arcPtr)
		ld	hl, 83F9h
		ld	bc, 2
		call	Page7D_2C46
		jp	c, Page0Call_2541
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		ld	de, 2
		call	Page7D_2CCA
		ld	a, (unk_8404)
		ld	(arcInfo), a
		ld	de, (arcPtr)
		ld	hl, (unk_83F1)
		call	Page0Call_2EDD
		ld	a, (arcPage)
		ld	(arcInfo), a

p7Dloc_692E:				; CODE XREF: seg001:6894j
		ld	hl, (unk_83F1)
		ld	bc, (unk_83F5)
		push	de
		ld	de, OP1
		ld	b, c

p7Dloc_693A:				; CODE XREF: Page7D_2EB0+A7j
		ld	a, (hl)
		ld	(de), a
		inc	de
		dec	hl
		djnz	p7Dloc_693A
		pop	de
		ld	a, (arcInfo)
		ld	bc, (unk_83F5)
		ld	hl, OP1
		res	7, (hl)
		ld	(arcPtr), de
		ld	(arcPage), a
		call	Page7D_2C46
		jp	c, Page0Call_2541
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		ld	de, (unk_83F5)
		call	Page7D_2CCA
		ld	a, (arcPage)
		ld	(arcInfo), a
		ld	de, (arcPtr)
		ld	(unk_83FB), de
		bit	3, (iy+26h)
		res	3, (iy+26h)
		jr	nz, p7Dloc_69D1
		ld	a, (arcInfo)
		ld	hl, (unk_83F3)
		bit	5, (iy+26h)
		ld	bc, 2
		jr	nz, p7Dloc_698F
		ld	bc, (unk_83F7)

p7Dloc_698F:				; CODE XREF: Page7D_2EB0+F2j
		ld	(arcPtr), de
		ld	(arcPage), a
		call	Page7D_2C46
		jp	c, Page0Call_2541
		call	p7Dsub_7666
		bit	5, (iy+26h)
		ld	de, 2
		jr	nz, p7Dloc_69AC
		ld	de, (unk_83F7)

p7Dloc_69AC:				; CODE XREF: Page7D_2EB0+10Fj
		call	Page7D_2CCA
		ld	a, (arcPage)
		ld	(arcInfo), a
		ld	de, (arcPtr)
		bit	2, (iy+26h)
		jr	nz, p7Dloc_69D1
		ld	de, (unk_8402)
		ld	b, 0FCh	; '�'
		ld	a, (unk_8404)
		call	p7Dsub_6F82
		jp	c, Page0Call_2541
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------

p7Dloc_69D1:				; CODE XREF: Page7D_2EB0+E3j
		; Page7D_2EB0+126j
		jp	relockFlashBack
; End of function Page7D_2EB0


; =============== S U B	R O U T	I N E =======================================


p7Dsub_69D4:				; CODE XREF: Page7D_2EB0+1Bp
		; p7Dsub_7CDA+39p
		push	hl
		ld	bc, 4000h
		or	a
		sbc	hl, bc
		pop	hl
		jr	z, p7Dloc_69DF
		ret	nc

p7Dloc_69DF:				; CODE XREF: p7Dsub_69D4+8j
		ld	b, a
		and	3
		ld	a, b
		ret
; End of function p7Dsub_69D4

; ---------------------------------------------------------------------------

Page7D_326A:
		call	p7Dsub_69E8
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_69E8:				; CODE XREF: seg001:6848p
		; seg001:Page7D_326Ap
		call	p7Dsub_6A07
		push	af
		push	hl
		push	af
		call	Page7D_2CD0
		ld	e, a
		pop	af
		inc	hl
		call	Page0Call_23FC
		jr	nc, p7Dloc_69FA
		inc	a

p7Dloc_69FA:				; CODE XREF: p7Dsub_69E8+Fj
		call	Page7D_2CD0
		ld	d, a
		push	de
		pop	bc
		pop	hl
		pop	af
		ret
; End of function p7Dsub_69E8

; ---------------------------------------------------------------------------

Page7D_2F88:
		call	p7Dsub_6A07
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_6A07:				; CODE XREF: p7Dsub_69E8p
		; seg001:Page7D_2F88p
		inc	hl
		inc	hl
		inc	hl
		call	Page0Call_23FC
		jr	nc, Page7D_2CD6
		inc	a

Page7D_2CD6:				; CODE XREF: p7Dsub_6A07+6j
		push	af
		call	Page7D_2CD0
		and	1Fh
		or	a
		call	Page0Call_23F6
		jr	nc, p7Dloc_6A21
		ld	d, a
		pop	af
		inc	a
		push	af
		ld	a, d

p7Dloc_6A21:				; CODE XREF: p7Dsub_6A07+13j
		ld	de, 3
		call	page0_17B3
		jr	z, p7Dloc_6A3D
		call	IS_A_LSTorCLST
		jr	z, p7Dloc_6A3D
		pop	af
		ld	(arcPage), a
		call	Page7D_2CD0
		cp	5Dh ; ']'
		ld	a, (arcPage)
		jr	nz, p7Dloc_6A45
		push	af

p7Dloc_6A3D:				; CODE XREF: p7Dsub_6A07+20j p7Dsub_6A07+25j
		pop	af
		push	af
		call	Page7D_2CD0
		ld	e, a
		pop	af
		inc	e

p7Dloc_6A45:				; CODE XREF: p7Dsub_6A07+33j
		ld	(arcPage), a
		ld	(arcPtr), hl
		call	Page7D_2CCA
		ld	a, (arcPage)
		ld	hl, (arcPtr)
		ret
; End of function p7Dsub_6A07

; ---------------------------------------------------------------------------

Page7D_2D42:
		call	Page7D_2B56
		call	p7Dsub_75EC
		cp	b
		jr	c, p7Dloc_6A6D
		jr	z, p7Dloc_6A6D

p7Dloc_6A60:				; CODE XREF: seg001:6A6Bj
		push	bc
		call	DeleteApp
		pop	bc
		ld	a, (appSearchPage+1)
		cp	b
		jr	c, p7Dloc_6A6D
		jr	nz, p7Dloc_6A60

p7Dloc_6A6D:				; CODE XREF: seg001:6A5Cj seg001:6A5Ej ...
		res	2, (iy+25h)
		ld	a, 4
		call	Page0Call_2EB9
		ret
; ---------------------------------------------------------------------------

Page7D_2D36:
		call	Page0Call_3F2D
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		ld	a, 8
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8084h
; ---------------------------------------------------------------------------
		ld	a, 8
		ld	de, 4000h
		ld	b, 0FEh	; '�'
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		ld	a, 0Ch

p7Dloc_6A9C:				; CODE XREF: seg001:6AABj
		push	af
		call	p7Dsub_7BD4
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8084h
; ---------------------------------------------------------------------------
		pop	af
		add	a, 4

p7Dloc_6AA8:				; DATA XREF: seg001:76B7w seg001:76C9w
		call	p7Dsub_75E1
		jr	c, p7Dloc_6A9C
		ld	hl, tempSwapArea
		ld	b, 0E8h	; '�'

p7Dloc_6AB2:				; CODE XREF: seg001:6AB6j
		ld	a, 0FFh
		ld	(hl), a
		inc	hl
		djnz	p7Dloc_6AB2
		ld	a, 0FEh	; '�'
		ld	hl, 836Dh
		ld	(hl), a
		call	NZIf83Plus
		jr	z, p7Dloc_6AC9
		ld	a, 7Fh ; ''
		ld	hl, 836Eh
		ld	(hl), a

p7Dloc_6AC9:				; CODE XREF: seg001:6AC1j
		ld	a, 0
		call	Page7D_2B62
		jp	relockFlashBack
; ---------------------------------------------------------------------------

Page7D_2D48:
		res	6, (iy+24h)
		res	7, (iy+24h)
		res	4, (iy+26h)
		ld	a, 8

p7Dloc_6ADF:				; CODE XREF: seg001:6B05j
		push	af
		ld	hl, 4000h
		call	Page7D_2CD0
		cp	0FEh ; '�'
		jr	nz, p7Dloc_6AF3

p7Dloc_6AEA:				; CODE XREF: seg001:6AF9j seg001:6B17j
		pop	af
		push	bc
		ld	c, 3
		add	a, c
		pop	bc
		push	af
		jr	p7Dloc_6AFB
; ---------------------------------------------------------------------------

p7Dloc_6AF3:				; CODE XREF: seg001:6AE8j
		cp	0F0h ; '�'
		jr	z, p7Dloc_6B07
		cp	0FFh
		jr	z, p7Dloc_6AEA

p7Dloc_6AFB:				; CODE XREF: seg001:6AF1j
		pop	af
		push	hl
		call	Page7D_2B56
		cp	b
		pop	hl
		jr	nc, locret_6B35
		inc	a
		jr	p7Dloc_6ADF
; ---------------------------------------------------------------------------

p7Dloc_6B07:				; CODE XREF: seg001:6AF5j
		pop	af
		push	af
		ld	(arcPage), a
		ld	(arcPtr), hl
		call	Page7D_2CE2

p7Dloc_6B12:				; CODE XREF: seg001:6B33j
		ld	c, 0FCh	; '�'
		call	Page7D_2B6E
		jr	z, p7Dloc_6AEA
		ld	(arcPage), a
		ld	(arcPtr), hl
		push	bc
		call	Page0Call_2FC7
		pop	de
		inc	de
		inc	de
		ld	(arcPage), a
		ld	(arcPtr), hl
		inc	de
		call	Page7D_2CCA
		ld	a, (arcPage)
		jr	p7Dloc_6B12
; ---------------------------------------------------------------------------

locret_6B35:				; CODE XREF: seg001:6B02j
		ret

; =============== S U B	R O U T	I N E =======================================


Page7D_2CD0:				; CODE XREF: p7Dsub_4083+Bp p7Dsub_4566+3p ...
		push	hl
		push	bc
		push	de
		ld	bc, 1
		ld	de, flashByte1
		call	FlashToRam
		ld	a, (flashByte1)
		pop	de
		pop	bc
		pop	hl
		ret
; End of function Page7D_2CD0


; =============== S U B	R O U T	I N E =======================================


FlashToRam:				; CODE XREF: p7Dsub_424C+3p p7Dsub_42AE+Dp ...
		call	NZIf83Plus
		jr	z, p7Dloc_6B50
		and	1Fh

p7Dloc_6B50:				; CODE XREF: FlashToRam+3j
		push	ix
		ld	ix, FlashToRamPrivilegedCopy
		call	p7Dsub_6B87
		pop	ix
		ret
; End of function FlashToRam

FlashToRamPrivilegedCopy:
		.dw 29h
		ld	(flashByte2), a
		in	a, (6)
		push	af
		ld	a, (flashByte2)
		out	(6), a
		bit	7, h
		jr	nz, p7Dloc_6B83

p7Dloc_6B6D:				; CODE XREF: seg001:6B7Dj
		bit	7, h
		jr	z, p7Dloc_6B79
		in	a, (6)
		inc	a
		out	(6), a
		ld	hl, 4000h

p7Dloc_6B79:				; CODE XREF: seg001:6B6Fj
		ldi
		ld	a, b
		or	c
		jr	nz, p7Dloc_6B6D

p7Dloc_6B7F:				; CODE XREF: seg001:6B85j
		pop	af
		out	(6), a
		ret
p7Dloc_6B83:				; CODE XREF: seg001:6B6Bj
		ldir
		jr	p7Dloc_6B7F

; =============== S U B	R O U T	I N E =======================================


p7Dsub_6B87:				; CODE XREF: FlashToRam+Dp
		; p7Dsub_7666+11p
		call	p7Dsub_6BB0
		push	bc
		push	de
		push	hl
		push	ix
		pop	hl
		ld	c, (hl)
		inc	hl
		ld	b, (hl)
		inc	hl
		ld	de, ramCode
		push	de
		ldir
		pop	ix
		pop	hl
		pop	de
		pop	bc
		call	p7Dsub_6BAD
		push	af
		ld	a, (unk_82A2)
		bit	2, a
		jr	z, p7Dloc_6BAB
		ei

p7Dloc_6BAB:				; CODE XREF: p7Dsub_6B87+21j
		pop	af
		ret
; End of function p7Dsub_6B87


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6BAD:				; CODE XREF: p7Dsub_6B87+18p
		jp	ramCode
; End of function p7Dsub_6BAD


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6BB0:				; CODE XREF: p7Dsub_6B87p
		push	af
		push	bc
		ld	a, i
		push	af
		di
		pop	bc
		ld	a, c
		ld	(unk_82A2), a
		pop	bc
		pop	af
		ret
; End of function p7Dsub_6BB0

; ---------------------------------------------------------------------------

Page7D_3E28:
		res	7, (iy+24h)
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		ld	a, b
		ld	b, 0F0h	; '�'
		call	p7Dsub_6F82
		jp	c, Page0Call_2541
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		jp	relockFlashBack
; ---------------------------------------------------------------------------

Page7D_2D3C:
		res	7, (iy+24h)
		ld	a, 8

p7Dloc_6BE8:				; CODE XREF: seg001:6C0Cj
		push	af
		ld	hl, 4000h
		call	Page7D_2CD0
		cp	0FEh ; '�'
		jr	nz, p7Dloc_6BF9

p7Dloc_6BF3:				; CODE XREF: seg001:6BFFj seg001:6C1Ej
		pop	af
		add	a, 3
		push	af
		jr	p7Dloc_6C01
; ---------------------------------------------------------------------------

p7Dloc_6BF9:				; CODE XREF: seg001:6BF1j
		cp	0F0h ; '�'
		jr	z, p7Dloc_6C0E
		cp	0FFh
		jr	z, p7Dloc_6BF3

p7Dloc_6C01:				; CODE XREF: seg001:6BF7j
		pop	af
		push	hl
		call	Page7D_2B56
		cp	b
		pop	hl
		jp	nc, p7Dloc_6CAB
		inc	a
		jr	p7Dloc_6BE8
; ---------------------------------------------------------------------------

p7Dloc_6C0E:				; CODE XREF: seg001:6BFBj
		pop	af
		push	af
		ld	(arcPage), a
		ld	(arcPtr), hl
		call	Page7D_2CE2

p7Dloc_6C19:				; CODE XREF: seg001:6CA8j
		ld	c, 0FCh	; '�'
		call	Page7D_2B6E
		jr	z, p7Dloc_6BF3
		ld	(arcPage), a
		ld	(arcPtr), hl
		ld	(unk_8404), a
		ld	(unk_8402), hl
		ld	de, 3
		call	Page7D_2CCA
		ld	a, (arcPage)
		push	bc
		push	af
		call	Page7D_2CD0
		and	1Fh
		ld	(OP1), a
		call	page0_17B3
		jr	z, p7Dloc_6C49
		call	IS_A_LSTorCLST
		jr	nz, p7Dloc_6C6A

p7Dloc_6C49:				; CODE XREF: seg001:6C42j
		or	a
		call	Page0Call_23F6
		jr	nc, p7Dloc_6C52
		pop	af
		inc	a
		push	af

p7Dloc_6C52:				; CODE XREF: seg001:6C4Dj
		pop	af
		push	af
		call	Page7D_2CD0
		ld	c, a
		ld	b, 0
		pop	af
		ld	(arcPage), a
		ld	(arcPtr), hl
		call	Page7D_2CE2
		ld	a, (arcPage)
		push	af
		jr	p7Dloc_6C76
; ---------------------------------------------------------------------------

p7Dloc_6C6A:				; CODE XREF: seg001:6C47j
		or	a
		call	Page0Call_23F6
		jr	nc, p7Dloc_6C73
		pop	af
		inc	a
		push	af

p7Dloc_6C73:				; CODE XREF: seg001:6C6Ej
		ld	bc, 3

p7Dloc_6C76:				; CODE XREF: seg001:6C68j
		ld	de, 8479h
		push	hl
		ld	a, (OP1)
		push	af
		call	ZeroOP1
		pop	af
		ld	(OP1), a
		pop	hl
		pop	af
		call	FlashToRam
		call	ChkFindSym
		call	page0_1F31
		pop	de
		inc	de
		inc	de
		ld	a, (unk_8404)
		ld	hl, (unk_8402)
		ld	(arcPage), a
		ld	(arcPtr), hl
		call	Page7D_2CCA
		call	Page7D_2CE2
		ld	a, (arcPage)
		jp	p7Dloc_6C19
; ---------------------------------------------------------------------------

p7Dloc_6CAB:				; CODE XREF: seg001:6C08j
		res	2, (iy+25h)
		ld	a, 3
		call	Page0Call_2EB9
		ret

; =============== S U B	R O U T	I N E =======================================


Page7D_2C16:				; CODE XREF: p7Dsub_7240+1F3p
		; seg001:77F3p
		ld	hl, 8697h
		call	NZIf83Plus
		jr	z, p7Dloc_6CC4
		ld	c, a
		ld	b, 0
		add	hl, bc
		set	7, (hl)
		ret
; ---------------------------------------------------------------------------

p7Dloc_6CC4:				; CODE XREF: Page7D_2C16+6j
		ld	b, a
		call	Page0Call_2DB1
		or	(hl)
		ld	(hl), a
		ret
; End of function Page7D_2C16


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6CCB:				; CODE XREF: seg001:6D56p
		ld	(arcPage), a
		ld	(arcPtr), hl
		ld	de, 3
		call	Page7D_2CCA
		call	ZeroOP1
		ld	a, (arcPage)
		ld	hl, (arcPtr)
		call	Page7D_2CD0
		ld	(OP1), a
		call	Page0Call_23F6
		jr	nc, p7Dloc_6CF2
		ld	a, (arcPage)
		inc	a
		ld	(arcPage), a

p7Dloc_6CF2:				; CODE XREF: p7Dsub_6CCB+1Ej
		ld	(arcPtr), hl
		ld	a, (OP1)
		ld	b, 3
		call	page0_17B3
		jr	z, p7Dloc_6D11
		call	IS_A_LSTorCLST
		jr	z, p7Dloc_6D11
		ld	a, (arcPage)
		call	Page7D_2CD0
		cp	5Dh ; ']'
		ld	a, (arcPage)
		jr	nz, p7Dloc_6D21

p7Dloc_6D11:				; CODE XREF: p7Dsub_6CCB+32j p7Dsub_6CCB+37j
		ld	a, (arcPage)
		ld	hl, (arcPtr)
		call	Page7D_2CD0
		ld	b, a
		ld	a, (arcPage)
		call	Page7D_2CE2

p7Dloc_6D21:				; CODE XREF: p7Dsub_6CCB+44j
		ld	de, 8479h

p7Dloc_6D24:				; CODE XREF: p7Dsub_6CCB+69j
		ld	a, (arcPage)
		ld	hl, (arcPtr)
		push	bc
		call	Page7D_2CD0
		pop	bc
		ld	(de), a
		inc	de
		call	Page7D_2CE2
		djnz	p7Dloc_6D24
		ret
; End of function p7Dsub_6CCB

; ---------------------------------------------------------------------------

Page7D_2B7A:
		push	bc
		push	hl
		push	de
		push	af
		ld	(arcInfo), a
		ld	(arcInfo+1), hl
		ld	a, b
		ld	(unk_83F1), a
		ld	(unk_83F1+1), de
		ld	(unk_8404), a
		ld	(unk_8402), de
		ld	a, (arcInfo)
		ld	hl, (arcInfo+1)
		call	p7Dsub_6CCB
		ld	a, (OP1)
		and	1Fh
		push	af
		ld	a, (arcInfo)
		ld	hl, (arcInfo+1)
		ld	(arcPage), a
		ld	(arcPtr), hl
		call	Page7D_2CE2
		ld	a, (arcPage)
		call	Page7D_2CD0
		ld	c, a
		call	Page7D_2CE2
		ld	a, (arcPage)
		call	Page7D_2CD0
		ld	b, a
		call	Page7D_2CE2
		push	bc
		ld	a, (arcPage)
		ld	(arcInfo), a
		ld	(arcInfo+1), hl
		ld	a, (unk_83F1)
		ld	de, (unk_83F1+1)
		ld	(arcPage), a
		ld	(arcPtr), de
		ld	b, 0FEh	; '�'
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		call	Page7D_2CE2
		ld	a, (arcPage)
		ld	de, (arcPtr)
		pop	bc
		push	bc
		ld	b, c
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		call	Page7D_2CE2
		ld	a, (arcPage)
		ld	de, (arcPtr)
		pop	bc
		push	bc
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		call	Page7D_2CE2
		ld	a, (arcPage)
		ld	de, (arcPtr)
		ld	(unk_83F1), a
		ld	(unk_83F1+1), de
		ld	a, (arcInfo)
		ld	hl, (arcInfo+1)
		ld	(arcPage), a
		ld	(arcPtr), hl
		ld	de, 83FDh
		ld	bc, 3
		call	FlashToRam
		ld	de, 6
		call	Page7D_2CCA
		ld	a, (arcPage)
		ld	hl, (arcPtr)
		ld	(arcInfo), a
		ld	(arcInfo+1), hl
		ld	a, (unk_83F1)
		ld	de, (unk_83F1+1)
		ld	(arcPage), a
		ld	(arcPtr), de
		ld	hl, 83FDh
		ld	bc, 3
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		ld	de, 3
		call	Page7D_2CCA
		ld	a, (arcPage)
		ld	de, (arcPtr)
		ld	hl, 8402h
		ld	bc, 3
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		ld	de, 3
		call	Page7D_2CCA
		ld	a, (arcPage)
		ld	de, (arcPtr)
		ld	(unk_83F1), a
		ld	(unk_83F1+1), de
		pop	hl
		ld	bc, 6
		or	a
		sbc	hl, bc
		push	hl
		pop	bc

p7Dloc_6E40:				; CODE XREF: seg001:6EA4j
		ld	hl, 0
		ld	(unk_83F3+1), hl
		ld	de, ramStart

p7Dloc_6E49:				; CODE XREF: seg001:6E75j
		push	bc
		ld	a, (arcInfo)
		ld	b, a
		ld	hl, (arcInfo+1)
		call	LoadCIndPaged
		ld	a, c
		ld	(de), a
		inc	de
		inc	hl
		bit	7, h
		jr	z, p7Dloc_6E60
		inc	b
		ld	hl, 4000h

p7Dloc_6E60:				; CODE XREF: seg001:6E5Aj
		call	p7Dsub_6ECE
		ld	a, b
		ld	(arcInfo), a
		ld	(arcInfo+1), hl
		pop	bc
		dec	bc
		ld	a, b
		or	c
		jr	z, p7Dloc_6EA7
		call	p7Dsub_6ED5
		jr	z, p7Dloc_6E77
		jr	p7Dloc_6E49
; ---------------------------------------------------------------------------

p7Dloc_6E77:				; CODE XREF: seg001:6E73j
		push	bc
		ld	hl, ramStart
		ld	de, (unk_83F1+1)
		ld	a, (unk_83F1)
		ld	(arcPtr), de
		ld	(arcPage), a
		ld	bc, (unk_83F3+1)
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		ld	de, (unk_83F3+1)
		call	Page7D_2CCA
		ld	a, (arcPage)
		ld	hl, (arcPtr)
		ld	(unk_83F1), a
		ld	(unk_83F1+1), hl
		pop	bc
		jp	p7Dloc_6E40
; ---------------------------------------------------------------------------

p7Dloc_6EA7:				; CODE XREF: seg001:6E6Ej
		ld	hl, ramStart
		ld	de, (unk_83F1+1)
		ld	a, (unk_83F1)
		ld	bc, (unk_83F3+1)
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		ld	a, (unk_8404)
		ld	de, (unk_8402)
		ld	b, 0FCh	; '�'
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		pop	af
		ld	(OP1), a
		pop	af
		pop	de
		pop	hl
		pop	bc
		ret
; ---------------------------------------------------------------------------
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_6ECE:				; CODE XREF: seg001:p7Dloc_6E60p
		push	hl
		ld	hl, 83F4h
		inc	(hl)
		pop	hl
		ret
; End of function p7Dsub_6ECE


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6ED5:				; CODE XREF: seg001:6E70p
		ld	a, (unk_83F3+1)
		cp	0FFh
		ret
; End of function p7Dsub_6ED5


; =============== S U B	R O U T	I N E =======================================


Page7D_2C10:				; CODE XREF: seg001:65D7p
		call	p7Dsub_75EC

p7Dloc_6EDE:				; CODE XREF: Page7D_2C10+2Dj
		; Page7D_2C10+75j
		call	p7Dsub_7BD4
		call	Page7D_2B56
		cp	b
		jr	c, locret_6F53
		jr	z, locret_6F53
		ld	hl, 4000h
		push	af
		call	Page7D_2CD0
		cp	0
		jr	nz, p7Dloc_6F0A
		pop	af
		push	af
		call	FindAppNumPages
		ld	a, c
		or	c
		jr	z, p7Dloc_6F52
		ld	b, c
		ld	de, 4000h

p7Dloc_6F01:				; CODE XREF: Page7D_2C10+29j
		call	p7Dsub_652E
		djnz	p7Dloc_6F01

p7Dloc_6F06:				; CODE XREF: Page7D_2C10+71j
		pop	af
		sub	c
		jr	p7Dloc_6EDE
; ---------------------------------------------------------------------------

p7Dloc_6F0A:				; CODE XREF: Page7D_2C10+17j
		cp	80h ; '�'
		jr	nz, p7Dloc_6F52
		pop	af
		push	af
		call	Page0Call_3E31
		jr	nz, p7Dloc_6F52
		pop	af
		push	af
		call	Page7D_2C9A
		call	Page7D_2B5C
		jr	z, p7Dloc_6F43
		pop	af
		push	af
		call	FindAppNumPages
		ld	a, c
		or	c
		jr	z, p7Dloc_6F52
		ld	b, c

p7Dloc_6F29:				; CODE XREF: Page7D_2C10+66j
		pop	af
		push	af
		push	bc
		ld	de, 4000h
		ld	b, 0
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		ld	de, 4000h
		call	p7Dsub_652E
		pop	bc
		dec	b
		jr	z, p7Dloc_6F4E
		pop	af
		dec	a
		push	af
		jr	p7Dloc_6F29
; ---------------------------------------------------------------------------

p7Dloc_6F43:				; CODE XREF: Page7D_2C10+42j
		pop	af
		push	af
		call	FindAppNumPages
		ld	a, c
		or	a
		jr	z, p7Dloc_6F52
		jr	p7Dloc_6F06
; ---------------------------------------------------------------------------

p7Dloc_6F4E:				; CODE XREF: Page7D_2C10+61j
		pop	af
		dec	a
		jr	p7Dloc_6EDE
; ---------------------------------------------------------------------------

p7Dloc_6F52:				; CODE XREF: Page7D_2C10+20j
		; Page7D_2C10+31j ...
		pop	af

locret_6F53:				; CODE XREF: Page7D_2C10+Aj
		; Page7D_2C10+Cj
		ret
; End of function Page7D_2C10


; =============== S U B	R O U T	I N E =======================================


Page7D_2C46:				; CODE XREF: seg001:6853p
		; Page7D_2EB0+72p ...
		push	hl
		push	de
		push	bc
		cp	8
		jp	c, p7Dloc_6F7D
		push	af
		ld	a, (OP1)
		push	af
		call	Page7D_2B56
		pop	af
		ld	(OP1), a
		pop	af
		cp	b
		jr	z, p7Dloc_6F6E
		jr	nc, p7Dloc_6F7D

p7Dloc_6F6E:				; CODE XREF: Page7D_2C46+16j
		ld	bc, 4000h
		sbc	hl, bc
		jr	c, p7Dloc_6F7D
		ex	de, hl
		or	a
		sbc	hl, bc
		jr	c, p7Dloc_6F7D
		jr	p7Dloc_6F7E
; ---------------------------------------------------------------------------

p7Dloc_6F7D:				; CODE XREF: Page7D_2C46+5j
		; Page7D_2C46+18j ...
		scf

p7Dloc_6F7E:				; CODE XREF: Page7D_2C46+27j
		pop	bc
		pop	de
		pop	hl
		ret
; End of function Page7D_2C46


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6F82:				; CODE XREF: Page7D_2EB0+29p
		; Page7D_2EB0+4Bp ...
		push	hl
		push	de
		push	bc
		cp	8
		jp	c, p7Dloc_6FA7
		push	af
		ld	a, (OP1)
		push	af
		call	Page7D_2B56
		pop	af
		ld	(OP1), a
		pop	af
		cp	b
		jr	z, p7Dloc_6F9C
		jr	nc, p7Dloc_6FA7

p7Dloc_6F9C:				; CODE XREF: p7Dsub_6F82+16j
		ld	bc, 4000h
		ex	de, hl
		or	a
		sbc	hl, bc
		jr	c, p7Dloc_6FA7
		jr	p7Dloc_6FA8
; ---------------------------------------------------------------------------

p7Dloc_6FA7:				; CODE XREF: p7Dsub_6F82+5j p7Dsub_6F82+18j	...
		scf

p7Dloc_6FA8:				; CODE XREF: p7Dsub_6F82+23j
		pop	bc
		pop	de
		pop	hl
		ret
; End of function p7Dsub_6F82


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6FAC:				; CODE XREF: seg001:4011p
		; DeleteApp+11p
		push	hl
		push	bc
		call	p7Dsub_75E1
		jr	nc, p7Dloc_6FBD
		call	Page7D_2B56
		cp	b
		jr	c, p7Dloc_6FBA
		or	a

p7Dloc_6FBA:				; CODE XREF: p7Dsub_6FAC+Bj p7Dsub_6FAC+12j
		pop	bc
		pop	hl
		ret
; ---------------------------------------------------------------------------

p7Dloc_6FBD:				; CODE XREF: p7Dsub_6FAC+5j
		scf
		jr	p7Dloc_6FBA
; End of function p7Dsub_6FAC


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6FC0:				; CODE XREF: seg001:634Cp
		push	hl
		push	bc
		push	de
		ld	hl, 4000h
		ld	de, 80C0h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_6FF4
		inc	hl
		ld	a, (appPage)
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		ld	a, (appPage)
		call	p7Dsub_5CFF
		call	GetBaseVer
		ld	b, a
		ld	a, (MD5Buffer)
		cp	b
		jr	z, p7Dloc_6FE9
		jr	c, p7Dloc_6FF4
		jr	p7Dloc_6FF5
; ---------------------------------------------------------------------------

p7Dloc_6FE9:				; CODE XREF: p7Dsub_6FC0+23j
		call	GetBaseVer
		ld	a, (unk_83A6)
		cp	b
		jr	z, p7Dloc_6FF4
		jr	nc, p7Dloc_6FF5

p7Dloc_6FF4:				; CODE XREF: p7Dsub_6FC0+Cj p7Dsub_6FC0+25j	...
		xor	a

p7Dloc_6FF5:				; CODE XREF: p7Dsub_6FC0+27j p7Dsub_6FC0+32j
		pop	de
		pop	bc
		pop	hl
		ret
; End of function p7Dsub_6FC0


; =============== S U B	R O U T	I N E =======================================


p7Dsub_6FF9:				; CODE XREF: seg001:6355p
		push	hl
		push	bc
		push	de
		bit	5, (iy+24h)
		jr	nz, p7Dloc_701F
		ld	a, (appPage)
		ld	hl, 4000h
		ld	de, 80A0h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jr	nz, p7Dloc_7024
		inc	hl
		ld	a, (appPage)
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		ld	a, b
		or	c
		jr	z, p7Dloc_7024
		ld	a, (hl)
		or	a
		jr	z, p7Dloc_7024

p7Dloc_701F:				; CODE XREF: p7Dsub_6FF9+7j
		call	page0_BB1
		jr	p7Dloc_7027
; ---------------------------------------------------------------------------

p7Dloc_7024:				; CODE XREF: p7Dsub_6FF9+15j p7Dsub_6FF9+20j ...
		call	page0_B8D

p7Dloc_7027:				; CODE XREF: p7Dsub_6FF9+29j
		pop	de
		pop	bc
		pop	hl
		ret
; End of function p7Dsub_6FF9

; ---------------------------------------------------------------------------
aDeleting___:	.asc 'Deleting...',0
aHaveExpired_:	.asc 'Have Expired.',0

; =============== S U B	R O U T	I N E =======================================


p7Dsub_7045:				; CODE XREF: p7Dsub_4926+29p p7Dsub_4926+3Bp ...
		push	bc
		push	af
		ld	a, (winBtm)
		ld	b, a

p7Dloc_704B:				; CODE XREF: p7Dsub_7045+13j
		ld	a, (hl)
		inc	hl
		or	a
		scf
		jr	z, p7Dloc_705A
		call	Page0Call_3F9F
		ld	a, (curRow)
		cp	b
		jr	c, p7Dloc_704B

p7Dloc_705A:				; CODE XREF: p7Dsub_7045+Aj
		pop	bc
		ld	a, b
		pop	bc
		ret
; End of function p7Dsub_7045


; =============== S U B	R O U T	I N E =======================================


p7Dsub_705E:				; CODE XREF: p7Dsub_464E+15p p7Dsub_4AC9+16p ...
		ld	a, 7Eh ; '~'
; End of function p7Dsub_705E


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7060:				; CODE XREF: p7Dsub_7240+17Bp
		; seg001:7790p
		push	ix

p7Dloc_7062:				; CODE XREF: p7Dsub_7060+35j
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		cp	d
		jr	nz, p7Dloc_709E
		inc	hl
		pop	af
		push	af
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		and	0F0h ; '�'
		cp	e
		jr	nz, p7Dloc_7078
		pop	af
		dec	hl
		jr	p7Dloc_70A2
; ---------------------------------------------------------------------------

p7Dloc_7078:				; CODE XREF: p7Dsub_7060+12j
		pop	af
		push	af
		push	de
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		pop	de
		add	hl, bc
		ld	(arcInfo), hl
		pop	af
		push	af
		push	hl
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8051h
; ---------------------------------------------------------------------------
		and	0F0h ; '�'
		cp	e
		jr	z, p7Dloc_7093
		cp	10h
		jr	z, p7Dloc_7097

p7Dloc_7093:				; CODE XREF: p7Dsub_7060+2Dj
		pop	hl
		pop	af
		jr	p7Dloc_7062
; ---------------------------------------------------------------------------

p7Dloc_7097:				; CODE XREF: p7Dsub_7060+31j
		pop	hl
		ld	hl, (arcInfo)
		ld	a, 1
		or	a

p7Dloc_709E:				; CODE XREF: p7Dsub_7060+7j
		pop	bc
		pop	ix
		ret
; ---------------------------------------------------------------------------

p7Dloc_70A2:				; CODE XREF: p7Dsub_7060+16j
		ld	a, 0
		bit	7, a
		pop	ix
		ret
; End of function p7Dsub_7060

; ---------------------------------------------------------------------------

Page7D_2CFA:
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	Page0Call_240A
		ld	e, (hl)
		dec	hl
		ld	d, (hl)
		dec	hl
		ld	a, (hl)
		ld	b, 0FCh	; '�'
		call	Page7D_2C46
		jp	c, Page0Call_2541
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8021h
; ---------------------------------------------------------------------------
		call	Page7D_3E10
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_70D1:				; CODE XREF: p7Dsub_4442+2p p7Dsub_4498+Cp ...
		ld	de, 300h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8027h
; ---------------------------------------------------------------------------
		ret
; End of function p7Dsub_70D1

; ---------------------------------------------------------------------------
aCert_Revision:	.asc 'Cert. Revision #',0
; ---------------------------------------------------------------------------

Page7D_3C60:
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	p7Dsub_70D1
		jp	nz, relockFlashBack
		push	hl
		ld	hl, aCert_Revision
		ld	de, OP1
		ld	bc, 12h

p7Dloc_710A:				; CODE XREF: seg001:710Ej
		ld	a, (hl)
		ld	(de), a
		inc	hl
		inc	de
		djnz	p7Dloc_710A
		ld	hl, OP1
		call	Page0Call_3D4D
		ld	a, 7Eh ; '~'
		pop	hl
		call	p7Dsub_4873
		push	bc
		pop	hl
		call	p7Dsub_598E
		jp	relockFlashBack

; =============== S U B	R O U T	I N E =======================================


p7Dsub_7124:				; CODE XREF: p7Dsub_6428+10p p7Dsub_7240-EDp ...
		ld	a, (header)
		cp	23h ; '#'
		ret
; End of function p7Dsub_7124

; ---------------------------------------------------------------------------

Page7D_2BB6:
		ld	bc, (unk_8685)
		sub	c
		ld	hl, (unk_8683)
		push	af
		ld	a, (unk_8434)
		sub	c
		call	p7Dsub_5EFC
		jr	c, p7Dloc_7150
		pop	af
		ld	bc, (ioData)
		push	hl
		push	bc
		push	af
		ld	h, 9
		call	Page0Call_2C5B
		pop	af
		pop	bc
		pop	hl
		call	p7Dsub_7240
		ret
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p7Dsub_7240

p7Dloc_7150:				; CODE XREF: seg001:713Aj
		; p7Dsub_7240:p7Dloc_74EDj ...
		call	relockFlashBack
		call	p7Dsub_7124
		push	af
		jr	z, p7Dloc_715C
		call	popErrorHandleR

p7Dloc_715C:				; CODE XREF: p7Dsub_7240-E9j
		pop	af
		push	af
		jr	z, p7Dloc_7166
		ld	hl, Page0Call_2C79
		call	pushErrorHandleR

p7Dloc_7166:				; CODE XREF: p7Dsub_7240-E2j
		call	Page0Call_3D2F
		ld	a, 0Bh
		call	Page0Call_2C49
		pop	af
		jr	z, p7Dloc_7174
		call	popErrorHandleR

p7Dloc_7174:				; CODE XREF: p7Dsub_7240-D1j
		call	Page0Call_3D05
		jp	Page0Call_2541
; END OF FUNCTION CHUNK	FOR p7Dsub_7240

; =============== S U B	R O U T	I N E =======================================


p7Dsub_717A:				; CODE XREF: p7Dsub_7240+19Dp
		; seg001:77ABp
		ld	hl, ramStart
		ld	de, 81AFh
		jr	p7Dloc_7188
; End of function p7Dsub_717A


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7182:				; CODE XREF: p7Dsub_7240+1B1p
		; p7Dsub_7240+1EDp ...
		ld	hl, 81AFh
		ld	de, ramStart

p7Dloc_7188:				; CODE XREF: p7Dsub_717A+6j
		ld	bc, 80h	; '�'
		ldir
		ret
; End of function p7Dsub_7182

; ---------------------------------------------------------------------------

WriteToFlash:
		cp	0
		jr	z, p7Dloc_71B3
		cp	1
		jp	z, Page7D_2BE0
		cp	2
		jp	z, p7Dloc_7E57
		cp	3
		jp	z, p7Dloc_7E31
		cp	4
		jp	z, p7Dsub_7D67
		cp	5
		jp	z, p7Dloc_7E8D
		cp	6
		jp	z, p7Dloc_7E91
		jp	ErrInvalid
; ---------------------------------------------------------------------------

p7Dloc_71B3:				; CODE XREF: seg001:7190j
		push	ix
		ld	a, (ramCodeEnd)
		or	a
		ld	a, e
		jr	nz, p7Dloc_71D9
		push	hl
		push	bc
		call	p7Dsub_7B72
		pop	bc
		pop	hl
		or	a
		jp	z, Page7D_2BBC
		push	hl
		ld	de, 4000h
		sbc	hl, de
		jp	nz, Page0Call_2541
		ld	hl, 7Fh	; ''
		sbc	hl, bc
		jp	nc, Page0Call_2541
		pop	hl

p7Dloc_71D9:				; CODE XREF: seg001:71BAj
		push	af
		ld	(appSearchPage+1), a
		call	p7Dsub_5EFC
		jp	c, Page0Call_2541
		push	hl
		ld	de, 4080h
		sbc	hl, de
		pop	hl
		jr	nc, p7Dloc_71FD
		ld	a, (ramCodeEnd)
		or	a
		jr	z, p7Dloc_71FD
		ld	a, (unk_8434)
		ld	e, a
		ld	a, (appSearchPage+1)
		cp	e
		jp	z, Page0Call_2541

p7Dloc_71FD:				; CODE XREF: seg001:71EAj seg001:71F0j
		xor	a
		ld	(appInfo), a
		ld	(unk_843B), hl
		ld	(unk_8439), bc
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		res	6, (iy+24h)
		res	7, (iy+24h)
		xor	a
		ld	(unk_9C87), a

p7Dloc_7225:				; CODE XREF: seg001:723Bj
		push	bc
		ld	a, (unk_83A4)
		cp	0
		jr	z, p7Dloc_7234
		ld	a, (unk_83A3)
		inc	a
		ld	(unk_83A3), a

p7Dloc_7234:				; CODE XREF: seg001:722Bj
		call	p7Dsub_7CBB
		pop	bc
		dec	bc
		ld	a, b
		or	c
		jr	nz, p7Dloc_7225
		jp	p7Dloc_739B

; =============== S U B	R O U T	I N E =======================================


p7Dsub_7240:				; CODE XREF: seg001:714Cp

; FUNCTION CHUNK AT 7150 SIZE 0000002A BYTES
; FUNCTION CHUNK AT 72D2 SIZE 0000005D BYTES
; FUNCTION CHUNK AT 7336 SIZE 00000005 BYTES
; FUNCTION CHUNK AT 7345 SIZE 0000022A BYTES
; FUNCTION CHUNK AT 75A5 SIZE 0000000C BYTES
; FUNCTION CHUNK AT 75B4 SIZE 00000004 BYTES

		push	ix
		push	af
		ld	(appSearchPage+1), a
		xor	a
		ld	(sndRecState), a
		ex	de, hl
		ld	(unk_843B), de
		push	bc
		call	Page0Call_2C61
		pop	bc
		ld	hl, ioFlag
		ld	a, (unk_8675)
		cp	15h
		jp	nz, p7Dloc_733F
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		ld	hl, (unk_8676)
		or	a
		sbc	hl, bc
		jp	nz, p7Dloc_733F
		res	6, (iy+24h)
		res	7, (iy+24h)
		xor	a
		ld	(unk_9C87), a
		ld	bc, (unk_8676)
		ld	de, 0
		ld	(unk_8678), de
		ld	a, c
		or	b
		jp	z, p7Dloc_7363
		ld	hl, ramStart
		ld	(unk_8439), bc

p7Dloc_729C:				; CODE XREF: p7Dsub_7240+120j
		call	CHKERRBREAK
		jp	z, p7Dloc_7345
		jp	JErrorNo
; End of function p7Dsub_7240

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p7Dsub_7BEA

Page7D_2BBC:				; CODE XREF: seg001:71C4j
		; p7Dsub_7240+1C0j ...
		call	p7Dsub_733B
		call	relockFlashBack
		call	p7Dsub_7124
		push	af
		jr	z, p7Dloc_72B4
		call	popErrorHandleR

p7Dloc_72B4:				; CODE XREF: p7Dsub_7BEA-93Bj
		pop	af
		push	af
		jr	z, p7Dloc_72BE
		ld	hl, Page0Call_2C79
		call	pushErrorHandleR

p7Dloc_72BE:				; CODE XREF: p7Dsub_7BEA-934j
		call	Page0Call_3D2F
		ld	a, 1
		call	Page0Call_2C49
		pop	af
		jr	z, p7Dloc_72CC
		call	popErrorHandleR

p7Dloc_72CC:				; CODE XREF: p7Dsub_7BEA-923j
		call	Page0Call_3D05
		jp	ErrMemory
; END OF FUNCTION CHUNK	FOR p7Dsub_7BEA
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p7Dsub_7240

p7Dloc_72D2:				; CODE XREF: p7Dsub_7240+173j
		call	p7Dsub_733B
		call	relockFlashBack
		call	p7Dsub_7124
		push	af
		jr	z, p7Dloc_72E1
		call	popErrorHandleR

p7Dloc_72E1:				; CODE XREF: p7Dsub_7240+9Cj
		pop	af
		push	af
		jr	z, p7Dloc_72EB
		ld	hl, Page0Call_2C79
		call	pushErrorHandleR

p7Dloc_72EB:				; CODE XREF: p7Dsub_7240+A3j
		call	Page0Call_3D2F
		ld	a, 7
		call	Page0Call_2C49
		pop	af
		jr	z, p7Dloc_72F9
		call	popErrorHandleR

p7Dloc_72F9:				; CODE XREF: p7Dsub_7240+B4j
		call	Page0Call_2C55
		call	Page0Call_3D05
		jp	Page0Call_2539
; ---------------------------------------------------------------------------

p7Dloc_7302:				; CODE XREF: p7Dsub_7240+183j
		call	p7Dsub_733B
		call	relockFlashBack
		call	p7Dsub_7124
		push	af
		jr	z, p7Dloc_7311
		call	popErrorHandleR

p7Dloc_7311:				; CODE XREF: p7Dsub_7240+CCj
		pop	af
		push	af
		jr	z, p7Dloc_731B
		ld	hl, Page0Call_2C79
		call	pushErrorHandleR

p7Dloc_731B:				; CODE XREF: p7Dsub_7240+D3j
		call	Page0Call_3D2F
		ld	a, 9
		call	Page0Call_2C49
		pop	af
		jr	z, p7Dloc_7329
		call	popErrorHandleR

p7Dloc_7329:				; CODE XREF: p7Dsub_7240+E4j
		call	Page0Call_3D05
		jp	Page0Call_253D
; END OF FUNCTION CHUNK	FOR p7Dsub_7240
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p7Dsub_75B8

p7Dloc_732F:				; CODE XREF: p7Dsub_75B8:p7Dloc_75B1j
		call	p7Dsub_733B
		call	Page0Call_2C49
		ret
; END OF FUNCTION CHUNK	FOR p7Dsub_75B8
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p7Dsub_7240

p7Dloc_7336:				; CODE XREF: p7Dsub_7240+36Ej
		ld	h, 36h ; '6'
		jp	Page0Call_2C73
; END OF FUNCTION CHUNK	FOR p7Dsub_7240

; =============== S U B	R O U T	I N E =======================================


p7Dsub_733B:				; CODE XREF: p7Dsub_7BEA:Page7D_2BBCp
		; p7Dsub_7240:p7Dloc_72D2p ...
		call	p7Dsub_7CB2
		ret	nz

p7Dloc_733F:				; CODE XREF: p7Dsub_7240+1Cj p7Dsub_7240+36j
		call	relockFlashBack
		jp	JErrorNo
; End of function p7Dsub_733B

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p7Dsub_7240

p7Dloc_7345:				; CODE XREF: p7Dsub_7240+5Fj
		push	bc
		call	j_RecAByteIO
		ld	(hl), a
		call	p7Dsub_7CA5
		inc	hl
		ex	de, hl
		ld	b, 0
		ld	hl, (unk_8678)
		add	hl, bc
		ld	(unk_8678), hl
		ex	de, hl
		call	p7Dsub_7CBB
		pop	bc
		dec	bc
		ld	a, b
		or	c
		jp	nz, p7Dloc_729C

p7Dloc_7363:				; CODE XREF: p7Dsub_7240+52j
		call	j_RecAByteIO
		push	af
		call	j_RecAByteIO
		ld	b, a
		pop	af
		ld	c, a
		in	a, (2)
		and	80h ; '�'
		jr	z, p7Dloc_738A
		in	a, (20h)
		and	1
		jr	z, p7Dloc_738A
		xor	a
		out	(20h), a
		ld	de, 0FEh ; '�'

p7Dloc_737F:				; CODE XREF: p7Dsub_7240+142j
		dec	de
		ld	a, d
		or	e
		jr	nz, p7Dloc_737F
		ld	a, 1
		out	(20h), a
		jr	p7Dloc_7392
; ---------------------------------------------------------------------------

p7Dloc_738A:				; CODE XREF: p7Dsub_7240+131j
		; p7Dsub_7240+137j
		ld	de, 100h

p7Dloc_738D:				; CODE XREF: p7Dsub_7240+150j
		dec	de
		ld	a, d
		or	e
		jr	nz, p7Dloc_738D

p7Dloc_7392:				; CODE XREF: p7Dsub_7240+148j
		ld	hl, (unk_8678)
		or	a
		sbc	hl, bc
		jp	nz, p7Dloc_75A5

p7Dloc_739B:				; CODE XREF: seg001:723Dj
		call	p7Dsub_5E0A
		ld	a, (ramCodeEnd)
		cp	0
		jp	nz, p7Dloc_74BC
		ld	de, (unk_843B)
		push	de
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8063h
; ---------------------------------------------------------------------------
		pop	de
		ld	(unk_843B), de
		jp	nz, p7Dloc_72D2
		ld	a, 1
		ld	de, 8050h
		call	p7Dsub_7060
		jr	nz, p7Dloc_73C6
		call	p7Dsub_50C5
		jp	nz, p7Dloc_7302

p7Dloc_73C6:				; CODE XREF: p7Dsub_7240+17Ej
		call	p7Dsub_75B8
		ld	a, (appInfo)
		cp	0
		jp	nz, p7Dloc_75B4
		di
		ld	hl, (curRow)
		push	hl
		call	Page0Call_3CD5
		ld	a, (ioFlag)
		push	af
		call	p7Dsub_717A
		res	2, (iy+25h)
		call	Chk_Batt_Low
		jp	z, ErrInvalid
		ld	a, 0
		ld	b, 0
		call	Page0Call_2EB9
		call	p7Dsub_7182
		pop	af
		pop	hl
		ld	(curRow), hl
		ld	(ioFlag), a
		call	p7Dsub_7B72
		or	a
		jp	z, Page7D_2BBC
		push	af
		call	p7Dsub_7BEA
		jr	c, p7Dloc_740C

p7Dloc_7409:				; CODE XREF: p7Dsub_7240+1EBj
		jp	nz, Page7D_2BBC

p7Dloc_740C:				; CODE XREF: p7Dsub_7240+1C7j
		xor	a
		cp	d
		jp	z, ErrInvalid
		push	de
		call	FindSwapSector
		cp	8
		jr	z, p7Dloc_7430
		add	a, 4
		ld	b, a
		ld	a, c
		sub	d
		cp	b
		jr	nc, p7Dloc_7430
		ld	a, 5
		call	Page0Call_2EB9
		call	FindSwapSector
		cp	8
		jr	nz, p7Dloc_7409
		call	p7Dsub_7182

p7Dloc_7430:				; CODE XREF: p7Dsub_7240+1D7j
		; p7Dsub_7240+1DFj
		ld	a, (appSearchPage)
		call	Page7D_2C16
		ld	a, 1
		ld	hl, ramStart
		call	Page7D_2C9A
		call	p7Dsub_7CB2
		jr	z, p7Dloc_7453
		ld	a, 19h
		ld	(sndRecState), a
		call	Page0Call_2E23
		call	Page0Call_2DE7
		di
		xor	a
		ld	(sndRecState), a

p7Dloc_7453:				; CODE XREF: p7Dsub_7240+201j
		pop	de
		pop	af
		push	de
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	p7Dsub_519D
		call	p7Dsub_5E90
		ld	hl, ramStart
		call	p7Dsub_5757
		ld	hl, (unk_83A1)
		call	p7Dsub_57C5
		push	hl
		ld	a, 1
		ld	hl, ramStart
		push	hl
		inc	hl
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		pop	bc
		sbc	hl, bc
		push	hl
		pop	bc
		ld	hl, (unk_8439)
		sbc	hl, bc
		push	hl
		pop	bc
		pop	hl
		sbc	hl, bc
		call	p7Dsub_57C5
		ld	(unk_83A1), hl
		jr	c, p7Dloc_749D
		jr	nz, p7Dloc_74F0

p7Dloc_749D:				; CODE XREF: p7Dsub_7240+259j
		ld	hl, (unk_839F)
		call	p7Dsub_57C5
		dec	hl
		call	p7Dsub_57C5
		ld	(unk_839F), hl
		ld	a, l
		or	h
		jr	nz, p7Dloc_74BA
		ld	hl, (unk_83A1)
		ld	a, l
		or	h
		jr	nz, p7Dloc_74BA
		ld	a, 0
		ld	(unk_83A4), a

p7Dloc_74BA:				; CODE XREF: p7Dsub_7240+26Cj
		; p7Dsub_7240+273j
		jr	p7Dloc_74F0
; ---------------------------------------------------------------------------

p7Dloc_74BC:				; CODE XREF: p7Dsub_7240+163j
		push	de
		call	p7Dsub_7CB2
		jr	nz, p7Dloc_74F0
		ld	a, (appSearchPage+1)
		call	p7Dsub_7CCF
		call	p7Dsub_4566
		cp	0FEh ; '�'
		jr	nz, p7Dloc_74ED
		call	p7Dsub_4565
		cp	0BFh ; '�'
		jr	nz, p7Dloc_74ED
		call	p7Dsub_4565
		ld	b, a
		ld	a, (appSearchPage+1)
		cp	b
		jr	z, p7Dloc_74F0
		jr	nc, p7Dloc_74ED
		call	p7Dsub_4565
		ld	b, a
		ld	a, (appSearchPage+1)
		inc	b
		cp	b
		jr	nc, p7Dloc_74F0

p7Dloc_74ED:				; CODE XREF: p7Dsub_7240+28Dj
		; p7Dsub_7240+294j ...
		jp	p7Dloc_7150
; ---------------------------------------------------------------------------

p7Dloc_74F0:				; CODE XREF: p7Dsub_7240+25Bj
		; p7Dsub_7240:p7Dloc_74BAj ...
		ld	bc, (unk_8439)
		ld	hl, ramStart
		ld	de, (unk_843B)
		ld	a, (appSearchPage+1)
		bit	7, d
		jp	nz, p7Dloc_7150
		bit	6, d
		jp	z, p7Dloc_7150
		cp	8
		jp	c, p7Dloc_7150
		call	p7Dsub_75E1
		jp	nc, p7Dloc_7150
		call	p7Dsub_756F
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		call	p7Dsub_7CB2
		jr	z, p7Dloc_752A
		call	relockFlashBack
		call	Page0Call_3F1B

p7Dloc_7524:				; CODE XREF: p7Dsub_7240+2F3j
		pop	de

p7Dloc_7525:				; CODE XREF: p7Dsub_7240+32Dj
		pop	af
		pop	ix
		xor	a
		ret
; ---------------------------------------------------------------------------

p7Dloc_752A:				; CODE XREF: p7Dsub_7240+2DCj
		ld	a, (ramCodeEnd)
		or	a
		jr	z, p7Dloc_7535
		call	relockFlashBack
		jr	p7Dloc_7524
; ---------------------------------------------------------------------------

p7Dloc_7535:				; CODE XREF: p7Dsub_7240+2EEj
		call	p7Dsub_7CCF
		pop	de
		push	hl
		push	de
		ld	b, 4

p7Dloc_753D:				; CODE XREF: p7Dsub_7240+305j
		call	p7Dsub_4566
		cp	0FFh
		jr	nz, p7Dloc_7549
		inc	hl
		djnz	p7Dloc_753D
		jr	p7Dloc_754C
; ---------------------------------------------------------------------------

p7Dloc_7549:				; CODE XREF: p7Dsub_7240+302j
		call	Page7D_2BB0

p7Dloc_754C:				; CODE XREF: p7Dsub_7240+307j
		ld	hl, 0BFFEh
		ld	(OP1+1), hl
		ld	a, (appSearchPage)
		ld	(unk_847B), a
		pop	de
		sub	d
		ld	(unk_847C), a
		ld	bc, 4
		ld	hl, 8479h
		call	p7Dsub_7700
		pop	de
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		call	relockFlashBack
		jr	p7Dloc_7525
; END OF FUNCTION CHUNK	FOR p7Dsub_7240

; =============== S U B	R O U T	I N E =======================================


p7Dsub_756F:				; CODE XREF: p7Dsub_7240+2D3p
		ld	h, d
		ld	l, e
		dec	hl
		add	hl, bc
		bit	7, h
		jr	z, p7Dloc_75A1
		ld	hl, ramStart
		ld	de, (unk_843B)
		or	a
		sbc	hl, de
		ld	b, h
		ld	c, l
		ld	hl, ramStart
		push	bc
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		pop	bc
		ld	a, (appSearchPage+1)
		dec	a
		ld	hl, (unk_8439)
		or	a
		sbc	hl, bc
		push	bc
		ld	b, h
		ld	c, l
		pop	de
		ld	hl, ramStart
		add	hl, de
		ld	de, 4000h
		ret
; ---------------------------------------------------------------------------

p7Dloc_75A1:				; CODE XREF: p7Dsub_756F+6j
		ld	hl, ramStart
		ret
; End of function p7Dsub_756F

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p7Dsub_7240

p7Dloc_75A5:				; CODE XREF: p7Dsub_7240+158j
		ld	hl, (unk_8439)
		push	hl
		ld	h, 5Ah ; 'Z'
		call	Page0Call_2C5B
		jp	p7Dloc_7336
; END OF FUNCTION CHUNK	FOR p7Dsub_7240
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p7Dsub_75B8

p7Dloc_75B1:				; CODE XREF: p7Dsub_75B8+Fj p7Dsub_7B41+Fj
		jp	p7Dloc_732F
; END OF FUNCTION CHUNK	FOR p7Dsub_75B8
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p7Dsub_7240

p7Dloc_75B4:				; CODE XREF: p7Dsub_7240+18Ej
		; seg001:77A3j
		pop	af
		pop	ix
		ret
; END OF FUNCTION CHUNK	FOR p7Dsub_7240

; =============== S U B	R O U T	I N E =======================================


p7Dsub_75B8:				; CODE XREF: p7Dsub_7240:p7Dloc_73C6p

; FUNCTION CHUNK AT 732F SIZE 00000007 BYTES
; FUNCTION CHUNK AT 75B1 SIZE 00000003 BYTES

		call	ZeroOP1
		ld	a, 1
		or	a
		ld	hl, ramStart
		ld	de, 8040h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jp	nz, p7Dloc_75B1
		inc	hl
		ld	a, 1
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		ld	de, 8479h
		ldir
		ld	a, (appSearchPage+1)
		push	af
		call	p7Dsub_6428
		pop	af
		ld	(appSearchPage+1), a
		ret
; End of function p7Dsub_75B8


; =============== S U B	R O U T	I N E =======================================


p7Dsub_75E1:				; CODE XREF: p7Dsub_4A21+10p
		; FindSwapSector+18p ...
		call	NZIf83Plus
		jr	nz, p7Dloc_75E9
		cp	6Ah ; 'j'
		ret
; ---------------------------------------------------------------------------

p7Dloc_75E9:				; CODE XREF: p7Dsub_75E1+3j
		cp	16h
		ret
; End of function p7Dsub_75E1


; =============== S U B	R O U T	I N E =======================================


p7Dsub_75EC:				; CODE XREF: p7Dsub_4A5A+4p p7Dsub_4A5A+44p	...
		ld	a, 15h
		call	NZIf83Plus
		ret	nz
		ld	a, 69h ; 'i'
		ret
; End of function p7Dsub_75EC


; =============== S U B	R O U T	I N E =======================================


p7Dsub_75F5:				; CODE XREF: seg001:5874p p7Dsub_6021p ...
		call	p7Dsub_75EC
		inc	a
		ld	(appSearchPage), a
		ret
; End of function p7Dsub_75F5


; =============== S U B	R O U T	I N E =======================================


p7Dsub_75FD:				; CODE XREF: p7Dsub_5525+8p seg001:56F0p	...
		ld	de, 839Fh
		and	0Fh
		cp	0Fh
		jr	nz, p7Dloc_7609
		ld	b, 4
		ret
; ---------------------------------------------------------------------------

p7Dloc_7609:				; CODE XREF: p7Dsub_75FD+7j
		cp	0Eh
		jr	nz, p7Dloc_7612
		ld	b, 2
		xor	a
		jr	p7Dloc_761A
; ---------------------------------------------------------------------------

p7Dloc_7612:				; CODE XREF: p7Dsub_75FD+Ej
		cp	0Dh
		ret	nz
		ld	b, 1
		xor	a
		ld	(de), a
		inc	de

p7Dloc_761A:				; CODE XREF: p7Dsub_75FD+13j
		ld	(de), a
		inc	de
		ld	(de), a
		inc	de
		ret
; End of function p7Dsub_75FD


; =============== S U B	R O U T	I N E =======================================


p7Dsub_761F:				; CODE XREF: seg001:551Cp p7Dsub_5525+10p ...
		push	af
		call	Page7D_2CD0
		ld	(de), a
		inc	de
		inc	hl
		pop	af
		djnz	p7Dsub_761F
		ret
; End of function p7Dsub_761F


; =============== S U B	R O U T	I N E =======================================


p7Dsub_762A:				; CODE XREF: seg001:43A2p seg001:46C9p ...
		call	p7Dsub_7634
		ld	de, 610h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8030h
; ---------------------------------------------------------------------------
		ret
; End of function p7Dsub_762A


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7634:				; CODE XREF: seg001:471Bp p7Dsub_762Ap
		call	p7Dsub_4894
		ld	de, 600h
		call	p7Dsub_777E
		call	p7Dsub_4574
		ld	a, 7Eh ; '~'
		ret
; End of function p7Dsub_7634


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7643:				; CODE XREF: p7Dsub_4A5Ap	p7Dsub_51DB+21p ...
		ld	bc, 0Dh
		call	NZIf83Plus
		ret	nz
		ld	bc, 61h	; 'a'
		ret
; End of function p7Dsub_7643


; =============== S U B	R O U T	I N E =======================================


p7Dsub_764E:				; CODE XREF: p7Dsub_47E3+55p
		; p7Dsub_484E:p7Dloc_486Cp ...
		push	ix
		pop	hl
		ld	bc, 0Dh
		add	hl, bc
		ret
; End of function p7Dsub_764E


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7656:				; CODE XREF: p7Dsub_5B4D+2p seg001:5C38p	...
		ld	a, 16h
		call	NZIf83Plus
		ret	nz
		ld	a, 6Ah ; 'j'
		ret
; End of function p7Dsub_7656

; ---------------------------------------------------------------------------
		ld	hl, OP1
		ld	(hl), b

; =============== S U B	R O U T	I N E =======================================


p7Dsub_7663:				; CODE XREF: p7Dsub_42AE+18p
		ld	bc, 1
; End of function p7Dsub_7663


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7666:				; CODE XREF: p7Dsub_4214+10p
		; CopyFlashPage+38p ...
		res	1, (iy+25h)
		call	NZIf83Plus
		jr	z, p7Dloc_7671
		and	1Fh

p7Dloc_7671:				; CODE XREF: p7Dsub_7666+7j
		push	ix
		ld	ix, WriteFlashPrivilegedCopy
		call	p7Dsub_6B87
		pop	ix
		ret
; End of function p7Dsub_7666

WriteFlashPrivilegedCopy:
		.dw 81h
		ld	(flashByte2), a
		in	a, (6)
		push	af
		ld	a, (flashByte2)
		out	(6), a
		bit	7, h
		jr	nz, p7Dloc_7692
		set	1, (iy+25h)

p7Dloc_7692:				; CODE XREF: seg001:768Cj seg001:76ECj
		bit	1, (iy+25h)
		push	hl
		jr	nz, p7Dloc_76AD
		ld	hl, 7FFFh
		or	a
		sbc	hl, de
		jr	nc, p7Dloc_76AD
		in	a, (6)
		inc	a
		cp	7Eh ; '~'
		jr	z, p7Dloc_76AA
		out	(6), a

p7Dloc_76AA:				; CODE XREF: seg001:76A6j
		ld	de, 4000h

p7Dloc_76AD:				; CODE XREF: seg001:7697j seg001:769Fj
		pop	hl
		in	a, (6)
		push	af
		ld	a, 2
		out	(6), a
		ld	a, 0AAh	; '�'
		ld	(p7Dloc_6AA8+2), a
		ld	a, 1
		out	(6), a
		ld	a, 55h ; 'U'
		ld	(p7Dloc_5555), a
		ld	a, 2
		out	(6), a
		ld	a, 0A0h	; '�'
		ld	(p7Dloc_6AA8+2), a
		pop	af
		out	(6), a
		ld	a, (hl)
		ld	a, (hl)
		ld	(de), a

p7Dloc_76D2:				; CODE XREF: seg001:76DCj
		ld	a, (de)
		push	af
		xor	(hl)
		and	80h ; '�'
		jr	z, p7Dloc_76E6
		pop	af
		bit	5, a
		jr	z, p7Dloc_76D2
		ld	a, (de)
		xor	(hl)
		and	80h ; '�'
		jr	nz, p7Dloc_76F8
		jr	p7Dloc_76E7
; ---------------------------------------------------------------------------

p7Dloc_76E6:				; CODE XREF: seg001:76D7j
		pop	af

p7Dloc_76E7:				; CODE XREF: seg001:76E4j
		inc	de
		inc	hl
		dec	bc
		ld	a, b
		or	c
		jr	nz, p7Dloc_7692
		dec	de
		ld	a, 0F0h	; '�'
		ld	(de), a
		inc	de
		pop	af
		out	(6), a
		xor	a
		ret
; ---------------------------------------------------------------------------

p7Dloc_76F8:				; CODE XREF: seg001:76E2j
		ld	a, 0F0h	; '�'
		ld	(de), a
		pop	af
		out	(6), a
		or	a
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_7700:				; CODE XREF: p7Dsub_4083p	p7Dsub_40A6p ...
		in	a, (2)
		and	80h ; '�'
		ld	a, 1Eh
		ret	z
		ld	a, 7Eh ; '~'
		ret
; End of function p7Dsub_7700

; ---------------------------------------------------------------------------

Page7D_2C28:
		push	af
		inc	a
		ld	(appSearchPage), a
		call	p7Dsub_638B
		ld	a, 14h
		ld	(OP1), a
		ld	bc, 8
		ld	hl, 8484h
		ld	de, 8479h
		ldir
		pop	af
		ret
; ---------------------------------------------------------------------------

Page7D_2BE0:				; CODE XREF: seg001:7194j
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		ld	a, (unk_8434)
		nop
		call	p7Dsub_43F6
		jr	nz, ret8
		ld	a, (unk_8434)
		ld	hl, 4000h
		call	p7Dsub_5E59
		call	p7Dsub_52D9
		jp	c, p7Dloc_774F
		jr	nz, ret9

p7Dloc_774F:				; CODE XREF: seg001:774Aj
		ld	a, (unk_8434)
		ld	hl, 4000h
		call	Page7D_2C9A
		call	p7Dsub_51C3
		ld	a, (unk_8434)
		ld	hl, 4000h
		call	p7Dsub_5E59
		call	p7Dsub_533B
		call	Page7D_2B56
		ld	a, b
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80CFh
; ---------------------------------------------------------------------------
		ld	a, 0FFh
		ld	(ioFlag), a
		call	relockFlashBack
		xor	a
		ret
; ---------------------------------------------------------------------------

ret9:					; CODE XREF: seg001:774Dj
		ld	a, 9
		ret
; ---------------------------------------------------------------------------

ret8:					; CODE XREF: seg001:773Cj
		ld	a, 8
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_777E:				; CODE XREF: p7Dsub_4442+8p p7Dsub_45E4+37p	...
		call	p7Dsub_7700
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Dh
; ---------------------------------------------------------------------------
		ret
; End of function p7Dsub_777E

; ---------------------------------------------------------------------------
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8063h
; ---------------------------------------------------------------------------
		jp	nz, p7Dloc_7813
		ld	a, 1
		ld	de, 8050h
		call	p7Dsub_7060
		jr	nz, p7Dloc_779B
		call	p7Dsub_50C5
		jp	nz, p7Dloc_7810

p7Dloc_779B:				; CODE XREF: seg001:7793j
		call	p7Dsub_7B41
		ld	a, (appInfo)
		cp	0
		jp	nz, p7Dloc_75B4
		di
		ld	a, (ioFlag)
		push	af
		call	p7Dsub_717A
		ld	a, 0
		ld	b, 0
		res	2, (iy+25h)
		call	Page0Call_2EB9
		call	p7Dsub_7182
		pop	af
		ld	(ioFlag), a
		call	p7Dsub_7B72
		or	a
		jp	z, p7Dloc_780D
		push	af
		call	p7Dsub_7BEA
		jr	c, p7Dloc_77D2
		jr	z, p7Dloc_77D2

p7Dloc_77CF:				; CODE XREF: seg001:77EBj
		jp	p7Dloc_780D
; ---------------------------------------------------------------------------

p7Dloc_77D2:				; CODE XREF: seg001:77CBj seg001:77CDj
		call	FindSwapSector
		cp	8
		jr	z, p7Dloc_77F0
		add	a, 4
		ld	b, a
		ld	a, c
		sub	d
		cp	b
		jr	nc, p7Dloc_77F0
		ld	a, 5
		call	Page0Call_2EB9
		call	FindSwapSector
		cp	8
		jr	nz, p7Dloc_77CF
		call	p7Dsub_7182

p7Dloc_77F0:				; CODE XREF: seg001:77D7j seg001:77DFj
		ld	a, (appSearchPage)
		call	Page7D_2C16
		ld	a, 1
		ld	hl, ramStart
		call	Page7D_2C9A
		ld	a, 19h
		ld	(sndRecState), a
		pop	af
		push	af
		di
		xor	a
		ld	(sndRecState), a
		pop	af
		ret
; ---------------------------------------------------------------------------
		ret
; ---------------------------------------------------------------------------

p7Dloc_780D:				; CODE XREF: seg001:77C4j
		; seg001:p7Dloc_77CFj
		jp	ErrMemory
; ---------------------------------------------------------------------------

p7Dloc_7810:				; CODE XREF: seg001:7798j
		jp	Page0Call_253D
; ---------------------------------------------------------------------------

p7Dloc_7813:				; CODE XREF: seg001:7788j
		jp	Page0Call_2539
; ---------------------------------------------------------------------------
		call	popErrorHandleR
		ld	a, 23h ; '#'
		ld	(errNo), a
		or	1
		ret
; ---------------------------------------------------------------------------
		push	af
		ld	(unk_8439), a
		call	p7Dsub_5525
		ld	b, a
		pop	af
		sub	b
		ld	de, 4000h
		push	hl
		or	a
		jr	z, p7Dloc_7855
		push	af

p7Dloc_7833:				; CODE XREF: seg001:7849j
		ld	hl, 4000h
		ld	bc, 4000h
		call	p7Dsub_7865
		pop	af
		dec	a
		or	a
		jr	z, p7Dloc_784B
		push	af
		ld	a, (unk_8439)
		dec	a
		ld	(unk_8439), a
		jr	p7Dloc_7833
; ---------------------------------------------------------------------------

p7Dloc_784B:				; CODE XREF: seg001:783Fj
		ld	hl, 4000h
		ld	a, (unk_8439)
		dec	a
		ld	(unk_8439), a

p7Dloc_7855:				; CODE XREF: seg001:7830j
		pop	hl
		ld	de, 4000h
		or	a
		sbc	hl, de
		push	hl
		pop	bc
		ld	hl, 4000h
		call	p7Dsub_7865
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_7865:				; CODE XREF: seg001:7839p seg001:7861p ...
		push	hl
		push	bc
		ld	a, (unk_8439)
		ld	de, ramStart
		ld	bc, 100h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8054h
; ---------------------------------------------------------------------------
		pop	bc
		ld	hl, 100h
		or	a
		sbc	hl, bc
		jr	nc, p7Dloc_7882
		push	bc
		ld	bc, 100h
		jr	p7Dloc_7883
; ---------------------------------------------------------------------------

p7Dloc_7882:				; CODE XREF: p7Dsub_7865+15j
		push	bc

p7Dloc_7883:				; CODE XREF: p7Dsub_7865+1Bj
		ld	hl, ramStart
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8090h
; ---------------------------------------------------------------------------
		ex	de, hl
		pop	hl
		ld	bc, 100h
		or	a
		sbc	hl, bc
		push	hl
		pop	bc
		ex	de, hl
		jr	z, p7Dloc_78A1
		jr	c, p7Dloc_78A1
		pop	hl
		push	bc
		ld	de, 100h
		add	hl, de
		pop	bc
		jr	p7Dsub_7865
; ---------------------------------------------------------------------------

p7Dloc_78A1:				; CODE XREF: p7Dsub_7865+2Fj p7Dsub_7865+31j
		pop	hl
		ret
; End of function p7Dsub_7865


; =============== S U B	R O U T	I N E =======================================


p7Dsub_78A3:				; CODE XREF: p7Dsub_795C+1Bp p7Dsub_795C+24p ...
		push	af
		push	hl
		push	bc
		ld	b, 8

p7Dloc_78A8:				; CODE XREF: p7Dsub_78A3+19j
		ld	c, a
		xor	e
		rr	d
		rr	e
		and	1
		jr	z, p7Dloc_78BA
		ld	a, 8
		xor	e
		ld	e, a
		ld	a, 84h ; '�'
		xor	d
		ld	d, a

p7Dloc_78BA:				; CODE XREF: p7Dsub_78A3+Dj
		ld	a, c
		rra
		djnz	p7Dloc_78A8
		pop	bc
		pop	hl
		pop	af
		ret
; End of function p7Dsub_78A3


; =============== S U B	R O U T	I N E =======================================


p7Dsub_78C2:				; CODE XREF: p7Dsub_795C+7Dp p7Dsub_7AD0+50p
		push	hl
		push	bc
		push	af
		ld	de, 0FFFFh
		ld	a, b
		or	c
		jr	z, p7Dloc_78F1

p7Dloc_78CC:				; CODE XREF: p7Dsub_78C2+2Dj
		ld	a, (hl)
		inc	hl
		push	af
		push	hl
		push	bc
		ld	b, 8

p7Dloc_78D3:				; CODE XREF: p7Dsub_78C2+25j
		ld	c, a
		xor	e
		rr	d
		rr	e
		and	1
		jr	z, p7Dloc_78E5
		ld	a, 8
		xor	e
		ld	e, a
		ld	a, 84h ; '�'
		xor	d
		ld	d, a

p7Dloc_78E5:				; CODE XREF: p7Dsub_78C2+19j
		ld	a, c
		rra
		djnz	p7Dloc_78D3
		pop	bc
		pop	hl
		pop	af
		dec	bc
		ld	a, b
		or	c
		jr	nz, p7Dloc_78CC

p7Dloc_78F1:				; CODE XREF: p7Dsub_78C2+8j
		pop	af
		pop	bc
		pop	hl
		ret
; End of function p7Dsub_78C2


; =============== S U B	R O U T	I N E =======================================


p7Dsub_78F5:				; CODE XREF: p7Dsub_7915:p7Dloc_791Fp
		; p7Dsub_794D+6p ...
		push	hl
		push	de
		push	bc
		ld	hl, p7Dloc_790F
		call	APP_PUSH_ERRORH
		call	j_RecAByteIO
		ld	l, a
		call	APP_POP_ERRORH
		bit	4, (iy+9)
		jr	nz, p7Dloc_790F
		xor	a
		ld	a, l
		jr	p7Dloc_7911
; ---------------------------------------------------------------------------

p7Dloc_790F:				; CODE XREF: p7Dsub_78F5+14j
		or	0FFh

p7Dloc_7911:				; CODE XREF: p7Dsub_78F5+18j
		pop	bc
		pop	de
		pop	hl
		ret
; End of function p7Dsub_78F5


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7915:				; CODE XREF: p7Dsub_795C+78p
		push	hl
		push	bc
		push	af
		ld	de, 0
		ld	a, b
		or	c
		jr	z, p7Dloc_792D

p7Dloc_791F:				; CODE XREF: p7Dsub_7915+15j
		call	p7Dsub_78F5
		jr	nz, p7Dloc_792D
		ld	(hl), a
		inc	hl
		inc	de
		dec	bc
		ld	a, b
		or	c
		jr	nz, p7Dloc_791F
		xor	a

p7Dloc_792D:				; CODE XREF: p7Dsub_7915+8j p7Dsub_7915+Dj
		pop	bc
		ld	a, b
		pop	bc
		pop	hl
		ret
; End of function p7Dsub_7915


; =============== S U B	R O U T	I N E =======================================


LinkStatus:				; CODE XREF: p7Dsub_794D:p7Dloc_794Ep
		push	bc
		push	af
		call	NZIf83Plus
		jr	z, p7Dloc_7945
		in	a, (0)
		and	3
		jr	z, p7Dloc_7949
		cp	3
		jr	z, p7Dloc_7949
		jr	p7Dloc_7949
; ---------------------------------------------------------------------------

p7Dloc_7945:				; CODE XREF: LinkStatus+5j
		in	a, (9)
		and	58h ; 'X'

p7Dloc_7949:				; CODE XREF: LinkStatus+Bj
		; LinkStatus+Fj ...
		pop	bc
		ld	a, b
		pop	bc
		ret
; End of function LinkStatus


; =============== S U B	R O U T	I N E =======================================


p7Dsub_794D:				; CODE XREF: p7Dsub_795C:p7Dloc_79F0p
		push	af

p7Dloc_794E:				; CODE XREF: p7Dsub_794D+Bj
		call	LinkStatus
		jr	z, p7Dloc_795A
		call	p7Dsub_78F5
		jr	nz, p7Dloc_795A
		jr	p7Dloc_794E
; ---------------------------------------------------------------------------

p7Dloc_795A:				; CODE XREF: p7Dsub_794D+4j p7Dsub_794D+9j
		pop	af
		ret
; End of function p7Dsub_794D


; =============== S U B	R O U T	I N E =======================================


p7Dsub_795C:				; CODE XREF: seg001:7A30p
		push	ix
		ld	ix, 0
		add	ix, sp
		push	hl
		push	de
		push	af
		push	af
		push	af
		ld	de, 0FFFFh
		call	p7Dsub_78F5
		jp	nz, p7Dloc_79F0
		call	p7Dsub_78F5
		jr	nz, p7Dloc_79F0
		call	p7Dsub_78A3
		ld	h, a
		call	p7Dsub_78F5
		jr	nz, p7Dloc_79F0
		call	p7Dsub_78A3
		ld	l, a
		ld	(ix+0F9h), h
		ld	(ix+0F8h), l
		call	p7Dsub_78F5
		jr	nz, p7Dloc_79F0
		call	p7Dsub_78A3
		ld	h, a
		call	p7Dsub_78F5
		jr	nz, p7Dloc_79F0
		call	p7Dsub_78A3
		ld	l, a
		ld	(ix+0FBh), h
		ld	(ix+0FAh), l
		call	p7Dsub_78F5
		jr	nz, p7Dloc_79F0
		ld	h, a
		call	p7Dsub_78F5
		jr	nz, p7Dloc_79F0
		ld	l, a
		and	a
		sbc	hl, de
		jr	nz, p7Dloc_79F0
		ld	d, (ix+0FBh)
		ld	e, (ix+0FAh)
		ld	a, d
		or	e
		jr	z, p7Dloc_79F5
		ld	h, (ix+0FDh)
		ld	l, (ix+0FCh)
		and	a
		sbc	hl, de
		jr	c, p7Dloc_79F0
		ld	h, (ix+0FFh)
		ld	l, (ix+0FEh)
		ld	b, (ix+0FBh)
		ld	c, (ix+0FAh)
		call	p7Dsub_7915
		jr	nz, p7Dloc_79F0
		call	p7Dsub_78C2
		call	p7Dsub_78F5
		jr	nz, p7Dloc_79F0
		ld	h, a
		call	p7Dsub_78F5
		jr	nz, p7Dloc_79F0
		ld	l, a
		and	a
		sbc	hl, de
		jr	nz, p7Dloc_79F0
		xor	a
		jr	p7Dloc_79F5
; ---------------------------------------------------------------------------

p7Dloc_79F0:				; CODE XREF: p7Dsub_795C+13j p7Dsub_795C+19j ...
		call	p7Dsub_794D
		or	0FFh

p7Dloc_79F5:				; CODE XREF: p7Dsub_795C+5Fj p7Dsub_795C+92j
		pop	bc
		ld	a, b
		pop	bc
		pop	de
		pop	hl
		pop	hl
		pop	ix
		ret
; End of function p7Dsub_795C

; ---------------------------------------------------------------------------
		push	ix
		ld	ix, 0
		add	ix, sp
		push	hl
		push	de
		push	af
		push	af
		push	af
		push	af
		ld	b, 0
		ld	a, c
		or	a
		jr	z, p7Dloc_7A17
		dec	c
		cp	33h ; '3'
		jr	c, p7Dloc_7A19

p7Dloc_7A17:				; CODE XREF: seg001:7A10j
		ld	c, 32h ; '2'

p7Dloc_7A19:				; CODE XREF: seg001:7A15j seg001:7A50j
		ld	(ix+0F7h), b
		ld	(ix+0F6h), c
		call	p7Dsub_7A8D
		jr	nz, p7Dloc_7A52
		ld	h, (ix+0FFh)
		ld	l, (ix+0FEh)
		ld	d, (ix+0FDh)
		ld	e, (ix+0FCh)
		call	p7Dsub_795C
		ld	(ix+0FBh), d
		ld	(ix+0FAh), e
		ld	(ix+0F9h), b
		ld	(ix+0F8h), c
		jr	z, p7Dloc_7A59
		ld	b, (ix+0F7h)
		ld	c, (ix+0F6h)
		bit	4, (iy+9)
		jr	nz, p7Dloc_7A52
		dec	bc
		ld	a, b
		or	c
		jr	nz, p7Dloc_7A19

p7Dloc_7A52:				; CODE XREF: seg001:7A22j seg001:7A4Bj
		call	p7Dsub_7A85
		or	0FFh
		jr	p7Dloc_7A5D
; ---------------------------------------------------------------------------

p7Dloc_7A59:				; CODE XREF: seg001:7A3Fj
		call	p7Dsub_7A75
		xor	a

p7Dloc_7A5D:				; CODE XREF: seg001:7A57j
		pop	bc
		ld	a, b
		pop	bc
		pop	bc
		pop	de
		pop	hl
		pop	hl
		pop	ix
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_7A67:				; CODE XREF: p7Dsub_7A75+3p seg001:7A80p	...
		push	hl
		push	de
		ld	hl, 0
		ld	de, 0
		call	p7Dsub_7AD0
		pop	de
		pop	hl
		ret
; End of function p7Dsub_7A67


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7A75:				; CODE XREF: seg001:p7Dloc_7A59p
		push	bc
		ld	b, 1
		call	p7Dsub_7A67
		pop	bc
		ret
; End of function p7Dsub_7A75

; ---------------------------------------------------------------------------
		push	bc
		ld	b, 2
		call	p7Dsub_7A67
		pop	bc
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_7A85:				; CODE XREF: seg001:p7Dloc_7A52p
		push	bc
		ld	b, 4
		call	p7Dsub_7A67
		pop	bc
		ret
; End of function p7Dsub_7A85


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7A8D:				; CODE XREF: seg001:7A1Fp
		bit	4, (iy+9)
		res	4, (iy+9)
		ret
; End of function p7Dsub_7A8D


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7A96:				; CODE XREF: p7Dsub_7AB7+8p p7Dsub_7AD0+11p	...
		push	hl
		push	de
		push	bc
		push	af
		ld	hl, p7Dloc_7AAF
		call	APP_PUSH_ERRORH
		call	j_SendAByte
		call	APP_POP_ERRORH
		bit	4, (iy+9)
		jr	nz, p7Dloc_7AAF
		xor	a
		jr	p7Dloc_7AB1
; ---------------------------------------------------------------------------

p7Dloc_7AAF:				; CODE XREF: p7Dsub_7A96+14j
		or	0FFh

p7Dloc_7AB1:				; CODE XREF: p7Dsub_7A96+17j
		pop	bc
		ld	a, b
		pop	bc
		pop	de
		pop	hl
		ret
; End of function p7Dsub_7A96


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7AB7:				; CODE XREF: p7Dsub_7AD0+53p
		push	hl
		push	bc
		push	af
		ld	a, b
		or	c
		jr	z, p7Dloc_7ACB

p7Dloc_7ABE:				; CODE XREF: p7Dsub_7AB7+11j
		ld	a, (hl)
		call	p7Dsub_7A96
		jr	nz, p7Dloc_7ACB
		inc	hl
		dec	bc
		ld	a, b
		or	c
		jr	nz, p7Dloc_7ABE
		xor	a

p7Dloc_7ACB:				; CODE XREF: p7Dsub_7AB7+5j p7Dsub_7AB7+Bj
		pop	bc
		ld	a, b
		pop	bc
		pop	hl
		ret
; End of function p7Dsub_7AB7


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7AD0:				; CODE XREF: p7Dsub_7A67+8p
		push	ix
		ld	ix, 0
		add	ix, sp
		push	hl
		push	de
		push	bc
		push	af
		ld	de, 0FFFFh
		ld	a, 5Bh ; '['
		call	p7Dsub_7A96
		jr	nz, p7Dloc_7B37
		ld	a, b
		call	p7Dsub_78A3
		call	p7Dsub_7A96
		jr	nz, p7Dloc_7B37
		ld	a, c
		call	p7Dsub_78A3
		call	p7Dsub_7A96
		jr	nz, p7Dloc_7B37
		ld	b, (ix+0FDh)
		ld	c, (ix+0FCh)
		ld	a, b
		call	p7Dsub_78A3
		call	p7Dsub_7A96
		jr	nz, p7Dloc_7B37
		ld	a, c
		call	p7Dsub_78A3
		call	p7Dsub_7A96
		jr	nz, p7Dloc_7B37
		ld	a, d
		call	p7Dsub_7A96
		jr	nz, p7Dloc_7B37
		ld	a, e
		call	p7Dsub_7A96
		jr	nz, p7Dloc_7B37
		ld	a, b
		or	c
		jr	z, p7Dloc_7B34
		call	p7Dsub_78C2
		call	p7Dsub_7AB7
		jr	nz, p7Dloc_7B37
		ld	a, d
		call	p7Dsub_7A96
		jr	nz, p7Dloc_7B37
		ld	a, e
		call	p7Dsub_7A96
		jr	nz, p7Dloc_7B37

p7Dloc_7B34:				; CODE XREF: p7Dsub_7AD0+4Ej
		xor	a
		jr	p7Dloc_7B39
; ---------------------------------------------------------------------------

p7Dloc_7B37:				; CODE XREF: p7Dsub_7AD0+14j p7Dsub_7AD0+1Dj ...
		or	0FFh

p7Dloc_7B39:				; CODE XREF: p7Dsub_7AD0+65j
		pop	bc
		ld	a, b
		pop	bc
		pop	de
		pop	hl
		pop	ix
		ret
; End of function p7Dsub_7AD0


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7B41:				; CODE XREF: seg001:p7Dloc_779Bp
		call	ZeroOP1
		ld	a, 1
		or	a
		ld	hl, ramStart
		ld	de, 8040h
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8075h
; ---------------------------------------------------------------------------
		jp	nz, p7Dloc_75B1
		inc	hl
		ld	a, 1
		rst	28h
; ---------------------------------------------------------------------------
		.dw 805Ah
; ---------------------------------------------------------------------------
		ld	de, 8479h
		ldir
		ld	hl, (appSearchPage)
		push	hl
		call	p7Dsub_6186
		jr	c, p7Dloc_7B6D
		ld	(appInfo+1), a
		call	Page7D_2BE6

p7Dloc_7B6D:				; CODE XREF: p7Dsub_7B41+24j
		pop	hl
		ld	(appSearchPage), hl
		ret
; End of function p7Dsub_7B41


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7B72:				; CODE XREF: seg001:71BEp
		; p7Dsub_7240+1BCp ...
		call	p7Dsub_75EC

p7Dloc_7B75:				; CODE XREF: p7Dsub_7B72+24j
		ld	hl, 4000h
		push	af
		call	Page7D_2CD0
		cp	80h ; '�'
		jr	z, p7Dloc_7B84
		cp	0
		jr	nz, p7Dloc_7B9C

p7Dloc_7B84:				; CODE XREF: p7Dsub_7B72+Cj
		pop	af
		call	Page0Call_3E31
		jr	nz, p7Dloc_7B9A
		call	FindAppNumPages
		ld	b, a
		ld	a, c
		or	a
		jr	z, p7Dloc_7B98
		ld	a, b
		sub	c
		cp	8
		jr	nc, p7Dloc_7B75

p7Dloc_7B98:				; CODE XREF: p7Dsub_7B72+1Ej
		xor	a
		ret
; ---------------------------------------------------------------------------

p7Dloc_7B9A:				; CODE XREF: p7Dsub_7B72+16j p7Dsub_7B72+2Ej
		cp	a
		ret
; ---------------------------------------------------------------------------

p7Dloc_7B9C:				; CODE XREF: p7Dsub_7B72+10j
		cp	0FFh
		pop	bc
		ld	a, b
		jr	nz, p7Dloc_7B9A
		or	a
		ret
; End of function p7Dsub_7B72


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7BA4:				; CODE XREF: seg001:60F7p
		xor	a
		ld	b, 0Eh
		ld	hl, 9C88h

p7Dloc_7BAA:				; CODE XREF: p7Dsub_7BA4+8j
		ld	(hl), a
		inc	hl
		djnz	p7Dloc_7BAA
		ret
; End of function p7Dsub_7BA4


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7BAF:				; CODE XREF: seg001:610Fp
		call	p7Dsub_7BBA
		or	(hl)
		ld	(hl), a
		ret
; End of function p7Dsub_7BAF


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7BB5:				; CODE XREF: p7Dsub_638B+1Ap
		call	p7Dsub_7BBA
		and	(hl)
		ret
; End of function p7Dsub_7BB5


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7BBA:				; CODE XREF: p7Dsub_7BAFp	p7Dsub_7BB5p
		sub	8
		ld	hl, 9C88h
		ld	c, a
		ld	b, 0
		sra	c
		sra	c
		sra	c
		add	hl, bc
		and	7
		ld	c, a
; End of function p7Dsub_7BBA


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7BCC:				; CODE XREF: p7Dsub_519D+6p p7Dsub_51C3+6p ...
		ld	b, c
		ld	a, 80h ; '�'
		inc	b

p7Dloc_7BD0:				; CODE XREF: p7Dsub_7BCC+5j
		rlca
		djnz	p7Dloc_7BD0
		ret
; End of function p7Dsub_7BCC


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7BD4:				; CODE XREF: p7Dsub_662F:p7Dloc_6638p
		; seg001:6A9Dp	...
		bit	0, (iy+12h)
		ret	z
		push	af
		push	bc
		push	de
		push	hl
		ld	a, 1
		ld	(indicCounter), a
		call	page0_1BF
		pop	hl
		pop	de
		pop	bc
		pop	af
		ret
; End of function p7Dsub_7BD4


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7BEA:				; CODE XREF: p7Dsub_7240+1C4p
		; seg001:77C8p

; FUNCTION CHUNK AT 72A5 SIZE 0000002D BYTES

		ld	(appSearchPage+1), a
		ld	(appSearchPage), a
		ld	(unk_8434), a
		call	p7Dsub_5DC7
		ret	c
		ret	z
		ld	a, e
		or	a
		jp	z, Page7D_2BBC
		ld	a, 6
		call	Page0Call_2EB9
		jp	z, Page7D_2BBC
		call	p7Dsub_7182
		ld	a, (unk_8434)
		call	p7Dsub_5DC7
		ret
; End of function p7Dsub_7BEA

; ---------------------------------------------------------------------------

Page7D_3EB8:
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	Page7D_2B56
		ld	a, b
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80CFh
; ---------------------------------------------------------------------------
		jp	relockFlashBack
; ---------------------------------------------------------------------------

DoNothing2:
		ret
; ---------------------------------------------------------------------------
		jp	nz, p7Dloc_7C2E

p7Dloc_7C2E:
		call	popErrorHandleR
		ld	a, 23h ; '#'
		ld	(errNo), a
		pop	hl
		ld	(freeRAM), hl
		call	p7Dsub_7C64
		jr	z, p7Dloc_7C4D
		call	OP4ToOP1
		call	ChkFindSym
		call	nc, DelVarArc
		call	relockFlashBack
		jr	p7Dloc_7C61
; ---------------------------------------------------------------------------

p7Dloc_7C4D:				; CODE XREF: seg001:7C3Dj
		call	ChkFindSym
		ex	de, hl
		ld	bc, (freeRAM)
		dec	bc
		dec	bc
		ld	(hl), c
		inc	hl
		ld	(hl), b
		dec	hl
		ex	de, hl
		ld	a, 3
		call	DELVARIO

p7Dloc_7C61:				; CODE XREF: seg001:7C4Bj
		or	1
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_7C64:				; CODE XREF: seg001:7C3Ap
		push	hl
		ld	hl, ioNewData
		bit	7, (hl)
		pop	hl
		ret
; End of function p7Dsub_7C64

; ---------------------------------------------------------------------------
		call	page0_17B0
		jr	z, p7Dloc_7C7D
		call	ISO1NONTEMPLST
		jr	nz, p7Dloc_7C84
		push	bc
		call	CMPPRGNAMLEN
		inc	a
		jr	p7Dloc_7C81
; ---------------------------------------------------------------------------

p7Dloc_7C7D:				; CODE XREF: seg001:7C6Fj
		push	bc
		call	CMPPRGNAMLEN

p7Dloc_7C81:				; CODE XREF: seg001:7C7Bj
		pop	bc
		or	a
		ret
; ---------------------------------------------------------------------------

p7Dloc_7C84:				; CODE XREF: seg001:7C74j
		xor	a
		scf
		ret
; ---------------------------------------------------------------------------
		push	hl
		ld	hl, (unk_83F7)
		or	a
		sbc	hl, bc
		jp	c, ErrMemory
		ld	(unk_83F7), hl
		pop	hl
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_7C96:				; CODE XREF: p7Dsub_7D67+36p
		call	NZIf83Plus
		jr	nz, p7Dloc_7CA0
		and	7Fh ; ''
		cp	6Ah ; 'j'
		ret
; ---------------------------------------------------------------------------

p7Dloc_7CA0:				; CODE XREF: p7Dsub_7C96+3j
		and	1Fh
		cp	16h
		ret
; End of function p7Dsub_7C96


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7CA5:				; CODE XREF: p7Dsub_7240+10Ap
		ld	a, (unk_83A4)
		or	a
		ret	z
		ld	a, (unk_83A3)
		inc	a
		ld	(unk_83A3), a
		ret
; End of function p7Dsub_7CA5


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7CB2:				; CODE XREF: p7Dsub_6428+Bp p7Dsub_733Bp ...
		push	bc
		ld	b, a
		ld	a, (sndRecState)
		inc	a
		ld	a, b
		pop	bc
		ret
; End of function p7Dsub_7CB2


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7CBB:				; CODE XREF: seg001:p7Dloc_7234p
		; p7Dsub_7240+119p
		ld	a, (ramCodeEnd)
		cp	0
		ret	z
		push	hl
		call	p7Dsub_578D
		ld	a, l
		or	h
		pop	hl
		ret	nz
		ld	a, 0
		ld	(unk_83A4), a
		ret
; End of function p7Dsub_7CBB


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7CCF:				; CODE XREF: p7Dsub_7240+285p
		; p7Dsub_7240:p7Dloc_7535p ...
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8057h
; End of function p7Dsub_7CCF

; ---------------------------------------------------------------------------
		call	Page7D_2BEC
		ld	de, 1DE2h
		add	hl, de
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_7CDA:				; CODE XREF: seg001:7E7Dp
		push	af
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	Page0Call_2ECB
		call	p7Dsub_7CCF
		push	hl
		ld	b, 8

p7Dloc_7CF5:				; CODE XREF: p7Dsub_7CDA+23j
		call	p7Dsub_4566
		cp	0FFh
		jr	nz, p7Dloc_7D01
		inc	hl
		djnz	p7Dloc_7CF5
		jr	p7Dloc_7D04
; ---------------------------------------------------------------------------

p7Dloc_7D01:				; CODE XREF: p7Dsub_7CDA+20j
		call	Page7D_2BB0

p7Dloc_7D04:				; CODE XREF: p7Dsub_7CDA+25j
		ld	hl, 7FFEh
		ld	(OP1+1), hl
		ld	a, (arcInfo)
		ld	(unk_847B), a
		ld	hl, (arcInfo+1)
		call	p7Dsub_69D4
		jr	nz, p7Dloc_7D19
		inc	hl

p7Dloc_7D19:				; CODE XREF: p7Dsub_7CDA+3Cj
		inc	hl
		inc	hl
		inc	hl
		ld	de, (unk_83F5)
		add	hl, de
		ld	(unk_847C), hl
		ld	(iMathPtr5), hl
		ld	de, (unk_83F7)
		bit	7, d
		jr	z, p7Dloc_7D33
		inc	a
		inc	a
		res	7, d

p7Dloc_7D33:				; CODE XREF: p7Dsub_7CDA+53j
		bit	6, d
		jr	z, p7Dloc_7D3A
		inc	a
		res	6, d

p7Dloc_7D3A:				; CODE XREF: p7Dsub_7CDA+5Bj
		add	hl, de
		bit	7, h
		jr	z, p7Dloc_7D44
		inc	a
		res	7, h
		set	6, h

p7Dloc_7D44:				; CODE XREF: p7Dsub_7CDA+63j
		ld	(unk_847E), a
		ld	(unk_847F), hl
		ld	bc, 8
		ld	hl, 8479h
		call	p7Dsub_7700
		pop	de
		rst	28h
; ---------------------------------------------------------------------------
		.dw 8087h
; ---------------------------------------------------------------------------
		call	relockFlashBack
		set	3, (iy+26h)
		call	Page7D_2EB0
		pop	af
		ld	hl, (unk_83F1)
		ld	(hl), a
		ret
; End of function p7Dsub_7CDA


; =============== S U B	R O U T	I N E =======================================


p7Dsub_7D67:				; CODE XREF: seg001:71A3j p7Dsub_7E40+13p
		ld	a, (pagedCount)
		or	a
		ret	z
		push	bc
		push	de
		push	hl
		ld	c, a
		xor	a
		ld	(pagedCount), a
		ld	hl, pagedBuf
		ld	(pagedGetPtr), hl
		ld	de, (iMathPtr5)
		ld	a, (arcInfo)
		push	de
		ld	(Abackup), a
		ld	a, i
		di
		push	af
		ld	a, (Abackup)
		push	af
		ld	a, 1
		nop
		di
		nop
		nop
		im	1
		di
		out	(14h), a
		di
		call	checkForFlashTrickery
		pop	af
		call	p7Dsub_7C96
		jr	nc, p7Dloc_7E0D
		cp	8
		jr	c, p7Dloc_7E0D
		call	p7Dsub_7CCF
		call	p7Dsub_4566
		cp	0FEh ; '�'
		jr	nz, p7Dloc_7E0D
		call	p7Dsub_4565
		cp	7Fh ; ''
		jr	nz, p7Dloc_7E0D
		call	p7Dsub_4565
		ld	b, a
		ld	a, (arcInfo)
		cp	b
		jr	c, p7Dloc_7E0D
		jr	nz, p7Dloc_7DD3
		call	p7Dsub_455C
		push	hl
		ld	hl, (iMathPtr5)
		call	CpHLDE
		ex	de, hl
		pop	hl
		jr	c, p7Dloc_7E0D
		jr	p7Dloc_7DD9
; ---------------------------------------------------------------------------

p7Dloc_7DD3:				; CODE XREF: p7Dsub_7D67+5Aj
		ld	de, (iMathPtr5)
		inc	hl
		inc	hl

p7Dloc_7DD9:				; CODE XREF: p7Dsub_7D67+6Aj
		ld	a, (arcInfo)
		ld	b, 0
		ex	de, hl
		add	hl, bc
		call	Page0Call_23FC
		jr	nc, p7Dloc_7DE6
		inc	a

p7Dloc_7DE6:				; CODE XREF: p7Dsub_7D67+7Cj
		ld	b, a
		ex	de, hl
		call	p7Dsub_4565
		cp	b
		jr	c, p7Dloc_7E0D
		jr	nz, p7Dloc_7DFC
		push	de
		call	p7Dsub_455C
		pop	hl
		dec	hl
		call	CpHLDE
		ex	de, hl
		jr	nc, p7Dloc_7E0D

p7Dloc_7DFC:				; CODE XREF: p7Dsub_7D67+87j
		ld	de, (iMathPtr5)
		ld	hl, pagedBuf
		ld	b, 0
		ld	a, (arcInfo)
		rst	28h
; ---------------------------------------------------------------------------
		.dw 80C9h
; ---------------------------------------------------------------------------
		jr	p7Dloc_7E0E
; ---------------------------------------------------------------------------

p7Dloc_7E0D:				; CODE XREF: p7Dsub_7D67+39j p7Dsub_7D67+3Dj ...
		nop

p7Dloc_7E0E:				; CODE XREF: p7Dsub_7D67+A4j
		call	relockFlashBack
		ld	(Abackup), a
		pop	af
		jp	po, p7Dloc_7E19
		ei

p7Dloc_7E19:				; CODE XREF: p7Dsub_7D67+AEj
		ld	a, (Abackup)
		ld	(iMathPtr5), de
		pop	hl
		or	a
		sbc	hl, de
		jr	c, p7Dloc_7E2D
		ld	a, (arcInfo)
		inc	a
		ld	(arcInfo), a

p7Dloc_7E2D:				; CODE XREF: p7Dsub_7D67+BDj
		pop	hl
		pop	de
		pop	bc
		ret
; End of function p7Dsub_7D67

; ---------------------------------------------------------------------------

p7Dloc_7E31:				; CODE XREF: seg001:719Ej seg001:7E3Dj
		ld	a, (hl)
		inc	hl
		push	hl
		push	bc
		call	p7Dsub_7E40
		pop	bc
		pop	hl
		dec	bc
		ld	a, c
		or	b
		jr	nz, p7Dloc_7E31
		ret

; =============== S U B	R O U T	I N E =======================================


p7Dsub_7E40:				; CODE XREF: seg001:7E35p
		push	hl
		ld	hl, (pagedGetPtr)
		ld	(hl), a
		inc	hl
		ld	(pagedGetPtr), hl
		pop	hl
		ld	a, (pagedCount)
		inc	a
		ld	(pagedCount), a
		cp	10h
		call	z, p7Dsub_7D67
		ret
; End of function p7Dsub_7E40

; ---------------------------------------------------------------------------

p7Dloc_7E57:				; CODE XREF: seg001:7199j
		dec	hl
		dec	hl
		ld	a, (hl)
		inc	hl
		inc	hl
		cp	4
		jr	c, p7Dloc_7E66
		call	DelVarArc
		jp	Page0Call_2555
; ---------------------------------------------------------------------------

p7Dloc_7E66:				; CODE XREF: seg001:7E5Ej
		ld	a, (OP1+1)
		cp	24h ; '$'
		jp	z, Page0Call_24B5
		call	Page0Call_2EE9
		jp	z, Page0Call_24B5
		ld	a, (hl)
		push	af
		and	1Fh
		ld	(hl), a
		call	Page0Call_2ED1
		pop	af
		call	p7Dsub_7CDA
		xor	a
		ld	(pagedCount), a
		push	hl
		ld	hl, pagedBuf
		ld	(pagedGetPtr), hl
		pop	hl
		ret

p7Dloc_7E8D:				; CODE XREF: seg001:71A8j
		call	Page0Call_2C91
		ret

p7Dloc_7E91:				; CODE XREF: seg001:71ADj
		call	page0_1F38
		ret

.org	$7FFF
		.db  5Dh	; ]
