Yeah, so page 3 was all sorts of wrong, still had hard-coded addresses I hadn't
fixed. That should be resolved now.
Page03_3825:
call j_ClrLCD
b_call(_dispBootVer)
ld hl, 1
ld (curRow), hl
ld hl, aBaseCode1_19
call j_PutS
bit localizeHookActive, (iy+hookflags3)
jr z, p03loc_401F
ld a, 79h
call j_call_character_hook
jr z, p03loc_4031
p03loc_401F:
ld hl, aEnterSelfTest
call p03sub_40E7
ld hl, aThisWillClearAllMemory
call p03sub_40E7
ld hl, aPressOnToCancel
call p03sub_40E7
p03loc_4031:
call j_RunIndicOff
call j_getkey
cp 5
jp nz, JForceCmdNoChar
call j_ClrScrn
ld hl, 403h
ld (curRow), hl
ld hl, aStart?
call j_PutS
call j_getkey
cp 5
jp nz, JForceCmdNoChar
call j_ClrScrn
res bPLinkOn, (iy+hookflags1)
set resetOnPowerOn, (iy+selfTestFlag)
res apdAble, (iy+apdFlags)
ld hl, 0
ld (curGStyle), hl
b_call(_getSerial)
ld hl, aId
jp z, p03loc_4077
call p03sub_429B
call j_ClrScrn
p03loc_4077:
call p03sub_4146
ld sp, 8D4Fh
p03loc_407D:
ld hl, 403h
ld (curRow), hl
ld hl, (curGStyle)
push hl
call j_DispHL
ei
pop hl
inc hl
ld (curGStyle), hl
xor a
call p03sub_409E
ld hl, aRom
or a
jp nz, p03loc_4295
jp p03loc_4172
p03sub_409E:
ld b, 0
jr p03loc_40AC
p03loc_40A2:
ld b, 18h
call NZIf83Plus
jr nz, p03loc_40AB
ld b, 78h
p03loc_40AB:
pop af
p03loc_40AC:
ld hl, 4000h
p03loc_40AF:
call LoadCIndPaged
add a, c
inc hl
bit 7, h
jr z, p03loc_40AF
call IsOnInterruptSet
jp nz, p03loc_41AB
push af
inc b
ld a, b
cp 8
jr z, p03loc_40A2
call NZIf83Plus
jr nz, p03loc_40CE
cp 7Ah
jr p03loc_40D0
p03loc_40CE:
cp 1Ah
p03loc_40D0:
jr nz, p03loc_40D8
pop af
ld hl, 4200h
jr p03loc_40AF
p03loc_40D8:
call NZIf83Plus
jr nz, p03loc_40E1
cp 7Eh
jr p03loc_40E3
p03loc_40E1:
cp 1Eh
p03loc_40E3:
jr nz, p03loc_40AB
pop af
ret
p03sub_40E7:
push hl
call ldHLind
ld (penCol), hl
pop hl
inc hl
inc hl
ld bc, 20h
ld de, OP1
push de
ldir
pop hl
call j_VPutS
ret
aEnterSelfTest:
.db 12h
.db 18h
.asc 'Enter Self-Test?',0
aThisWillClearAllMemory:
.db 4
.db 24h
.asc 'This will clear all memory',0
aPressOnToCancel:
.db 0Ch
.db 3Ah
.asc 'Press ',0C1h,'ON] to cancel',0
p03sub_4146:
call NZIf83Plus
ret nz
di
ld a, 45h
out (36h), a
xor a
out (37h), a
ld a, 80h
out (38h), a
ld hl, 0
p03loc_4159:
inc hl
in a, (4)
bit 7, a
jr z, p03loc_4159
ei
ld de, 503h
ld (curRow), de
call j_DispHL
call j_getkey
call j_ClrLCD
ret
p03loc_4172:
ld de, 8D4Fh
call p03sub_4368
jr nz, p03loc_41AB
call NZIf83Plus
jr nz, p03loc_4198
xor a
out (27h), a
ld a, 2
p03loc_4184:
push af
out (5), a
ld de, 0C000h
call p03sub_4368
jr nz, p03loc_419B
pop af
inc a
cp 8
jr c, p03loc_4184
xor a
out (5), a
p03loc_4198:
jp p03loc_407D
p03loc_419B:
pop bc
xor a
out (5), a
jr p03loc_41AB
p03sub_41A1:
add a, 18h
or 0C0h
di
call OutLCDCommand
ei
ret
p03loc_41AB:
xor a
ld (unk_9CAF), a
res onInterrupt, (iy+onFlags)
ld de, 8181h
call p03sub_424B
ld d, 0FFh
ld b, 80h
call p03sub_427C
ld b, 0BFh
call p03sub_427C
call p03sub_4274
ld a, 0FFh
call p03sub_426F
sub a
call p03sub_426F
ld d, 55h
ld e, 0AAh
call p03sub_424B
call j_getkey
or a
jr z, p03loc_41FE
ld de, 0FFh
call p03sub_424B
call j_getkey
or a
jr z, p03loc_41FE
ld a, 0AAh
call p03sub_426F
ld c, 27h
p03loc_41F1:
ld a, c
call p03sub_41A1
call j_getkey
or a
jr z, p03loc_41FE
dec c
jr nz, p03loc_41F1
p03loc_41FE:
res onInterrupt, (iy+onFlags)
call j_ClrScrn
ld a, (contrast)
call p03sub_41A1
ld ix, p03loc_42B3
ld b, 31h
call SetSlowSpeed
p03loc_4214:
ld hl, 503h
ld (curRow), hl
ld l, (ix+1)
ld h, 0
call j_DispHL
ei
p03loc_4223:
call GetCSC
call IsOnInterruptSet
jr nz, p03loc_4248
cp (ix+0)
jr nz, p03loc_4223
inc ix
inc ix
djnz p03loc_4214
call j_ClrScrn
ld hl, 703h
ld (curRow), hl
ld hl, aOk
call j_PutS
call j_getkey
p03loc_4248:
jp resetRam
p03sub_424B:
di
ld c, 20h
p03loc_424E:
ld a, 80h
call OutLCDCommand
ld a, c
call OutLCDCommand
ld b, 20h
p03loc_4259:
ld a, d
call lcd_busy
out (11h), a
ld a, e
call lcd_busy
out (11h), a
djnz p03loc_4259
inc c
ld a, c
cp 2Ch
jr nz, p03loc_424E
ei
ret
p03sub_426F:
ld d, a
ld e, a
call p03sub_424B
p03sub_4274:
call j_getkey
pop hl
or a
jr z, p03loc_41FE
jp (hl)
p03sub_427C:
di
ld c, 20h
p03loc_427F:
ld a, b
call OutLCDCommand
ld a, c
call OutLCDCommand
ld a, d
call lcd_busy
out (11h), a
inc c
ld a, c
cp 2Ch
jr nz, p03loc_427F
ei
ret
p03loc_4295:
call p03sub_429B
jp resetRam
p03sub_429B:
push hl
call j_ClrScrn
ld hl, 503h
ld (curRow), hl
pop hl
call j_PutS
ld hl, aFail
call j_PutS
call j_getkey
ret
p03loc_42B3:
.db 35h
.db 0Bh
.db 34h
.db 0Ch
.db 33h
.db 0Dh
.db 32h
.db 0Eh
.db 31h
.db 0Fh
.db 36h
.db 15h
.db 37h
.db 16h
.db 38h
.db 17h
.db 02h
.db 18h
.db 04h
.db 19h
.db 03h
.db 1Ah
.db 30h
.db 1Fh
.db 28h
.db 20h
.db 20h
.db 21h
.db 01h
.db 22h
.db 2Fh
.db 29h
.db 27h
.db 2Ah
.db 1Fh
.db 2Bh
.db 17h
.db 2Ch
.db 0Fh
.db 2Dh
.db 2Eh
.db 33h
.db 26h
.db 34h
.db 1Eh
.db 35h
.db 16h
.db 36h
.db 0Eh
.db 37h
.db 2Dh
.db 3Dh
.db 25h
.db 3Eh
.db 1Dh
.db 3Fh
.db 15h
.db 40h
.db 0Dh
.db 41h
.db 2Ch
.db 47h
.db 24h
.db 48h
.db 1Ch
.db 49h
.db 14h
.db 4Ah
.db 0Ch
.db 4Bh
.db 2Bh
.db 51h
.db 23h
.db 52h
.db 1Bh
.db 53h
.db 13h
.db 54h
.db 0Bh
.db 55h
.db 2Ah
.db 5Bh
.db 22h
.db 5Ch
.db 1Ah
.db 5Dh
.db 12h
.db 5Eh
.db 0Ah
.db 5Fh
.db 21h
.db 66h
.db 19h
.db 67h
.db 11h
.db 68h
.db 09h
.db 69h
EVALF3A:
ld hl, kbdGetKy
ld a, (hl)
or a
jr nz, p03loc_4320
ld h, a
ld l, a
jr p03loc_432A
p03loc_4320:
ld e, a
ld d, 0
ld (hl), d
ld hl, p03loc_4330-1
add hl, de
ld l, (hl)
ld h, d
p03loc_432A:
call SetXXXXOP2
jp GetCSC
p03loc_4330:
.db 22h
.db 18h
.db 1Ah
.db 19h
.db 00h
.db 00h
.db 00h
.db 00h
.db 69h
.db 5Fh
.db 55h
.db 4Bh
.db 41h
.db 37h
.db 2Dh
.db 00h
.db 68h
.db 5Eh
.db 54h
.db 4Ah
.db 40h
.db 36h
.db 2Ch
.db 00h
.db 67h
.db 5Dh
.db 53h
.db 49h
.db 3Fh
.db 35h
.db 2Bh
.db 21h
.db 66h
.db 5Ch
.db 52h
.db 48h
.db 3Eh
.db 34h
.db 2Ah
.db 20h
.db 00h
.db 5Bh
.db 51h
.db 47h
.db 3Dh
.db 33h
.db 29h
.db 1Fh
.db 0Fh
.db 0Eh
.db 0Dh
.db 0Ch
.db 0Bh
.db 15h
.db 16h
.db 17h
p03sub_4368:
ld hl, 0
or a
sbc hl, de
ex de, hl
push de
push hl
p03loc_4371:
ld b, 0
p03loc_4373:
ld (hl), b
inc hl
dec de
ld a, e
or d
jr z, p03loc_4382
inc b
ld a, b
cp 0FBh
jr c, p03loc_4373
jr p03loc_4371
p03loc_4382:
pop hl
pop de
p03loc_4384:
ld b, 0
p03loc_4386:
push de
push hl
ld de, 9C86h
or a
sbc hl, de
pop hl
pop de
jr z, p03loc_4396
ld a, (hl)
cp b
jr nz, p03loc_43A4
p03loc_4396:
inc hl
dec de
ld a, e
or d
jr z, p03loc_43B3
inc b
ld a, b
cp 0FBh
jr c, p03loc_4386
jr p03loc_4384
p03loc_43A4:
in a, (2)
and 80h
jr z, p03loc_43AD
xor a
out (5), a
p03loc_43AD:
ld hl, aRam
jp p03loc_4295
p03loc_43B3:
call IsOnInterruptSet
ret
#ifndef DEVIATE_FROM_ORIGINAL_FILE
;Not referenced anywhere.
ld a, 2
ld de, 1
jr p03loc_43C6
#endif
Page03_3711:
ld hl, OP3
GetK: ld a, 1
ld de, 0
p03loc_43C6:
call CheckSplitFlag
jr z, p03loc_43CF
add a, 3
ld e, a
inc a
p03loc_43CF:
ld (winTop), a
ld (curRow), de
call j_PutS
call j_EraseEOL
ret
p03sub_43DD:
push ix
ld ix, (unk_9700)
ld a, 1
call CheckSplitFlag
jr z, p03loc_43EC
ld a, 5
p03loc_43EC:
ld (curRow), a
ld a, (mcxCurApp)
cp kSolveTVM
jr nz, p03loc_43FA
ld hl, curRow
dec (hl)
p03loc_43FA:
sub a
ld (curCol), a
ld a, (curRow)
ld hl, winBtm
cp (hl)
jr nc, p03loc_441E
call p03sub_4E6C
inc a
jr z, p03loc_441B
call setTitle
ld de, 3
add ix, de
ld hl, curRow
inc (hl)
jr p03loc_43FA
p03loc_441B:
call j_EraseEOW2
p03loc_441E:
pop ix
ret
Page03_371D:
sub a
ld (curCol), a
ld a, (curRow)
ld hl, winBtm
cp (hl)
jr nc, p03loc_445C
ld a, ' '
call j_PutC
ld a, (unk_9813)
ld e, a
ld d, 5Eh
call j_GETTOKSTRING
call j_PutPS
ld a, '('
call j_PutC
ld e, 1Fh
ld d, 63h
call j_GETTOKSTRING
call j_PutPS
ld a, ')'
call j_PutC
call Page0Call_3627
call j_PutC
call j_EraseEOL
p03loc_445C:
call j_setNumWindow
p03loc_445F:
call Page03_3723
call j_CMP_NUM_INIT
or a
ret z
push af
ld a, 7Bh ;'{'
call j_wputc
call Page03_3723
ld de, OP1
call mov9B2
call p03sub_44C6
pop af
cp 1
jr z, p03loc_4490
ld a, ','
call p03sub_4492
call Page03_3723
ex de, hl
ld de, OP1
call mov9B2
call p03sub_44C6
p03loc_4490:
ld a, '}'
p03sub_4492:
ld b, a
ld a, (curRow)
inc a
ld hl, winBtm
cp (hl)
ld a, b
jr nc, p03loc_44AB
p03loc_449E:
ld de, (curRow)
push de
call j_wputc
pop hl
ld (curRow), hl
ret
p03loc_44AB:
bit appAutoScroll, (iy+appFlags)
jr z, p03loc_449E
res appAutoScroll, (iy+appFlags)
ld de, (curRow)
push de
call j_wputc
pop hl
ld (curRow), hl
set appAutoScroll, (iy+appFlags)
ret
p03sub_44C6:
bit appAutoScroll, (iy+appFlags)
jp z, p03loc_4587
res appAutoScroll, (iy+appFlags)
call p03loc_4587
set appAutoScroll, (iy+appFlags)
ret
Page03_3723:
ld a, (unk_9813)
res 7, a
ld hl, u0
ld de, u02
dec a
ret m
ld hl, v0
ld de, v02
dec a
ret m
ld hl, w0
ld de, w02
ret
setTitle:
sub a
ld (curCol), a
ld a, (winBtm)
dec a
ld hl, curRow
cp (hl)
jr nz, p03loc_451A
ld a, 1
bit windowHookActive, (iy+hookflags3)
jr z, p03loc_4510
call Page0Call_362D
jr nz, p03loc_4513
p03loc_4510:
ld a, (ix+3)
p03loc_4513:
inc a
jr z, p03loc_453E
ld a, 1Fh
jr p03loc_4540
p03loc_451A:
ld a, (winTop)
cp (hl)
jr nz, p03loc_453E
ld a, (mcxCurApp)
cp kSolveTVM
jr z, p03loc_453E
ld a, 2
bit windowHookActive, (iy+hookflags3)
jr z, p03loc_4534
call Page0Call_362D
jr nz, p03loc_4537
p03loc_4534:
ld a, (ix+0FDh)
p03loc_4537:
inc a
jr z, p03loc_453E
ld a, 1Eh
jr p03loc_4540
p03loc_453E:
ld a, ' '
p03loc_4540:
call j_PutC
bit windowHookActive, (iy+hookflags3)
jr z, p03loc_454F
ld a, 3
call Page0Call_362D
ret nz
p03loc_454F:
ld l, (ix+1)
ld h, (ix+2)
bit localizeHookActive, (iy+hookflags3)
jr z, p03loc_4565
push bc
ld b, (ix+0)
ld a, 14h
call j_call_character_hook
pop bc
p03loc_4565:
call IsInfStatContext
ret z
call p03sub_4D49
ld a, '='
call j_PutC
call j_setNumWindow
p03loc_4574:
call IsInfStatContext
jr nz, p03sub_4581
ld a, (ix+0)
call Rcl_StatVar
jr p03loc_4587
p03sub_4581:
ld a, (ix+0)
call j_RclSysTok
p03loc_4587:
ld a, 15h
call j_FormEReal
ld hl, OP3
call j_wputsEOL
ld a, (ix+0)
cp '0'
ret nz
ld a, (mcxCurApp)
cp kSolveTVM
ret nz
ld hl, curRow
inc (hl)
call j_setNumWindow
ld de, 3
add ix, de
call p03sub_4581
ld hl, curRow
dec (hl)
call j_setNumWindow
ld de, 0FFFDh
add ix, de
ret
p03sub_45BA:
ld a, 6
ld (curRow), a
jr p03loc_45E3
p03sub_45C1:
ld a, 2
call CheckSplitFlag
jr z, p03loc_45D5
ld a, 6
jr p03loc_45D5
Page03_372F:
ld a, 1
call CheckSplitFlag
jr z, p03loc_45D5
ld a, 5
p03loc_45D5:
ld (curRow), a
ld a, (mcxCurApp)
cp kSolveTVM
jr nz, p03loc_45E3
ld hl, curRow
dec (hl)
p03loc_45E3:
call CanAlphIns
call RecallEd
ld hl, (unk_9700)
call IsInfStatContext
jr nz, p03loc_4602
ld a, (hl)
call Rcl_StatVar
call CkOP1Real
cp 0Eh
jr nz, p03loc_4600
xor a
ld (OP1), a
p03loc_4600:
jr Page03_3735
p03loc_4602:
bit windowHookActive, (iy+hookflags3)
jr z, p03loc_460F
ld a, 5
call Page0Call_362D
jr nz, Page03_3735
p03loc_460F:
ld a, (hl)
call j_RclSysTok
Page03_3735:
call j_OP1toEdit
dispVarVal:
jr nc, Page03_3741
call releaseBuffer
jp ErrMemory_NoGoTo
Page03_3741:
call j_BufToTop
call j_fdispEOL
res 5, (iy+5)
ret
Page03_3747:
call RecallEd
call Page03_3723
call j_CMP_NUM_INIT
or a
ret z
call j_MinToEdit
jr nc, p03loc_463F
call releaseBuffer
jp ErrMemory_NoGoTo
p03loc_463F:
call j_BufToTop
call j_fdispEOL
res 5, (iy+5)
ret
RecallEd:
call Page03_37AD
Page03_3753:
call Page03_37A7
set 6, (iy+5)
call createNumEditBuf
ld (editSym), hl
call j_SetEmptyEditPtr
ret
createNumEditBuf:
call releaseBuffer
ld hl, ErrMemory_NoGoTo
call pushErrorHandleR
ld hl, 14h
call CreateEqu
call popErrorHandleR
ret
ProcessBufKeys:
push af
call CallCommon
pop af
ret
p03loc_4677:
bit windowHookActive, (iy+hookflags3)
jr z, p03loc_4690
ld b, a
push ix
ld ix, (unk_9700)
ld c, (ix+0FDh)
ld a, 0Ah
call Page0Call_362D
pop ix
ret nz
ld a, b
p03loc_4690:
cp 27h
jr nz, p03loc_46B4
ld a, (mcxCurApp)
cp kYequ
ret z
call p03sub_4B7F
ld a, (mcxCurApp)
cp kWindow
jp z, InitWindowContext
cp kZFactEd
jp z, InitZoomContext
cp kTblSet
jp z, InitTableSetContext
cp kSolveTVM
jp z, InitTVMContext
p03loc_46B4:
cp 5
jr z, p03loc_46BD
cp 4
jp nz, p03loc_474F
p03loc_46BD:
call p03sub_473A
jr nz, p03loc_4710
call IsEditEmpty
ret z
call ParseAndStoreSysVar
call DisplayEditSysVar
ld a, 1
bit windowHookActive, (iy+hookflags3)
jr z, p03loc_46D9
call Page0Call_362D
jr nz, p03loc_46DC
p03loc_46D9:
ld a, (ix+3)
p03loc_46DC:
inc a
jr nz, p03loc_46EE
ld a, (mcxCurApp)
cp kTblSet
jp z, Page0Call_3657
cp kSolveTVM
jr nz, p03loc_470D
jp Page0Call_365D
p03loc_46EE:
call p03sub_4742
jp nz, j_JForceYEqu
ld de, 3
add ix, de
ld (unk_9700), ix
call p03sub_4987
jr c, p03loc_470A
ld (curCol), a
call setTitle
jr p03loc_470D
p03loc_470A:
ld (curRow), a
p03loc_470D:
jp p03loc_45E3
p03loc_4710:
call p03sub_4727
ld a, (ix+3)
inc a
jp z, Page03_3747
ld de, 3
add ix, de
ld (unk_9700), ix
call Page0Call_3669
ret
p03sub_4727:
call ParseAndStoreSysVar
bit monAbandon, (iy+monFlags)
call z, DisplayEditSysVar
res monAbandon, (iy+monFlags)
ld ix, (unk_9700)
ret
p03sub_473A:
ld hl, (unk_9700)
ld a, (hl)
cp 1Fh
jr z, p03loc_4749
p03sub_4742:
ld a, (mcxCurApp)
cp kYequ
jr z, p03loc_474B
p03loc_4749:
xor a
ret
p03loc_474B:
call IsRecursiveMode
ret
p03loc_474F:
cp 6
jr nz, p03loc_4797
ld a, (mcxCurApp)
cp kSolveTVM
ret nz
ld hl, (unk_9700)
ld a, (hl)
cp '0'
ret nc
push af
call Page0Call_366F
call closeeditbufnor
pop af
sub '+'
ld hl, p03loc_4D62
ld e, a
ld d, 0
add hl, de
ld a, (hl)
call Page0Call_395D
ld hl, (unk_9700)
ld a, (hl)
call j_StoSysTok
call p03sub_4AE9
set 1, (iy+19h)
ld hl, (curRow)
push hl
sub a
ld (curCol), a
ld a, 0D0h
call j_PutC
pop hl
ld (curRow), hl
jp p03loc_45E3
p03loc_4797:
cp 3
jr nz, p03loc_4814
Page03_3765:
call p03sub_473A
jr nz, Page03_3771
call IsEditEmpty
ret z
call ParseAndStoreSysVar
call DisplayEditSysVar
ld a, 2
bit windowHookActive, (iy+hookflags3)
jr z, p03loc_47B7
call Page0Call_362D
jr nz, p03loc_47BA
p03loc_47B7:
ld a, (ix+0FDh)
p03loc_47BA:
inc a
jr nz, p03loc_47C8
ld a, (mcxCurApp)
cp kYequ
jr nz, p03loc_47DE
call Page0Call_367B
ret
p03loc_47C8:
ld de, 0FFFDh
add ix, de
ld (unk_9700), ix
call Page03_3789
jr nc, p03loc_47DB
call setTitle
jr p03loc_47DE
p03loc_47DB:
ld (curRow), a
p03loc_47DE:
jp p03loc_45E3
Page03_376B:
ld de, 0FFFDh
add ix, de
ld (unk_9700), ix
call Page03_3789
jr nc, p03loc_47F4
call Page03_371D
jr p03loc_47F7
p03loc_47F4:
ld (curRow), a
p03loc_47F7:
call Page03_3747
call InitNumVec
ret
Page03_3771:
call p03sub_4727
ld a, (ix+0FDh)
inc a
jr z, p03loc_4810
ld de, 0FFFDh
add ix, de
ld (unk_9700), ix
p03loc_4810:
call Page0Call_3687
ret
p03loc_4814:
bit enableQueue, (iy+rclFlag)
jr nz, CallCommon
cp 8Ah
ret z
CallCommon:
cp 9
jr nz, p03loc_482E
set 5, (iy+5)
call CanAlphIns
call Page0Call_366F
jp fDel
p03loc_482E:
cp 0Dh
jp nz, p03loc_4858
set cmdVirgin, (iy+cmdFlags)
set 5, (iy+5)
call Page0Call_366F
call CanAlphIns
call j_BufToTop
call Page03_37A7
call GETLASTENTRY
call j_RCLENTRYTOEDIT
res cmdVirgin, (iy+cmdFlags)
call j_BufToTop
call j_fdispEOL
ret
p03loc_4858:
cp 2
jr nz, p03loc_489E
res textInsMode, (iy+textFlags)
call j_BufLeft
jp z, p03sub_48F5
CommonKeys:
res textScrolled, (iy+textFlags)
call IsAtTop
jp z, p03loc_48FE
ld hl, (editTail)
call j_BUFPEEK3
call j_GetTokLen
ld b, a
ld a, (curCol)
sub b
jr c, p03loc_4890
ld hl, winLeftEdge
cp (hl)
jr c, p03loc_4890
jr z, p03loc_4890
p03loc_4888:
ld (curCol), a
call j_fdispEOL
jr p03sub_48F5
p03loc_4890:
ld a, (winLeftEdge)
inc a
ld (curCol), a
push af
call j_FDISPBOL
pop af
jr p03loc_4888
p03loc_489E:
cp 1
jr nz, p03loc_48FA
res textInsMode, (iy+textFlags)
call j_BUFPEEK
ret z
call j_GetTokLen
ld hl, curCol
add a, (hl)
push af
call j_BufRight
pop bc
ld a, b
cp 0Fh
jr c, p03loc_48F2
jr nz, p03loc_48C3
bit 1, (iy+0Eh)
jr z, p03loc_48F2
p03loc_48C3:
ld a, 0Eh
ld (curCol), a
call j_BufRight
jr nz, p03loc_48DA
call j_BufLeft
push de
call j_BufRight
pop de
call j_putbuf
jr p03sub_48F5
p03loc_48DA:
push de
call j_GetTokLen
pop de
push af
scf
call j_putbuf1
call j_BufLeft
pop bc
ld a, (curCol)
sub b
ld hl, winLeftEdge
cp (hl)
jr c, p03loc_4890
p03loc_48F2:
ld (curCol), a
p03sub_48F5:
res 6, (iy+5)
ret
p03loc_48FA:
cp 0Eh
jr nz, p03loc_4903
p03loc_48FE:
call Page03_37E3
jr p03sub_48F5
p03loc_4903:
cp 0Fh
jr nz, p03loc_490C
call p03sub_4B73
jr p03sub_48F5
p03loc_490C:
cp 0Bh
jr nz, p03loc_4917
call p03sub_48F5
call Page0Call_369F
ret
p03loc_4917:
cp '!'
jr nz, p03loc_4929
res textInsMode, (iy+textFlags)
call j_BufLeft
jr z, p03sub_48F5
call CommonKeys
jr p03loc_492D
p03loc_4929:
cp 0Ah
jr nz, p03loc_4943
p03loc_492D:
call Page0Call_366F
call p03sub_48F5
Leftmore:
res textInsMode, (iy+textFlags)
call j_BufDelete
ret z
set 5, (iy+5)
call j_fdispEOL
ret
p03loc_4943:
cp 0Ch
call z, j_rclkeyRtn
or a
ret z
cp 5Ah
ret c
cp 0FBh
jr nz, p03loc_4960
ld a, (keyExtend)
cp 0Dh
jr c, p03loc_495E
cp 8Ch
ret c
cp 0A6h
ret nc
p03loc_495E:
ld a, 0FBh
p03loc_4960:
call Page0Call_366F
bit enableQueue, (iy+rclFlag)
jr nz, p03loc_4972
bit 1, (iy+2Ah)
jr nz, p03loc_4972
cp 0C6h
ret z
p03loc_4972:
set 5, (iy+5)
bit 6, (iy+5)
call nz, fDel
call page0_1808
jp nz, fClear
call j_initNamePrompt
ret
p03sub_4987:
ld a, (curRow)
inc a
ld hl, winBtm
cp (hl)
ret c
ld a, (mcxCurApp)
cp kYequ
jr nz, p03loc_499B
call j_scrollUp
ret
p03loc_499B:
call Page03_37B9
call j_scrollUp
call p03sub_4A39
sub a
ret
Page03_3789:
ld a, (curRow)
or a
jr z, p03loc_49BE
dec a
ld hl, winTop
cp (hl)
ret nc
ld a, (mcxCurApp)
cp kYequ
jr nz, p03loc_49BE
call j_scrollDown
scf
ret
p03loc_49BE:
call Page03_37B9
call j_scrollDown
call p03sub_4A40
scf
ret
fDel: call p03sub_48F5
call j_BufClear
call Page03_37A7
call j_EraseEOL
p03loc_49D5:
res 0, (iy+0Eh)
Page03_3C3F:
res 1, (iy+0Eh)
ret
fClear:
call j_ConvKeyToTok
finsDisp:
push de
bit textInsMode, (iy+textFlags)
jr nz, p03loc_49F1
call j_BufReplace
pop de
ret z
call j_putbuf
ret
p03loc_49F1:
call j_bufInsert
pop de
ret z
call j_putbuf
ret
Page03_37A1:
ret
Page03_37A7:
push af
bit 1, (iy+2Ah)
jr z, p03loc_4A07
pop af
call j_RestorePenCol
ret
p03loc_4A07:
ld a, (winLeftEdge)
ld (curCol), a
pop af
ret
Page03_37AD:
ld a, 1
ld (curCol), a
ld c, a
call j_getcurloc
ld b, 0Eh
p03loc_4A1A:
ld a, (hl)
inc hl
inc c
cp 3Dh
jr z, p03loc_4A31
cp 3Ah
jr z, p03loc_4A31
cp 3Fh
jr z, p03loc_4A31
cp 7Fh
jr z, p03loc_4A31
djnz p03loc_4A1A
sub a
ret
p03loc_4A31:
ld a, c
ld (winLeftEdge), a
ld (curCol), a
ret
p03sub_4A39:
ld c, 1Eh
ld a, (winTop)
jr FinsDisp02
p03sub_4A40:
ld c, 1Fh
jr p03loc_4A46
Page03_37B3:
ld c, 20h ; ' '
p03loc_4A46:
ld a, (winBtm)
dec a
jr FinsDisp02
Page03_37B9:
ld a, (curRow)
ld c, 20h ; ' '
FinsDisp02:
ld b, a
ld a, (winLeftEdge)
push af
ld hl, (curRow)
push hl
ld hl, curRow
ld (hl), b
sub a
ld (curCol), a
ld a, c
call j_PutC
pop hl
ld (curRow), hl
pop af
ld (winLeftEdge), a
ret
p03loc_4A6F:
call p03sub_48F5
ld bc, (errOffset)
p03loc_4A76:
ld a, c
or b
jr z, p03loc_4A87
call j_BufRight
jr z, p03loc_4A87
push bc
call j_putbuf
pop bc
dec bc
jr p03loc_4A76
p03loc_4A87:
call j_fdispEOL
ret
closeeditbufnor:
call CanAlphIns
bit editOpen, (iy+editFlags)
ret z
call j_CloseEditEqu
ret
ParseAndStoreSysVar:
call IsEditEmpty
jr nz, p03loc_4AAB
call p03sub_4742
jr z, p03loc_4AAB
call closeeditbufnor
ld a, 0Eh
ld (OP1), a
jr p03loc_4ABE
p03loc_4AAB:
set 6, (iy+5)
call closeeditbufnor
bit monAbandon, (iy+monFlags)
jr nz, p03sub_4AE9
call page0_166E
call j_ParseInp
p03loc_4ABE:
ld hl, (unk_9700)
bit 5, (iy+5)
jr z, p03sub_4AE9
call IsInfStatContext
jr nz, p03loc_4AD8
call page0_1717
call EOP1NotReal
ld a, (hl)
call STO_STATVAR
jr p03sub_4AE9
p03loc_4AD8:
bit windowHookActive, (iy+hookflags3)
jr z, p03loc_4AE5
ld a, 6
call Page0Call_362D
jr nz, p03sub_4AE9
p03loc_4AE5:
ld a, (hl)
call j_StoSysTok
p03sub_4AE9:
call j_CleanAll
jr releaseBuffer
p03loc_4AEE:
res grfSplitOverride, (iy+sGrFlags)
releaseBuffer:
call page0_166E
rst 10h
call nc, DelVar
ret
DisplayEditSysVar:
call Page03_37A7
call j_setNumWindow
ld ix, (unk_9700)
call p03sub_473A
jp nz, p03loc_445F
bit windowHookActive, (iy+hookflags3)
jr z, p03loc_4B16
ld a, 9
call Page0Call_362D
ret nz
p03loc_4B16:
jp p03loc_4574
Page03_37D1:
ld hl, (editSym)
varnameToOP1hl:
push hl
call ZeroOP1
pop hl
ld a, (hl)
and 1Fh
ld (OP1), a
ld b, 2
dec hl
dec hl
dec hl
dec hl
dec hl
dec hl
cp 1
jr z, p03loc_4B37
cp 0Dh
jr nz, p03loc_4B48
p03loc_4B37:
ld a, (hl)
cp ':'
jr z, p03loc_4B40
ld b, (hl)
dec b
jr p03loc_4B47
p03loc_4B40:
dec hl
ld a, (hl)
inc hl
or a
jr z, p03loc_4B48
ld b, (hl)
p03loc_4B47:
dec hl
p03loc_4B48:
ld de, OP1+1
jr p03loc_4B5E
nameToOP1:
call ZeroOP1
ld hl, (editSym)
dec hl
dec hl
dec hl
dec hl
dec hl
dec hl
ld b, (hl)
inc b
ld de, OP1+1
p03loc_4B5E:
ld a, (hl)
dec hl
ld (de), a
inc de
djnz p03loc_4B5E
ret
Page03_37E3:
res 0, (iy+0Eh)
call j_BufToTop
call Page03_37A7
call j_fdispEOL
ret
p03sub_4B73:
call j_BufRight
ret z
call j_putbuf
jr p03sub_4B73
numPPutAway:
jp j_saveShadow
p03sub_4B7F:
ld hl, p03loc_4AEE
call pushErrorHandleR
call ParseAndStoreSysVar
call popErrorHandleR
res grfSplitOverride, (iy+sGrFlags)
ret
p03loc_4B90:
jr c, p03loc_4BD2
ld a, (mcxCurApp)
cp kYequ
jr nz, p03loc_4B9D
call j_shrinkWindow2
ret
p03loc_4B9D:
cp kSolveTVM
ret z
call j_shrinkWindow2
jp p, p03sub_4A39
ld a, 7
sub b
ld b, a
ld a, (curRow)
ld c, a
ld de, 3
ld hl, (unk_9700)
p03loc_4BB4:
ld a, b
cp c
jr c, p03loc_4BCC
add hl, de
ld a, 8
bit windowHookActive, (iy+hookflags3)
jr z, p03loc_4BC6
call Page0Call_362D
jr nz, p03loc_4BC7
p03loc_4BC6:
ld a, (hl)
p03loc_4BC7:
inc a
ret z
inc c
jr p03loc_4BB4
p03loc_4BCC:
ld c, 1Fh
ld a, b
jp FinsDisp02
p03loc_4BD2:
ld a, (mcxCurApp)
cp kYequ
jp z, p03loc_4C68
cp kSolveTVM
jp z, p03loc_4C71
ld a, 7
sub b
ld b, a
ld ix, (unk_9700)
ld a, (curRow)
ld c, a
ld de, 3
p03loc_4BEE:
inc c
add ix, de
call p03sub_4E6C
inc a
jr z, p03loc_4C24
ld a, c
cp b
jr nz, p03loc_4BEE
ld hl, (curRow)
push hl
dec a
ld (curRow), a
call Page03_37B9
ld hl, curRow
inc (hl)
ld a, (mcxCurApp)
cp kInfStat
jr nz, p03loc_4C1E
ld a, (unk_8D0B+1)
push af
call p03sub_7278
pop af
ld (unk_8D0B+1), a
jr p03loc_4C21
p03loc_4C1E:
call setTitle
p03loc_4C21:
pop hl
jr p03loc_4C5B
p03loc_4C24:
ld a, (winTop)
dec a
ld b, a
ld ix, (unk_9700)
ld a, (curRow)
ld c, a
ld de, 0FFFDh
p03loc_4C34:
dec c
add ix, de
call p03sub_4E6C
inc a
ret z
ld a, c
cp b
jr nz, p03loc_4C34
ld hl, (curRow)
push hl
inc a
ld (curRow), a
ld a, (unk_89FE)
push af
call Page03_37B9
call j_scrollDown
call setTitle
pop af
ld (unk_89FE), a
pop hl
inc l
p03loc_4C5B:
ld (curRow), hl
ld a, h
push af
call Page03_37AD
pop af
ld (curCol), a
ret
p03loc_4C68:
ld hl, (curRow)
push hl
call j_dispNumEOS
jr p03loc_4C21
p03loc_4C71:
ld hl, (curRow)
push hl
ld a, 7
call Page0Call_36E7
call j_SolveRedisp
jr p03loc_4C21
#ifndef DEVIATE_FROM_ORIGINAL_FILE
;Not referenced anywhere.
set curLock, (iy+curFlags)
#endif
numRedisp:
jp j_rstrShadow
Page03_37F5:
bit 5, (iy+36h)
call nz, Page0Call_36F3
jr nz, numError02
call j_rstrShadow2
call j_SetMenuFlags
numError02:
bit editOpen, (iy+editFlags)
jr nz, p03loc_4CAA
call page0_166E
call j_setupEditEqu
ld hl, p03loc_4CBD
call pushErrorHandleR
call popErrorHandleR
p03loc_4CAA:
call j_BufToTop
call p03loc_49D5
call Page03_37A7
call IsBasicProgZero
jp nz, p03loc_4A6F
call j_fdispEOL
ret
p03loc_4CBD:
call j_CloseEditEqu
call releaseBuffer
jp ErrMemory_NoGoTo
Page03_380D:
push hl
ld hl, (chkDelPtr1)
ld a, (hl)
inc hl
or (hl)
ld a, (OP1M)
jr z, p03loc_4D27
pop bc
bit 5, a
jr z, p03loc_4CEF
push bc
push af
xor 1
ld (OP1M), a
rst 10h
jp c, ErrUndefined
pop af
pop bc
ld (OP1M), a
ex de, hl
ld a, (hl)
inc hl
or (hl)
ret z
ex de, hl
set 5, (hl)
p03loc_4CEF:
ld hl, (chkDelPtr3)
set 5, (hl)
p03loc_4CF4:
ld a, (OP1M)
bit 6, a
jr z, p03loc_4D15
call IsFunctionMode
p03loc_4CFE:
ret z
ld a, b
and 1Fh
cp 3
jp z, SetTblGraphDraw
bit smarter_test, (iy+smartFlags)
jp nz, SetTblGraphDraw
set smartGraph, (iy+smartFlags)
jp SetTblGraphDrawPreserveSmartTest
p03loc_4D15:
bit 5, a
jr nz, p03loc_4D44
bit 4, a
jr z, p03loc_4D22
call IsFuncMode
jr p03loc_4CFE
p03loc_4D22:
call IsRecursiveMode
jr p03loc_4CFE
p03loc_4D27:
pop bc
ld hl, (chkDelPtr3)
bit 5, (hl)
ret z
res 5, (hl)
bit 5, a
jr z, p03loc_4CF4
push af
xor 1
ld (OP1M), a
rst 10h
jp c, ErrUndefined
pop af
ld (OP1M), a
res 5, (hl)
p03loc_4D44:
call IsParametricMode
jr p03loc_4CFE
p03sub_4D49:
push bc
push af
ld a, (winBtm)
ld b, a
p03loc_4D4F:
ld a, (hl)
inc hl
or a
scf
jr z, p03loc_4D5E
call j_PutC
ld a, (curRow)
cp b
jr c, p03loc_4D4F
p03loc_4D5E:
pop bc
ld a, b
pop bc
ret
p03loc_4D62:
.db 23h
.db 21h
.db 22h
.db 20h
.db 24h
Page03_3813:
ld a, (ix+0)
ret
Load_SFont:
push bc
bit fontHookActive, (iy+hookflags3)
jr z, p03loc_4D7B
ld b, a
ld a, 0
call j_FontHook
ld a, b
jr z, p03loc_4D97
p03loc_4D7B:
bit localizeHookActive, (iy+hookflags3)
jr z, p03loc_4D8A
ld b, a
ld a, 75h
call j_call_character_hook
ld a, b
jr z, p03loc_4D97
p03loc_4D8A:
ld de, p03loc_4E7C-8
add hl, de
ld de, sFont_record
call Mov8B
ld hl, sFont_record
p03loc_4D97:
pop bc
ret
SFont_Len:
bit fontHookActive, (iy+hookflags3)
jr z, p03loc_4DA7
ld b, a
ld a, 2
call j_FontHook
ld a, b
ret z
p03loc_4DA7:
bit localizeHookActive, (iy+hookflags3)
jr z, p03loc_4DB5
ld b, a
ld a, 77h
call j_call_character_hook
ld a, b
ret z
p03loc_4DB5:
ld de, p03loc_4E7C-8
add hl, de
ld b, (hl)
ret
Page03_3819:
push bc
or a
jp z, ErrDomain
call CheckSplitFlag
jr z, p03loc_4DC7
add a, 4
p03loc_4DC7:
pop hl
ld l, a
push hl
call OP3ToOP1
pop hl
OutputExpr:
push hl
call j_Disp
pop hl
ld a, h
dec a
jp m, ErrDomain
cp 10h
jp p, ErrDomain
ld h, a
ld a, (winBtm)
ld b, a
ld a, l
dec a
jp m, ErrDomain
cp b
jp p, ErrDomain
ld l, a
ld de, (curRow)
push de
ld (curRow), hl
ld hl, p03loc_4E65
call pushErrorHandleR
ld hl, (FPS)
ld (editTop), hl
ld (editCursor), hl
ex de, hl
ld hl, (OPS)
ld (editTail), hl
ld (editBtm), hl
call CpHLDE
jp c, ErrMemory_NoGoTo
ld de, ioPrompt
call MovFrOP1
ld hl, ioPrompt
ld a, (hl)
and 1Fh
jr z, p03loc_4E40
cp 0Ch
jr nz, p03loc_4E3E
rst 10h
jr nc, p03loc_4E3F
ld a, 0Ch
ld hl, OP1
ld de, OP3
call mov9B2
ld hl, OP2
call mov9B2
ld hl, OP3
jr p03loc_4E40
p03loc_4E3E:
rst 10h
p03loc_4E3F:
ex de, hl
p03loc_4E40:
call j_rclToQueue
jp c, ErrMemory
call popErrorHandleR
res appAutoScroll, (iy+appFlags)
ld hl, (editCursor)
ld de, (rclQueue)
call j_finishoutput
set appAutoScroll, (iy+appFlags)
pop hl
ld (curRow), hl
res donePrgm, (iy+doneFlags)
ei
ret
p03loc_4E65:
pop hl
ld (curRow), hl
jp JErrorNo
p03sub_4E6C:
ld a, 0
bit windowHookActive, (iy+hookflags3)
jr z, p03loc_4E78
call Page0Call_362D
ret nz
p03loc_4E78:
ld a, (ix+0)
ret
p03loc_4E7C:
.db 6
.db 0
.db 0
.db 2Ch
.db 12h
.db 12h
.db 24h
.db 0
.db 4
.db 0
.db 0
.db 0Ah
.db 0Ah
.db 0Ah
.db 0Eh
.db 0
.db 4
.db 0
.db 0
.db 0Ah
.db 0Ah
.db 4
.db 4
.db 0
.db 4
.db 0
.db 0
.db 0Ah
.db 0Ah
.db 0Eh
.db 0Ah
.db 0
.db 4
.db 0
.db 8
.db 0Ch
.db 0Eh
.db 0Ch
.db 8
.db 0
.db 4
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 5
.db 0
.db 0
.db 0Eh
.db 1Fh
.db 0Eh
.db 4
.db 0
.db 4
.db 0
.db 2
.db 4
.db 4
.db 4
.db 8
.db 0
.db 4
.db 0
.db 0
.db 0Ah
.db 4
.db 0Ah
.db 0
.db 0
.db 4
.db 0
.db 0
.db 0
.db 0Eh
.db 0Ah
.db 0Eh
.db 0
.db 4
.db 0
.db 0
.db 0
.db 4
.db 0Eh
.db 4
.db 0
.db 4
.db 0
.db 0
.db 0
.db 0
.db 4
.db 0
.db 0
.db 4
.db 0
.db 0
.db 0
.db 0Eh
.db 4
.db 4
.db 4
.db 4
.db 0
.db 7
.db 2
.db 1
.db 6
.db 0
.db 0
.db 5
.db 0
.db 1Eh
.db 18h
.db 1Eh
.db 18h
.db 18h
.db 0
.db 4
.db 0
.db 6
.db 4
.db 4
.db 0Ch
.db 4
.db 0
.db 5
.db 0
.db 6
.db 2
.db 1Ah
.db 2
.db 0
.db 0
.db 4
.db 0
.db 0Ch
.db 2
.db 4
.db 0Eh
.db 0
.db 0
.db 4
.db 0
.db 0
.db 2
.db 4
.db 8
.db 0Eh
.db 0
.db 5
.db 0
.db 0Ch
.db 12h
.db 12h
.db 0Ch
.db 0
.db 0
.db 5
.db 0
.db 16h
.db 18h
.db 10h
.db 10h
.db 0
.db 0
.db 4
.db 0
.db 0Eh
.db 4
.db 4
.db 0
.db 0
.db 0
.db 5
.db 0
.db 6
.db 18h
.db 6
.db 0
.db 1Eh
.db 0
.db 6
.db 0
.db 4
.db 3Eh
.db 8
.db 3Eh
.db 10h
.db 0
.db 5
.db 0
.db 18h
.db 6
.db 18h
.db 0
.db 1Eh
.db 0
.db 4
.db 0
.db 0
.db 6
.db 0
.db 0
.db 0
.db 0
.db 4
.db 0
.db 0Eh
.db 8
.db 0Ch
.db 8
.db 0Eh
.db 0
.db 5
.db 0
.db 8
.db 4
.db 1Eh
.db 4
.db 8
.db 0
.db 6
.db 0
.db 0
.db 2Eh
.db 2Ah
.db 2Ah
.db 2Eh
.db 0
.db 3
.db 0
.db 2
.db 7
.db 2
.db 2
.db 2
.db 0
.db 3
.db 0
.db 2
.db 2
.db 2
.db 7
.db 2
.db 0
.db 1
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 2
.db 0
.db 2
.db 2
.db 2
.db 0
.db 2
.db 0
.db 4
.db 0
.db 0Ah
.db 0Ah
.db 0Ah
.db 0
.db 0
.db 0
.db 6
.db 0
.db 14h
.db 3Eh
.db 14h
.db 3Eh
.db 14h
.db 0
.db 6
.db 0
.db 1Ch
.db 28h
.db 1Ch
.db 0Ah
.db 3Ch
.db 0
.db 4
.db 0
.db 0Ah
.db 2
.db 4
.db 8
.db 0Ah
.db 0
.db 5
.db 0
.db 8
.db 14h
.db 8
.db 14h
.db 0Ah
.db 0
.db 2
.db 0
.db 2
.db 2
.db 2
.db 0
.db 0
.db 0
.db 3
.db 0
.db 2
.db 4
.db 4
.db 4
.db 2
.db 0
.db 3
.db 0
.db 4
.db 2
.db 2
.db 2
.db 4
.db 0
.db 6
.db 0
.db 8
.db 2Ah
.db 1Ch
.db 2Ah
.db 8
.db 0
.db 4
.db 0
.db 0
.db 4
.db 0Eh
.db 4
.db 0
.db 0
.db 3
.db 0
.db 0
.db 0
.db 2
.db 2
.db 4
.db 0
.db 4
.db 0
.db 0
.db 0
.db 0Eh
.db 0
.db 0
.db 0
.db 2
.db 0
.db 0
.db 0
.db 0
.db 0
.db 2
.db 0
.db 4
.db 0
.db 2
.db 2
.db 4
.db 8
.db 8
.db 0
.db 4
.db 0
.db 4
.db 0Ah
.db 0Ah
.db 0Ah
.db 4
.db 0
.db 4
.db 0
.db 4
.db 0Ch
.db 4
.db 4
.db 0Eh
.db 0
.db 4
.db 0
.db 0Ch
.db 2
.db 4
.db 8
.db 0Eh
.db 0
.db 4
.db 0
.db 0Ch
.db 2
.db 4
.db 2
.db 0Ch
.db 0
.db 4
.db 0
.db 8
.db 0Ah
.db 0Eh
.db 2
.db 2
.db 0
.db 4
.db 0
.db 0Eh
.db 8
.db 0Ch
.db 2
.db 0Ch
.db 0
.db 4
.db 0
.db 6
.db 8
.db 0Eh
.db 0Ah
.db 0Eh
.db 0
.db 4
.db 0
.db 0Eh
.db 2
.db 4
.db 8
.db 8
.db 0
.db 4
.db 0
.db 0Eh
.db 0Ah
.db 0Eh
.db 0Ah
.db 0Eh
.db 0
.db 4
.db 0
.db 0Eh
.db 0Ah
.db 0Eh
.db 2
.db 0Ch
.db 0
.db 2
.db 0
.db 0
.db 2
.db 0
.db 2
.db 0
.db 0
.db 3
.db 0
.db 0
.db 2
.db 0
.db 2
.db 4
.db 0
.db 4
.db 0
.db 2
.db 4
.db 8
.db 4
.db 2
.db 0
.db 4
.db 0
.db 0
.db 0Eh
.db 0
.db 0Eh
.db 0
.db 0
.db 4
.db 0
.db 8
.db 4
.db 2
.db 4
.db 8
.db 0
.db 4
.db 0
.db 0Ch
.db 2
.db 4
.db 0
.db 4
.db 0
.db 6
.db 0
.db 1Ch
.db 2
.db 1Ah
.db 2Ah
.db 1Ch
.db 0
.db 4
.db 0
.db 4
.db 0Ah
.db 0Eh
.db 0Ah
.db 0Ah
.db 0
.db 4
.db 0
.db 0Ch
.db 0Ah
.db 0Ch
.db 0Ah
.db 0Ch
.db 0
.db 4
.db 0
.db 6
.db 8
.db 8
.db 8
.db 6
.db 0
.db 4
.db 0
.db 0Ch
.db 0Ah
.db 0Ah
.db 0Ah
.db 0Ch
.db 0
.db 4
.db 0
.db 0Eh
.db 8
.db 0Ch
.db 8
.db 0Eh
.db 0
.db 4
.db 0
.db 0Eh
.db 8
.db 0Ch
.db 8
.db 8
.db 0
.db 4
.db 0
.db 6
.db 8
.db 0Ah
.db 0Ah
.db 6
.db 0
.db 4
.db 0
.db 0Ah
.db 0Ah
.db 0Eh
.db 0Ah
.db 0Ah
.db 0
.db 4
.db 0
.db 0Eh
.db 4
.db 4
.db 4
.db 0Eh
.db 0
.db 4
.db 0
.db 2
.db 2
.db 2
.db 0Ah
.db 0Eh
.db 0
.db 4
.db 0
.db 0Ah
.db 0Ah
.db 0Ch
.db 0Ah
.db 0Ah
.db 0
.db 4
.db 0
.db 8
.db 8
.db 8
.db 8
.db 0Eh
.db 0
.db 4
.db 0
.db 0Ah
.db 0Eh
.db 0Eh
.db 0Ah
.db 0Ah
.db 0
.db 4
.db 0
.db 0Ch
.db 0Ah
.db 0Ah
.db 0Ah
.db 0Ah
.db 0
.db 4
.db 0
.db 0Eh
.db 0Ah
.db 0Ah
.db 0Ah
.db 0Eh
.db 0
.db 4
.db 0
.db 0Ch
.db 0Ah
.db 0Ch
.db 8
.db 8
.db 0
.db 4
.db 0
.db 0Eh
.db 0Ah
.db 0Ah
.db 0Eh
.db 6
.db 0
.db 4
.db 0
.db 0Ch
.db 0Ah
.db 0Ch
.db 0Ah
.db 0Ah
.db 0
.db 4
.db 0
.db 6
.db 8
.db 4
.db 2
.db 0Ch
.db 0
.db 4
.db 0
.db 0Eh
.db 4
.db 4
.db 4
.db 4
.db 0
.db 4
.db 0
.db 0Ah
.db 0Ah
.db 0Ah
.db 0Ah
.db 0Eh
.db 0
.db 4
.db 0
.db 0Ah
.db 0Ah
.db 0Ah
.db 4
.db 4
.db 0
.db 4
.db 0
.db 0Ah
.db 0Ah
.db 0Ah
.db 0Eh
.db 0Ah
.db 0
.db 4
.db 0
.db 0Ah
.db 0Ah
.db 4
.db 0Ah
.db 0Ah
.db 0
.db 4
.db 0
.db 0Ah
.db 0Ah
.db 4
.db 4
.db 4
.db 0
.db 4
.db 0
.db 0Eh
.db 2
.db 4
.db 8
.db 0Eh
.db 0
.db 4
.db 0
.db 4
.db 0Ah
.db 0Eh
.db 0Ah
.db 4
.db 0
.db 4
.db 0
.db 8
.db 8
.db 4
.db 2
.db 2
.db 0
.db 3
.db 0
.db 6
.db 2
.db 2
.db 2
.db 6
.db 0
.db 4
.db 0
.db 4
.db 0Ah
.db 0
.db 0
.db 0
.db 0
.db 4
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0Eh
.db 0
.db 3
.db 0
.db 4
.db 2
.db 0
.db 0
.db 0
.db 0
.db 4
.db 0
.db 0
.db 6
.db 0Ah
.db 0Ah
.db 6
.db 0
.db 4
.db 0
.db 8
.db 0Ch
.db 0Ah
.db 0Ah
.db 0Ch
.db 0
.db 4
.db 0
.db 0
.db 6
.db 8
.db 8
.db 6
.db 0
.db 4
.db 0
.db 2
.db 6
.db 0Ah
.db 0Ah
.db 6
.db 0
.db 4
.db 0
.db 0
.db 4
.db 0Ah
.db 0Ch
.db 6
.db 0
.db 3
.db 0
.db 2
.db 4
.db 6
.db 4
.db 4
.db 0
.db 4
.db 0
.db 6
.db 0Ah
.db 6
.db 2
.db 0Ch
.db 0
.db 4
.db 0
.db 8
.db 0Ch
.db 0Ah
.db 0Ah
.db 0Ah
.db 0
.db 2
.db 0
.db 2
.db 0
.db 2
.db 2
.db 2
.db 0
.db 4
.db 0
.db 2
.db 0
.db 2
.db 0Ah
.db 4
.db 0
.db 4
.db 0
.db 8
.db 8
.db 0Ah
.db 0Ch
.db 0Ah
.db 0
.db 3
.db 0
.db 6
.db 2
.db 2
.db 2
.db 2
.db 0
.db 6
.db 0
.db 0
.db 34h
.db 2Ah
.db 2Ah
.db 22h
.db 0
.db 4
.db 0
.db 0
.db 0Ch
.db 0Ah
.db 0Ah
.db 0Ah
.db 0
.db 4
.db 0
.db 0
.db 4
.db 0Ah
.db 0Ah
.db 4
.db 0
.db 4
.db 0
.db 0
.db 0Ch
.db 0Ah
.db 0Ch
.db 8
.db 0
.db 4
.db 0
.db 0
.db 6
.db 0Ah
.db 6
.db 2
.db 0
.db 4
.db 0
.db 0
.db 0Ah
.db 0Ch
.db 8
.db 8
.db 0
.db 3
.db 0
.db 0
.db 6
.db 4
.db 2
.db 6
.db 0
.db 3
.db 0
.db 4
.db 6
.db 4
.db 4
.db 2
.db 0
.db 4
.db 0
.db 0
.db 0Ah
.db 0Ah
.db 0Ah
.db 0Eh
.db 0
.db 4
.db 0
.db 0
.db 0Ah
.db 0Ah
.db 4
.db 4
.db 0
.db 6
.db 0
.db 0
.db 22h
.db 2Ah
.db 2Ah
.db 14h
.db 0
.db 4
.db 0
.db 0
.db 0Ah
.db 4
.db 4
.db 0Ah
.db 0
.db 4
.db 0
.db 0
.db 0Ah
.db 0Ah
.db 4
.db 8
.db 0
.db 5
.db 0
.db 0
.db 1Eh
.db 4
.db 8
.db 1Eh
.db 0
.db 4
.db 0
.db 6
.db 4
.db 8
.db 4
.db 6
.db 0
.db 2
.db 0
.db 2
.db 2
.db 2
.db 2
.db 2
.db 0
.db 4
.db 0
.db 0Ch
.db 4
.db 2
.db 4
.db 0Ch
.db 0
.db 5
.db 0
.db 0
.db 0Ah
.db 14h
.db 0
.db 0
.db 0
.db 4
.db 0
.db 0Eh
.db 0
.db 0Eh
.db 0
.db 0Eh
.db 0
.db 4
.db 0
.db 0Eh
.db 0Ah
.db 0Ah
.db 0Ah
.db 0Eh
.db 0
.db 3
.db 0
.db 2
.db 6
.db 2
.db 2
.db 2
.db 0
.db 4
.db 0
.db 0Ch
.db 2
.db 4
.db 8
.db 0Eh
.db 0
.db 4
.db 0
.db 0Ch
.db 2
.db 4
.db 2
.db 0Ch
.db 0
.db 4
.db 0
.db 8
.db 0Ah
.db 0Eh
.db 2
.db 2
.db 0
.db 4
.db 0
.db 0Eh
.db 8
.db 0Ch
.db 2
.db 0Ch
.db 0
.db 4
.db 0
.db 6
.db 8
.db 0Eh
.db 0Ah
.db 0Eh
.db 0
.db 4
.db 0
.db 0Eh
.db 2
.db 4
.db 8
.db 8
.db 0
.db 4
.db 0
.db 0Eh
.db 0Ah
.db 0Eh
.db 0Ah
.db 0Eh
.db 0
.db 4
.db 0
.db 0Eh
.db 0Ah
.db 0Eh
.db 2
.db 0Ch
.db 0
.db 5
.db 2
.db 4
.db 0Ch
.db 12h
.db 1Eh
.db 12h
.db 0
.db 5
.db 10h
.db 8
.db 0Ch
.db 12h
.db 1Eh
.db 12h
.db 0
.db 5
.db 0Ch
.db 12h
.db 0Ch
.db 12h
.db 1Eh
.db 12h
.db 0
.db 5
.db 12h
.db 0
.db 0Ch
.db 12h
.db 1Eh
.db 12h
.db 0
.db 5
.db 4
.db 8
.db 0
.db 0Ch
.db 14h
.db 0Ah
.db 0
.db 5
.db 10h
.db 8
.db 0
.db 0Ch
.db 14h
.db 0Ah
.db 0
.db 5
.db 8
.db 14h
.db 0
.db 0Ch
.db 14h
.db 0Ah
.db 0
.db 5
.db 0
.db 14h
.db 0
.db 0Ch
.db 14h
.db 0Ah
.db 0
.db 5
.db 10h
.db 0Eh
.db 8
.db 0Ch
.db 8
.db 0Eh
.db 0
.db 5
.db 2
.db 1Ch
.db 10h
.db 18h
.db 10h
.db 1Ch
.db 0
.db 4
.db 4
.db 0Ah
.db 0
.db 0Eh
.db 0Ch
.db 0Eh
.db 0
.db 4
.db 0Ah
.db 0Eh
.db 8
.db 0Ch
.db 8
.db 0Eh
.db 0
.db 4
.db 0
.db 2
.db 4
.db 0Ah
.db 0Ch
.db 6
.db 0
.db 4
.db 0
.db 8
.db 4
.db 0Ah
.db 0Ch
.db 6
.db 0
.db 4
.db 4
.db 0Ah
.db 4
.db 0Ah
.db 0Ch
.db 6
.db 0
.db 4
.db 0Ah
.db 0
.db 4
.db 0Ah
.db 0Ch
.db 6
.db 0
.db 4
.db 2
.db 4
.db 0Eh
.db 4
.db 4
.db 0Eh
.db 0
.db 4
.db 8
.db 4
.db 0Eh
.db 4
.db 4
.db 0Eh
.db 0
.db 4
.db 4
.db 0Ah
.db 0Eh
.db 4
.db 4
.db 0Eh
.db 0
.db 4
.db 0Ah
.db 0
.db 0Eh
.db 4
.db 4
.db 0Eh
.db 0
.db 4
.db 2
.db 4
.db 0
.db 0Ch
.db 4
.db 0Eh
.db 0
.db 4
.db 8
.db 4
.db 0
.db 0Ch
.db 4
.db 0Eh
.db 0
.db 4
.db 4
.db 0Ah
.db 0
.db 0Ch
.db 4
.db 0Eh
.db 0
.db 4
.db 0
.db 0Ah
.db 0
.db 0Ch
.db 4
.db 0Eh
.db 0
.db 6
.db 4
.db 8
.db 1Ch
.db 22h
.db 22h
.db 1Ch
.db 0
.db 6
.db 10h
.db 8
.db 1Ch
.db 22h
.db 22h
.db 1Ch
.db 0
.db 6
.db 8
.db 14h
.db 1Ch
.db 22h
.db 22h
.db 1Ch
.db 0
.db 6
.db 14h
.db 0
.db 1Ch
.db 22h
.db 22h
.db 1Ch
.db 0
.db 6
.db 4
.db 8
.db 0
.db 1Ch
.db 22h
.db 1Ch
.db 0
.db 6
.db 10h
.db 8
.db 0
.db 1Ch
.db 22h
.db 1Ch
.db 0
.db 6
.db 8
.db 14h
.db 0
.db 1Ch
.db 22h
.db 1Ch
.db 0
.db 6
.db 0
.db 14h
.db 0
.db 1Ch
.db 22h
.db 1Ch
.db 0
.db 4
.db 2
.db 4
.db 0Ah
.db 0Ah
.db 0Ah
.db 0Eh
.db 0
.db 4
.db 8
.db 4
.db 0Ah
.db 0Ah
.db 0Ah
.db 0Eh
.db 0
.db 4
.db 4
.db 0Ah
.db 0
.db 0Ah
.db 0Ah
.db 0Eh
.db 0
.db 4
.db 0Ah
.db 0
.db 0Ah
.db 0Ah
.db 0Ah
.db 0Eh
.db 0
.db 5
.db 4
.db 8
.db 0
.db 14h
.db 14h
.db 0Ah
.db 0
.db 5
.db 10h
.db 8
.db 0
.db 14h
.db 14h
.db 0Ah
.db 0
.db 5
.db 8
.db 14h
.db 0
.db 14h
.db 14h
.db 0Ah
.db 0
.db 5
.db 0
.db 14h
.db 0
.db 14h
.db 14h
.db 0Ah
.db 0
.db 4
.db 0
.db 6
.db 8
.db 8
.db 6
.db 0Ch
.db 0
.db 4
.db 0
.db 0
.db 6
.db 8
.db 6
.db 0Ch
.db 0
.db 5
.db 0Ah
.db 14h
.db 12h
.db 1Ah
.db 16h
.db 12h
.db 0
.db 5
.db 0Ah
.db 14h
.db 0
.db 1Ch
.db 12h
.db 12h
.db 0
.db 3
.db 0
.db 2
.db 4
.db 0
.db 0
.db 0
.db 0
.db 3
.db 0
.db 4
.db 2
.db 0
.db 0
.db 0
.db 0
.db 4
.db 0
.db 0Ah
.db 0
.db 0
.db 0
.db 0
.db 0
.db 4
.db 0
.db 4
.db 0
.db 4
.db 8
.db 6
.db 0
.db 2
.db 0
.db 2
.db 0
.db 2
.db 2
.db 2
.db 0
.db 5
.db 0
.db 0
.db 0Ah
.db 14h
.db 14h
.db 0Ah
.db 0
.db 4
.db 0
.db 4
.db 0Ah
.db 0Ch
.db 0Ah
.db 0Ch
.db 0
.db 5
.db 0
.db 2
.db 0Ah
.db 14h
.db 4
.db 4
.db 0
.db 6
.db 0
.db 0
.db 8
.db 14h
.db 22h
.db 3Eh
.db 0
.db 4
.db 0
.db 4
.db 8
.db 4
.db 0Ah
.db 4
.db 0
.db 4
.db 0
.db 6
.db 8
.db 0Eh
.db 8
.db 6
.db 0
.db 3
.db 0
.db 6
.db 4
.db 4
.db 4
.db 6
.db 0
.db 4
.db 0
.db 8
.db 4
.db 4
.db 0Ah
.db 0Ah
.db 0
.db 5
.db 0
.db 0
.db 14h
.db 14h
.db 1Eh
.db 10h
.db 0
.db 6
.db 0
.db 0
.db 3Eh
.db 14h
.db 14h
.db 14h
.db 0
.db 5
.db 0
.db 4
.db 0Ah
.db 0Ch
.db 8
.db 10h
.db 0
.db 5
.db 0
.db 1Eh
.db 8
.db 4
.db 8
.db 1Eh
.db 0
.db 5
.db 0
.db 0
.db 0Eh
.db 14h
.db 14h
.db 8
.db 0
.db 5
.db 0
.db 0
.db 1Ch
.db 8
.db 0Ah
.db 4
.db 0
.db 6
.db 0
.db 8
.db 1Ch
.db 2Ah
.db 1Ch
.db 8
.db 0
.db 6
.db 0
.db 1Ch
.db 22h
.db 22h
.db 14h
.db 36h
.db 0
.db 4
.db 0
.db 0Eh
.db 0
.db 0Ah
.db 4
.db 0Ah
.db 0
.db 4
.db 0
.db 0Eh
.db 0
.db 0Ah
.db 4
.db 8
.db 0
.db 4
.db 0
.db 0Ah
.db 4
.db 0Ah
.db 0
.db 0
.db 0
.db 3
.db 0
.db 0
.db 0
.db 0
.db 0
.db 7
.db 0
.db 4
.db 0
.db 2
.db 6
.db 0Eh
.db 6
.db 2
.db 0
.db 3
.db 0
.db 0
.db 6
.db 6
.db 0
.db 0
.db 0
.db 4
.db 0
.db 2
.db 2
.db 4
.db 8
.db 8
.db 0
.db 3
.db 0
.db 0
.db 0
.db 6
.db 0
.db 0
.db 0
.db 4
.db 0
.db 0Ch
.db 2
.db 4
.db 0Eh
.db 0
.db 0
.db 4
.db 0
.db 4
.db 0Ah
.db 4
.db 0
.db 0
.db 0
.db 4
.db 0
.db 0Eh
.db 4
.db 2
.db 0Ch
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 4
.db 0
.db 8
.db 0
.db 8
.db 0Ah
.db 0Ch
.db 0
.db 4
.db 0
.db 4
.db 0Ch
.db 0Ah
.db 0Ch
.db 8
.db 0
.db 4
.db 0
.db 8
.db 0Ah
.db 4
.db 0Ah
.db 2
.db 0
.db 4
.db 0
.db 0Eh
.db 8
.db 0Eh
.db 8
.db 8
.db 0
.db 4
.db 0
.db 0
.db 4
.db 0Ah
.db 0Ch
.db 6
.db 0
.db 3
.db 0
.db 0
.db 4
.db 4
.db 4
.db 7
.db 0
.db 3
.db 0
.db 6
.db 5
.db 5
.db 5
.db 5
.db 0
.db 4
.db 0
.db 0Ah
.db 5
.db 5
.db 5
.db 5
.db 0Ah
.db 3
.db 0
.db 6
.db 4
.db 6
.db 4
.db 6
.db 0
.db 3
.db 0
.db 2
.db 7
.db 7
.db 7
.db 2
.db 0
.db 6
.db 20h
.db 20h
.db 21h
.db 24h
.db 28h
.db 20h
.db 3Fh
.db 5
.db 0
.db 2
.db 0
.db 8
.db 0
.db 0
.db 1Fh
.db 6
.db 20h
.db 20h
.db 23h
.db 24h
.db 28h
.db 30h
.db 3Fh
.db 5
.db 4
.db 0Ah
.db 11h
.db 0
.db 0
.db 0
.db 1Fh
.db 6
.db 0Fh
.db 29h
.db 39h
.db 29h
.db 0Fh
.db 0
.db 3Fh
.db 5
.db 18h
.db 9
.db 0Fh
.db 9
.db 18h
.db 0
.db 1Fh
.db 6
.db 0Eh
.db 0Ah
.db 0Bh
.db 0Ah
.db 3Ah
.db 2Ah
.db 3Fh
.db 5
.db 0
.db 0
.db 10h
.db 1Ch
.db 17h
.db 15h
.db 1Fh
.db 6
.db 0Eh
.db 2Ah
.db 3Bh
.db 2Ah
.db 0Eh
.db 0
.db 3Fh
.db 5
.db 0
.db 10h
.db 15h
.db 10h
.db 0
.db 0
.db 1Fh
.db 6
.db 20h
.db 20h
.db 21h
.db 26h
.db 28h
.db 20h
.db 3Fh
.db 5
.db 6
.db 8
.db 10h
.db 0
.db 0
.db 0
.db 1Fh
.db 2
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 3
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 5
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 6
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 4
.db 0
.db 0Ah
.db 4
.db 0Ah
.db 4
.db 0Ah
.db 0
.db 6
.db 0
.db 1Ch
.db 28h
.db 1Ch
.db 0Ah
.db 3Ch
.db 0
.db 5
.db 0
.db 4
.db 0Eh
.db 1Fh
.db 0Eh
.db 0
.db 0
.db 5
.db 0
.db 0Ch
.db 12h
.db 14h
.db 12h
.db 14h
.db 0
.db 1
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 1
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 1
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 1
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 1
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 1
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 1
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 1
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 1
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 1
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 1
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
InitAboutContext:
ld hl, p03loc_569D
call AppInit
call j_CleanAll
set grfSplitOverride, (iy+sGrFlags)
p03loc_5681:
sub a
ld (winTop), a
call j_ClrWindow
call Page0Call_3E07
#ifndef DEVIATE_FROM_ORIGINAL_FILE
;Uh?
jr p03loc_568D
p03loc_568D:
#endif
res curAble, (iy+curFlags)
res curOn, (iy+curFlags)
set curLock, (iy+curFlags)
ret
p03loc_569A:
jp p03loc_5681
p03loc_569D:
.dw p03loc_56BA
.dw j_numPPutAway
.dw p03loc_56AA
.dw p03loc_56B6
.dw p03loc_56B7
.dw p03loc_569A
.db 0Ah
p03loc_56AA:
res curLock, (iy+curFlags)
res grfSplitOverride, (iy+sGrFlags)
xor a
ld (varClass), a
p03loc_56B6:
ret
p03loc_56B7:
jp JForceCmdNoChar
p03loc_56BA:
cp kApp
jp z, InitAboutContext
cp kClear
jp z, JForceCmdNoChar
cp echoStart1
ret c
jp JForceCmd
#ifndef DEVIATE_FROM_ORIGINAL_FILE
;Not referenced anywhere.
call page0_176F
ld hl, p03loc_5814
call AppInit
ret
#endif
InitTVMContext:
res 1, (iy+19h)
set grfSplitOverride, (iy+sGrFlags)
call RESETWINTOP
bit prgmEdit, (iy+prgmFlags)
jr z, p03loc_56F0
call j_POPCX
call call_cxPutAway
ld a, kSolveTVM
ld (mcxCurApp), a
p03loc_56F0:
ld hl, p03loc_5814
call AppInit
ld hl, p03loc_58AB
ld (unk_9700), hl
call p03sub_43DD
ld a, 7
call Page0Call_36E7
call j_SolveDisp
call Page03_372F
ret
InitWindowContext:
bit prgmEdit, (iy+prgmFlags)
jr z, JForceWindowSettings
call j_POPCX
call call_cxPutAway
ld a, kWindow
ld (mcxCurApp), a
JForceWindowSettings:
call page0_176F
ld hl, p03loc_5814
call AppInit
bit windowHookActive, (iy+hookflags3)
jr z, p03loc_5732
ld a, 4
call Page0Call_362D
jr nz, p03loc_574A
p03loc_5732:
ld hl, p03loc_595D
ld a, 11h
bit localizeHookActive, (iy+hookflags3)
call nz, j_call_character_hook
ld de, OP3
call Mov8B
call Mov8B
call Page03_3711
p03loc_574A:
call p03sub_5751
call Page03_372F
ret
p03sub_5751:
bit windowHookActive, (iy+hookflags3)
jr z, p03loc_575E
ld a, 7
call Page0Call_362D
jr nz, p03sub_5779
p03loc_575E:
ld hl, p03loc_5836
call IsFuncMode
jr nz, p03sub_5779
ld hl, p03loc_584E
call IsFunctionMode
jr nz, p03sub_5779
ld hl, p03loc_588D
call IsParametricMode
jr nz, p03sub_5779
ld hl, p03loc_586C
p03sub_5779:
ld (unk_9700), hl
call p03sub_43DD
ret
InitZoomContext:
ld hl, p03loc_5814
call AppInit
call page0_176F
ld hl, p03loc_5970
ld a, 12h
bit localizeHookActive, (iy+hookflags3)
call nz, j_call_character_hook
ld de, OP3
call Mov8B
call Mov8B
call Page03_3711
ld hl, p03loc_5824
call p03sub_5779
call Page03_372F
ret
InitTableSetContext:
bit prgmEdit, (iy+prgmFlags)
jp nz, Page0Call_35F7
call InitNumVec
set grfSplitOverride, (iy+sGrFlags)
ld hl, p03loc_5964
ld a, 13h
bit localizeHookActive, (iy+hookflags3)
call nz, j_call_character_hook
ld de, OP3
call Mov8B
call Mov8B
call Page03_3711
ld hl, p03loc_582D
call p03sub_5779
ld a, 3
call Page0Call_35FD
call Page0Call_3603
call Page03_372F
ret
InitNumVec:
ld hl, p03loc_5814
call AppInit
ret
Page03_3609:
call InitNumVec
call p03sub_45C1
ret
Page03_360F:
call InitNumVec
call p03sub_45BA
ret
Page03_3615:
ld ix, p03loc_586C
ld (unk_9700), ix
ret
Page03_361B:
ld hl, p03loc_58C3
ld (unk_9700), hl
ret
Page03_3621:
push ix
ld ix, p03loc_586C
call setTitle
pop ix
ret
p03loc_5814:
.dw p03loc_4677
.dw j_numPPutAway
.dw p03sub_4B7F
.dw j_numRedisp
.dw Page0Call_37FB
.dw p03loc_4B90
.db 0Ah
.db 0FFh
.db 0
.db 0
p03loc_5824:
.db 28h ; (
.db 0D6h ; �
.db 58h ; X
.db 29h ; )
.db 0DCh ; �
.db 58h ; X
.db 0FFh
.db 0
.db 0
p03loc_582D:
.db 1Ah
.db 0E2h ; �
.db 58h ; X
.db 21h ; !
.db 0EBh ;
.db 58h ; X
.db 0FFh
.db 0
.db 0
p03loc_5836:
.db 0Ah
.db 0
.db 59h ; Y
.db 0Bh
.db 0FBh ; �
.db 58h ; X
.db 2
.db 5
.db 59h ; Y
.db 0Ch
.db 0Fh
.db 59h ; Y
.db 0Dh
.db 0Ah
.db 59h ; Y
.db 3
.db 14h
.db 59h ; Y
.db 36h ; 6
.db 19h
.db 59h ; Y
.db 0FFh
.db 0
.db 0
p03loc_584E:
.db 10h
.db 23h ; #
.db 59h ; Y
.db 11h
.db 1Eh
.db 59h ; Y
.db 23h ; #
.db 28h ; (
.db 59h ; Y
.db 0Ah
.db 0
.db 59h ; Y
.db 0Bh
.db 0FBh ; �
.db 58h ; X
.db 2
.db 5
.db 59h ; Y
.db 0Ch
.db 0Fh
.db 59h ; Y
.db 0Dh
.db 0Ah
.db 59h ; Y
.db 3
.db 14h
.db 59h ; Y
.db 0FFh
.db 0
.db 0
p03loc_586C:
.db 1Fh
.db 0F0h ; �
.db 58h ; X
.db 1Dh
.db 58h ; X
.db 59h ; Y
.db 1Bh
.db 45h ; E
.db 59h ; Y
.db 34h ; 4
.db 4Fh ; O
.db 59h ; Y
.db 0Ah
.db 0
.db 59h ; Y
.db 0Bh
.db 0FBh ; �
.db 58h ; X
.db 2
.db 5
.db 59h ; Y
.db 0Ch
.db 0Fh
.db 59h ; Y
.db 0Dh
.db 0Ah
.db 59h ; Y
.db 3
.db 14h
.db 59h ; Y
.db 0FFh
.db 0
.db 0
p03loc_588D:
.db 0Eh
.db 0D6h ; �
.db 26h ; &
.db 0Fh
.db 0D1h ; �
.db 26h ; &
.db 22h ; "
.db 0F5h ; �
.db 58h ; X
.db 0Ah
.db 0
.db 59h ; Y
.db 0Bh
.db 0FBh ; �
.db 58h ; X
.db 2
.db 5
.db 59h ; Y
.db 0Ch
.db 0Fh
.db 59h ; Y
.db 0Dh
.db 0Ah
.db 59h ; Y
.db 3
.db 14h
.db 59h ; Y
.db 0FFh
.db 0
.db 0
p03loc_58AB:
.db 2Bh ; +
.db 2Eh ; .
.db 59h ; Y
.db 2Ch ; ,
.db 30h ; 0
.db 59h ; Y
.db 2Dh ; -
.db 33h ; 3
.db 59h ; Y
.db 2Eh ; .
.db 36h ; 6
.db 59h ; Y
.db 2Fh ; /
.db 3Ah ; :
.db 59h ; Y
.db 30h ; 0
.db 3Dh ; =
.db 59h ; Y
.db 31h ; 1
.db 41h ; A
.db 59h ; Y
.db 0FFh
.db 0
.db 0
p03loc_58C3:
.db 4
.db 0F0h ; �
.db 58h ; X
.db 4
.db 0F0h ; �
.db 58h ; X
.db 5
.db 0F0h ; �
.db 58h ; X
.db 5
.db 0F0h ; �
.db 58h ; X
.db 32h ; 2
.db 0F0h ; �
.db 58h ; X
.db 32h ; 2
.db 0F0h ; �
.db 58h ; X
.db 0FFh
.db 58h ; X
.db 46h ; F
.db 61h ; a
.db 63h ; c
.db 74h ; t
.db 0
.db 59h ; Y
.db 46h ; F
.db 61h ; a
.db 63h ; c
.db 74h ; t
.db 0
.db 54h ; T
.db 62h ; b
.db 6Ch ; l
.db 53h ; S
.db 74h ; t
.db 61h ; a
.db 72h ; r
.db 74h ; t
.db 0
.db 0BEh ; �
.db 54h ; T
.db 62h ; b
.db 6Ch ; l
.db 0
.db 1
.db 4Dh ; M
.db 69h ; i
.db 6Eh ; n
.db 0
.db 54h ; T
.db 73h ; s
.db 74h ; t
.db 65h ; e
.db 70h ; p
.db 0
.db 58h ; X
.db 6Dh ; m
.db 61h ; a
.db 78h ; x
.db 0
.db 58h ; X
.db 6Dh ; m
.db 69h ; i
.db 6Eh ; n
.db 0
.db 58h ; X
.db 73h ; s
.db 63h ; c
.db 6Ch ; l
.db 0
.db 59h ; Y
.db 6Dh ; m
.db 61h ; a
.db 78h ; x
.db 0
.db 59h ; Y
.db 6Dh ; m
.db 69h ; i
.db 6Eh ; n
.db 0
.db 59h ; Y
.db 73h ; s
.db 63h ; c
.db 6Ch ; l
.db 0
.db 58h ; X
.db 72h ; r
.db 65h ; e
.db 73h ; s
.db 0
.db 5Bh ; [
.db 6Dh ; m
.db 61h ; a
.db 78h ; x
.db 0
.db 5Bh ; [
.db 6Dh ; m
.db 69h ; i
.db 6Eh ; n
.db 0
.db 5Bh ; [
.db 73h ; s
.db 74h ; t
.db 65h ; e
.db 70h ; p
.db 0
.db 0DDh ; �
.db 0
.db 49h ; I
.db 25h ; %
.db 0
.db 50h ; P
.db 56h ; V
.db 0
.db 50h ; P
.db 4Dh ; M
.db 54h ; T
.db 0
.db 46h ; F
.db 56h ; V
.db 0
.db 50h ; P
.db 2Fh ; /
.db 59h ; Y
.db 0
.db 43h ; C
.db 2Fh ; /
.db 59h ; Y
.db 0
.db 50h ; P
.db 6Ch ; l
.db 6Fh ; o
.db 74h ; t
.db 53h ; S
.db 74h ; t
.db 61h ; a
.db 72h ; r
.db 74h ; t
.db 0
.db 50h ; P
.db 6Ch ; l
.db 6Fh ; o
.db 74h ; t
.db 53h ; S
.db 74h ; t
.db 65h ; e
.db 70h ; p
.db 0
.db 1
.db 4Dh ; M
.db 61h ; a
.db 78h ; x
.db 0
p03loc_595D:
.asc 'WINDOW',0
p03loc_5964:
.asc 'TABLE SETUP',0
p03loc_5970:
.asc 'ZOOM FACTORS',0
p03sub_597D:
push af
call ShRAcc
ld b, a
pop af
and 0Fh
inc b
add a, 0
daa
jr p03loc_598E
p03loc_598B:
add a, 16h
daa
p03loc_598E:
djnz p03loc_598B
ret
SetXXOP1:
ld hl, OP1
jr p03loc_5999
SetXXOP2:
ld hl, OP2
p03loc_5999:
push hl
push af
call OPSet0
pop af
call p03sub_597D
pop hl
inc hl
cp 10h
jr nc, p03loc_59AD
call ShLAcc
jr p03loc_59AE
p03loc_59AD:
inc (hl)
p03loc_59AE:
inc hl
ld (hl), a
ret
SetXXXXOP2:
push hl
call OP2Set0
pop hl
ld a, h
or l
ret z
ld a, l
and 0Fh
add a, 0
daa
ld (OP2+4), a
ld a, h
call ShRAcc
ld de, 4096h
call p03sub_59FA
ld a, h
and 0Fh
ld de, 256h
call p03sub_59FA
ld a, l
call ShRAcc
ld de, 16h
call p03sub_59FA
ld hl, 8484h
ld (hl), 85h
p03loc_59E4:
ld a, (OP2M)
cp 10h
ret nc
ld hl, 8487h
xor a
rld
dec hl
rld
dec hl
rld
dec hl
dec (hl)
jr p03loc_59E4
p03sub_59FA:
ret z
push hl
ld b, a
p03loc_59FD:
ld hl, 8487h
ld a, (hl)
add a, e
daa
ld (hl), a
dec hl
ld a, (hl)
adc a, d
daa
ld (hl), a
dec hl
ld a, (hl)
adc a, 0
daa
ld (hl), a
djnz p03loc_59FD
pop hl
ret
p03sub_5A13:
call PopRealO6
call PopRealO5
ld de, OP5
ld hl, OP6
call j_WTOV
ret
UCLineS:push af
scf
jr p03loc_5A49
p03sub_5A27:
ld hl, (FPS)
ld de, 0FFE5h
add hl, de
ld de, 0FFF7h
call p03sub_7084
push af
call p03sub_707D
pop hl
ld l, a
ret
CLine:
bit g_style_active, (iy+sGrFlags)
jr z, p03loc_5A41
p03loc_5A41:
call PUSHMCPLXO3
call PUSHMCPLXO1
CLineS: push af
or a
p03loc_5A49:
ld a, 2
bit drawingHookActive, (iy+hookflags3)
call nz, Page0Call_3483
jr z, p03loc_5A57
pop af
ret
BCALL_503E:
push af
p03loc_5A57:
push bc
push de
push hl
push af
ld c, 1
push bc
ld ix, 0
add ix, sp
ld a, 0Ah
push af
ld de, 0FFE5h
call j_XYRNDBOTH
jp nz, p03loc_5C20
ld de, 0FFF7h
call j_XYRNDBOTH
jp nz, p03loc_5C10
call p03sub_5C38
jr z, p03loc_5A96
call CpyTo1FPS3
ld de, OP1
call j_XftoI
ld (unk_9188), a
call CpyTo1FPS1
ld de, OP1
call j_XftoI
ld (unk_9189), a
p03loc_5A96:
call p03sub_5A27
ld (unk_918A), hl
p03loc_5A9C:
pop af
dec a
push af
jp z, p03loc_5D38
call p03sub_5A27
and h
jr z, p03loc_5ACB
cp 4
jr nc, p03loc_5AC4
push af
call p03sub_5C38
jp z, p03loc_5D37
ld a, (unk_9189)
ld b, a
ld a, (unk_9188)
pop hl
bit 0, h
jr z, p03loc_5AC7
ld e, 3Fh
p03loc_5AC1:
call p03sub_5C4D
p03loc_5AC4:
jp p03loc_5D38
p03loc_5AC7:
ld e, 1
jr p03loc_5AC1
p03loc_5ACB:
ld a, h
or l
jp z, p03loc_5BB2
push hl
ld hl, (FPS)
ld de, 0FFE5h
add hl, de
ld (chkDelPtr2), hl
ld de, 0FFF7h
add hl, de
ld (chkDelPtr1), hl
bit 0, (ix+0)
jr z, p03loc_5B24
res 0, (ix+0)
call CpyTo1FPS1
call CpyTo2FPS3
ld b, 0Ch
call p03sub_5D0A
call FPSub
call CkOP1FP0
jr nz, p03loc_5B05
p03loc_5AFF:
set 2, (ix+0)
jr p03loc_5B24
p03loc_5B05:
call OP1ToOP5
call CpyTo1FPST
call CpyTo2FPS2
ld b, 3
call p03sub_5D0A
call FPSub
call CkOP1FP0
jr z, p03loc_5AFF
call OP5ToOP2
call fpdiv
call OP1ToOP6
p03loc_5B24:
pop hl
bit 1, (ix+0)
jr nz, p03loc_5B33
xor a
or h
jr nz, p03loc_5B44
set 1, (ix+0)
p03loc_5B33:
push hl
ld hl, (FPS)
ld de, 0FFF7h
add hl, de
ld (chkDelPtr2), hl
add hl, de
ld (chkDelPtr1), hl
pop hl
ld h, l
p03loc_5B44:
bit 0, h
jr z, p03loc_5B5D
ld hl, Ymax
p03loc_5B4B:
ld (chkDelPtr2), hl
bit 2, (ix+0)
jr nz, p03loc_5B8A
scf
call p03sub_5C71
ld de, OP1
jr p03loc_5B8E
p03loc_5B5D:
bit 1, h
jr z, p03loc_5B66
ld hl, Ymin
jr p03loc_5B4B
p03loc_5B66:
bit 2, h
jr z, p03loc_5B6F
ld de, Xmax
jr p03loc_5B76
p03loc_5B6F:
bit 3, h
jr z, p03loc_5B8A
ld de, Xmin
p03loc_5B76:
bit 2, (ix+0)
jr nz, p03loc_5B8E
ex de, hl
ld (chkDelPtr1), hl
or a
call p03sub_5C71
ld hl, OP1
ld (chkDelPtr2), hl
p03loc_5B8A:
ld de, (chkDelPtr1)
p03loc_5B8E:
bit 1, (ix+0)
jr nz, p03loc_5BA5
call CpyToFPS3
ld de, (chkDelPtr2)
call CpyToFPS2
set 3, (ix+0)
jp p03loc_5A9C
p03loc_5BA5:
call CpyToFPS1
ld de, (chkDelPtr2)
call CpyToFPST
jp p03loc_5A9C
p03loc_5BB2:
call p03sub_5A13
push bc
call p03sub_5A13
push bc
call p03sub_5C38
jr z, p03loc_5BD7
ld a, (unk_9188)
cp b
jr z, p03loc_5BD7
ld hl, (unk_918A)
bit 0, h
jr z, p03loc_5BD3
ld e, 3Fh
p03loc_5BCE:
call p03sub_5C4D
jr p03loc_5BD7
p03loc_5BD3:
ld e, 1
jr p03loc_5BCE
p03loc_5BD7:
pop bc
pop de
pop hl
pop hl
pop af
ld h, 1
jr nc, p03loc_5BE1
dec h
p03loc_5BE1:
push de
call j_ILine
pop de
call p03sub_5C38
jr z, p03loc_5C33
ld a, (unk_9189)
cp d
jr z, p03loc_5C33
ld b, a
ld a, d
ld hl, pixWide_m_2
cp (hl)
jr z, p03loc_5C33
ld hl, (unk_918A)
bit 0, l
jr z, p03loc_5C07
ld e, 3Fh
p03loc_5C02:
call p03sub_5C4D
jr p03loc_5C33
p03loc_5C07:
ld e, 1
jr p03loc_5C02
#ifndef DEVIATE_FROM_ORIGINAL_FILE
;Not referenced anywhere.
call j_ILine
jr p03loc_5C33
#endif
p03loc_5C10:
call FPOPCPLX
pop hl
pop hl
pop af
ld a, 1
jr nc, p03loc_5C1B
dec a
p03loc_5C1B:
call j_CPointS
jr p03loc_5C33
p03loc_5C20:
pop hl
pop hl
pop af
ld a, 1
jr nc, p03loc_5C28
dec a
p03loc_5C28:
call j_CPointS
call FPOPCPLX
jr p03loc_5C33
p03loc_5C30:
pop hl
pop hl
pop af
p03loc_5C33:
pop hl
pop de
pop bc
pop af
ret
p03sub_5C38:
bit g_style_active, (iy+sGrFlags)
ret z
ld a, (unk_9775)
cp 2
jr c, p03loc_5C4B
cp 4
jr nc, p03loc_5C4B
or 1
ret
p03loc_5C4B:
xor a
ret
p03sub_5C4D:
push bc
ld c, e
ld b, a
ld a, (unk_9775)
cp 2
ld a, e
jr z, p03loc_5C5E
cp 1
jr nz, p03loc_5C62
p03loc_5C5C:
pop af
ret
p03loc_5C5E:
cp 3Fh
jr z, p03loc_5C5C
p03loc_5C62:
pop af
p03loc_5C63:
push af
push bc
ld d, 3
call j_IPoint
pop bc
inc b
pop af
cp b
jr nc, p03loc_5C63
ret
p03sub_5C71:
push af
rst 20h
ld hl, (FPS)
ld de, 0FFDCh
add hl, de
ex de, hl
ld hl, 9
add hl, de
pop af
push af
jr c, p03loc_5C84
ex de, hl
p03loc_5C84:
push hl
ld bc, 12h
add hl, bc
inc hl
ld b, (hl)
inc hl
ld a, (hl)
pop hl
or a
jr z, p03loc_5CCB
call CkOP1FP0
jr z, p03loc_5CD2
push de
push hl
push bc
call Mov9ToOP2
call CkOP2FP0
jr z, p03loc_5CC6
ld a, (OP2+1)
ld d, a
ld a, (OP1+1)
add a, 0Dh
cp d
pop bc
jr nc, p03loc_5CEF
sub b
pop hl
pop de
jr nc, p03loc_5CCB
pop af
pop hl
bit 3, (ix+0)
jp nz, p03loc_5C20
bit 1, (ix+0)
jp nz, p03loc_5C10
jp p03loc_5C20
p03loc_5CC6:
pop bc
p03loc_5CC7:
pop hl
pop de
jr p03loc_5CD2
p03loc_5CCB:
ld bc, 12h
add hl, bc
ex de, hl
add hl, bc
ex de, hl
p03loc_5CD2:
pop af
push de
push af
call page0_C25
call OP6ToOP2
pop af
push af
call c, fpdiv
pop af
call nc, FPMult
pop hl
call FPAdd_FromHL
ld hl, OP1
call j_XYRND
ret
p03loc_5CEF:
sub b
jr c, p03loc_5CC7
sub 0Dh
jr nc, p03loc_5CF7
cpl
p03loc_5CF7:
ld b, a
ld a, (OP2+1)
ld d, a
ld a, (OP1+1)
sub d
jr nc, p03loc_5D03
cpl
p03loc_5D03:
sub b
pop hl
pop de
jr c, p03loc_5CD2
jr p03loc_5CCB
p03sub_5D0A:
call CkOP1FP0
ret z
call CkOP2FP0
ret z
ld a, (OP1+1)
ld hl, 8484h
sub (hl)
jr c, p03loc_5D32
sub 0Ch
ret c
p03loc_5D1E:
pop hl
pop de
push af
ld a, d
and b
jr z, p03loc_5D29
ld a, e
and b
jr nz, p03loc_5D37
p03loc_5D29:
pop af
push de
push hl
jp nc, OP2Set0
jp OP1Set0
p03loc_5D32:
sub 0F5h
ret nc
jr p03loc_5D1E
p03loc_5D37:
pop af
p03loc_5D38:
ld de, 24h
call DeallocFPS1
jp p03loc_5C30
XRootY: call CkOP1FP0
jr z, p03loc_5D6C
set 1, (iy+1Eh)
set 2, (iy+1Eh)
call OP1ExOP2
jr p03loc_5D5B
YToX: res 1, (iy+1Eh)
res 2, (iy+1Eh)
p03loc_5D5B:
call page0_FB5
call CkOP1FP0
jr nz, p03loc_5D6F
call CkOP2FP0
jr z, p03loc_5D6C
call ckop2pos
ret z
p03loc_5D6C:
jp ErrDomain
p03loc_5D6F:
call CkOP2FP0
jp z, OP1Set1
xor a
push af
call OP2ToOP6
call CkOP1Pos
jr z, p03loc_5DDF
call PUSHMCPLXO1
ld a, (OP2+1)
cp 75h
jp c, j_BCALL_4EAF
call OP2ToOP1
call GETEXP
jr nc, p03loc_5D9D
ld a, (iy+1Eh)
xor 4
ld (iy+1Eh), a
call fprecip
p03loc_5D9D:
call j_ToFrac
jr c, p03loc_5DB3
ld hl, 8484h
call CKOdd
jr nz, p03loc_5DC1
bit 2, (iy+1Eh)
jp z, j_BCALL_4EAF
jr p03loc_5DD6
p03loc_5DB3:
ld d, 0Ch
call Page0Call_39C9
ld hl, OP1+1
call CKDoInt
jp nz, j_BCALL_4EAF
p03loc_5DC1:
ld hl, OP1+1
call CKOdd
jr nz, p03loc_5DD2
bit 2, (iy+1Eh)
jp nz, j_BCALL_4EAF
jr p03loc_5DD6
p03loc_5DD2:
pop af
or 80h
push af
p03loc_5DD6:
call PopRealO2
call PopRealO1
call ClrOP1S
p03loc_5DDF:
call OP1ToOP6
call OP2ToOP1
bit 1, (iy+1Eh)
call nz, fprecip
rst 8
call OP1ExOP6
ld a, (OP2+1)
cp 82h
jr nc, p03loc_5E1D
ld hl, OP2
bit 7, (hl)
jr nz, p03loc_5E1D
inc hl
call CKDoInt
jr nz, p03loc_5E1D
ld a, (OP2+1)
cp 80h
ld a, (OP2M)
call z, ShRAcc
rst 8
jr p03loc_5E18
p03loc_5E12:
daa
push af
call FPMult
pop af
p03loc_5E18:
dec a
jr nz, p03loc_5E12
jr p03loc_5E38
p03loc_5E1D:
ld c, 1
call Page0Call_3861
call CkOP1FP0
jr nz, p03loc_5E2C
call OP1Set1
jr p03loc_5E38
p03loc_5E2C:
call OP6ToOP2
call page0_CFA
call LJNORND
call Page0Call_3867
p03loc_5E38:
pop af
ld (OP1), a
ret
p03sub_5E3D:
call p03sub_67B2
bit 0, (hl)
ret z
cp 3
ret nz
push af
push hl
call p03sub_7053
pop hl
pop af
call p03sub_65F5
call p03sub_6AF7
ld hl, (fOutDat)
ld a, h
or a
jr nz, p03loc_5E65
push bc
pop hl
push hl
call SetXXXXOP2
call OP2ToOP1
jr p03loc_5E79
p03loc_5E65:
push bc
ld (OP6), bc
ld (iMathPtr1), hl
ld hl, 1
ld (OP6M), hl
call j_LSUM
call p03sub_6AF7
p03loc_5E79:
call j_LogX
ld hl, p03loc_6AFE
call page0_EC1
call Plus1
call int
rst 18h
pop hl
push hl
ld (OP6), hl
call j_LLOW
rst 18h
call p03sub_6B07
jr z, p03loc_5EA5
call OP1ToOP3
call CpyTo2FPS2
call cpop1op2
jr nc, p03loc_5EA8
call OP3ToOP1
p03loc_5EA5:
call CpyO1ToFPS2
p03loc_5EA8:
pop hl
ld (OP6), hl
call j_LHIGH
call PopRealO2
call OP1ToOP5
call FPSub
call PopRealO2
call fpdiv
call p03sub_6B07
jr z, p03loc_5ED1
call OP1ToOP3
call CpyTo2FPS4
call cpop1op2
jr c, p03loc_5ED4
call OP3ToOP1
p03loc_5ED1:
call CpyO1ToFPS4
p03loc_5ED4:
call OP5ToOP1
call CpyTo2FPS4
rst 30h
call p03sub_6B07
set 7, (iy+1Ah)
set 1, (iy+1Ah)
set 4, (iy+1Ah)
jr z, p03loc_5EF9
call OP1ToOP3
call CpyTo2FPS1
call cpop1op2
ret c
call OP3ToOP1
p03loc_5EF9:
jp CpyO1ToFPS1
p03sub_5EFC:
ld (curPlotNumber), a
call p03sub_67B2
bit 0, (hl)
ret z
cp 3
ret z
push af
push af
push hl
call p03sub_7053
pop hl
pop af
call p03sub_65F5
call p03sub_6AF7
pop af
push af
push bc
ld (OP6), bc
cp 2
jr nc, p03loc_5F3B
ld hl, (YOutDat)
ld (iMathPtr1), hl
call j_LHIGH
call p03sub_5FEB
pop hl
push hl
ld (OP6), hl
call j_LLOW
call p03sub_6AF7
call p03sub_5FC3
p03loc_5F3B:
pop hl
push hl
ld (OP6), hl
call j_LHIGH
call p03sub_5FE2
jr nz, p03loc_5F53
bit 6, (iy+1Ah)
jr nz, p03loc_5F53
call p03sub_5FEB
jr p03loc_5F56
p03loc_5F53:
call p03sub_5F89
p03loc_5F56:
pop hl
push hl
ld (OP6), hl
call j_LLOW
call p03sub_5FE2
jr nz, p03loc_5F6E
bit 6, (iy+1Ah)
jr nz, p03loc_5F6E
call p03sub_5FC3
jr p03loc_5F71
p03loc_5F6E:
call p03sub_5FA4
p03loc_5F71:
pop hl
pop af
cp 5
jr nz, locret_5F88
set 2, (iy+1Dh)
call SetTblGraphDraw
ld hl, curPlotNumber
call p03sub_640C
res 2, (iy+1Dh)
locret_5F88:
ret
p03sub_5F89:
call OP1ToOP3
bit 4, (iy+1Ah)
jr z, p03loc_5F9C
call CpyTo2FPS1
call cpop1op2
ret c
call OP3ToOP1
p03loc_5F9C:
call CpyO1ToFPS1
res 7, (iy+1Ah)
ret
p03sub_5FA4:
call OP1ToOP3
bit 4, (iy+1Ah)
set 4, (iy+1Ah)
jr z, p03loc_5FBB
call CpyTo2FPST
call cpop1op2
ret nc
call OP3ToOP1
p03loc_5FBB:
call CpyO1ToFPST
res 7, (iy+1Ah)
ret
p03sub_5FC3:
call OP1ToOP3
bit 1, (iy+1Ah)
set 1, (iy+1Ah)
jr z, p03loc_5FDA
call CpyTo2FPS2
call cpop1op2
ret nc
call OP3ToOP1
p03loc_5FDA:
call CpyO1ToFPS2
res 7, (iy+1Ah)
ret
p03sub_5FE2:
pop de
pop hl
pop af
push af
push hl
push de
cp 5
ret
p03sub_5FEB:
call OP1ToOP3
bit 1, (iy+1Ah)
jr z, p03loc_5FFE
call CpyTo2FPS3
call cpop1op2
ret c
call OP3ToOP1
p03loc_5FFE:
call CpyO1ToFPS3
res 7, (iy+1Ah)
ret
ZmStats:call j_COPYRNG
call Bit_VertSplit
jr z, p03loc_6019
bit NEED_RETABLE, (iy+VERTFLAG2)
call nz, j_DSPGRTBL
res 2, (iy+1Fh)
p03loc_6019:
ld hl, 2Dh
call AllocFPS1
res 4, (iy+1Ah)
res 1, (iy+1Ah)
res 7, (iy+1Ah)
ld hl, Xscl
rst 20h
call CpyO1ToFPS4
ld hl, Ymin
rst 20h
call CpyO1ToFPS2
ld hl, Ymax
rst 20h
call CpyO1ToFPS3
xor a
ld a, 1
call p03sub_5E3D
ld a, 2
call p03sub_5E3D
ld a, 3
call p03sub_5E3D
call p03sub_6B07
jr z, p03loc_60AB
ld b, 5
p03loc_6057:
push bc
call CpyTo1FPS4
rst 18h
pop bc
djnz p03loc_6057
call p03sub_60BA
call OP1Set0
rst 18h
ld a, 1
call p03sub_6138
call p03sub_612E
ld a, 2
call p03sub_6138
call p03sub_612E
ld a, 3
call p03sub_6138
call p03sub_612E
call PopRealO1
call OP2Set1
ld a, 11h
ld (OP2M), a
ld a, 70h
ld (OP2+3), a
call FPMult
call CpyO1ToFPS3
ld hl, 257Fh
call CheckSplitFlag
jr z, p03loc_609F
ld hl, 807Fh
p03loc_609F:
ld (OP2+1), hl
call FPMult
call InvOP1S
call CpyO1ToFPS2
p03loc_60AB:
ld a, 1
call p03sub_5EFC
ld a, 2
call p03sub_5EFC
ld a, 3
call p03sub_5EFC
p03sub_60BA:
bit 4, (iy+1Ah)
ld de, 2Dh
jp z, DeallocFPS1
ld a, 0Ah
cp a
call p03sub_60E6
call CpyTo1FPS2
call CkValidNum
ld a, 2
call j_StoSysTok
bit 1, (iy+1Ah)
ld a, 0Ch
push af
call z, FPOPCPLX
pop af
call nz, p03sub_60E6
jp FPOPREAL
p03sub_60E6:
push af
call CpyTo1FPS1
call CpyTo2FPST
call FPSub
call ClrOP1S
call OP2Set1
ld a, 7Fh
ld (OP2+1), a
pop af
push af
jr z, p03loc_6104
ld a, 17h
ld (OP2M), a
p03loc_6104:
call FPMult
call p03sub_6B07
call nz, OP1Set0
call CpyTo2FPST
call CpyO1ToFPST
call InvSub
call CkValidNum
pop af
push af
call j_StoSysTok
call PopRealO1
call PopRealO2
rst 30h
call CkValidNum
pop af
inc a
call j_StoSysTok
ret
p03sub_612E:
call CpyTo2FPST
call cpop1op2
ret c
jp CpyO1ToFPST
p03sub_6138:
call p03sub_67B2
bit 0, (hl)
ret z
cp 3
ret nz
push af
push hl
call p03sub_7053
pop hl
pop af
call p03sub_65F5
p03sub_614B:
call OP1Set0
call p03sub_6B07
call nz, PushRealO1
ld hl, Xmax
rst 20h
ld hl, Xmin
call Mov9ToOP2
rst 18h
call PushRealO2
rst 18h
rst 18h
call FPSub
ld hl, Xscl
call Mov9ToOP2
call CkOP2FP0
jp z, ErrStat
call fpdiv
call ClrOP1S
rst 18h
call j_Ceiling
call CkOP1FP0
jp z, ErrStat
ld a, 30h
call SetXXOP2
call cpop1op2
jp nc, ErrStat
call PopRealO2
call cpop1op2
call z, Plus1
call CpyO1ToFPS3
call j_ConvOP1
push af
ld hl, Xmin
rst 20h
ld de, OP3
call mov9B2
call OP2Set0
call OP4Set0
call p03sub_6B07
jr nz, p03loc_61BA
bit 3, (iy+13h)
call z, CLine
p03loc_61BA:
pop bc
ld c, 1
p03loc_61BD:
ld hl, (XOutDat)
call ldHLind
p03loc_61C3:
push bc
push hl
push hl
call p03sub_62BC
call CpyO1ToFPS1
p03loc_61CC:
call FPSMINUS9
ex de, hl
call OPSet0DE
pop hl
p03loc_61D4:
call p03sub_6B07
jr nz, p03loc_61DE
call IsOnInterruptSet
jr nz, p03loc_6224
p03loc_61DE:
push hl
ld de, (XOutDat)
call j_GetLToOP1
call CpyTo2FPS2
call cpop1op2
jr c, p03loc_6213
call CpyTo2FPS1
call cpop1op2
jr nc, p03loc_6213
call OP1Set1
ld de, (fOutDat)
ld a, d
or a
jr z, p03loc_620C
pop hl
push hl
call j_GetLToOP1
call CkOP1Pos
jp nz, ErrStat
p03loc_620C:
call CpyTo2FPST
rst 30h
call CpyO1ToFPST
p03loc_6213:
pop hl
dec hl
ld a, h
or l
jr nz, p03loc_61D4
call p03sub_6B07
jr nz, p03loc_626B
bit 3, (iy+13h)
jr z, p03loc_6227
p03loc_6224:
pop hl
pop bc
ret
p03loc_6227:
call CpyTo4FPST
call CpyTo3FPS2
call OP2Set0
call OP3ToOP1
call CLine
call CpyTo4FPST
call CpyTo3FPS1
call OP4ToOP2
call CpyTo1FPS2
call CLine
call OP4Set0
call CpyTo3FPS1
call CpyTo2FPST
call OP3ToOP1
call CpyO1ToFPS2
call CLine
p03loc_6257:
pop hl
pop bc
inc c
dec b
jp nz, p03loc_61C3
ld de, 24h
call DeallocFPS1
call p03sub_6B07
ret z
jp PopRealO1
p03loc_626B:
call CpyTo1FPST
call CpyTo2FPS4
call cpop1op2
call nc, CpyO1ToFPS4
call CpyTo1FPS1
call CpyO1ToFPS2
jr p03loc_6257
p03sub_627F:
call CpyTo1FPS3
call j_ConvOP1
ld hl, 8E65h
cp (hl)
ret z
ld c, (hl)
inc c
push bc
inc (hl)
call CpyTo1FPS1
call CpyO1ToFPS2
pop bc
jp p03loc_61BD
p03sub_6298:
ld a, (unk_8E65)
dec a
ret z
ld c, a
ld (unk_8E65), a
push bc
call CpyTo1FPS2
call CpyO1ToFPS1
pop bc
push bc
dec c
call p03sub_62BC
call CpyO1ToFPS2
ld hl, (XOutDat)
call ldHLind
push hl
push hl
jp p03loc_61CC
p03sub_62BC:
ld a, c
call SetXXOP1
ld hl, Xscl
call Mov9ToOP2
ld hl, OP2
res 7, (hl)
call FPMult
ld hl, Xmin
jp FPAdd_FromHL
p03loc_62D4:
set 4, (iy+3)
jr p03loc_62DE
p03loc_62DA:
res 4, (iy+3)
p03loc_62DE:
res 3, (iy+1Dh)
p03loc_62E2:
ld b, d
ld hl, (XOutDat)
call ldHLind
push hl
ld de, 1
push de
push bc
bit 2, (iy+1Dh)
jr nz, p03loc_6306
or a
sbc hl, de
jr nz, p03loc_62FE
res 4, (iy+3)
p03loc_62FE:
rst 18h
rst 18h
p03loc_6300:
call IsOnInterruptSet
jp nz, p03loc_639A
p03loc_6306:
pop af
pop hl
push hl
push af
push hl
bit 3, (iy+1Dh)
jr z, p03loc_633D
pop hl
call p03sub_6AD6
bit 2, (iy+1Dh)
jr z, p03loc_6338
bit 6, (iy+1Ah)
jr z, p03loc_632C
call p03sub_5FEB
call OP3ToOP1
call p03sub_5FC3
jr p03loc_6335
p03loc_632C:
call p03sub_5F89
call OP3ToOP1
call p03sub_5FA4
p03loc_6335:
jp p03loc_638D
p03loc_6338:
call PUSHMCPLXO1
jr p03loc_634E
p03loc_633D:
ld de, (XOutDat)
call j_GetLToOP1
rst 18h
pop hl
ld de, (YOutDat)
call j_GetLToOP1
rst 18h
p03loc_634E:
call POINT_STAT_HLP
jr z, p03loc_635B
bit 4, (iy+3)
jr nz, p03loc_6373
jr p03loc_638D
p03loc_635B:
pop af
push af
call j_STATMARK
jr c, p03loc_636D
bit 4, (iy+3)
jr nz, p03loc_6373
call j_DarkPnt
jr p03loc_638D
p03loc_636D:
bit 4, (iy+3)
jr z, p03loc_638D
p03loc_6373:
res plotLoc, (iy+plotFlags)
call CpyTo3FPS1
call CpyTo4FPST
call CpyO1ToFPS1
call CpyO2ToFPST
pop af
pop hl
push hl
push af
dec hl
ld a, h
or l
call nz, CLine
p03loc_638D:
pop af
pop de
pop hl
push hl
inc de
push de
push af
or a
sbc hl, de
jp nc, p03loc_6300
p03loc_639A:
pop hl
pop hl
pop hl
bit 2, (iy+1Dh)
ret nz
jp FPOPCPLX
nullsub_1:
ret
#ifndef DEVIATE_FROM_ORIGINAL_FILE
;Not referenced anywhere.
call IsOnInterruptSet
ret z
pop hl
call j_TraceOff
ret
#endif
POINT_STAT_HLP:
ld de, 0FFF7h
call j_XYRNDBOTH
jr nz, p03loc_63BD
call p03sub_707D
or a
jr z, p03loc_63C3
p03loc_63BD:
call POPMCPLXO1
or 1
ret
p03loc_63C3:
call CpyTo1FPS1
ld de, OP1
call j_XftoI
ld (curGY+1), a
call CpyTo1FPST
ld de, OP1
call j_YftoI
ld (curGY), a
call POPMCPLXO1
xor a
ret
p03sub_63E0:
set 3, (iy+16h)
res 4, (iy+16h)
call p03sub_6AF7
ld hl, (fOutDat)
ld (iMathPtr5), hl
call j_ORDSTAT
res 3, (iy+16h)
ret
p03loc_63F9:
or a
jp z, p03loc_62DA
jp p03loc_62D4
DRAWSPLOT:
res 7, (iy+1Ah)
res 2, (iy+1Dh)
ld hl, curPlotNumber
inc (hl)
p03sub_640C:
ld a, (hl)
push af
call p03sub_69E7
rst 10h
call nc, DelVar
pop af
res 3, (iy+13h)
call p03sub_67B2
bit 0, (hl)
ret z
push af
push hl
call p03sub_7053
pop hl
pop af
call p03sub_65F5
jr c, p03loc_63F9
cp 3
set cmp_mod_box, (iy+sGrFlags)
jr c, p03loc_6485
res cmp_mod_box, (iy+sGrFlags)
jp z, p03sub_614B
cp 4
jr z, p03loc_6481
push de
call p03sub_6AF7
call ldHLind
push hl
add hl, hl
call p03sub_69E7
call CreateStrng
ld (iMathPtr4), de
ld (YOutDat), de
pop hl
push hl
inc hl
push hl
p03loc_645A:
pop bc
dec bc
ld a, b
or c
jr z, p03loc_6468
push bc
pop hl
push hl
call PUT_INDEX_LST
jr p03loc_645A
p03loc_6468:
pop hl
ld de, 1
call HEAP_SORT
ld hl, (iMathPtr4)
ld (unk_84E7), hl
set 3, (iy+1Dh)
res 4, (iy+3)
pop de
jp p03loc_62E2
p03loc_6481:
res cmp_mod_box, (iy+sGrFlags)
p03loc_6485:
push de
call p03sub_63E0
call p03sub_6583
rst 18h
ld (ES), de
rst 8
call CPYTO1ES5
call CPYTO3ES2
call OP2ToOP4
call CLine
call CpyTo2FPST
call OP2ToOP4
call CPYTO1ES1
call CPYTO3ES4
call CLine
ld de, p03loc_65D1
call p03sub_6586
call CpyO1ToFPST
call CPYTO1ES1
call CpyTo2FPST
call p03sub_6571
ld de, p03loc_65DA
call p03sub_6586
rst 18h
rst 8
call CPYTO1ES2
call p03sub_6571
call CPYTO1ES2
call CpyTo2FPST
call p03sub_657B
call CPYTO1ES1
call CPYTO2EST
call p03sub_657B
call CpyTo4FPST
call CPYTO2EST
call CPYTO1ES3
call OP1ToOP3
call CLine
ld de, p03loc_65E3
call p03sub_6586
call CpyO1ToFPS1
ld de, p03loc_65EC
call p03sub_6586
call CpyO1ToFPST
call CPYTO1ES5
call p03sub_6566
call CPYTO1ES4
call p03sub_6566
call p03sub_6583
call CpyO1ToFPST
call CPYTO1ES6
call OP1ToOP6
pop af
ld (OP6+6), a
p03loc_651C:
ld bc, (OP6)
dec bc
ld (OP6), bc
ld a, c
or b
jr z, p03loc_652E
call p03sub_654A
jr p03loc_651C
p03loc_652E:
ld bc, (OP6M)
inc bc
ld (OP6M), bc
ld hl, (OP6+4)
or a
sbc hl, bc
jr c, p03loc_6544
call p03sub_654A
jr p03loc_652E
p03loc_6544:
ld de, 48h
jp DeallocFPS1
p03sub_654A:
ld (OP6), bc
call GET_X_INDIRECT
call CpyTo2FPST
call PUSHMCPLXO1
call POINT_STAT_HLP
ret nz
ld a, (OP6+6)
call j_STATMARK
ret c
call j_DarkPnt
ret
p03sub_6566:
call OP1ToOP3
call CpyTo2FPS1
call CpyTo4FPST
jr p03loc_6577
p03sub_6571:
call CPYTO3ES2
call CPYTO4EST
p03loc_6577:
call CLine
ret
p03sub_657B:
call CPYTO3ES1
call CpyTo4FPST
jr p03loc_6577
p03sub_6583:
ld de, p03loc_65C8
p03sub_6586:
ld a, (unk_8E64)
ld c, a
ld hl, curPlotNumber
and 0Fh
cp (hl)
ld a, 1
jr z, p03loc_659F
ld a, c
call ShRAcc
cp (hl)
ld a, 2
jr z, p03loc_659F
ld a, 3
p03loc_659F:
dec a
call CheckSplitFlag
jr z, p03loc_65A7
add a, 3
p03loc_65A7:
call Bit_VertSplit
jr z, p03loc_65AE
add a, 6
p03loc_65AE:
ld l, a
ld h, 0
add hl, de
ld l, (hl)
ld h, 0
call SetXXXXOP2
ld hl, deltaY
rst 20h
call FPMult
ld hl, Ymax
call Mov9ToOP2
jp InvSub
p03loc_65C8:
.db 8
.db 17h
.db 27h
.db 5
.db 0Fh
.db 19h
.db 6
.db 11h
.db 1Fh
p03loc_65D1:
.db 2
.db 11h
.db 21h
.db 2
.db 0Ch
.db 16h
.db 2
.db 0Dh
.db 1Bh
p03loc_65DA:
.db 0Eh
.db 1Dh
.db 2Dh
.db 8
.db 12h
.db 1Ch
.db 0Ah
.db 15h
.db 23h
p03loc_65E3:
.db 7
.db 16h
.db 26h
.db 4
.db 0Eh
.db 18h
.db 5
.db 10h
.db 1Eh
p03loc_65EC:
.db 9
.db 18h
.db 28h
.db 6
.db 10h
.db 1Ah
.db 7
.db 12h
.db 20h
p03sub_65F5:
ld de, 0FFF0h
add hl, de
ld b, a
ld a, (hl)
or a
sbc hl, de
call ShRAcc
push af
ld a, b
push af
set 6, (iy+1Ah)
ld a, (hl)
call ShRAcc
jr z, p03loc_6612
res 6, (iy+1Ah)
p03loc_6612:
ld de, 0FFF1h
add hl, de
call p03sub_6646
pop af
push af
cp 5
jr z, p03loc_663A
cp 2
push de
jr c, p03loc_663E
add hl, bc
call p03sub_665C
ex de, hl
pop bc
ld a, (fOutDat+1)
or a
jr z, p03loc_6635
p03loc_6630:
sbc hl, bc
jp nz, ErrDimMismatch
p03loc_6635:
pop af
cp 2
pop de
ret
p03loc_663A:
push de
pop bc
jr p03loc_6635
p03loc_663E:
call p03sub_6653
ex de, hl
pop bc
or a
jr p03loc_6630
p03sub_6646:
push hl
call p03sub_6675
ld (XOutDat), hl
p03loc_664D:
pop hl
ld bc, 5
add hl, bc
ret
p03sub_6653:
push hl
call p03sub_6675
ld (YOutDat), hl
jr p03loc_664D
p03sub_665C:
push hl
ld a, (hl)
cp 31h
jr nz, p03loc_6668
xor a
ld (fOutDat+1), a
jr p03loc_664D
p03loc_6668:
call p03sub_6675
p03loc_666B:
ld (fOutDat), hl
jr p03loc_664D
#ifndef DEVIATE_FROM_ORIGINAL_FILE
;Not referenced anywhere.
ld hl, 0
jr p03loc_666B
#endif
p03sub_6675:
call p03sub_6692
call Page0Call_241E
jp c, ErrStatPlot
and 1Fh
cp 0Dh
jp z, ErrStatPlot
set 6, (hl)
ex de, hl
ld e, (hl)
inc hl
ld d, (hl)
dec hl
ld a, d
or e
jp z, ErrDimension
ret
p03sub_6692:
ld de, OP1+1
ld a, 5Dh
ld (de), a
inc de
call Mov5B
ex de, hl
ld (hl), 0
ret
INITNEWTRACEP:
res 7, (iy+1Ah)
call j_VALCUR
ld (curPlotNumber), a
ld hl, (unk_8D1F)
ld (unk_8E65), hl
call p03sub_67B2
call p03sub_65F5
ld b, a
cp 1
jr nz, p03loc_66BC
p03loc_66BB:
xor a
p03loc_66BC:
cp 5
jr z, p03loc_66BB
ld hl, 8D1Eh
cp (hl)
jr z, p03loc_66CC
ld hl, 1
ld (unk_8E65), hl
p03loc_66CC:
ld a, b
cp 2
jp c, p03loc_6897
set cmp_mod_box, (iy+sGrFlags)
jr z, p03loc_671A
res cmp_mod_box, (iy+sGrFlags)
cp 4
jr z, p03loc_671A
jp nc, p03loc_68C5
set 3, (iy+13h)
call p03sub_614B
jr p03loc_66EF
p03loc_66EC:
call p03sub_627F
p03loc_66EF:
ld a, 4
ld (unk_8D1E), a
call nullsub_1
call CpyTo1FPST
call j_YPIXSET
call CpyTo2FPS1
call CpyTo1FPS2
call InvSub
call TimesPt5
call CpyTo2FPS2
rst 30h
p03loc_670D:
call j_XPIXSET
ld hl, (curGY)
ld (freeSaveY), hl
p03loc_6716:
call j_LABCOOR
ret
p03loc_671A:
ld de, 3
cp (hl)
jr z, p03loc_6724
ld (unk_8E65), de
p03loc_6724:
ld (unk_8D1E), a
call p03sub_63E0
p03loc_672A:
call p03sub_6583
call nullsub_1
call j_YPIXSET
call p03sub_6738
jr p03loc_670D
p03sub_6738:
call CpyTo1FPS5
ld hl, (unk_8E65)
ld a, l
or h
jr z, p03loc_674A
ld de, 6
call CpHLDE
jr c, p03loc_6768
p03loc_674A:
ld de, (OP1)
dec hl
bit 7, h
jr nz, p03loc_675B
ld de, 0FFFCh
add hl, de
ld de, (OP1M)
p03loc_675B:
add hl, de
ld b, h
ld c, l
call GET_X_INDIRECT
ld hl, 3
ld (unk_8D1F), hl
ret
p03loc_6768:
ld (unk_8D1F), hl
cp 2
jp z, CpyTo1FPS1
jp c, CpyTo1FPS4
cp 4
jp z, CpyTo1FPST
jp c, CpyTo1FPS2
jp CpyTo1FPS3
p03loc_677E:
ld (unk_8D1F), bc
call nullsub_1
ld l, c
ld h, b
pop af
cp 5
jr nz, p03loc_679A
call p03sub_6AD6
call PushRealO2
call j_XPIXSET
call PopRealO1
jr p03loc_67A9
p03loc_679A:
push hl
call j_GetLToOP1
call j_XPIXSET
ld de, (YOutDat)
pop hl
call j_GetLToOP1
p03loc_67A9:
call j_YPIXSET
jp p03loc_6716
p03sub_67AF:
ld a, (curPlotNumber)
p03sub_67B2:
add a, a
ld e, a
ld d, 0
ld hl, p03loc_67C7-2
add hl, de
call ldHLind
push hl
ld bc, 0FFF0h
add hl, bc
ld a, (hl)
and 0Fh
pop hl
ret
p03loc_67C7:
.dw 92D9h
.dw 92EAh
.dw 92FBh
p03sub_67CD:
ld a, (hl)
cp 0Fh
ret z
ld de, (curGY)
push de
call p03sub_6692
push de
call CMPPRGNAMLEN
ld c, a
dec c
ld hl, OP1+1
ld a, (OP1M)
cp 6
jr nc, p03loc_67EB
inc c
dec hl
p03loc_67EB:
ld b, 0
set 4, (iy+11h)
call j_WRITE_TEXT
res 4, (iy+11h)
pop hl
pop de
ld (curGY), de
ret
SPLOTCOORD:
push af
set textEraseBelow, (iy+textFlags)
bit grfExpr, (iy+traceFlags)
jr nz, p03loc_6847
ld hl, 0
ld (penCol), hl
ld a, 'P'
call j_VPutMap
pop af
push af
call j_PUTEQUNO
ld a, ':'
call j_VPutMap
pop af
call p03sub_67B2
push af
ld de, 0FFF1h
add hl, de
call p03sub_67CD
pop af
cp 2
jr c, p03loc_683D
cp 5
jr z, p03loc_6868
ld de, 5
add hl, de
ld a, (hl)
cp '1'
jr z, p03loc_6868
p03loc_683D:
ld a, ','
call j_VPutMap
call p03sub_67CD
jr p03loc_6868
p03loc_6847:
bit grfNoCoord, (iy+grfDBFlags)
jr z, p03loc_684F
pop af
ret
p03loc_684F:
ld hl, 56h ; 'V'
call Bit_VertSplit
jr z, p03loc_6859
ld l, 26h ; '&'
p03loc_6859:
ld (penCol), hl
call j_VPUTBLANK
ld a, 'P'
call j_VPutMap
pop af
call j_PUTEQUNO
p03loc_6868:
call p03sub_67AF
cp 5
jp z, j_PutXY
cp 2
jp c, j_PutXY
jr z, p03loc_687C
cp 4
jp nz, Page0Call_3501
p03loc_687C:
jp Page0Call_3507
SPLOTRIGHT:
call j_CursorOff
call j_VALCUR
call p03sub_67B2
ld hl, (unk_8E65)
cp 5
jr z, p03loc_6893
cp 2
jr nc, p03loc_68B6
p03loc_6893:
inc hl
p03loc_6894:
ld (unk_8E65), hl
p03loc_6897:
push af
xor a
ld (unk_8D1E), a
ld hl, (XOutDat)
ld e, (hl)
inc hl
ld d, (hl)
dec hl
ex de, hl
ld bc, (unk_8E65)
p03loc_68A8:
or a
sbc hl, bc
jp nc, p03loc_677E
add hl, bc
dec bc
ld (unk_8E65), bc
jr p03loc_68A8
p03loc_68B6:
jr z, p03loc_68BD
cp 4
jp nz, p03loc_66EC
p03loc_68BD:
call Page03_35A3
jr z, p03loc_6907
inc hl
jr p03loc_6904
p03loc_68C5:
call p03sub_69E7
call Page0Call_241E
jp c, ErrStat
ld (unk_84E7), de
ld a, 5
jr p03loc_6897
SPLOTLEFT:
call j_CursorOff
call j_VALCUR
call p03sub_67B2
ld hl, (unk_8E65)
cp 5
jr z, p03loc_68EA
cp 2
jr nc, p03loc_68F3
p03loc_68EA:
dec hl
ld b, a
ld a, h
or l
ld a, b
jr nz, p03loc_6894
jr p03loc_6897
p03loc_68F3:
jr z, p03loc_68FF
cp 4
jr z, p03loc_68FF
call p03sub_6298
jp p03loc_66EF
p03loc_68FF:
call Page03_359D
jr z, p03loc_6907
p03loc_6904:
ld (unk_8E65), hl
p03loc_6907:
jp p03loc_672A
Page03_359D:
dec hl
push hl
call CpyTo2FPS5
pop hl
push hl
ld de, (OP2)
add hl, de
dec hl
ld a, h
or l
pop hl
ret
Page03_35A3:
push hl
call CpyTo2FPS5
ld de, (OP2+4)
ld hl, 5
add hl, de
ld de, (OP2M)
or a
sbc hl, de
ex de, hl
pop hl
jp CpHLDE
CMPBOXINFO:
ld a, 3
ld (curPlotNumber), a
xor a
push af
p03loc_693A:
call p03sub_67AF
bit 0, (hl)
ld hl, curPlotNumber
jr z, p03loc_6952
cp 2
jr z, p03loc_694C
cp 4
jr nz, p03loc_6952
p03loc_694C:
pop af
call ShLAcc
or (hl)
push af
p03loc_6952:
dec (hl)
jr nz, p03loc_693A
pop af
ld (unk_8E64), a
ret
p03sub_695A:
pop hl
ld b, a
ld a, (curGStyle)
cp 7Fh
jr z, p03loc_6967
cp 51h
jr nz, p03loc_6987
p03loc_6967:
ld a, b
jp (hl)
p03sub_6969:
push af
call p03sub_67B2
ld b, a
cp 2
jr c, p03loc_697C
ld a, (curGStyle)
cp 7Fh
jr nz, p03loc_697C
pop af
cp a
ret
p03loc_697C:
pop af
bit 0, (hl)
ret
NEXTPLOT:
call p03sub_695A
p03loc_6983:
cp 3
jr nz, Page03_35B5
p03loc_6987:
xor a
ret
Page03_35B5:
inc a
call p03sub_6969
jr z, p03loc_6983
or a
ret
PREVPLOT:
call p03sub_695A
p03loc_6994:
cp 1
jr z, p03loc_6987
dec a
call p03sub_6969
jr z, p03loc_6994
or a
ret
CLRPREVPLOT:
call p03sub_67B2
cp 3
jr z, p03loc_69B4
cp 4
jr z, p03loc_69AF
cp 2
jr nz, p03loc_69BA
p03loc_69AF:
ld de, 36h
jr p03loc_69B7
p03loc_69B4:
ld de, 24h
p03loc_69B7:
call DeallocFPS1
p03loc_69BA:
ld a, (curPlotNumber)
ret
p03sub_69BE:
push hl
ld hl, (OP6+8)
add hl, bc
ld b, h
ld c, l
pop hl
PUT_INDEX_LST:
ld de, (iMathPtr4)
sla c
rl b
ex de, hl
add hl, bc
ld (hl), e
inc hl
ld (hl), d
ret
p03sub_69D4:
ld hl, (OP6+8)
add hl, bc
ld b, h
ld c, l
GET_INDEX_LST:
ld de, (iMathPtr4)
p03sub_69DE:
sla c
rl b
ex de, hl
add hl, bc
jp ldHLind
p03sub_69E7:
ld a, (curPlotNumber)
add a, 26h
ld (OP1+1), a
ld de, 0
ld (OP1M), de
ret
HEAP_SORT:
or a
sbc hl, de
inc hl
ld (OP6+4), hl
dec de
ld (OP6+8), de
sra h
rr l
ret z
inc hl
p03loc_6A09:
ld de, 2
call CpHLDE
jr nc, p03loc_6A3D
push hl
ld bc, (OP6+4)
push bc
call p03sub_69D4
ld (OP6+6), hl
ld bc, 1
call p03sub_69D4
pop bc
push bc
call p03sub_69BE
pop hl
dec hl
ld (OP6+4), hl
dec hl
ld a, h
or l
jr nz, p03loc_6A47
ld bc, 1
ld hl, (OP6+6)
call p03sub_69BE
pop hl
ret
p03loc_6A3D:
dec hl
push hl
pop bc
push bc
call p03sub_69D4
ld (OP6+6), hl
p03loc_6A47:
pop hl
push hl
ld (OP6M), hl
add hl, hl
p03loc_6A4D:
ld (OP6), hl
ld de, (OP6+4)
call CpHLDE
jr z, p03loc_6A5B
jr nc, p03loc_6AAA
p03loc_6A5B:
push af
push hl
pop bc
push bc
call p03sub_69D4
call j_GETL1TOP2A
pop bc
pop af
jr z, p03loc_6A77
inc bc
call p03sub_69D4
call j_GETL1TOP1A
call cpop1op2
jr z, p03loc_6A77
jr nc, p03loc_6A7C
p03loc_6A77:
call OP2ToOP1
jr p03loc_6A83
p03loc_6A7C:
ld hl, (OP6)
inc hl
ld (OP6), hl
p03loc_6A83:
ld hl, (OP6+6)
call j_GETL1TOP2A
call cpop1op2
jr c, p03loc_6AA4
ld bc, (OP6)
push bc
call p03sub_69D4
ld bc, (OP6M)
call p03sub_69BE
pop hl
ld (OP6M), hl
add hl, hl
jr p03loc_6A4D
p03loc_6AA4:
ld hl, (OP6+4)
inc hl
jr p03loc_6A4D
p03loc_6AAA:
ld hl, (OP6+6)
ld bc, (OP6M)
call p03sub_69BE
pop hl
jp p03loc_6A09
p03sub_6AB8:
call SetXXXXOP2
ld hl, 0FC3h
rst 20h
call InvSub
ld hl, (XOutDat)
call ldHLind
call SetXXXXOP2
call fpdiv
ld a, 1Eh
call j_BCALL_4B9D
jp InvOP1S
p03sub_6AD6:
push hl
call p03sub_6AB8
rst 8
ld de, (unk_84E7)
pop bc
bit 2, (iy+1Dh)
ret nz
call p03sub_69DE
ld de, (XOutDat)
call j_GetLToOP1
bit 6, (iy+1Ah)
call z, OP1ExOP2
ret
p03sub_6AF7:
ld hl, (XOutDat)
ld (iMathPtr1), hl
ret
p03loc_6AFE:
.db 0
.db 7Fh
.db 30h
.db 10h
.db 29h
.db 99h
.db 56h
.db 63h
.db 98h
p03sub_6B07:
bit 7, (iy+1Ah)
ret
StoGDB2:xor a
ld (ioData), a
ld de, 867Eh
call MovFrOP1
ld a, (OP1+1)
cp 61h
jp nz, ErrDataType
call j_FNDDB
call OP4ToOP1
ld a, (OP3M)
ld e, a
ld d, 0
ld hl, (OP3)
add hl, de
add hl, de
add hl, de
inc hl
inc hl
inc hl
inc hl
inc hl
ld de, 57h
call IsFunctionMode
jr nz, p03loc_6B4D
call IsParametricMode
jr nz, p03loc_6B4D
ld de, 49h
call IsFuncMode
jr nz, p03loc_6B4D
ld de, 93h
p03loc_6B4D:
add hl, de
push hl
ld a, (OP1)
cp 0FFh
jr nz, p03loc_6B62
call CreateGDB
ld (chkDelPtr1), de
ld (chkDelPtr3), hl
jr p03loc_6B73
p03loc_6B62:
ld (OP1), a
inc hl
inc hl
ex de, hl
ld hl, (chkDelPtr3)
bit 6, (hl)
call nz, SetTblGraphDraw
call CHKDELA
p03loc_6B73:
ld hl, (chkDelPtr1)
pop bc
ld (hl), c
inc hl
ld (hl), b
inc hl
ld (hl), 0
inc hl
ld a, (iy+2)
ld (hl), a
inc hl
ld a, (iy+4)
res 7, a
ld (hl), a
inc hl
ld a, (iy+0Fh)
ld (hl), a
inc hl
ld a, (iy+18h)
ld (hl), a
inc hl
ex de, hl
ld hl, Xmin
ld bc, 36h
ldir
call p03sub_6D9F
ldir
call IsRecursiveMode
jr z, p03loc_6BAD
ld hl, w02
call mov9B2
p03loc_6BAD:
call p03sub_6DC1
ldir
ld (chkDelPtr1), de
xor a
p03loc_6BB7:
call j_NEXTEQ
or a
jr nz, p03loc_6BCC
ld hl, 867Eh
rst 20h
rst 10h
call Page0Call_240B
ld a, (ioData)
ld (hl), a
jp FPOPCPLX
p03loc_6BCC:
push af
p03loc_6BCD:
call Page0Call_241E
push hl
push de
call Page0Call_240A
ld e, (hl)
dec hl
ld d, (hl)
dec hl
ld b, (hl)
call Page0Call_3519
ld d, a
ld a, (ioData)
cp d
jr nc, p03loc_6BE8
ld a, d
ld (ioData), a
p03loc_6BE8:
pop de
pop hl
ld a, (hl)
ld hl, (chkDelPtr1)
ld (hl), a
inc hl
ex de, hl
ld c, (hl)
inc hl
ld b, (hl)
dec hl
inc bc
inc bc
ldir
ld (chkDelPtr1), de
call IsParametricMode
jr z, p03loc_6C0D
ld hl, OP1M
bit 0, (hl)
jr nz, p03loc_6C0D
set 0, (hl)
jr p03loc_6BCD
p03loc_6C0D:
pop af
jr p03loc_6BB7
#ifndef DEVIATE_FROM_ORIGINAL_FILE
;Not referenced anywhere.
ld hl, (chkDelPtr3)
inc hl
ld e, (hl)
inc hl
ld d, (hl)
dec hl
dec hl
call DelVarNoArc
jp ErrSyntax
#endif
RclGDB2:ld a, (OP1+1)
cp 61h
jp nz, ErrDataType
call CkOP1Real
cp 1Fh
jp z, ErrUndefined
ld hl, (chkDelPtr1)
ld e, (hl)
inc hl
ld d, (hl)
inc hl
ld a, (hl)
res 1, (iy+1Eh)
or a
jr nz, p03loc_6C60
ld a, 10h
ld c, 4Ch
ld b, 1Eh
inc hl
bit 4, (hl)
jr nz, p03loc_6C83
add a, a
ld c, 5Ah
ld b, 12h
bit 5, (hl)
jr nz, p03loc_6C83
add a, a
ld b, 24h
bit 6, (hl)
jr nz, p03loc_6C83
add a, a
ld c, 96h
ld b, 9
jr p03loc_6C83
p03loc_6C60:
set 1, (iy+1Eh)
ld a, 10h
ld c, 39h
ld b, 1Eh
bit 4, (hl)
jr nz, p03loc_6C83
add a, a
ld c, 54h
ld b, 12h
bit 5, (hl)
jr nz, p03loc_6C83
add a, a
ld b, 24h
bit 6, (hl)
jr nz, p03loc_6C83
add a, a
ld c, 66h
ld b, 6
p03loc_6C83:
push af
push bc
ld b, 0
add hl, bc
ex de, hl
sbc hl, bc
pop bc
ld c, b
ld b, 0
sbc hl, bc
pop bc
push hl
ld a, (iy+2)
ld c, a
push bc
and 0Fh
or b
ld (iy+2), a
call j_FNDDB
ld de, (OP3)
call FPOPCPLX
pop bc
pop hl
ld a, (OP3M)
call IsParametricMode
jr z, p03loc_6CB4
srl a
p03loc_6CB4:
push af
or a
sbc hl, de
jr c, p03loc_6CD0
jr z, p03loc_6CD0
push bc
ld (OP3+5), hl
ld hl, p03loc_6D97
call pushErrorHandleR
ld hl, (OP3+5)
call ErrNotEnoughMem
call popErrorHandleR
pop bc
p03loc_6CD0:
call SetTblGraphDraw
bit 4, b
push bc
call nz, j_SetFuncM
pop bc
bit 5, b
push bc
call nz, j_SetPolM
pop bc
bit 6, b
push bc
call nz, j_SetParM
pop bc
bit 7, b
push bc
call nz, j_SetSeqM
pop bc
ld a, 5
call j_AllEq
ld hl, (chkDelPtr1)
call p03sub_6E19
jr nz, p03loc_6CFD
inc hl
p03loc_6CFD:
inc hl
inc hl
inc hl
ld a, (hl)
ld (iy+4), a
inc hl
ld a, (hl)
res 7, a
call p03sub_6E19
jr z, p03loc_6D0F
and 1
p03loc_6D0F:
ld (iy+0Fh), a
call p03sub_6E19
jr nz, p03loc_6D25
inc hl
ld a, (hl)
res grfExpr, (iy+traceFlags)
bit 0, a
jr z, p03loc_6D25
set grfExpr, (iy+traceFlags)
p03loc_6D25:
inc hl
ld de, Xmin
ld bc, 36h
ldir
call p03sub_6E19
jr z, p03loc_6D47
call IsFuncMode
jr nz, p03loc_6D58
call IsRecursiveMode
jr z, p03loc_6D47
ld de, PlotStart
ld bc, 2Dh
ldir
jr p03loc_6D64
p03loc_6D47:
call p03sub_6D9E
ex de, hl
ldir
call IsRecursiveMode
jr z, p03loc_6D58
ld de, w02
call mov9B2
p03loc_6D58:
call p03sub_6E19
jr nz, p03loc_6D64
ex de, hl
call p03sub_6DC1
ex de, hl
ldir
p03loc_6D64:
ld (chkDelPtr1), hl
xor a
pop bc
p03loc_6D69:
push bc
ld hl, (chkDelPtr1)
inc a
push af
call Page0Call_385B
ld hl, (chkDelPtr1)
ld a, (hl)
inc hl
call p03sub_6DE3
call IsParametricMode
jr z, p03loc_6D91
pop af
push af
call Page0Call_385B
ld hl, OP1M
set 0, (hl)
ld hl, (chkDelPtr1)
ld a, (hl)
inc hl
call p03sub_6DE3
p03loc_6D91:
pop af
pop bc
cp b
jr nz, p03loc_6D69
ret
p03loc_6D97:
pop bc
ld (iy+2), c
jp JErrorNo
p03sub_6D9E:
ex de, hl
p03sub_6D9F:
ld hl, XresO
ld bc, 9
call IsFuncMode
ret nz
ld hl, ThetaMin
ld bc, 1Bh
call IsFunctionMode
ret nz
ld hl, TminPar
call IsParametricMode
ret nz
ld bc, 51h
ld hl, PlotStart
ret
p03sub_6DC1:
ld bc, 6
ld hl, polar1LineType
call IsFunctionMode
ret nz
ld hl, para1LineType
call IsParametricMode
ret nz
ld bc, 0Ah
ld hl, y1LineType
call IsFuncMode
ret nz
ld bc, 3
ld hl, secULineType
ret
p03sub_6DE3:
push af
call p03sub_6E19
jr z, p03loc_6DF5
ld a, (OP1M)
cp 82h
jr nz, p03loc_6DF5
call Create0Equ
pop af
ret
p03loc_6DF5:
ld e, (hl)
inc hl
ld d, (hl)
inc hl
ld (chkDelPtr1), hl
ex de, hl
push hl
call CreateEqu
inc de
inc de
pop bc
push hl
ld a, b
or c
jr z, p03loc_6E11
ld hl, (chkDelPtr1)
ldir
ld (chkDelPtr1), hl
p03loc_6E11:
pop hl
pop af
bit 5, a
ret z
set 5, (hl)
ret
p03sub_6E19:
bit 1, (iy+1Eh)
ret
CircCmd:call j_PDspGrph
call IsOnInterruptSet
jr z, p03loc_6E2A
p03loc_6E26:
call j_TraceOff
ret
p03loc_6E2A:
call p03sub_6E2F
jr p03loc_6E26
p03sub_6E2F:
bit useFastCirc, (iy+plotFlag3)
jr z, p03loc_6E39
call j_DrawCirc2
ret
p03loc_6E39:
ld hl, (FPS)
ld (inputDat), hl
call OP1Set0
rst 18h
ld a, 60h
ld (OP1M), a
bit trigDeg, (iy+trigFlags)
call z, DToR
rst 18h
set 5, (iy+3)
ld b, 3Dh
p03loc_6E56:
push bc
ld hl, (inputDat)
ld de, 0FFF7h
add hl, de
rst 20h
inc de
inc de
call mov9B2
ld hl, p03loc_6ED3
call pushErrorHandleR
call j_PtoR
call OP1ToOP4
ld hl, (inputDat)
ld de, 0FFEEh
add hl, de
rst 20h
rst 30h
call OP4ToOP2
call OP1ToOP4
ld hl, (inputDat)
ld de, 0FFE5h
add hl, de
rst 20h
rst 30h
call OP4ToOP2
call popErrorHandleR
p03loc_6E8E:
bit 5, (iy+3)
jr z, p03loc_6E9D
call PUSHMCPLXO1
res 5, (iy+3)
jr p03loc_6EB4
p03loc_6E9D:
ld de, OP3
call CPYFPS1
inc de
inc de
call mov9B2
call CpyO1ToFPS1
ld de, OP2
call CpyToFPST
call CLine
p03loc_6EB4:
ld hl, (inputDat)
rst 20h
inc de
inc de
call mov9B2
rst 30h
ld de, (inputDat)
call MovFrOP1
pop bc
call IsOnInterruptSet
jr nz, p03loc_6ECD
djnz p03loc_6E56
p03loc_6ECD:
ld de, 3Fh
jp DeallocFPS1
p03loc_6ED3:
ld a, 20h ; ' '
ld (OP1), a
ld (OP2), a
jr p03loc_6E8E
GrphCirc:
ld hl, (FPS)
ld (EQS), hl
ld hl, 5Ah
call AllocFPS1
ld de, (EQS)
ld hl, 8E6Ah
call Mov18B
ld hl, Xmin
call Mov18B
ld hl, Ymin
call Mov18B
ld hl, deltaX
call p03sub_6F88
ld hl, p03loc_6F91
call pushErrorHandleR
call OP1Set0
ld de, 8E6Ah
call MovFrOP1
call MovFrOP1
ld de, Xmin
call MovFrOP1
ld hl, p03loc_6F97
call mov9B2
ld de, Ymin
call MovFrOP1
ld hl, p03loc_6FA0
call mov9B2
ld de, deltaX
call p03sub_6F88
ld bc, (curGY2)
call j_VtoWHLDE
rst 18h
call PushRealO4
ld bc, (curGY)
call j_VtoWHLDE
call CpyTo2FPS1
call FPSub
call FPSquare
call OP1ToOP5
call OP4ToOP1
call CpyTo2FPST
call FPSub
call FPSquare
call OP5ToOP2
rst 30h
call j_SqRoot
rst 18h
call p03sub_6E2F
call popErrorHandleR
p03sub_6F6D:
ld hl, (EQS)
ld (FPS), hl
ld de, 8E6Ah
call Mov18B
ld de, Xmin
call Mov18B
ld de, Ymin
call Mov18B
ld de, deltaX
p03sub_6F88:
call Mov18B
Mov18B: call mov9B2
jp mov9B2
p03loc_6F91:
call p03sub_6F6D
jp JErrorNo
p03loc_6F97:
.db 0
.db 81h
.db 57h
.db 96h
.db 0
.db 0
.db 0
.db 0
.db 0
p03loc_6FA0:
.db 0
.db 81h
.db 28h
.db 52h
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 7Fh
.db 46h
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 7Fh
.db 46h
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 0
.db 80h
.db 21h
.db 73h
.db 90h
.db 0
.db 0
.db 0
.db 0
.db 0
.db 80h
.db 21h
.db 73h
.db 90h
.db 0
.db 0
.db 0
.db 0
Page03_35D9:
call IsOP1Num
ret z
ld hl, (FPS)
ld de, 0FFF7h
add hl, de
ld a, (hl)
inc a
jr nz, p03loc_6FE2
call CpyO1ToFPS1
jp CpyO1ToFPST
p03loc_6FE2:
call OP1ToOP5
call CpyTo2FPS1
call cpop1op2
jp c, CpyO5ToFPS1
call OP5ToOP2
call CpyTo1FPST
call cpop1op2
ret nc
call OP5ToOP1
jp CpyO1ToFPST
p03loc_6FFE:
scf
ZOOMXYCMD:
push de
push af
push hl
ld a, 1
call Page0Call_3537
call PushRealO5
jr p03loc_7016
Page03_35DF:
push de
push af
push hl
call j_RclX
rst 18h
call j_RclY
p03loc_7016:
call OP1ToOP5
ld hl, Ymin
pop de
pop af
push af
call Page0Call_3543
call OP4ToOP2
call PopRealO5
call PUSHMCPLXO1
ld hl, Xmin
pop af
pop de
call Page0Call_3543
Page03_35E5:
call j_COPYRNG
ld de, Xmin
call MovFrOP1
ld hl, OP4
call mov9B2
call PopRealO2
call PopRealO1
ld de, Ymin
call MovFrOP1
inc hl
inc hl
jp mov9B2
p03sub_7053:
push af
ld de, 0FFF1h
add hl, de
call p03sub_7070
pop af
cp 5
ret z
cp 2
jr c, p03loc_706C
add hl, bc
ld a, (hl)
cp '1'
ret z
call p03sub_7070
ret
p03loc_706C:
call p03sub_7070
ret
p03sub_7070:
push hl
call p03sub_6692
call j_Find_Parse_Formula
pop hl
ld bc, 5
add hl, bc
ret
p03sub_707D:
ld hl, (FPS)
ld de, 0FFF7h
add hl, de
p03sub_7084:
ex de, hl
add hl, de
ex de, hl
call j_CheckXY
ret
Page03_35EB:
or a
jp z, GrphCirc
cp 8Fh
jp z, ZmStats
cp 9Ah
jp z, StoGDB2
cp 9Bh
jp z, RclGDB2
cp 0A5h
jp z, CircCmd
cp 8Ah
jp z, ZOOMXYCMD
cp 89h
jp z, p03loc_6FFE
ret
p03loc_70AE:
call p03sub_748F
InitInfStatEditorContext:
ld a, (keyExtend)
call p03sub_7CBB
jr z, p03loc_70BF
set 4, a
set 4, (iy+1Ch)
p03loc_70BF:
ld (unk_8D0A), a
ld hl, p03loc_7650
call AppInitEnoughMem50
set grfSplitOverride, (iy+sGrFlags)
p03loc_70CC:
call p03sub_71FC
inc hl
ld e, (hl)
inc hl
ld d, (hl)
ex de, hl
ld a, 74h
bit localizeHookActive, (iy+hookflags3)
call nz, j_call_character_hook
ld de, OP3
call Mov8B
call Mov8B
call Page03_3711
call j_ClrWindow
call p03sub_722B
ld a, 1
ld (curRow), a
p03loc_70F4:
call p03sub_74AD
ld hl, (unk_9700)
ld a, (hl)
ld (unk_8D0B), a
call p03sub_7264
call p03sub_7316
jp nz, p03loc_710B
call p03loc_45E3
ret
p03loc_710B:
res 6, (iy+1Ch)
set 5, (iy+1Ch)
cp 8
jr z, p03loc_7132
res 5, (iy+1Ch)
cp 2
jr z, p03loc_7132
cp 3
jr nz, p03loc_7129
set 1, (iy+18h)
jr p03loc_7132
p03loc_7129:
cp 9
jp nz, p03loc_71CB
set 6, (iy+1Ch)
p03loc_7132:
set 7, (iy+1Ch)
call Page03_37AD
set 6, (iy+5)
call j_CATALOGCHK
ld hl, 84C9h
bit 5, (iy+1Ch)
jr nz, p03loc_7152
bit 6, (iy+1Ch)
jr nz, p03loc_7152
ld hl, 84CCh
p03loc_7152:
ld (editBtm), hl
ld (editTail), hl
ld a, (unk_8D0B)
call j_CMP_STATPTR
inc hl
bit 6, (iy+1Ch)
jr z, p03loc_716E
ld a, (hl)
cp 5Eh
jr z, p03loc_7174
call CancelAlpha
ret
p03loc_716E:
bit 5, (iy+1Ch)
jr z, p03loc_7185
p03loc_7174:
ld de, nameBuff
call Mov5B
call CancelAlpha
call Page03_37A7
ld bc, 2
jr p03loc_7191
p03loc_7185:
call j_NameToBuf
call j_RstrSomeFlags
call Page03_37A7
call j_CurNameLength
p03loc_7191:
ld hl, (editBtm)
sbc hl, bc
ld (editTail), hl
ld hl, nameBuff
add hl, bc
dec hl
ld de, (editBtm)
dec de
lddr
ret
p03sub_71A6:
push af
sub 52h
ld hl, p03loc_7AD2
call ldHLind_AWord
pop af
cp 58h
jr c, p03loc_71BA
cp 5Ah
jr z, p03loc_71BE
jr p03loc_71C2
p03loc_71BA:
ld a, 3
jr p03loc_71C4
p03loc_71BE:
ld a, 1
jr p03loc_71C4
p03loc_71C2:
ld a, 2
p03loc_71C4:
ld (unk_97A1), a
ld (unk_979F), hl
ret
p03loc_71CB:
ld a, (unk_8D0B)
call p03sub_71A6
ld (unk_97A3), hl
ld a, (unk_8D0B)
cp 58h
jr z, p03loc_71DF
res 4, (iy+1Ch)
p03loc_71DF:
set appCurWord, (iy+appFlags)
res appTextSave, (iy+appFlags)
call CanAlphIns
bit 4, (iy+1Ch)
ret z
res 4, (iy+1Ch)
call p03sub_7CBB
ret z
ld a, 1
jp p03loc_7D84
p03sub_71FC:
ld a, (unk_8D0A)
sla a
sla a
ld e, a
ld d, 0
ld hl, p03loc_78AF
add hl, de
ld e, (hl)
inc hl
ld d, (hl)
ld (unk_9700), de
ret
p03sub_7212:
push ix
ld ix, (unk_9700)
ld a, (curRow)
or a
jr z, p03loc_7235
dec a
jr z, p03loc_7235
ld b, a
ld de, 0FFFDh
p03loc_7225:
add ix, de
djnz p03loc_7225
jr p03loc_7235
p03sub_722B:
push ix
ld ix, (unk_9700)
res 5, (iy+1Dh)
p03loc_7235:
ld a, 1
ld (curRow), a
p03loc_723A:
sub a
ld (curCol), a
ld a, (curRow)
ld hl, winBtm
cp (hl)
jr nc, p03loc_7261
ld a, (ix+0)
ld (unk_8D0B), a
inc a
jr z, p03loc_725E
call p03sub_7278
ld de, 3
add ix, de
ld hl, curRow
inc (hl)
jr p03loc_723A
p03loc_725E:
call j_EraseEOW2
p03loc_7261:
pop ix
ret
p03sub_7264:
push hl
sub 47h
ld e, a
ld a, 0
jr c, p03loc_7273
ld d, 0
ld hl, p03loc_765D
add hl, de
ld a, (hl)
p03loc_7273:
ld (unk_8D0B+1), a
pop hl
ret
p03sub_7278:
call p03sub_7264
call setTitle
call p03sub_4D49
ld a, (ix+0)
cp 5Ah
ret z
cp 5Bh
jp nc, p03loc_72BC
cp 54h
jr z, p03loc_7295
ld a, 3Ah
call j_PutC
p03loc_7295:
ld a, (ix+0)
cp 52h
jp c, p03loc_72D9
call p03sub_71A6
push ix
call p03sub_7D48
pop ix
ret
#ifndef DEVIATE_FROM_ORIGINAL_FILE
;Not referenced anywhere.
ld a, (unk_89F5)
push af
set textInverse, (iy+textFlags)
set preClrForMode, (iy+newDispF)
call p03sub_4D49
pop af
ld (unk_89F5), a
ret
#endif
p03loc_72BC:
ld a, ' '
call j_PutC
ld hl, p03loc_7A64
ld a, 71h
bit localizeHookActive, (iy+hookflags3)
call nz, j_call_character_hook
call p03sub_4D49
ret c
ld a, (curRow)
dec a
ld (curRow), a
ret
p03loc_72D9:
bit 5, (iy+1Dh)
ret nz
call Rcl_StatVar
ld a, (ix+0)
cp 51h
jr nz, p03loc_72F1
call CkOP1Real
cp 3
ret nz
jp p03loc_7DBC
p03loc_72F1:
call CkOP1Real
cp 2
jp z, p03loc_7DBC
cp 1
jr z, p03loc_7301
cp 0Dh
jr nz, p03loc_7308
p03loc_7301:
ld hl, OP1+1
call j_RstrSomeFlags
ret
p03loc_7308:
cp 0Eh
jr nz, p03loc_7310
xor a
ld (OP1), a
p03loc_7310:
call j_setNumWindow
jp p03loc_4587
p03sub_7316:
ld b, a
ld a, (unk_8D0B+1)
or a
ld a, b
ret
p03loc_731D:
cp kApp
jp z, p03loc_70AE
bit 7, (iy+1Ch)
jp nz, Page0Call_342F
cp 5
jr z, p03loc_7332
cp 4
jp nz, p03loc_7395
p03loc_7332:
call p03sub_7316
jr nz, p03loc_7343
call IsEditEmpty
ret z
call ParseAndStoreSysVar
call DisplayEditSysVar
jr p03loc_7366
p03loc_7343:
cp 5
jr z, p03loc_7356
push ix
ld ix, (unk_9700)
ld a, (ix+3)
pop ix
inc a
ret z
jr p03loc_7366
p03loc_7356:
ld a, (unk_8D0B+1)
cp 6
jp z, p03loc_75C0
cp 7
jp z, p03loc_75C0
jp p03loc_7D23
p03loc_7366:
call p03sub_74B9
call p03sub_7474
ld ix, (unk_9700)
ld a, (ix+3)
inc a
jr z, p03loc_7392
ld de, 3
add ix, de
ld (unk_9700), ix
call p03sub_4987
jr c, p03loc_738F
ld (curCol), a
p03loc_7387:
ld a, (ix+0)
call p03sub_7278
jr p03loc_7392
p03loc_738F:
ld (curRow), a
p03loc_7392:
jp p03loc_70F4
p03loc_7395:
cp 3
jr nz, p03loc_73D7
call p03sub_7316
jr z, p03loc_73AD
push ix
ld ix, (unk_9700)
ld a, (ix+0FDh)
pop ix
inc a
ret z
jr p03loc_73B7
p03loc_73AD:
call IsEditEmpty
ret z
call ParseAndStoreSysVar
call DisplayEditSysVar
p03loc_73B7:
call p03sub_74B9
call p03sub_7474
ld ix, (unk_9700)
ld a, (ix+0FDh)
inc a
jr z, p03loc_7392
ld de, 0FFFDh
add ix, de
ld (unk_9700), ix
call Page03_3789
jr nc, p03loc_738F
jr p03loc_7387
p03loc_73D7:
bit enableQueue, (iy+rclFlag)
jr nz, p03loc_73E0
cp 8Ah
ret z
p03loc_73E0:
call p03sub_7316
jp z, CallCommon
jp p03loc_7D84
#ifndef DEVIATE_FROM_ORIGINAL_FILE
;Not referenced anywhere.
cp 9
ret z
cp 0Dh
ret z
cp 2
ret z
cp 1
ret z
cp 0Eh
ret z
cp 0Fh
ret z
cp 0Bh
ret z
cp 0Ah
ret z
cp 0Ch
ret z
or a
ret z
ret
#endif
Page03_3465:
call CanAlphIns
bit 5, (iy+1Ch)
jr nz, p03loc_7426
bit 6, (iy+1Ch)
jr nz, p03loc_7426
ld hl, nameBuff
ld de, OP1+1
ld bc, 5
ldir
ld a, 1
ld (OP1), a
p03loc_7426:
ld hl, p03loc_746C
call pushErrorHandleR
ld a, (unk_8D0B)
call STO_STATVAR
ld de, OP1
ld a, (de)
cp 1
jr nz, p03loc_7457
inc de
ld a, (de)
cp 31h
jr z, p03loc_7457
cp 5Dh
jr z, p03loc_7450
ld a, 5Dh
ld (de), a
inc de
ld hl, nameBuff
ld bc, 5
ldir
p03loc_7450:
rst 10h
ld hl, 0
call c, CreateRList
p03loc_7457:
call popErrorHandleR
bit monAbandon, (iy+monFlags)
ret nz
ld hl, 92C5h
bit 2, (hl)
jp z, p03loc_7366
res 2, (hl)
jp p03loc_73B7
p03loc_746C:
bit monAbandon, (iy+monFlags)
ret nz
jp JError
p03sub_7474:
ld a, 8
ld (winBtm), a
ret
p03sub_747A:
set monAbandon, (iy+monFlags)
ld hl, p03loc_748A
call pushErrorHandleR
call Page0Call_3435
call popErrorHandleR
p03loc_748A:
res monAbandon, (iy+monFlags)
ret
p03sub_748F:
call p03sub_74B9
call p03sub_7316
jr z, p03loc_74A0
bit 7, (iy+1Ch)
call nz, p03sub_747A
jr p03loc_74A3
p03loc_74A0:
call p03sub_4B7F
p03loc_74A3:
call ResetPromptEditFlag
call p03sub_7474
res grfSplitOverride, (iy+sGrFlags)
p03sub_74AD:
res 1, (iy+18h)
res 7, (iy+1Ch)
res 6, (iy+1Ch)
p03sub_74B9:
res appCurWord, (iy+appFlags)
set appTextSave, (iy+appFlags)
ret
p03loc_74C2:
jp numPPutAway
Page03_346B:
call OP1Set0
ld a, 3Dh
call j_CMP_STATPTR
ex de, hl
ld a, 9
p03loc_74D0:
call MovFrOP1
sub 1
jr nz, p03loc_74D0
ld hl, 957Fh
ld (OP1+1), hl
call MovFrOP1
ld a, 1
ld (OP1), a
ld hl, 31h
ld (OP1+1), hl
call MovFrOP1
call MovFrOP1
call MovFrOP1
ld a, 5Dh
ld (OP1+1), a
xor a
ld (OP1M), a
call MovFrOP1
call MovFrOP1
call MovFrOP1
ld a, 1
ld (OP1M), a
call MovFrOP1
call MovFrOP1
call ZeroOP1
ld hl, p03loc_5C02
ld (OP1), hl
call MovFrOP1
ld a, 1
ld (OP1M), a
call MovFrOP1
ld (iy+1Ch), 0
call ZeroOP1
call MovFrOP1
ret
IsInfStatContext:
ld b, a
ld a, (mcxCurApp)
cp kInfStat
ld a, b
ret
Page03_3471:
push bc
ld a, (unk_89F5)
push af
ld a, (curRow)
push af
ld a, (ix+5)
ld (curCol), a
jr nc, p03loc_756F
bit localizeHookActive, (iy+hookflags3)
jr z, p03loc_755C
ld h, (ix+0Dh)
ld l, (ix+0Eh)
ld a, 0
call j_call_character_hook
jr z, p03loc_7561
p03loc_755C:
ld a, (ix+6)
and 0Fh
p03loc_7561:
ld b, a
set textInverse, (iy+textFlags)
ld a, ' '
p03loc_7568:
call j_PutC
djnz p03loc_7568
jr p03loc_75B1
p03loc_756F:
ld l, (ix+9)
ld h, (ix+0Ah)
ld a, (hl)
and (ix+0Ch)
cp (ix+0Bh)
jr nz, p03loc_7584
set textInverse, (iy+textFlags)
jr p03loc_7588
p03loc_7584:
set preClrForMode, (iy+newDispF)
p03loc_7588:
bit localizeHookActive, (iy+hookflags3)
jr z, p03loc_759B
ld h, (ix+0Dh)
ld l, (ix+0Eh)
ld a, 1
call j_call_character_hook
jr z, p03loc_75B1
p03loc_759B:
ld l, (ix+7)
ld h, (ix+8)
ld de, OP1
p03loc_75A4:
ld a, (hl)
ld (de), a
inc hl
inc de
or a
jr nz, p03loc_75A4
ld hl, OP1
call j_putsm
p03loc_75B1:
pop af
ld (curRow), a
pop af
ld (unk_89F5), a
pop bc
ret
p03sub_75BB:
set 5, (iy+1Ch)
ret
p03loc_75C0:
ld hl, (unk_97A3)
ld de, (unk_979F)
or a
sbc hl, de
call nz, p03sub_75BB
ld hl, p03loc_7639
call pushErrorHandleR
call p03sub_7C6C
call PopRealO1
res grfSplitOverride, (iy+sGrFlags)
call p03sub_7474
call p03sub_74B9
call j_ClrScrnFull
ld a, (unk_8D0A)
and 0Fh
cp 0Eh
jr nz, p03loc_75FD
ld b, 19h
ld a, (nameBuff)
call j_TwoVarSet
res 2, (iy+1Ah)
jr p03loc_760E
p03loc_75FD:
ld d, 0
ld e, a
ld hl, p03loc_7C5D
add hl, de
ld e, (hl)
ld a, (nameBuff)
call j_ExTest_INT
call CHKERRBREAK
p03loc_760E:
call popErrorHandleR
bit 5, (iy+1Ch)
jr z, p03loc_7621
ld a, kGraph
call newContext
ld a, kGraph
jp sendKPress
p03loc_7621:
bit 7, (iy+9)
call nz, Page0Call_344D
bit grfSplit, (iy+sGrFlags)
call nz, j_GrBufCpy
set 6, (iy+1Ch)
ld a, appStart
call newContext
ret
p03loc_7639:
res statsValid, (iy+statFlags)
res 7, (iy+9)
res 7, a
jp JError
#ifndef DEVIATE_FROM_ORIGINAL_FILE
;Not referenced anywhere.
ld hl, (mcxMain)
ld de, p03loc_731D
or a
sbc hl, de
ret
#endif
p03loc_7650:
.dw p03loc_731D
.dw p03loc_74C2
.dw p03sub_748F
.dw j_numRedisp
.dw p03loc_7DC7
.dw p03loc_4B90
.db 0Ah
p03loc_765D:
.db 3
.db 3
.db 3
.db 2
.db 2
.db 2
.db 2
.db 2
.db 8
.db 8
.db 9
.db 5
.db 5
.db 5
.db 5
.db 5
.db 5
.db 5
.db 5
.db 7
.db 6
.db 0FFh
.db 0
.db 0
p03loc_7675:
.db 58h
.dw aInpt
.db 3Dh
.dw aA
.db 3Eh
.dw p03loc_79CC
.db 4Bh
.dw p03loc_79CE
.db 47h
.dw aFreq
.db 52h
.dw p03loc_7A44
.db 5Bh
.dw aCalculate
.db 0FFh
.dw 0
p03loc_768D:
.db 58h
.dw aInpt
.db 3Dh
.dw aA
.db 4Bh
.dw aList
.db 47h
.dw aFreq
.db 52h
.dw p03loc_7A44
.db 5Bh
.dw aCalculate
.db 0FFh
.dw 0
p03loc_76A2:
.db 58h
.dw aInpt
.db 4Ch
.dw aList1
.db 4Eh
.dw aList2
.db 48h
.dw aFreq1
.db 49h
.dw aFreq2
.db 53h
.dw a1
.db 59h
.dw aPooled
.db 5Bh
.dw aCalculate
.db 0FFh
.dw 0
p03loc_76BD:
.db 58h
.dw aInpt
.db 3Fh
.dw a1_2
.db 40h
.dw a2_0
.db 4Ch
.dw aList1
.db 4Eh
.dw aList2
.db 48h
.dw aFreq1
.db 49h
.dw aFreq2
.db 53h
.dw a1
.db 5Bh
.dw aCalculate
.db 0FFh
.dw 0
p03loc_76DB:
.db 41h
.dw aPa
.db 42h
.dw aX
.db 43h
.dw aN_0
.db 54h
.dw aProp
.db 5Bh
.dw aCalculate
.db 0FFh
.dw 0
p03loc_76ED:
.db 44h
.dw aX1
.db 2Dh
.dw aN1
.db 45h
.dw aX2
.db 30h
.dw aN2
.db 55h
.dw aP1
.db 5Bh
.dw aCalculate
.db 0FFh
.dw 0
p03loc_7702:
.db 4Fh
.dw aObserved
.db 50h
.dw aExpected
.db 5Bh
.dw aCalculate
.db 0FFh
.dw 0
p03loc_770E:
.db 58h
.dw aInpt
.db 4Ch
.dw aList1
.db 4Eh
.dw aList2
.db 48h
.dw aFreq1
.db 49h
.dw aFreq2
.db 56h
.dw a1_0
.db 5Bh
.dw aCalculate
.db 0FFh
.dw 0
p03loc_7726:
.db 58h
.dw aInpt
.db 3Eh
.dw p03loc_79CC
.db 4Bh
.dw aList
.db 47h
.dw aFreq
.db 46h
.dw aCLevel
.db 5Ah
.dw aCalculate
.db 0FFh
.dw 0
p03loc_773B:
.db 58h
.dw aInpt
.db 4Bh
.dw aList
.db 47h
.dw aFreq
.db 46h
.dw aCLevel
.db 5Ah
.dw aCalculate
.db 0FFh
.dw 0
p03loc_774D:
.db 58h
.dw aInpt
.db 4Ch
.dw aList1
.db 4Eh
.dw aList2
.db 48h
.dw aFreq1
.db 49h
.dw aFreq2
.db 46h
.dw aCLevel
.db 59h
.dw aPooled
.db 5Ah
.dw aCalculate
.db 0FFh
.dw 0
p03loc_7768:
.db 58h
.dw aInpt
.db 3Fh
.dw a1_2
.db 40h
.dw a2_0
.db 4Ch
.dw aList1
.db 4Eh
.dw aList2
.db 48h
.dw aFreq1
.db 49h
.dw aFreq2
.db 46h
.dw aCLevel
.db 5Ah
.dw aCalculate
.db 0FFh
.dw 0
p03loc_7786:
.db 42h
.dw aX
.db 43h
.dw aN_0
.db 46h
.dw aCLevel
.db 5Ah
.dw aCalculate
.db 0FFh
.dw 0
p03loc_7795:
.db 44h
.dw aX1
.db 2Dh
.dw aN1
.db 45h
.dw aX2
.db 30h
.dw aN2
.db 46h
.dw aCLevel
.db 5Ah
.dw aCalculate
.db 0FFh
.dw 0
p03loc_77AA:
.db 4Ah
.dw aXlist
.db 4Dh
.dw aYlist
.db 47h
.dw aFreq
.db 57h
.dw p03loc_7A54
.db 51h
.dw aRegEQ_03
.db 5Ah
.dw aCalculate
.db 0FFh
.dw 0
p03loc_77BF:
.db 58h
.dw aInpt
.db 3Dh
.dw aA
.db 3Eh
.dw p03loc_79CC
.db 3
.dw p03loc_7A3D
.db 2
.dw aN
.db 52h
.dw p03loc_7A44
.db 5Bh
.dw aCalculate
.db 0FFh
.dw 0
p03loc_77D7:
.db 58h
.dw aInpt
.db 3Dh
.dw aA
.db 3
.dw p03loc_7A3D
.db 6
.dw aSx
.db 2
.dw aN
.db 52h
.dw p03loc_7A44
.db 5Bh
.dw aCalculate
.db 0FFh
.dw 0
p03loc_77EF:
.db 58h
.dw aInpt
.db 2Bh
.dw a1_1
.db 2Ch
.dw aSx1
.db 2Dh
.dw aN1
.db 2Eh
.dw a2
.db 2Fh
.dw aSx2
.db 30h
.dw aN2
.db 53h
.dw a1
.db 59h
.dw aPooled
.db 5Bh
.dw aCalculate
.db 0FFh
.dw 0
p03loc_7810:
.db 58h
.dw aInpt
.db 3Fh
.dw a1_2
.db 40h
.dw a2_0
.db 2Bh
.dw a1_1
.db 2Dh
.dw aN1
.db 2Eh
.dw a2
.db 30h
.dw aN2
.db 53h
.dw a1
.db 5Bh
.dw aCalculate
.db 0FFh
.dw 0
p03loc_782E:
.db 58h
.dw aInpt
.db 2Ch
.dw aSx1
.db 2Dh
.dw aN1
.db 2Fh
.dw aSx2
.db 30h
.dw aN2
.db 56h
.dw a1_0
.db 5Bh
.dw aCalculate
.db 0FFh
.dw 0
p03loc_7846:
.db 58h
.dw aInpt
.db 3Eh
.dw p03loc_79CC
.db 3
.dw p03loc_7A3D
.db 2
.dw aN
.db 46h
.dw aCLevel
.db 5Ah
.dw aCalculate
.db 0FFh
.dw 0
p03loc_785B:
.db 58h
.dw aInpt
.db 3
.dw p03loc_7A3D
.db 6
.dw aSx
.db 2
.dw aN
.db 46h
.dw aCLevel
.db 5Ah
.dw aCalculate
.db 0FFh
.dw 0
p03loc_7870:
.db 58h
.dw aInpt
.db 2Bh
.dw a1_1
.db 2Ch
.dw aSx1
.db 2Dh
.dw aN1
.db 2Eh
.dw a2
.db 2Fh
.dw aSx2
.db 30h
.dw aN2
.db 46h
.dw aCLevel
.db 59h
.dw aPooled
.db 5Ah
.dw aCalculate
.db 0FFh
.dw 0
p03loc_7891:
.db 58h
.dw aInpt
.db 3Fh
.dw a1_2
.db 40h
.dw a2_0
.db 2Bh
.dw a1_1
.db 2Dh
.dw aN1
.db 2Eh
.dw a2
.db 30h
.dw aN2
.db 46h
.dw aCLevel
.db 5Ah
.dw aCalculate
.db 0FFh
.dw 0
p03loc_78AF:
.dw p03loc_7675
.dw p03loc_792B
.dw p03loc_768D
.dw p03loc_7932
.dw p03loc_76BD
.dw p03loc_7945
.dw p03loc_76A2
.dw p03loc_7939
.dw p03loc_76DB
.dw p03loc_7951
.dw p03loc_76ED
.dw p03loc_795D
.dw p03loc_7726
.dw p03loc_797D
.dw p03loc_773B
.dw p03loc_7987
.dw p03loc_7768
.dw p03loc_799C
.dw p03loc_774D
.dw p03loc_7991
.dw p03loc_7786
.dw p03loc_79A7
.dw p03loc_7795
.dw p03loc_79B2
.dw p03loc_7702
.dw p03loc_7969
.dw p03loc_770E
.dw p03loc_7971
.dw p03loc_77AA
.dw p03loc_79BD
.dw p03loc_77AA
.dw p03loc_79BD
.dw p03loc_77BF
.dw p03loc_792B
.dw p03loc_77D7
.dw p03loc_7932
.dw p03loc_7810
.dw p03loc_7945
.dw p03loc_77EF
.dw p03loc_7939
.dw p03loc_76DB
.dw p03loc_7951
.dw p03loc_76ED
.dw p03loc_795D
.dw p03loc_7846
.dw p03loc_797D
.dw p03loc_785B
.dw p03loc_7987
.dw p03loc_7891
.dw p03loc_799C
.dw p03loc_7870
.dw p03loc_7991
.dw p03loc_7786
.dw p03loc_79A7
.dw p03loc_7795
.dw p03loc_79B2
.dw p03loc_7702
.dw p03loc_7969
.dw p03loc_782E
.dw p03loc_7971
.dw p03loc_77AA
.dw p03loc_79BD
p03loc_792B:
.asc 'Z-Test',0
p03loc_7932:
.asc 'T-Test',0
p03loc_7939:
.asc '2-SampTTest',0
p03loc_7945:
.asc '2-SampZTest',0
p03loc_7951:
.asc '1-PropZTest',0
p03loc_795D:
.asc '2-PropZTest',0
p03loc_7969:
.asc 0D9h,12h,'-Test',0
p03loc_7971:
.asc '2-Samp',0DAh,'Test',0
p03loc_797D:
.asc 'ZInterval',0
p03loc_7987:
.asc 'TInterval',0
p03loc_7991:
.asc '2-SampTInt',0
p03loc_799C:
.asc '2-SampZInt',0
p03loc_79A7:
.asc '1-PropZInt',0
p03loc_79B2:
.asc '2-PropZInt',0
p03loc_79BD:
.asc 'LinRegTTest',0
aA:
.db 0C3h
.db 80h
.db 0
p03loc_79CC:
.db 0C7h
.db 0
p03loc_79CE:
aList:
.asc 'List',0
aFreq:
.asc 'Freq',0
aList1:
.asc 'List1',0
aList2:
.asc 'List2',0
aFreq1:
.asc 'Freq1',0
aFreq2:
.asc 'Freq2',0
aN1:
.asc 'n1',0
a1_1:
.db 0CBh
.db 31h
.db 0
aSx1:
.asc 'Sx1',0
aN2:
.asc 'n2',0
a2:
.db 0CBh
.db 32h
.db 0
aSx2:
.asc 'Sx2',0
a1_2:
.db 0C7h
.db 31h
.db 0
a2_0:
.db 0C7h
.db 32h
.db 0
aPa:
.db 70h
.db 80h
.db 0
aX:
.asc 'x',0
aN_0:
.asc 'n',0
aX1:
.asc 'x1',0
aX2:
.asc 'x2',0
aCLevel:
.asc 'C-Level',0
aObserved:
.asc 'Observed',0
aExpected:
.asc 'Expected',0
aXlist:
.asc 'Xlist',0
aYlist:
.asc 'Ylist',0
p03loc_7A3D:
.asc 0CBh,0
aN: .asc 'n',0
aSx: .asc 'Sx',0
p03loc_7A44:
.asc 0C3h,0
a1: .asc 0C3h,'1',0
aProp: .asc 'prop',0
aP1: .asc 'p1',0
a1_0: .asc 0C7h,'1',0
p03loc_7A54:
.asc 0BCh,' ',026h,' ',0C5h,0
aCalculate:
.asc 'Calculate',0
p03loc_7A64:
aDraw: .asc 'Draw',0
aInpt: .asc 'Inpt',0
aPooled:.asc 'Pooled',0
aYes: .asc 'Yes',0
aNo: .asc 'No',0
aData: .asc 'Data',0
aStats: .asc 'Stats',0
p03loc_7A87:
.db 18h
.db 0C3h
.db 80h
.db 0
p03loc_7A8B:
.db 3Eh
.db 0C3h
.db 80h
.db 0
p03loc_7A8F:
.db 3Ch
.db 0C3h
.db 80h
.db 0
p03loc_7A93:
.db 18h
.db 0C3h
.db 32h
.db 0
p03loc_7A97:
.db 3Eh
.db 0C3h
.db 32h
.db 0
p03loc_7A9B:
.db 3Ch
.db 0C3h
.db 32h
.db 0
p03loc_7A9F:
.db 18h
.db 70h
.db 80h
.db 0
p03loc_7AA3:
.db 3Eh
.db 70h
.db 80h
.db 0
p03loc_7AA7:
.db 3Ch
.db 70h
.db 80h
.db 0
p03loc_7AAB:
.db 18h
.db 70h
.db 32h
.db 0
p03loc_7AAF:
.db 3Eh
.db 70h
.db 32h
.db 0
p03loc_7AB3:
.db 3Ch
.db 70h
.db 32h
.db 0
p03loc_7AB7:
.db 18h
.db 0C7h
.db 32h
.db 0
p03loc_7ABB:
.db 3Eh
.db 0C7h
.db 32h
.db 0
p03loc_7ABF:
.db 3Ch
.db 0C7h
.db 32h
.db 0
p03loc_7AC3:
.db 18h
.db 30h
.db 0
p03loc_7AC6:
.db 3Eh
.db 30h
.db 0
p03loc_7AC9:
.db 3Ch
.db 30h
.db 0
aRegEQ_03:
.asc 'RegEQ',0
p03loc_7AD2:
.dw p03loc_7AE6
.dw p03loc_7B13
.dw p03loc_7B40
.dw p03loc_7B6D
.dw p03loc_7B9A
.dw p03loc_7BC7
.dw p03loc_7BF4
.dw p03loc_7C12
.dw p03loc_7C4E
.dw p03loc_7C30
p03loc_7AE6:
.db 1
.db 0
.db 0FEh
.db 0FEh
.db 5
.db 3
.db 3
.dw p03loc_7A87
.db 0Ch
.db 8Ah
.db 0
.db 3
.db 0FEh
.db 7Dh
.db 2
.db 0
.db 0FEh
.db 0FEh
.db 5
.db 7
.db 3
.dw p03loc_7A8F
.db 0Ch
.db 8Ah
.db 1
.db 3
.db 0FEh
.db 7Eh
.db 2
.db 1
.db 0FEh
.db 0FEh
.db 5
.db 0Bh
.db 3
.dw p03loc_7A8B
.db 0Ch
.db 8Ah
.db 2
.db 3
.db 0FEh
.db 7Fh
p03loc_7B13:
.db 1
.db 0
.db 0FEh
.db 0FEh
.db 5
.db 4
.db 3
.dw p03loc_7A93
.db 0Ch
.db 8Ah
.db 0
.db 3
.db 0FEh
.db 80h
.db 2
.db 0
.db 0FEh
.db 0FEh
.db 5
.db 8
.db 3
.dw p03loc_7A9B
.db 0Ch
.db 8Ah
.db 1
.db 3
.db 0FEh
.db 81h
.db 2
.db 1
.db 0FEh
.db 0FEh
.db 5
.db 0Ch
.db 3
.dw p03loc_7A97
.db 0Ch
.db 8Ah
.db 2
.db 3
.db 0FEh
.db 82h
p03loc_7B40:
.db 1
.db 0
.db 0FEh
.db 0FEh
.db 5
.db 5
.db 3
.dw p03loc_7A9F
.db 0Ch
.db 8Ah
.db 0
.db 3
.db 0FEh
.db 83h
.db 2
.db 0
.db 0FEh
.db 0FEh
.db 5
.db 9
.db 3
.dw p03loc_7AA7
.db 0Ch
.db 8Ah
.db 1
.db 3
.db 0FEh
.db 84h
.db 2
.db 1
.db 0FEh
.db 0FEh
.db 5
.db 0Dh
.db 3
.dw p03loc_7AA3
.db 0Ch
.db 8Ah
.db 2
.db 3
.db 0FEh
.db 85h
p03loc_7B6D:
.db 1
.db 0
.db 0FEh
.db 0FEh
.db 5
.db 4
.db 3
.dw p03loc_7AAB
.db 0Ch
.db 8Ah
.db 0
.db 3
.db 0FEh
.db 86h
.db 2
.db 0
.db 0FEh
.db 0FEh
.db 5
.db 8
.db 3
.dw p03loc_7AB3
.db 0Ch
.db 8Ah
.db 1
.db 3
.db 0FEh
.db 87h
.db 2
.db 1
.db 0FEh
.db 0FEh
.db 5
.db 0Ch
.db 3
.dw p03loc_7AAF
.db 0Ch
.db 8Ah
.db 2
.db 3
.db 0FEh
.db 88h
p03loc_7B9A:
.db 1
.db 0
.db 0FEh
.db 0FEh
.db 5
.db 4
.db 3
.dw p03loc_7AB7
.db 0Ch
.db 8Ah
.db 0
.db 3
.db 0FEh
.db 89h
.db 2
.db 0
.db 0FEh
.db 0FEh
.db 5
.db 8
.db 3
.dw p03loc_7ABF
.db 0Ch
.db 8Ah
.db 1
.db 3
.db 0FEh
.db 8Ah
.db 2
.db 1
.db 0FEh
.db 0FEh
.db 5
.db 0Ch
.db 3
.dw p03loc_7ABB
.db 0Ch
.db 8Ah
.db 2
.db 3
.db 0FEh
.db 8Bh
p03loc_7BC7:
.db 1
.db 0
.db 0FEh
.db 0FEh
.db 5
.db 7
.db 2
.dw p03loc_7AC3
.db 0Ch
.db 8Ah
.db 0
.db 3
.db 0FEh
.db 8Ch
.db 2
.db 0
.db 0FEh
.db 0FEh
.db 5
.db 0Ah
.db 2
.dw p03loc_7AC9
.db 0Ch
.db 8Ah
.db 1
.db 3
.db 0FEh
.db 8Dh
.db 2
.db 1
.db 0FEh
.db 0FEh
.db 5
.db 0Dh
.db 2
.dw p03loc_7AC6
.db 0Ch
.db 8Ah
.db 2
.db 3
.db 0FEh
.db 8Eh
p03loc_7BF4:
.db 1
.db 0
.db 0FEh
.db 0FEh
.db 1
.db 6
.db 4
.dw aData
.db 0Ch
.db 8Ah
.db 0
.db 8
.db 0FEh
.db 77h
.db 1
.db 0
.db 0FEh
.db 0FEh
.db 1
.db 0Bh
.db 5
.dw aStats
.db 0Ch
.db 8Ah
.db 8
.db 8
.db 0FEh
.db 78h
p03loc_7C12:
.db 1
.db 0
.db 0FEh
.db 0FEh
.db 7
.db 8
.db 2
.dw aNo
.db 0Ch
.db 8Ah
.db 0
.db 4
.db 0FEh
.db 79h
.db 1
.db 0
.db 0FEh
.db 0FEh
.db 7
.db 0Bh
.db 3
.dw aYes
.db 0Ch
.db 8Ah
.db 4
.db 4
.db 0FEh
.db 7Ah
p03loc_7C30:
.db 1
.db 0
.db 0FEh
.db 0FEh
.db 6
.db 1
.db 9
.dw aCalculate
.db 0Ch
.db 8Ah
.db 20h
.db 20h
.db 0FEh
.db 7Bh
.db 1
.db 0
.db 0FEh
.db 0FEh
.db 6
.db 0Bh
.db 4
.dw aDraw
.db 0Ch
.db 8Ah
.db 20h
.db 20h
.db 0FEh
.db 7Ch
p03loc_7C4E:
.db 0
.db 0
.db 0FEh
.db 0FEh
.db 6
.db 1
.db 9
.dw aCalculate
.db 0Ch
.db 8Ah
.db 20h
.db 20h
.db 0FEh
.db 7Bh
p03loc_7C5D:
.db 22h
.db 23h
.db 24h
.db 2Dh
.db 25h
.db 26h
.db 28h
.db 2Fh
.db 29h
.db 30h
.db 2Ah
.db 2Bh
.db 27h
.db 2Eh
.db 22h
p03sub_7C6C:
call p03sub_71FC
push ix
ld ix, (unk_9700)
ld a, 0
ld (nameBuff), a
p03loc_7C7A:
ld a, (ix+0)
ld (unk_8D0B), a
inc a
jr z, p03loc_7C8D
call p03sub_7C90
ld de, 3
add ix, de
jr p03loc_7C7A
p03loc_7C8D:
pop ix
ret
p03sub_7C90:
call p03sub_7264
call OP1Set0
ld a, (ix+0)
cp 5Ah
ret z
cp 5Bh
jr z, p03loc_7CD7
cp 52h
jp c, p03loc_7CDF
cp 58h
jr c, p03loc_7CC0
ret z
bit 2, (iy+1Ch)
jr z, p03loc_7CB3
p03loc_7CB0:
call OP1Set1
p03loc_7CB3:
ld hl, nameBuff
inc (hl)
call PushRealO1
ret
p03sub_7CBB:
bit 3, (iy+1Ch)
ret
p03loc_7CC0:
ld a, (unk_8A0C)
and 3
jr z, p03loc_7CB3
push af
call OP1Set1
pop af
cp 2
jr z, p03loc_7CB3
ld a, 80h
ld (OP1), a
jr p03loc_7CB3
p03loc_7CD7:
bit 5, (iy+1Ch)
jr nz, p03loc_7CB0
jr p03loc_7CB3
p03loc_7CDF:
call Rcl_StatVar
ld a, (ix+0)
cp 51h ; 'Q'
jr nz, p03loc_7CF1
call CkOP1Real
cp 3
ret nz
jr p03loc_7CB3
p03loc_7CF1:
call CkOP1Real
cp 1
jr z, p03loc_7CFC
cp 0Dh
jr nz, p03loc_7D19
p03loc_7CFC:
ld a, (OP1+1)
cp 31h
ret z
cp 5Dh
jr z, p03loc_7D14
ld hl, 847Dh
ld de, 847Eh
ld bc, 5
lddr
ld a, 5Dh
ld (de), a
p03loc_7D14:
call j_Find_Parse_Formula
jr p03loc_7CB3
p03loc_7D19:
cp 0Eh
jr nz, p03loc_7D21
xor a
ld (OP1), a
p03loc_7D21:
jr p03loc_7CB3
p03loc_7D23:
ld ix, (unk_97A3)
call p03sub_7D60
bit 4, (iy+1Ch)
jr z, p03sub_7D48
ld hl, 8D0Ah
res 4, (hl)
call p03sub_7CBB
jr z, p03loc_7D3C
set 4, (hl)
p03loc_7D3C:
call p03sub_74B9
call p03sub_7474
call j_ClrScrn
jp p03loc_70CC
p03sub_7D48:
res saIndic, (iy+newIndicFlags)
ld a, (unk_97A1)
ld b, a
ld ix, (unk_979F)
p03loc_7D54:
or a
call Page03_3471
ld de, 0Fh
add ix, de
djnz p03loc_7D54
ret
p03sub_7D60:
res 4, (iy+1Ch)
ld l, (ix+9)
ld h, (ix+0Ah)
ld a, (hl)
and (ix+0Ch)
cp (ix+0Bh)
ret z
ld a, (ix+0Ch)
cp 8
jr nz, p03loc_7D7D
set 4, (iy+1Ch)
p03loc_7D7D:
cpl
and (hl)
or (ix+0Bh)
ld (hl), a
ret
p03loc_7D84:
ld ix, (unk_97A3)
cp 1
jr z, p03loc_7D91
cp 2
jp nz, Page0Call_3453
p03loc_7D91:
dec a
ld e, a
ld d, 0
add ix, de
ld a, (ix+0)
ld (unk_97A2), a
ld a, (unk_97A2)
ld l, a
ld h, 0
ld e, l
ld d, h
add hl, hl
add hl, de
add hl, hl
add hl, hl
add hl, de
add hl, de
add hl, de
ld de, (unk_979F)
add hl, de
ld (unk_97A3), hl
push hl
pop ix
ret
#ifndef DEVIATE_FROM_ORIGINAL_FILE
;Not referenced anywhere.
cp 9
ret z
ret
#endif
p03loc_7DBC:
ld de, (OP1+1)
ld a, e
ld e, d
ld d, a
call j_PutTokString
ret
p03loc_7DC7:
ld hl, 92C5h
res 2, (hl)
call Page03_3477
call p03sub_7316
jp z, numError02
bit 7, (iy+1Ch)
ret z
call j_BufToTop
call Page03_37AD
call IsBasicProgZero
jp nz, p03loc_4A6F
call j_fdispEOL
ret
Page03_3477:
call p03sub_74B9
ld a, (winLeftEdge)
push af
ld hl, (curRow)
push hl
ld hl, (unk_8D0B)
push hl
ld a, (unk_97A1)
push af
ld hl, (unk_979F)
push hl
set 5, (iy+1Dh)
call j_ZifRclHandler
jr nz, p03loc_7E15
ld hl, (promptRow)
ld (curRow), hl
ld a, 7
ld (winBtm), a
p03loc_7E15:
call p03sub_7212
res 5, (iy+1Dh)
call p03sub_7474
pop hl
ld (unk_979F), hl
pop af
ld (unk_97A1), a
pop hl
ld (unk_8D0B), hl
pop hl
ld (curRow), hl
pop af
ld (winLeftEdge), a
ret