diff -r ce97578b771e -r 59f60baeaf6a source/page7D/initial.asm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/source/page7D/initial.asm Wed May 07 06:24:31 2014 -0400 @@ -0,0 +1,12811 @@ +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:6A61p + 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:401Cp + ; DeleteApp+17p ... + 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+33j + 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+Aj + ret +; --------------------------------------------------------------------------- + +p7Dloc_4078: ; CODE XREF: Page7D_2BE6+13j + 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_7549p + ; p7Dsub_7CDA:p7Dloc_7D01p + 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+86p + ; p7Dsub_430E+2Ap + call p7Dsub_7700 + push bc + push hl + push de + push af + +p7Dloc_408A: ; CODE XREF: p7Dsub_4083+1Cj + 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:5807p seg001:595Ep + call p7Dsub_7700 +; End of function p7Dsub_40A6 + + +p7Dloc_40A9: ; CODE XREF: seg001:58A2p + push bc + push hl + push de + push af + +p7Dloc_40AD: ; CODE XREF: seg001:40C5j + 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+4p p7Dsub_519D+19p ... + 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+Ej + 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+17j + 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+8Dj + ; Page7D_2B62:p7Dloc_4178j + 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+60j + 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+7Ej + 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+50j + 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+9Bj + jp p7Dloc_4117 +; --------------------------------------------------------------------------- + +p7Dloc_417B: ; CODE XREF: Page7D_2B62+54j + ; Page7D_2B62+6Aj + 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+BCj + call p7Dsub_4261 + call p7Dsub_4211 + call p7Dsub_427C + call p7Dsub_4230 + jr p7Dloc_41E2 +; --------------------------------------------------------------------------- + +p7Dloc_41B2: ; CODE XREF: Page7D_2B62+C0j + call p7Dsub_4214 + call p7Dsub_425E + call p7Dsub_427C + call p7Dsub_4238 + jr p7Dloc_41E2 +; --------------------------------------------------------------------------- + +p7Dloc_41C0: ; CODE XREF: Page7D_2B62+C4j + call p7Dsub_4214 + call p7Dsub_42A2 + call p7Dsub_4269 + call p7Dsub_428F + call p7Dsub_4238 + jr p7Dloc_41E2 +; --------------------------------------------------------------------------- + +p7Dloc_41D1: ; CODE XREF: Page7D_2B62+C8j + call p7Dsub_42A2 + call p7Dsub_425E + call p7Dsub_428F + call p7Dsub_4211 + jr p7Dloc_41E2 +; --------------------------------------------------------------------------- + +p7Dloc_41DF: ; CODE XREF: Page7D_2B62+B2j + ; Page7D_2B62+B8j + call p7Dsub_427F + +p7Dloc_41E2: ; CODE XREF: Page7D_2B62+D6j + ; Page7D_2B62+E4j ... + 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+136j + 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+CDp + ; Page7D_2B62+DBp ... + 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_41B2p + ; Page7D_2B62:p7Dloc_41C0p + call p7Dsub_522B + ld bc, 66h ; 'f' + +p7Dloc_421A: ; CODE XREF: p7Dsub_4261+6j p7Dsub_427F+6j ... + ld de, tempSwapArea + +p7Dloc_421D: ; CODE XREF: p7Dsub_4269+9j p7Dsub_42A2+9j + 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+D3p + 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+E1p + 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+EFp + ; Page7D_2B62+100p + call p7Dsub_522B + ld bc, 66h ; 'f' + +p7Dloc_423E: ; CODE XREF: p7Dsub_4228+6j p7Dsub_4230+6j + 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_4211p Page7D_2B86+13p + call p7Dsub_522B + ld bc, 66h ; 'f' + +p7Dloc_4249: ; CODE XREF: p7Dsub_4238+9j p7Dsub_4274+6j ... + ld de, tempSwapArea +; End of function p7Dsub_4243 + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_424C: ; CODE XREF: p7Dsub_4253+9j p7Dsub_42DF+12p ... + 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+16p + ; Page7D_2B86+1Ep + 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+D0p + ; Page7D_2B62+E9p ... + 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_41A4p + 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+FAp + 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_425Ep + ; Page7D_2B86:p7Dloc_47D1p + 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+DEp + ; Page7D_2B62+ECp + call p7Dsub_4287 +; End of function p7Dsub_427C + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_427F: ; CODE XREF: Page7D_2B62+CAp + ; Page7D_2B62:p7Dloc_41DFp + 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_427Cp + ; Page7D_2B86:p7Dloc_47D9p + 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+FDp + ; Page7D_2B62+10Bp + 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_428Fp + 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+F7p + ; Page7D_2B62:p7Dloc_41D1p + 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+13Ep + ; p7Dsub_42AE+23j ... + 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+3p seg001:57F5p + 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+36p + ; p7Dsub_468A+19p + push bc + push hl + push de + call p7Dsub_42D3 + pop de + pop hl + pop bc + +p7Dloc_42E8: ; CODE XREF: p7Dsub_42DF+2Cj + 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+33p p7Dsub_5083-Fp + 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+14j + 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+1Ej p7Dsub_430E+22j + 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:4378j + 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:439Dj + ld hl, 320h + cp l + jr nz, p7Dloc_43C4 + rst 28h +; --------------------------------------------------------------------------- + .dw 80CCh +; --------------------------------------------------------------------------- + jr p7Dloc_43DA +; --------------------------------------------------------------------------- + +p7Dloc_43C4: ; CODE XREF: seg001:43BDj + ld de, 0A20h + rst 28h +; --------------------------------------------------------------------------- + .dw 8027h +; --------------------------------------------------------------------------- + jr nz, p7Dloc_43DA + call p7Dsub_4574 + +p7Dloc_43CF: ; CODE XREF: seg001:43B7j + dec hl + inc bc + call p7Dsub_7700 + ld de, ramStart + rst 28h +; --------------------------------------------------------------------------- + .dw 8054h +; --------------------------------------------------------------------------- + +p7Dloc_43DA: ; CODE XREF: seg001:43A8j seg001:43B5j ... + 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:4386j + push af + call p7Dsub_4894 + rst 28h +; --------------------------------------------------------------------------- + .dw 8060h +; --------------------------------------------------------------------------- + pop af + +p7Dloc_43F4: ; CODE XREF: p7Dsub_4442-58j + 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:7739p + 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+4j + pop af + or a + ret +; End of function p7Dsub_43F6 + +; --------------------------------------------------------------------------- + +p7Dloc_442C: ; CODE XREF: seg001:44C9p p7Dsub_5B4D+1Dp + 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:4435j + ret + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_4442: ; CODE XREF: seg001:43A5p p7Dsub_4490+2p ... + +; 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+45j + 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+35j + 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+28j p7Dsub_4442+31j + pop bc + pop hl + add hl, bc + pop bc + pop de + jr p7Dloc_4452 +; --------------------------------------------------------------------------- + +p7Dloc_4489: ; CODE XREF: p7Dsub_4442+20j + 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:4722p + 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:45A1p + 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+Fj + ld a, 0 + bit 7, a + jr locret_44C2 +; --------------------------------------------------------------------------- + +p7Dloc_44BE: ; CODE XREF: p7Dsub_4498+1Ej + ld a, 0FFh + bit 7, a + +locret_44C2: ; CODE XREF: p7Dsub_4498+24j + ret +; End of function p7Dsub_4498 + +; --------------------------------------------------------------------------- + +p7Dloc_44C3: ; CODE XREF: seg001:459Cp + 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:44F5j + 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:44DCj + pop bc + +locret_44F8: ; CODE XREF: seg001:44EBj seg001:44F1j + 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:4521j + call p7Dsub_4894 + call p7Dsub_5083 + xor a + +p7Dloc_4530: ; CODE XREF: seg001:4519j + jp relockFlashBack + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_4533: ; CODE XREF: seg001:4599p + 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+5Cp p7Dsub_7D67+8Ap + 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_455Cp p7Dsub_455C+4p ... + inc hl +; End of function p7Dsub_4565 + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_4566: ; CODE XREF: Page7D_2B62+9p + ; Page7D_2B62:p7Dloc_4117p ... + 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+11Cp + ; Page7D_2B62+12Cp ... + 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+21p + ; Page7D_2B62+25p ... + inc hl + +p7Dloc_4575: ; CODE XREF: p7Dsub_4F95+47p seg001:5F60p + 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+4p + ; Page7D_2B62+126p ... + 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:45BAj + call p7Dsub_468A + call p7Dsub_70D1 + call p7Dsub_45E4 + ld a, 0 + bit 7, a + +p7Dloc_45CC: ; CODE XREF: seg001:45E2j + push af + call p7Dsub_4926 + pop af + pop ix + pop hl + pop de + pop bc + jp relockFlashBack +; --------------------------------------------------------------------------- + +p7Dloc_45D9: ; CODE XREF: seg001:459Fj seg001:45A4j + 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:45C5p seg001:4794p + 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+17j + 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+65j + 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+5Dj + pop bc + pop hl + add hl, bc + jr p7Dloc_4621 +; --------------------------------------------------------------------------- + +p7Dloc_464B: ; CODE XREF: p7Dsub_45E4+28j p7Dsub_45E4+46j + 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+2Ap p7Dsub_45E4+5Fp + 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+33j + 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+2Bj + pop hl + pop bc + add hl, bc + jr p7Dloc_4660 +; --------------------------------------------------------------------------- + +p7Dloc_4683: ; CODE XREF: p7Dsub_464E+18j + 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_45BFp + ; seg001:477Cp + 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-Cj + call relockFlashBack + jp JErrorNo +; END OF FUNCTION CHUNK FOR p7Dsub_5083 +; --------------------------------------------------------------------------- + +p7Dloc_46C7: ; CODE XREF: seg001:4728p seg001:4738p + 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:46E5j + pop hl + +p7Dloc_4715: ; CODE XREF: seg001:46DCj + 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:472Bj seg001:4733j + call p7Dsub_50A8 + call p7Dsub_5124 + +p7Dloc_474C: ; CODE XREF: seg001:4744j + 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:4725j seg001:472Dj + 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+4p p7Dsub_5124+4p + xor a +; End of function p7Dsub_47B5 + + +; =============== S U B R O U T I N E ======================================= + + +Page7D_2B86: ; CODE XREF: p7Dsub_5185+12p p7Dsub_576D+3p + 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+Dj + call p7Dsub_4274 + call p7Dsub_4253 + jr p7Dloc_47DC +; --------------------------------------------------------------------------- + +p7Dloc_47D9: ; CODE XREF: Page7D_2B86+9j + ; Page7D_2B86+11j + call p7Dsub_4287 + +p7Dloc_47DC: ; CODE XREF: Page7D_2B86+19j + ; Page7D_2B86+21j + 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:473Ep + 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+3Bj + ld hl, appID + ld a, 0FFh + ld b, 5 + +p7Dloc_482C: ; CODE XREF: p7Dsub_47E3+4Bj + 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+40j + 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+25p p7Dsub_47E3+3Dp ... + 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+1Aj + 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+9p p7Dsub_4498+15p ... + 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+Aj + pop af + +p7Dloc_4890: ; CODE XREF: p7Dsub_4873+1Aj + 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+1p + ; Page7D_2B62+6p ... + 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+44p + ; p7Dsub_4214:p7Dloc_421Dp ... + 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:48AFp p7Dsub_4A5A+4Fp ... + 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+3p + 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+44p seg001:4BABp ... + push ix + push hl + push de + push bc + call p7Dsub_521D + ld bc, 0Dh + add ix, bc + +p7Dloc_48EB: ; CODE XREF: p7Dsub_48BC+1Fj + 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+19j p7Dsub_48DE+1Dj + 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:45CDp + ; seg001:p7Dloc_479Dp ... + 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+Ej + 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+54j + ld c, b + ld b, 0FFh + +p7Dloc_496F: ; CODE XREF: p7Dsub_4926+51j + ld a, 0FFh + +p7Dloc_4971: ; CODE XREF: p7Dsub_4926+4Fj + 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+1Bj + 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+52p + 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+20j + pop hl + pop de + pop bc + pop af + ret +; End of function p7Dsub_4992 + +; --------------------------------------------------------------------------- + +p7Dloc_49BC: ; CODE XREF: seg001:49D1j + 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:49CDj + pop af + ret +; --------------------------------------------------------------------------- + +p7Dloc_49D5: ; CODE XREF: seg001:49C1j + pop bc + pop bc + ret + +; =============== S U B R O U T I N E ======================================= + + +CopyFlashPage: ; CODE XREF: seg001:49C4p + 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+44j + 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+Aj + ; CopyFlashPage+10j ... + pop af + pop hl + ret +; End of function CopyFlashPage + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_4A21: ; CODE XREF: seg001:49BEp + push hl + ld a, 8 + ld hl, 4000h + +p7Dloc_4A27: ; CODE XREF: p7Dsub_4A21+13j + 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+Cj + 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+Cp + ; Page7D_2B56+1Cp ... + 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+Ej + 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_4939p + call p7Dsub_7643 + ld b, c + call p7Dsub_75EC + +p7Dloc_4A61: ; CODE XREF: p7Dsub_4A5A+1Fj + 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+10j p7Dsub_4A5A+14j ... + pop af + +p7Dloc_4A78: ; CODE XREF: p7Dsub_4A5A+6Dj + dec a + djnz p7Dloc_4A61 + ret +; --------------------------------------------------------------------------- + +p7Dloc_4A7C: ; CODE XREF: p7Dsub_4A5A+2Cj + pop af + pop bc + jr p7Dloc_4A77 +; --------------------------------------------------------------------------- + +p7Dloc_4A80: ; CODE XREF: p7Dsub_4A5A+1Bj + 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+5Bj + pop af + push af + call Page7D_2BE6 + +p7Dloc_4AC4: ; CODE XREF: p7Dsub_4A5A+36j p7Dsub_4A5A+3Dj ... + 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+Bp + 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+93j p7Dsub_4AC9+9Dj + 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+37j p7Dsub_4AC9+3Fj ... + call p7Dsub_540C + jr z, p7Dloc_4B5F + pop hl + push hl + call p7Dsub_4992 + jr p7Dloc_4B5F +; --------------------------------------------------------------------------- + +p7Dloc_4B20: ; CODE XREF: p7Dsub_4AC9+49j + 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+5Cj + 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+67j p7Dsub_4AC9+7Dj + 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+2Fj p7Dsub_4AC9+4Ej ... + pop hl + call p7Dsub_4574 + add hl, bc + inc ix + jp p7Dloc_4ADC +; --------------------------------------------------------------------------- + +p7Dloc_4B69: ; CODE XREF: p7Dsub_4AC9+3j + ld a, 0FFh + bit 7, a + ret +; --------------------------------------------------------------------------- + +p7Dloc_4B6E: ; CODE XREF: p7Dsub_4AC9+19j + 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+61p p7Dsub_4AC9+77p + 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+10p + call p7Dsub_70D1 + ld de, 800h + call p7Dsub_777E + call p7Dsub_4574 + +p7Dloc_4B8E: ; CODE XREF: seg001:4C08j + 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:4B9Ej seg001:4BAEj ... + 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:4BA6j seg001:4BB0j ... + 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:4BFAj + pop hl + call p7Dsub_4574 + add hl, bc + inc ix + jp p7Dloc_4B8E +; --------------------------------------------------------------------------- + +locret_4C0B: ; CODE XREF: seg001:4B94j + ret + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_4C0C: ; CODE XREF: seg001:4BFEp + ld de, 700h + call p7Dsub_777E + call p7Dsub_4574 + +p7Dloc_4C15: ; CODE XREF: p7Dsub_4C0C+62j + 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+18j p7Dsub_4C0C+20j ... + pop hl + jr p7Dloc_4C68 +; --------------------------------------------------------------------------- + +p7Dloc_4C3B: ; CODE XREF: p7Dsub_4C0C+2Aj + 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+34j + 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+3Cj p7Dsub_4C0C+4Fj + pop hl + pop de + +p7Dloc_4C68: ; CODE XREF: p7Dsub_4C0C+2Dj + call p7Dsub_4574 + add hl, bc + inc ix + jr p7Dloc_4C15 +; --------------------------------------------------------------------------- + +p7Dloc_4C70: ; CODE XREF: p7Dsub_4C0C+Fj + dec ix + ret +; End of function p7Dsub_4C0C + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_4C73: ; CODE XREF: p7Dsub_4442+2Ep p7Dsub_4F95+27p + 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_45A9p + 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+Ap + 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+85j + push hl + +p7Dloc_4CD3: ; CODE XREF: p7Dsub_4CAE+47j + call p7Dsub_4F95 + jr nz, p7Dloc_4CDD + call p7Dsub_4F10 + jr p7Dloc_4D1D +; --------------------------------------------------------------------------- + +p7Dloc_4CDD: ; CODE XREF: p7Dsub_4CAE+28j + 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+3j p7Dsub_4CAE+Bj + call p7Dsub_4894 + ld de, 800h + call p7Dsub_777E + jr nz, locret_4D35 + inc ix + call p7Dsub_4574 + +p7Dloc_4D07: ; CODE XREF: p7Dsub_4CAE+6Dj + 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+2Dj p7Dsub_4CAE+45j + 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+52j p7Dsub_4CAE+5Fj ... + ret +; --------------------------------------------------------------------------- + +p7Dloc_4D36: ; CODE XREF: p7Dsub_4CAE+1Aj + pop hl + ret +; End of function p7Dsub_4CAE + +; --------------------------------------------------------------------------- + +p7Dloc_4D38: ; CODE XREF: p7Dsub_4C8B+7p + 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+63p + ; seg001:p7Dloc_4D80j + push hl + +p7Dloc_4D5F: ; CODE XREF: p7Dsub_4D5E+20j + 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-7j + jr p7Dsub_4D5E +; --------------------------------------------------------------------------- + +p7Dloc_4D82: ; CODE XREF: seg001:4D3Bj seg001:4D43j + 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:4DADj + 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+7j p7Dsub_4D5E+1Ej + 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:4D9Dj + dec ix +; START OF FUNCTION CHUNK FOR p7Dsub_4DCD + +locret_4DCA: ; CODE XREF: seg001:4D8Fj p7Dsub_4DCD-Cj + ret +; END OF FUNCTION CHUNK FOR p7Dsub_4DCD +; --------------------------------------------------------------------------- + +p7Dloc_4DCB: ; CODE XREF: seg001:4D52j + pop hl + ret + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_4DCD: ; CODE XREF: p7Dsub_4D5E+1Bp seg001:4DA1p ... + +; 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+13j + 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+28j + ld de, 80h ; '�' + jr p7Dloc_4E27 +; --------------------------------------------------------------------------- + +p7Dloc_4E01: ; CODE XREF: p7Dsub_4DCD+22j + ld a, c + or b + ld a, 0 + jr z, p7Dloc_4E0A + call p7Dsub_4566 + +p7Dloc_4E0A: ; CODE XREF: p7Dsub_4DCD+38j + 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+41j + ld d, 0 + pop af + call p7Dsub_4E9B + ld e, a + +p7Dloc_4E27: ; CODE XREF: p7Dsub_4DCD+2Dj p7Dsub_4DCD+32j ... + 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_4CF0p + ; p7Dsub_4CAE+63p + 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+Fj + ld a, c + or b + ld a, 0 + jr z, p7Dloc_4E63 + call p7Dsub_4566 + +p7Dloc_4E63: ; CODE XREF: p7Dsub_4E44+1Aj + 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+23j + ld d, 0 + pop af + call p7Dsub_4E9B + ld e, a + +p7Dloc_4E80: ; CODE XREF: p7Dsub_4E44+14j p7Dsub_4E44+33j + 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+47p p7Dsub_4DCD+4Dp ... + 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+17j + sla a + djnz p7Dloc_4EB0 + ld b, 1 + sub b + jr p7Dloc_4EBB +; --------------------------------------------------------------------------- + +p7Dloc_4EB9: ; CODE XREF: p7Dsub_4E9B+4j p7Dsub_4E9B+Bj + ld a, 0 + +p7Dloc_4EBB: ; CODE XREF: p7Dsub_4E9B+Fj p7Dsub_4E9B+1Cj + pop bc + ret +; End of function p7Dsub_4E9B + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_4EBD: ; CODE XREF: p7Dsub_4D5E+4p + ; p7Dsub_4F10:p7Dloc_4F47p + 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+8p p7Dsub_4F10+8p + 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+16j + 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+2Ap + 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+4Aj + 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+2Aj + 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+4p + ld hl, tempSwapArea + ld a, 0FFh + ld b, 0E8h ; '�' + +p7Dloc_4F69: ; CODE XREF: p7Dsub_4F62+9j + 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_4D5Fp + 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_4CD3p + 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+24j + ld b, c + +p7Dloc_4FBA: ; CODE XREF: p7Dsub_4F95+2Ej p7Dsub_4F95+52j + 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+1Ej p7Dsub_4F95+1Ej ... + ld a, 0FFh + bit 7, a + jr p7Dloc_4FF3 +; --------------------------------------------------------------------------- + +p7Dloc_4FEF: ; CODE XREF: p7Dsub_4F6E+22j p7Dsub_4F95+22j ... + ld a, 0 + bit 7, a + +p7Dloc_4FF3: ; CODE XREF: p7Dsub_4F95+58j + pop ix + pop bc + pop de + pop hl + ret +; End of function p7Dsub_4F95 + +; --------------------------------------------------------------------------- + +p7Dloc_4FF9: ; CODE XREF: p7Dsub_533B+24p + 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:5039j + pop hl +; START OF FUNCTION CHUNK FOR p7Dsub_5083 + +p7Dloc_503F: ; CODE XREF: p7Dsub_5083+4j + scf + +p7Dloc_5040: ; CODE XREF: p7Dsub_508A+1Cj + 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:452Cp + +; 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+15p + 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+14j + 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:45A6p seg001:4735p ... + 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:4516p p7Dsub_4AC9+3Cp ... + 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+28j + ld a, b + inc de + inc hl + ld b, c + ex de, hl + +p7Dloc_50F8: ; CODE XREF: p7Dsub_50C5+49j + 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+3Fj + pop af + inc de + inc hl + ex de, hl + djnz p7Dloc_50F8 + jr p7Dloc_5113 +; --------------------------------------------------------------------------- + +p7Dloc_5112: ; CODE XREF: p7Dsub_50C5+43j + pop af + +p7Dloc_5113: ; CODE XREF: p7Dsub_50C5+2Cj p7Dsub_50C5+4Bj + ld a, 0FFh + bit 7, a + jr p7Dloc_511F +; --------------------------------------------------------------------------- + +p7Dloc_5119: ; CODE XREF: p7Dsub_50C5+Cj + pop af + +p7Dloc_511A: ; CODE XREF: p7Dsub_50C5+41j + pop af + +p7Dloc_511B: ; CODE XREF: p7Dsub_50C5+2Aj + ld a, 0 + bit 7, a + +p7Dloc_511F: ; CODE XREF: p7Dsub_50C5+52j + 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:4749p + 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+30j + 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+68j p7Dsub_5124+23j + 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+46j + 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+14p + 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+227p + 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+12j + ex de, hl + call p7Dsub_456D + +p7Dloc_51BF: ; CODE XREF: p7Dsub_519D+1Cj + 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+2Dp seg001:7758p + 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+3p p7Dsub_51C3+3p + 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+6j + 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+10j + 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_4253p p7Dsub_4533p ... + 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+5Ap p7Dsub_4228p ... + push bc + ld bc, 1F18h + +p7Dloc_5221: ; CODE XREF: Page7D_2B80+4j + ; p7Dsub_522B+4j ... + 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+62p p7Dsub_4214p ... + 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_48B5p p7Dsub_5365+5p ... + 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_4230p p7Dsub_4261p ... + 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_42A2p + 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+3p p7Dsub_42D3p ... + push hl + push bc + push ix + ld a, (OP1) + push af + ld a, 8 + +p7Dloc_524C: ; CODE XREF: FindSwapSector+1Bj + 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+30j + 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+28j + pop af + +p7Dloc_5279: ; CODE XREF: FindSwapSector+34j + jr p7Dloc_527C +; --------------------------------------------------------------------------- + +p7Dloc_527B: ; CODE XREF: FindSwapSector+13j + pop af + +p7Dloc_527C: ; CODE XREF: FindSwapSector:p7Dloc_5279j + 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+8p + 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:5BDAp + 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:52D6j + 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:529Bj seg001:52D3j + ret + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_52D9: ; CODE XREF: p7Dsub_4A5A+3Ap seg001:630Dp ... + 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+Bj + pop af + scf + ret +; End of function p7Dsub_52D9 + +; --------------------------------------------------------------------------- + +Page7D_2CA0: ; CODE XREF: seg001:6221p seg001:626Bp + 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:532Bj + ld a, (Abackup) + call p7Dsub_6011 + scf + ccf + ret +; --------------------------------------------------------------------------- +; START OF FUNCTION CHUNK FOR p7Dsub_533B + +p7Dloc_5338: ; CODE XREF: seg001:5300j p7Dsub_533B+4j ... + 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:7764p + +; 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+1Ej + 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+13p + 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+41p seg001:4BA8p ... + push ix + push hl + push de + push bc + call p7Dsub_521D + ld bc, 0Dh + add ix, bc + +p7Dloc_537C: ; CODE XREF: p7Dsub_5365+8j + 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+24j + srl b + +p7Dloc_539B: ; CODE XREF: p7Dsub_536F+28j + 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+1Bj + 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+72p + 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:5522j + call p7Dsub_6006 + call relockFlashBack + ld (Abackup), a + pop af + jp po, p7Dloc_53DF + ei + +p7Dloc_53DF: ; CODE XREF: p7Dsub_53B3+28j + 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+1Bp p7Dsub_607A+3Fp ... + 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+9j + 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_4B14p + push de + push hl + push bc + push ix + +p7Dloc_5411: ; CODE XREF: Page7D_2B5C+25j + inc ix + push ix + pop hl + call p7Dsub_7643 + or a + adc hl, bc + push hl + pop bc + +p7Dloc_541E: ; CODE XREF: Page7D_2B5C+13j + 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:6272p + 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:5484j + cp 0 + jr z, p7Dloc_5486 + srl a + inc c + jr p7Dloc_547D +; --------------------------------------------------------------------------- + +p7Dloc_5486: ; CODE XREF: seg001:547Fj + ld a, (OP1+1) + +p7Dloc_5489: ; CODE XREF: seg001:5490j + cp 0 + jr z, p7Dloc_5492 + srl a + inc c + jr p7Dloc_5489 +; --------------------------------------------------------------------------- + +p7Dloc_5492: ; CODE XREF: seg001:548Bj + ld a, c + ld (OP1), a + ld a, 0 + ld (OP1+1), a + bit 7, a + +p7Dloc_549D: ; CODE XREF: seg001:5459j + jp relockFlashBack +; --------------------------------------------------------------------------- + +p7Dloc_54A0: ; CODE XREF: seg001:621Ap seg001:6248p + 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:54ABj + 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:5500j seg001:5508j + pop bc + +p7Dloc_5520: ; CODE XREF: seg001:5513j + pop de + pop hl + jp p7Dloc_53D1 + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_5525: ; CODE XREF: p7Dsub_43F6+1p seg001:5703p ... + 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:76C0w + 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+47j + 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+32j + 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+81j + 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+75j + pop af + push af + rst 28h +; --------------------------------------------------------------------------- + .dw 805Ah +; --------------------------------------------------------------------------- + dec hl + inc bc + ld de, tempSwapArea + +p7Dloc_55B2: ; CODE XREF: p7Dsub_5525+98j + 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+Bj p7Dsub_5525+68j + 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:4383p + inc hl + push af + rst 28h +; --------------------------------------------------------------------------- + .dw 805Ah +; --------------------------------------------------------------------------- + or a + adc hl, bc + +p7Dloc_55D6: ; CODE XREF: p7Dsub_55CE+25j + 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+1Bj + 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+Fj + pop af + ret +; End of function p7Dsub_55CE + +; --------------------------------------------------------------------------- + +p7Dloc_560B: ; CODE XREF: seg001:p7Dloc_5650p + ; seg001:5661p + 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:5611j seg001:562Fj + 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:5649j + call p7Dloc_560B + jr nz, p7Dloc_5695 + call Page7D_2C34 + jr nz, p7Dloc_5695 + +p7Dloc_565A: ; CODE XREF: seg001:564Ej + 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:5664j + 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:5653j seg001:5658j + 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:5655p + 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+34j + push de + push hl + push bc + call Page0Call_3B07 + ld de, OP4 + ld hl, OP2M + ld b, 7 + +p7Dloc_56C1: ; CODE XREF: Page7D_2C34+27j + 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+23j + 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+Ej + ; Page7D_2C34+32j + pop de + pop hl + pop bc + ret +; --------------------------------------------------------------------------- + +p7Dloc_56DA: ; CODE XREF: Page7D_2C34+29j + 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:56F3j + pop af + pop bc + pop de + pop hl + ret + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_573C: ; CODE XREF: seg001:572Ep seg001:5734p + 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+14j + 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+230p + 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+Fj + inc hl + ld a, (hl) + ld (de), a + inc de + djnz p7Dloc_5762 + +p7Dloc_5768: ; CODE XREF: p7Dsub_5757+9j + 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:4018p seg001:632Fp + 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:58DFp p7Dsub_7CBB+7p + 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+Fj + 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+5j p7Dsub_578D+16j ... + pop af + ret +; End of function p7Dsub_578D + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_57C5: ; CODE XREF: p7Dsub_5525+3Bp p7Dsub_5525+49p ... + 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:5830j + 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:5815j + 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:58ABj + 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:5880j + 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:58E6j + 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:57EDj seg001:57FBj ... + pop hl + +p7Dloc_5973: ; CODE XREF: seg001:57D0j + 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:5801p seg001:581Dp ... + 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:57CDp seg001:57F8p ... + 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:6252p seg001:625Cp ... + push bc + ld de, 847Ch + ld b, 5 + +p7Dloc_5994: ; CODE XREF: p7Dsub_598E+Dj + 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+1Ej + inc hl + cp (hl) + jr nz, p7Dloc_59AE + ld (hl), 20h ; ' ' + djnz p7Dloc_59A6 + +p7Dloc_59AE: ; CODE XREF: p7Dsub_598E+1Aj + pop bc + call Page0Call_3D4D + ret +; End of function p7Dsub_598E + +; --------------------------------------------------------------------------- + +p7Dloc_59B3: ; CODE XREF: seg001:624Bp + 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:5A3Aj + 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:5A14j seg001:5A1Cj + 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:5A24j + 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:5A36j + 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:5A42j seg001:5A4Aj + 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:5A52j + 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:59D4p + 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+Cj + 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:5A19p seg001:5A47p + 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+15j + ld a, 0 + bit 7, a + +p7Dloc_5ACA: ; CODE XREF: p7Dsub_5AA5+9j p7Dsub_5AA5+1Fj + 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:5AF9j + pop af + pop bc + pop hl + ret +; --------------------------------------------------------------------------- + +Page7D_2E56: ; CODE XREF: seg001:5B28j + 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:5B1Fj + pop af + call Page0Call_23D4 + +locret_5B2E: ; CODE XREF: seg001:5B14j + 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:5B36j + pop af + scf + ccf + ret + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_5B4D: ; CODE XREF: seg001:5B45p + push bc + push de + call p7Dsub_7656 + ld hl, 4003h + ld (appSearchPage), a + +p7Dloc_5B58: ; CODE XREF: p7Dsub_5B4D+59j p7Dsub_5B4D+73j + 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+11j + 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+39j + 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+35j + 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+15j + 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+66j + cp 18h + +p7Dloc_5BBB: ; CODE XREF: p7Dsub_5B4D+6Aj + jr z, p7Dloc_5BC2 + ld hl, 4000h + jr p7Dloc_5B58 +; --------------------------------------------------------------------------- + +p7Dloc_5BC2: ; CODE XREF: p7Dsub_5B4D+18j p7Dsub_5B4D+27j ... + scf + ccf + jr p7Dloc_5BC7 +; --------------------------------------------------------------------------- + +p7Dloc_5BC6: ; CODE XREF: p7Dsub_5B4D+3Fj + scf + +p7Dloc_5BC7: ; CODE XREF: p7Dsub_5B4D+77j + 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:5C08j + ld de, 410h + rst 28h +; --------------------------------------------------------------------------- + .dw 8027h +; --------------------------------------------------------------------------- + jr z, p7Dloc_5C0A + rst 28h +; --------------------------------------------------------------------------- + .dw 80AEh +; --------------------------------------------------------------------------- + jr p7Dloc_5BFD +; --------------------------------------------------------------------------- + +p7Dloc_5C0A: ; CODE XREF: seg001:5C03j + 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:5C25j + ld a, (Abackup) + ret +; --------------------------------------------------------------------------- + +p7Dloc_5C2D: ; CODE XREF: seg001:635Bp + 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:5C87j + 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:5C81p + 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+22j p7Dsub_5C8E+31j + 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+13j + 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+1Dj p7Dsub_5C8E+2Cj + 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:5CE9j seg001:5CF9j + 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:5CD9j + 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:5CE4j seg001:5CF4j + pop de + pop bc + pop hl + ret + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_5CFF: ; CODE XREF: seg001:46FCp seg001:4706p ... + 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+17j + 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+7j + 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:46FFp + 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+7j + ld h, a + ld l, a + +p7Dloc_5D3F: ; CODE XREF: p7Dsub_5D1E+16j p7Dsub_5D1E+1Dj + 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:4709p p7Dsub_4873+17p + 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+7j + ld b, a + ld c, a + +p7Dloc_5D64: ; CODE XREF: p7Dsub_5D43+16j p7Dsub_5D43+1Dj + 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_5DC7p + 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+23j + 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+51j + pop bc + jr p7Dloc_5D76 +; --------------------------------------------------------------------------- + +p7Dloc_5D8D: ; CODE XREF: Page7D_2E44+1Dj + 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+27j + 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+43j + ; Page7D_2E44+56j + 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+11j + xor a + ld c, a + +p7Dloc_5DC2: ; CODE XREF: Page7D_2E44+Fj + ; Page7D_2E44+4Bj + 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+9p p7Dsub_7BEA+21p + 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:5DFBj + 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:58DCp + ; p7Dsub_7240:p7Dloc_739Bp + 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+17j + 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+7j + 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+9j + ; p7Dsub_5E59+9j + 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+30p p7Dsub_607A+3Cp ... + ld hl, 4000h +; End of function p7Dsub_5E31 + + +; =============== S U B R O U T I N E ======================================= + + +Page7D_2C9A: ; CODE XREF: Page7D_2C10+3Cp + ; p7Dsub_7240+1FBp ... + +; 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:630Ap seg001:7744p ... + 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:6316p + 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+Ej p7Dsub_5E78+10j + ret +; End of function p7Dsub_5E78 + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_5E90: ; CODE XREF: p7Dsub_7240+22Ap + 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+19j + ld de, 0 + jr p7Dloc_5EDD +; --------------------------------------------------------------------------- + +p7Dloc_5EB5: ; CODE XREF: p7Dsub_5E90+Ej + 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+34j + ld d, 0 + pop af + call p7Dsub_4E9B + ld e, a + +p7Dloc_5EDD: ; CODE XREF: p7Dsub_5E90+1Ej p7Dsub_5E90+23j ... + 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:7137p seg001:71DDp + 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+9j p7Dsub_5EFC+12j ... + scf + +p7Dloc_5F26: ; CODE XREF: p7Dsub_5EFC+27j + 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:5F9Cj + 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:5F72j + inc a + dec hl + djnz p7Dloc_5F70 + +p7Dloc_5F74: ; CODE XREF: seg001:5F6Ej + 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:5F87p + 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+4j + 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:4014j seg001:401Fj ... + 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:70CDp + 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+11j + ld a, (Abackup) + ret +; End of function Page7D_3E10 + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_6006: ; CODE XREF: seg001:5321p + ; p7Dsub_53B3:p7Dloc_53D1p + 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:5332p p7Dsub_53B3+2Fj + 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+1Dp p7Dsub_4AC9+64p ... + call p7Dsub_75F5 + +p7Dloc_6024: ; CODE XREF: p7Dsub_6021+44j + 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+2Cj + 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+29p + 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+10j + 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+13p p7Dsub_607A+19j ... + 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+Bj + 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+42j + 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+4Fj + ld bc, 8 + +p7Dloc_60D5: ; CODE XREF: p7Dsub_607A+56j + ld a, c + ld (OP2), a + ld a, (appSearchPage) + ld de, 8484h + rst 28h +; --------------------------------------------------------------------------- + .dw 8054h +; --------------------------------------------------------------------------- + scf + ccf + +locret_60E4: ; CODE XREF: p7Dsub_607A+5j p7Dsub_607A+Ej + ret +; End of function p7Dsub_607A + +; --------------------------------------------------------------------------- + +FindAppUp: + ld a, 1 + jr p7Dloc_60EA +; --------------------------------------------------------------------------- + +FindAppDn: + xor a + +p7Dloc_60EA: ; CODE XREF: seg001:60E7j + 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:611Aj seg001:6121j ... + 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:6116j + 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:6104j + 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:615Bj + ld (unk_9C87), a + pop af + ret +; --------------------------------------------------------------------------- + +p7Dloc_6163: ; CODE XREF: seg001:6125j seg001:6137j + set 1, a + +p7Dloc_6165: ; CODE XREF: seg001:612Aj seg001:613Ej + 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:6113p p7Dsub_6186+7p ... + ld de, 8480h + jr p7Dloc_617A +; --------------------------------------------------------------------------- + +p7Dloc_6177: ; CODE XREF: seg001:6127p seg001:6139p + ld de, 8496h + +p7Dloc_617A: ; CODE XREF: p7Dsub_6172+3j + 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+3p p7Dsub_7B41+21p + call p7Dsub_75F5 + +p7Dloc_6189: ; CODE XREF: p7Dsub_6186+Cj + call p7Dsub_638B + ret c + call p7Dsub_6172 + bit 3, c + jr z, p7Dloc_6189 + jr p7Dloc_61A4 +; --------------------------------------------------------------------------- + +FindApp: ; CODE XREF: seg001:62CEp + call p7Dsub_75F5 + +p7Dloc_6199: ; CODE XREF: p7Dsub_6186+1Cj + call p7Dsub_6388 + ret c + call p7Dsub_6172 + bit 3, c + jr z, p7Dloc_6199 + +p7Dloc_61A4: ; CODE XREF: seg001:5882p p7Dsub_6021+2Fj ... + 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:6363p + 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:61F8j + ld hl, aCCopyright1998-2 + ld de, tempSwapArea + ld bc, 19h + ldir + +p7Dloc_620C: ; CODE XREF: seg001:61FFj + 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:6224j + ld hl, aExpirationDate-2 + ld a, 52h ; 'R' + bit 1, (iy+35h) + call nz, Page0Call_3C45 + call p7Dsub_62B3 + +p7Dloc_6246: ; CODE XREF: seg001:6235j + 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:621Dj + 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:626Ej seg001:6275j + 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:620Fp seg001:6215p ... + 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:62FCj + 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:6310j + pop af + push af + call p7Dsub_5E78 + jr c, p7Dloc_6348 + jr nz, p7Dloc_6348 + +p7Dloc_631D: ; CODE XREF: seg001:62F5j + 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:632Bj + 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:6326j + pop af + +p7Dloc_6345: ; CODE XREF: seg001:62D1j seg001:6342j + jp Page0Call_2539 +; --------------------------------------------------------------------------- + +p7Dloc_6348: ; CODE XREF: seg001:6303j seg001:6312j ... + 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:635Ej + 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:6255r seg001:625Fr + cpl + nop + nop + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_6388: ; CODE XREF: seg001:60FFp + ; p7Dsub_6186:p7Dloc_6199p + scf + jr p7Dloc_638D +; End of function p7Dsub_6388 + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_638B: ; CODE XREF: seg001:587Ap + ; p7Dsub_6186:p7Dloc_6189p ... + scf + ccf + +p7Dloc_638D: ; CODE XREF: p7Dsub_6388+1j + push af + +p7Dloc_638E: ; CODE XREF: p7Dsub_638B+1Dj p7Dsub_638B+32j ... + 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+Bj + 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+2Bj + inc hl + ld a, (appSearchPage) + rst 28h +; --------------------------------------------------------------------------- + .dw 805Ah +; --------------------------------------------------------------------------- + jr p7Dloc_6407 +; --------------------------------------------------------------------------- + +p7Dloc_63C8: ; CODE XREF: p7Dsub_638B+15j + 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+70j + call Page7D_2B5C + +p7Dloc_6405: ; CODE XREF: p7Dsub_638B+75j + jr nz, p7Dloc_638E + +p7Dloc_6407: ; CODE XREF: p7Dsub_638B+3Bj + 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+86j + ld bc, 8 + +p7Dloc_641C: ; CODE XREF: p7Dsub_638B+8Cj + 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+21p + 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+13j + 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+Ej + ld a, (appInfo+1) + call Page7D_2BE6 + +p7Dloc_6468: ; CODE XREF: p7Dsub_6428+6j p7Dsub_6428+38j + call relockFlashBack + +p7Dloc_646B: ; CODE XREF: p7Dsub_6428+24j + 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:649Aj + ld b, 0 + ex de, hl + call p7Dsub_456D + jr p7Dloc_64CE +; --------------------------------------------------------------------------- + +p7Dloc_64AE: ; CODE XREF: seg001:648Cj seg001:6496j + 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:64B7j + 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:64ACj seg001:64BEj ... + pop af + cp 0Fh + jr nz, p7Dloc_64D8 + call Page0Call_2B8F + jr p7Dloc_64DB +; --------------------------------------------------------------------------- + +p7Dloc_64D8: ; CODE XREF: seg001:64D1j + call Page0Call_2B89 + +p7Dloc_64DB: ; CODE XREF: seg001:64D6j + pop bc + pop de + pop hl + jp relockFlashBack +; --------------------------------------------------------------------------- + +p7Dloc_64E1: ; CODE XREF: seg001:64BBj + ld hl, 4001h + ld de, 6001h + +p7Dloc_64E7: ; CODE XREF: seg001:64F4j + call p7Dsub_4566 + cp 0 + jr z, p7Dloc_64F2 + cp 0FFh + jr nz, p7Dloc_64F6 + +p7Dloc_64F2: ; CODE XREF: seg001:64ECj + inc hl + ex de, hl + jr p7Dloc_64E7 +; --------------------------------------------------------------------------- + +p7Dloc_64F6: ; CODE XREF: seg001:64F0j + 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:5C89p + ld a, d + or a + jr nz, p7Dloc_650A + call p7Dsub_651E + +p7Dloc_650A: ; CODE XREF: p7Dsub_6503+2j + 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:628Cp + 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+6j + 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+4p + 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+3p p7Dsub_650D+Dp + or a + jr z, p7Dloc_6529 + ld d, 1 + ret +; --------------------------------------------------------------------------- + +p7Dloc_6529: ; CODE XREF: p7Dsub_6523+1j + 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+22p p7Dsub_662F+28p ... + 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+18j + ld (unk_839F), hl + +p7Dloc_654C: ; CODE XREF: p7Dsub_652E+12j + 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:6706p + ; Page7D_2B6E+32p ... + 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+4p + ; p7Dsub_662F+58p ... + 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+29j + 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_2B6Ep + push af + push bc + push hl + ld hl, arcPage + jr p7Dloc_65A6 +; --------------------------------------------------------------------------- + +p7Dloc_65A0: ; CODE XREF: seg001:65B9p seg001:65F8p + push af + push bc + push hl + ld hl, 839Fh + +p7Dloc_65A6: ; CODE XREF: p7Dsub_6598+6j + xor a + ld b, 4 + +p7Dloc_65A9: ; CODE XREF: p7Dsub_6598+13j + 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:65E1j + ld a, (Abackup) + ld de, 9C96h + call p7Dsub_6621 + set 6, (iy+24h) + +p7Dloc_65F2: ; CODE XREF: seg001:65B7j + 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:65F6j + ld hl, 9C9Ah + call p7Dsub_6626 + ld de, 83A2h + ld hl, 9C99h + ld b, 4 + or a + +p7Dloc_6617: ; CODE XREF: seg001:661Cj + 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:65EBp seg001:6601p + 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:660Bp + ld de, 839Fh + +p7Dloc_6629: ; CODE XREF: p7Dsub_6621+3j + 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:65FBp + call Page7D_2B56 + inc b + ld a, 8 + ld de, 0 + +p7Dloc_6638: ; CODE XREF: p7Dsub_662F+33j p7Dsub_662F+38j + 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+1Bj + cp 0F0h ; '�' + jr z, p7Dloc_6669 + pop af + inc a + jr p7Dloc_6638 +; --------------------------------------------------------------------------- + +p7Dloc_6664: ; CODE XREF: p7Dsub_662F+17j p7Dsub_662F+2Bj ... + pop af + add a, 4 + jr p7Dloc_6638 +; --------------------------------------------------------------------------- + +p7Dloc_6669: ; CODE XREF: p7Dsub_662F+2Fj + inc hl + pop af + push af + +p7Dloc_666C: ; CODE XREF: p7Dsub_662F+65j + 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+48j + 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+70j + jr p7Dloc_6664 +; End of function p7Dsub_662F + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_66A9: ; CODE XREF: seg001:6723p + 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+Aj + 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:66F9j + push af + ld hl, 4000h + call Page7D_2CD0 + cp 0FEh ; '�' + jr nz, p7Dloc_66E7 + +p7Dloc_66E2: ; CODE XREF: seg001:670Dj + pop af + add a, 3 + jr p7Dloc_66F0 +; --------------------------------------------------------------------------- + +p7Dloc_66E7: ; CODE XREF: seg001:66E0j + cp 0F0h ; '�' + jr z, p7Dloc_66FB + cp 0FFh + jr z, p7Dloc_6711 + pop af + +p7Dloc_66F0: ; CODE XREF: seg001:66E5j seg001:672Dj + push hl + ld hl, 83FFh + cp (hl) + pop hl + jr nc, p7Dloc_672F + inc a + jr p7Dloc_66D7 +; --------------------------------------------------------------------------- + +p7Dloc_66FB: ; CODE XREF: seg001:66E9j + 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:66EDj + 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:66F6j + ld a, 0FFh + add a, 10h + +p7Dloc_6733: ; CODE XREF: seg001:672Bj + 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+1Fp p7Dsub_662F+72p ... + push hl + push bc + push af + push hl + pop de + ld hl, 7FFFh + or a + sbc hl, de + +p7Dloc_6748: ; CODE XREF: Page7D_2B74+25j + 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+1Ej + pop af + +p7Dloc_6765: ; CODE XREF: Page7D_2B74+10j + ; Page7D_2B74+13j + 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+3Ap + ; p7Dsub_662F+42p ... + 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+13j + cp b + jr c, p7Dloc_6784 + ld a, b + +p7Dloc_6784: ; CODE XREF: Page7D_2B6E+18j + ld (unk_8390), a + pop af + pop hl + pop bc + +p7Dloc_678A: ; CODE XREF: Page7D_2B6E+57j + 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+52j + pop bc + jr p7Dloc_678A +; --------------------------------------------------------------------------- + +p7Dloc_67C2: ; CODE XREF: Page7D_2B6E+2Dj + ; Page7D_2B6E+54j + xor a + ld a, (arcPage) + pop bc + ret +; --------------------------------------------------------------------------- + +p7Dloc_67C8: ; CODE XREF: Page7D_2B6E+29j + 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+4Ep + ; Page7D_2B74+Dp + 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+Aj + cp 16h + +p7Dloc_67FE: ; CODE XREF: p7Dsub_67EC+5j p7Dsub_67EC+Ej + pop bc + ret +; End of function p7Dsub_67EC + + +; =============== S U B R O U T I N E ======================================= + + +Page7D_2B56: ; CODE XREF: seg001:4919p + ; Page7D_2E44+2p ... + push af + push hl + push de + call p7Dsub_75EC + ld hl, 4000h + +p7Dloc_6809: ; CODE XREF: Page7D_2B56+25j + push af + call Page7D_2CD0 + cp 80h ; '�' + jr z, p7Dloc_6815 + cp 0 + jr nz, p7Dloc_6827 + +p7Dloc_6815: ; CODE XREF: Page7D_2B56+Fj + 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+13j + ; Page7D_2B56+1Aj ... + 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+84p + 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+1Ej + ld de, (arcInfo+1) + +p7Dloc_68D6: ; CODE XREF: Page7D_2EB0+39j + 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:6894j + ld hl, (unk_83F1) + ld bc, (unk_83F5) + push de + ld de, OP1 + ld b, c + +p7Dloc_693A: ; CODE XREF: Page7D_2EB0+A7j + 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+F2j + 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+10Fj + 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+E3j + ; Page7D_2EB0+126j + jp relockFlashBack +; End of function Page7D_2EB0 + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_69D4: ; CODE XREF: Page7D_2EB0+1Bp + ; p7Dsub_7CDA+39p + push hl + ld bc, 4000h + or a + sbc hl, bc + pop hl + jr z, p7Dloc_69DF + ret nc + +p7Dloc_69DF: ; CODE XREF: p7Dsub_69D4+8j + 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:6848p + ; seg001:Page7D_326Ap + 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+Fj + 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_69E8p + ; seg001:Page7D_2F88p + inc hl + inc hl + inc hl + call Page0Call_23FC + jr nc, Page7D_2CD6 + inc a + +Page7D_2CD6: ; CODE XREF: p7Dsub_6A07+6j + 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+13j + 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+20j p7Dsub_6A07+25j + pop af + push af + call Page7D_2CD0 + ld e, a + pop af + inc e + +p7Dloc_6A45: ; CODE XREF: p7Dsub_6A07+33j + 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:6A6Bj + 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:6A5Cj seg001:6A5Ej ... + 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:6AABj + push af + call p7Dsub_7BD4 + pop af + push af + rst 28h +; --------------------------------------------------------------------------- + .dw 8084h +; --------------------------------------------------------------------------- + pop af + add a, 4 + +p7Dloc_6AA8: ; DATA XREF: seg001:76B7w seg001:76C9w + call p7Dsub_75E1 + jr c, p7Dloc_6A9C + ld hl, tempSwapArea + ld b, 0E8h ; '�' + +p7Dloc_6AB2: ; CODE XREF: seg001:6AB6j + 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:6AC1j + 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:6B05j + push af + ld hl, 4000h + call Page7D_2CD0 + cp 0FEh ; '�' + jr nz, p7Dloc_6AF3 + +p7Dloc_6AEA: ; CODE XREF: seg001:6AF9j seg001:6B17j + pop af + push bc + ld c, 3 + add a, c + pop bc + push af + jr p7Dloc_6AFB +; --------------------------------------------------------------------------- + +p7Dloc_6AF3: ; CODE XREF: seg001:6AE8j + cp 0F0h ; '�' + jr z, p7Dloc_6B07 + cp 0FFh + jr z, p7Dloc_6AEA + +p7Dloc_6AFB: ; CODE XREF: seg001:6AF1j + 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:6AF5j + pop af + push af + ld (arcPage), a + ld (arcPtr), hl + call Page7D_2CE2 + +p7Dloc_6B12: ; CODE XREF: seg001:6B33j + 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:6B02j + ret + +; =============== S U B R O U T I N E ======================================= + + +Page7D_2CD0: ; CODE XREF: p7Dsub_4083+Bp p7Dsub_4566+3p ... + 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+3p p7Dsub_42AE+Dp ... + call NZIf83Plus + jr z, p7Dloc_6B50 + and 1Fh + +p7Dloc_6B50: ; CODE XREF: FlashToRam+3j + 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:6B7Dj + bit 7, h + jr z, p7Dloc_6B79 + in a, (6) + inc a + out (6), a + ld hl, 4000h + +p7Dloc_6B79: ; CODE XREF: seg001:6B6Fj + ldi + ld a, b + or c + jr nz, p7Dloc_6B6D + +p7Dloc_6B7F: ; CODE XREF: seg001:6B85j + pop af + out (6), a + ret +p7Dloc_6B83: ; CODE XREF: seg001:6B6Bj + ldir + jr p7Dloc_6B7F + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_6B87: ; CODE XREF: FlashToRam+Dp + ; p7Dsub_7666+11p + 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+21j + pop af + ret +; End of function p7Dsub_6B87 + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_6BAD: ; CODE XREF: p7Dsub_6B87+18p + jp ramCode +; End of function p7Dsub_6BAD + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_6BB0: ; CODE XREF: p7Dsub_6B87p + 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:6C0Cj + push af + ld hl, 4000h + call Page7D_2CD0 + cp 0FEh ; '�' + jr nz, p7Dloc_6BF9 + +p7Dloc_6BF3: ; CODE XREF: seg001:6BFFj seg001:6C1Ej + pop af + add a, 3 + push af + jr p7Dloc_6C01 +; --------------------------------------------------------------------------- + +p7Dloc_6BF9: ; CODE XREF: seg001:6BF1j + cp 0F0h ; '�' + jr z, p7Dloc_6C0E + cp 0FFh + jr z, p7Dloc_6BF3 + +p7Dloc_6C01: ; CODE XREF: seg001:6BF7j + 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:6BFBj + pop af + push af + ld (arcPage), a + ld (arcPtr), hl + call Page7D_2CE2 + +p7Dloc_6C19: ; CODE XREF: seg001:6CA8j + 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:6C42j + or a + call Page0Call_23F6 + jr nc, p7Dloc_6C52 + pop af + inc a + push af + +p7Dloc_6C52: ; CODE XREF: seg001:6C4Dj + 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:6C47j + or a + call Page0Call_23F6 + jr nc, p7Dloc_6C73 + pop af + inc a + push af + +p7Dloc_6C73: ; CODE XREF: seg001:6C6Ej + ld bc, 3 + +p7Dloc_6C76: ; CODE XREF: seg001:6C68j + 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:6C08j + 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+1F3p + ; seg001:77F3p + 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+6j + 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:6D56p + 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+1Ej + 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+32j p7Dsub_6CCB+37j + ld a, (arcPage) + ld hl, (arcPtr) + call Page7D_2CD0 + ld b, a + ld a, (arcPage) + call Page7D_2CE2 + +p7Dloc_6D21: ; CODE XREF: p7Dsub_6CCB+44j + ld de, 8479h + +p7Dloc_6D24: ; CODE XREF: p7Dsub_6CCB+69j + 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:6EA4j + ld hl, 0 + ld (unk_83F3+1), hl + ld de, ramStart + +p7Dloc_6E49: ; CODE XREF: seg001:6E75j + 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:6E5Aj + 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:6E73j + 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:6E6Ej + 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_6E60p + 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:6E70p + 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:65D7p + call p7Dsub_75EC + +p7Dloc_6EDE: ; CODE XREF: Page7D_2C10+2Dj + ; Page7D_2C10+75j + 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+29j + call p7Dsub_652E + djnz p7Dloc_6F01 + +p7Dloc_6F06: ; CODE XREF: Page7D_2C10+71j + pop af + sub c + jr p7Dloc_6EDE +; --------------------------------------------------------------------------- + +p7Dloc_6F0A: ; CODE XREF: Page7D_2C10+17j + 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+66j + 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+42j + pop af + push af + call FindAppNumPages + ld a, c + or a + jr z, p7Dloc_6F52 + jr p7Dloc_6F06 +; --------------------------------------------------------------------------- + +p7Dloc_6F4E: ; CODE XREF: Page7D_2C10+61j + pop af + dec a + jr p7Dloc_6EDE +; --------------------------------------------------------------------------- + +p7Dloc_6F52: ; CODE XREF: Page7D_2C10+20j + ; Page7D_2C10+31j ... + pop af + +locret_6F53: ; CODE XREF: Page7D_2C10+Aj + ; Page7D_2C10+Cj + ret +; End of function Page7D_2C10 + + +; =============== S U B R O U T I N E ======================================= + + +Page7D_2C46: ; CODE XREF: seg001:6853p + ; Page7D_2EB0+72p ... + 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+16j + 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+5j + ; Page7D_2C46+18j ... + scf + +p7Dloc_6F7E: ; CODE XREF: Page7D_2C46+27j + 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+29p + ; Page7D_2EB0+4Bp ... + 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+16j + ld bc, 4000h + ex de, hl + or a + sbc hl, bc + jr c, p7Dloc_6FA7 + jr p7Dloc_6FA8 +; --------------------------------------------------------------------------- + +p7Dloc_6FA7: ; CODE XREF: p7Dsub_6F82+5j p7Dsub_6F82+18j ... + scf + +p7Dloc_6FA8: ; CODE XREF: p7Dsub_6F82+23j + 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:4011p + ; DeleteApp+11p + 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+Bj p7Dsub_6FAC+12j + pop bc + pop hl + ret +; --------------------------------------------------------------------------- + +p7Dloc_6FBD: ; CODE XREF: p7Dsub_6FAC+5j + scf + jr p7Dloc_6FBA +; End of function p7Dsub_6FAC + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_6FC0: ; CODE XREF: seg001:634Cp + 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+23j + call GetBaseVer + ld a, (unk_83A6) + cp b + jr z, p7Dloc_6FF4 + jr nc, p7Dloc_6FF5 + +p7Dloc_6FF4: ; CODE XREF: p7Dsub_6FC0+Cj p7Dsub_6FC0+25j ... + xor a + +p7Dloc_6FF5: ; CODE XREF: p7Dsub_6FC0+27j p7Dsub_6FC0+32j + 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:6355p + 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+7j + call page0_BB1 + jr p7Dloc_7027 +; --------------------------------------------------------------------------- + +p7Dloc_7024: ; CODE XREF: p7Dsub_6FF9+15j p7Dsub_6FF9+20j ... + call page0_B8D + +p7Dloc_7027: ; CODE XREF: p7Dsub_6FF9+29j + 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+29p p7Dsub_4926+3Bp ... + push bc + push af + ld a, (winBtm) + ld b, a + +p7Dloc_704B: ; CODE XREF: p7Dsub_7045+13j + 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+Aj + 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+15p p7Dsub_4AC9+16p ... + ld a, 7Eh ; '~' +; End of function p7Dsub_705E + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_7060: ; CODE XREF: p7Dsub_7240+17Bp + ; seg001:7790p + push ix + +p7Dloc_7062: ; CODE XREF: p7Dsub_7060+35j + 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+12j + 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+2Dj + pop hl + pop af + jr p7Dloc_7062 +; --------------------------------------------------------------------------- + +p7Dloc_7097: ; CODE XREF: p7Dsub_7060+31j + pop hl + ld hl, (arcInfo) + ld a, 1 + or a + +p7Dloc_709E: ; CODE XREF: p7Dsub_7060+7j + pop bc + pop ix + ret +; --------------------------------------------------------------------------- + +p7Dloc_70A2: ; CODE XREF: p7Dsub_7060+16j + 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+2p p7Dsub_4498+Cp ... + 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:710Ej + 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+10p p7Dsub_7240-EDp ... + 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:713Aj + ; p7Dsub_7240:p7Dloc_74EDj ... + call relockFlashBack + call p7Dsub_7124 + push af + jr z, p7Dloc_715C + call popErrorHandleR + +p7Dloc_715C: ; CODE XREF: p7Dsub_7240-E9j + pop af + push af + jr z, p7Dloc_7166 + ld hl, Page0Call_2C79 + call pushErrorHandleR + +p7Dloc_7166: ; CODE XREF: p7Dsub_7240-E2j + call Page0Call_3D2F + ld a, 0Bh + call Page0Call_2C49 + pop af + jr z, p7Dloc_7174 + call popErrorHandleR + +p7Dloc_7174: ; CODE XREF: p7Dsub_7240-D1j + 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+19Dp + ; seg001:77ABp + 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+1B1p + ; p7Dsub_7240+1EDp ... + ld hl, 81AFh + ld de, ramStart + +p7Dloc_7188: ; CODE XREF: p7Dsub_717A+6j + 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:7190j + 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:71BAj + 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:71EAj seg001:71F0j + 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:723Bj + 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:722Bj + 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:714Cp + +; 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+120j + 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:71C4j + ; p7Dsub_7240+1C0j ... + call p7Dsub_733B + call relockFlashBack + call p7Dsub_7124 + push af + jr z, p7Dloc_72B4 + call popErrorHandleR + +p7Dloc_72B4: ; CODE XREF: p7Dsub_7BEA-93Bj + pop af + push af + jr z, p7Dloc_72BE + ld hl, Page0Call_2C79 + call pushErrorHandleR + +p7Dloc_72BE: ; CODE XREF: p7Dsub_7BEA-934j + call Page0Call_3D2F + ld a, 1 + call Page0Call_2C49 + pop af + jr z, p7Dloc_72CC + call popErrorHandleR + +p7Dloc_72CC: ; CODE XREF: p7Dsub_7BEA-923j + 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+173j + call p7Dsub_733B + call relockFlashBack + call p7Dsub_7124 + push af + jr z, p7Dloc_72E1 + call popErrorHandleR + +p7Dloc_72E1: ; CODE XREF: p7Dsub_7240+9Cj + pop af + push af + jr z, p7Dloc_72EB + ld hl, Page0Call_2C79 + call pushErrorHandleR + +p7Dloc_72EB: ; CODE XREF: p7Dsub_7240+A3j + call Page0Call_3D2F + ld a, 7 + call Page0Call_2C49 + pop af + jr z, p7Dloc_72F9 + call popErrorHandleR + +p7Dloc_72F9: ; CODE XREF: p7Dsub_7240+B4j + call Page0Call_2C55 + call Page0Call_3D05 + jp Page0Call_2539 +; --------------------------------------------------------------------------- + +p7Dloc_7302: ; CODE XREF: p7Dsub_7240+183j + call p7Dsub_733B + call relockFlashBack + call p7Dsub_7124 + push af + jr z, p7Dloc_7311 + call popErrorHandleR + +p7Dloc_7311: ; CODE XREF: p7Dsub_7240+CCj + pop af + push af + jr z, p7Dloc_731B + ld hl, Page0Call_2C79 + call pushErrorHandleR + +p7Dloc_731B: ; CODE XREF: p7Dsub_7240+D3j + call Page0Call_3D2F + ld a, 9 + call Page0Call_2C49 + pop af + jr z, p7Dloc_7329 + call popErrorHandleR + +p7Dloc_7329: ; CODE XREF: p7Dsub_7240+E4j + 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_75B1j + 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+36Ej + 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_2BBCp + ; p7Dsub_7240:p7Dloc_72D2p ... + call p7Dsub_7CB2 + ret nz + +p7Dloc_733F: ; CODE XREF: p7Dsub_7240+1Cj p7Dsub_7240+36j + call relockFlashBack + jp JErrorNo +; End of function p7Dsub_733B + +; --------------------------------------------------------------------------- +; START OF FUNCTION CHUNK FOR p7Dsub_7240 + +p7Dloc_7345: ; CODE XREF: p7Dsub_7240+5Fj + 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+52j + 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+142j + 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+131j + ; p7Dsub_7240+137j + ld de, 100h + +p7Dloc_738D: ; CODE XREF: p7Dsub_7240+150j + dec de + ld a, d + or e + jr nz, p7Dloc_738D + +p7Dloc_7392: ; CODE XREF: p7Dsub_7240+148j + ld hl, (unk_8678) + or a + sbc hl, bc + jp nz, p7Dloc_75A5 + +p7Dloc_739B: ; CODE XREF: seg001:723Dj + 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+17Ej + 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+1EBj + jp nz, Page7D_2BBC + +p7Dloc_740C: ; CODE XREF: p7Dsub_7240+1C7j + 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+1D7j + ; p7Dsub_7240+1DFj + 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+201j + 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+259j + 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+26Cj + ; p7Dsub_7240+273j + jr p7Dloc_74F0 +; --------------------------------------------------------------------------- + +p7Dloc_74BC: ; CODE XREF: p7Dsub_7240+163j + 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+28Dj + ; p7Dsub_7240+294j ... + jp p7Dloc_7150 +; --------------------------------------------------------------------------- + +p7Dloc_74F0: ; CODE XREF: p7Dsub_7240+25Bj + ; p7Dsub_7240:p7Dloc_74BAj ... + 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+2F3j + pop de + +p7Dloc_7525: ; CODE XREF: p7Dsub_7240+32Dj + pop af + pop ix + xor a + ret +; --------------------------------------------------------------------------- + +p7Dloc_752A: ; CODE XREF: p7Dsub_7240+2DCj + ld a, (ramCodeEnd) + or a + jr z, p7Dloc_7535 + call relockFlashBack + jr p7Dloc_7524 +; --------------------------------------------------------------------------- + +p7Dloc_7535: ; CODE XREF: p7Dsub_7240+2EEj + call p7Dsub_7CCF + pop de + push hl + push de + ld b, 4 + +p7Dloc_753D: ; CODE XREF: p7Dsub_7240+305j + call p7Dsub_4566 + cp 0FFh + jr nz, p7Dloc_7549 + inc hl + djnz p7Dloc_753D + jr p7Dloc_754C +; --------------------------------------------------------------------------- + +p7Dloc_7549: ; CODE XREF: p7Dsub_7240+302j + call Page7D_2BB0 + +p7Dloc_754C: ; CODE XREF: p7Dsub_7240+307j + 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+2D3p + 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+6j + ld hl, ramStart + ret +; End of function p7Dsub_756F + +; --------------------------------------------------------------------------- +; START OF FUNCTION CHUNK FOR p7Dsub_7240 + +p7Dloc_75A5: ; CODE XREF: p7Dsub_7240+158j + 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+Fj p7Dsub_7B41+Fj + jp p7Dloc_732F +; END OF FUNCTION CHUNK FOR p7Dsub_75B8 +; --------------------------------------------------------------------------- +; START OF FUNCTION CHUNK FOR p7Dsub_7240 + +p7Dloc_75B4: ; CODE XREF: p7Dsub_7240+18Ej + ; seg001:77A3j + 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_73C6p + +; 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+10p + ; FindSwapSector+18p ... + call NZIf83Plus + jr nz, p7Dloc_75E9 + cp 6Ah ; 'j' + ret +; --------------------------------------------------------------------------- + +p7Dloc_75E9: ; CODE XREF: p7Dsub_75E1+3j + cp 16h + ret +; End of function p7Dsub_75E1 + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_75EC: ; CODE XREF: p7Dsub_4A5A+4p p7Dsub_4A5A+44p ... + 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:5874p p7Dsub_6021p ... + 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+8p seg001:56F0p ... + ld de, 839Fh + and 0Fh + cp 0Fh + jr nz, p7Dloc_7609 + ld b, 4 + ret +; --------------------------------------------------------------------------- + +p7Dloc_7609: ; CODE XREF: p7Dsub_75FD+7j + cp 0Eh + jr nz, p7Dloc_7612 + ld b, 2 + xor a + jr p7Dloc_761A +; --------------------------------------------------------------------------- + +p7Dloc_7612: ; CODE XREF: p7Dsub_75FD+Ej + cp 0Dh + ret nz + ld b, 1 + xor a + ld (de), a + inc de + +p7Dloc_761A: ; CODE XREF: p7Dsub_75FD+13j + 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:551Cp p7Dsub_5525+10p ... + 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:43A2p seg001:46C9p ... + 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:471Bp p7Dsub_762Ap + 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_4A5Ap p7Dsub_51DB+21p ... + 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+55p + ; p7Dsub_484E:p7Dloc_486Cp ... + 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+2p seg001:5C38p ... + 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+18p + ld bc, 1 +; End of function p7Dsub_7663 + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_7666: ; CODE XREF: p7Dsub_4214+10p + ; CopyFlashPage+38p ... + res 1, (iy+25h) + call NZIf83Plus + jr z, p7Dloc_7671 + and 1Fh + +p7Dloc_7671: ; CODE XREF: p7Dsub_7666+7j + 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:768Cj seg001:76ECj + 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:76A6j + ld de, 4000h + +p7Dloc_76AD: ; CODE XREF: seg001:7697j seg001:769Fj + 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:76DCj + 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:76D7j + pop af + +p7Dloc_76E7: ; CODE XREF: seg001:76E4j + 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:76E2j + 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_4083p p7Dsub_40A6p ... + 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:7194j + 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:774Aj + 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:774Dj + ld a, 9 + ret +; --------------------------------------------------------------------------- + +ret8: ; CODE XREF: seg001:773Cj + ld a, 8 + ret + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_777E: ; CODE XREF: p7Dsub_4442+8p p7Dsub_45E4+37p ... + 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:7793j + 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:77EBj + jp p7Dloc_780D +; --------------------------------------------------------------------------- + +p7Dloc_77D2: ; CODE XREF: seg001:77CBj seg001:77CDj + 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:77D7j seg001:77DFj + 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:77C4j + ; seg001:p7Dloc_77CFj + jp ErrMemory +; --------------------------------------------------------------------------- + +p7Dloc_7810: ; CODE XREF: seg001:7798j + jp Page0Call_253D +; --------------------------------------------------------------------------- + +p7Dloc_7813: ; CODE XREF: seg001:7788j + 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:7849j + 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:783Fj + ld hl, 4000h + ld a, (unk_8439) + dec a + ld (unk_8439), a + +p7Dloc_7855: ; CODE XREF: seg001:7830j + 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:7839p seg001:7861p ... + 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+15j + push bc + +p7Dloc_7883: ; CODE XREF: p7Dsub_7865+1Bj + 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+2Fj p7Dsub_7865+31j + pop hl + ret +; End of function p7Dsub_7865 + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_78A3: ; CODE XREF: p7Dsub_795C+1Bp p7Dsub_795C+24p ... + push af + push hl + push bc + ld b, 8 + +p7Dloc_78A8: ; CODE XREF: p7Dsub_78A3+19j + 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+Dj + 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+7Dp p7Dsub_7AD0+50p + push hl + push bc + push af + ld de, 0FFFFh + ld a, b + or c + jr z, p7Dloc_78F1 + +p7Dloc_78CC: ; CODE XREF: p7Dsub_78C2+2Dj + ld a, (hl) + inc hl + push af + push hl + push bc + ld b, 8 + +p7Dloc_78D3: ; CODE XREF: p7Dsub_78C2+25j + 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+19j + 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+8j + 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_791Fp + ; p7Dsub_794D+6p ... + 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+14j + or 0FFh + +p7Dloc_7911: ; CODE XREF: p7Dsub_78F5+18j + 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+78p + push hl + push bc + push af + ld de, 0 + ld a, b + or c + jr z, p7Dloc_792D + +p7Dloc_791F: ; CODE XREF: p7Dsub_7915+15j + 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+8j p7Dsub_7915+Dj + 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_794Ep + 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+5j + in a, (9) + and 58h ; 'X' + +p7Dloc_7949: ; CODE XREF: LinkStatus+Bj + ; LinkStatus+Fj ... + 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_79F0p + push af + +p7Dloc_794E: ; CODE XREF: p7Dsub_794D+Bj + call LinkStatus + jr z, p7Dloc_795A + call p7Dsub_78F5 + jr nz, p7Dloc_795A + jr p7Dloc_794E +; --------------------------------------------------------------------------- + +p7Dloc_795A: ; CODE XREF: p7Dsub_794D+4j p7Dsub_794D+9j + pop af + ret +; End of function p7Dsub_794D + + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_795C: ; CODE XREF: seg001:7A30p + 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+13j p7Dsub_795C+19j ... + call p7Dsub_794D + or 0FFh + +p7Dloc_79F5: ; CODE XREF: p7Dsub_795C+5Fj p7Dsub_795C+92j + 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:7A10j + ld c, 32h ; '2' + +p7Dloc_7A19: ; CODE XREF: seg001:7A15j seg001:7A50j + 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:7A22j seg001:7A4Bj + call p7Dsub_7A85 + or 0FFh + jr p7Dloc_7A5D +; --------------------------------------------------------------------------- + +p7Dloc_7A59: ; CODE XREF: seg001:7A3Fj + call p7Dsub_7A75 + xor a + +p7Dloc_7A5D: ; CODE XREF: seg001:7A57j + 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+3p seg001:7A80p ... + 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_7A59p + 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_7A52p + 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:7A1Fp + 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+8p p7Dsub_7AD0+11p ... + 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+14j + or 0FFh + +p7Dloc_7AB1: ; CODE XREF: p7Dsub_7A96+17j + 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+53p + push hl + push bc + push af + ld a, b + or c + jr z, p7Dloc_7ACB + +p7Dloc_7ABE: ; CODE XREF: p7Dsub_7AB7+11j + 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+5j p7Dsub_7AB7+Bj + 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+8p + 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+4Ej + xor a + jr p7Dloc_7B39 +; --------------------------------------------------------------------------- + +p7Dloc_7B37: ; CODE XREF: p7Dsub_7AD0+14j p7Dsub_7AD0+1Dj ... + or 0FFh + +p7Dloc_7B39: ; CODE XREF: p7Dsub_7AD0+65j + 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_779Bp + 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+24j + 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:71BEp + ; p7Dsub_7240+1BCp ... + call p7Dsub_75EC + +p7Dloc_7B75: ; CODE XREF: p7Dsub_7B72+24j + 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+Cj + 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+1Ej + xor a + ret +; --------------------------------------------------------------------------- + +p7Dloc_7B9A: ; CODE XREF: p7Dsub_7B72+16j p7Dsub_7B72+2Ej + cp a + ret +; --------------------------------------------------------------------------- + +p7Dloc_7B9C: ; CODE XREF: p7Dsub_7B72+10j + 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:60F7p + xor a + ld b, 0Eh + ld hl, 9C88h + +p7Dloc_7BAA: ; CODE XREF: p7Dsub_7BA4+8j + 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:610Fp + 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+1Ap + 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_7BAFp p7Dsub_7BB5p + 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+6p p7Dsub_51C3+6p ... + ld b, c + ld a, 80h ; '�' + inc b + +p7Dloc_7BD0: ; CODE XREF: p7Dsub_7BCC+5j + 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_6638p + ; seg001:6A9Dp ... + 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+1C4p + ; seg001:77C8p + +; 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:7C3Dj + 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:7C4Bj + or 1 + ret + +; =============== S U B R O U T I N E ======================================= + + +p7Dsub_7C64: ; CODE XREF: seg001:7C3Ap + 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:7C6Fj + push bc + call CMPPRGNAMLEN + +p7Dloc_7C81: ; CODE XREF: seg001:7C7Bj + pop bc + or a + ret +; --------------------------------------------------------------------------- + +p7Dloc_7C84: ; CODE XREF: seg001:7C74j + 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+36p + call NZIf83Plus + jr nz, p7Dloc_7CA0 + and 7Fh ; '' + cp 6Ah ; 'j' + ret +; --------------------------------------------------------------------------- + +p7Dloc_7CA0: ; CODE XREF: p7Dsub_7C96+3j + 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+10Ap + 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+Bp p7Dsub_733Bp ... + 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_7234p + ; p7Dsub_7240+119p + 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+285p + ; p7Dsub_7240:p7Dloc_7535p ... + 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:7E7Dp + 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+23j + call p7Dsub_4566 + cp 0FFh + jr nz, p7Dloc_7D01 + inc hl + djnz p7Dloc_7CF5 + jr p7Dloc_7D04 +; --------------------------------------------------------------------------- + +p7Dloc_7D01: ; CODE XREF: p7Dsub_7CDA+20j + call Page7D_2BB0 + +p7Dloc_7D04: ; CODE XREF: p7Dsub_7CDA+25j + 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+3Cj + 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+53j + bit 6, d + jr z, p7Dloc_7D3A + inc a + res 6, d + +p7Dloc_7D3A: ; CODE XREF: p7Dsub_7CDA+5Bj + add hl, de + bit 7, h + jr z, p7Dloc_7D44 + inc a + res 7, h + set 6, h + +p7Dloc_7D44: ; CODE XREF: p7Dsub_7CDA+63j + 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:71A3j p7Dsub_7E40+13p + 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+5Aj + ld de, (iMathPtr5) + inc hl + inc hl + +p7Dloc_7DD9: ; CODE XREF: p7Dsub_7D67+6Aj + 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+7Cj + 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+87j + 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+39j p7Dsub_7D67+3Dj ... + nop + +p7Dloc_7E0E: ; CODE XREF: p7Dsub_7D67+A4j + call relockFlashBack + ld (Abackup), a + pop af + jp po, p7Dloc_7E19 + ei + +p7Dloc_7E19: ; CODE XREF: p7Dsub_7D67+AEj + 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+BDj + pop hl + pop de + pop bc + ret +; End of function p7Dsub_7D67 + +; --------------------------------------------------------------------------- + +p7Dloc_7E31: ; CODE XREF: seg001:719Ej seg001:7E3Dj + 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:7E35p + 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:7199j + 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:7E5Ej + 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:71A8j + call Page0Call_2C91 + ret + +p7Dloc_7E91: ; CODE XREF: seg001:71ADj + call page0_1F38 + ret + +.org $7FFF + .db 5Dh ; ]