# HG changeset patch # User brandonlw # Date 1400736548 14400 # Node ID 486c42a314bcb0cc7ff227e754f6971884ffcdef # Parent adad2f097dcbc2c043c9552588f5fd22c9f23aca First pass at the rest of page 0 cleanup. diff -r adad2f097dcb -r 486c42a314bc source/page00/math_var.asm --- a/source/page00/math_var.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page00/math_var.asm Thu May 22 01:29:08 2014 -0400 @@ -1,105 +1,79 @@ -sub_BD1: +cpop1op2_backUpToOP3OP4: call OP1ToOP3 call OP2ToOP4 jp cpop1op2 -; End of function sub_BD1 - -; --------------------------------------------------------------------------- Min: - call sub_BD1 + call cpop1op2_backUpToOP3OP4 jp c, OP3ToOP1 jp OP4ToOP1 -; --------------------------------------------------------------------------- Max: - call sub_BD1 + call cpop1op2_backUpToOP3OP4 jp c, OP4ToOP1 jp OP3ToOP1 -; --------------------------------------------------------------------------- -page0_BEC: +FPAdd_FromHL: call Mov9ToOP2 jr FPAdd -; --------------------------------------------------------------------------- -BCALL_405A: +FPAdd_AbsoluteValues: call ClrOP1S call ClrOP2S jr FPAdd -; --------------------------------------------------------------------------- -BCALL_405D: - call page0_14E1 +DoInt: call CKOP1DoInt ret z ld a, (OP1) push af call Trunc pop af - and 80h ; '' + and 80h jr nz, Minus1 ret -; --------------------------------------------------------------------------- page0_C0A: call InvOP1S jr page0_C3D -; =============== S U B R O U T I N E ======================================= - - Trunc: - - - - - rst 8 call frac InvSub: call InvOP1S jr FPAdd -; --------------------------------------------------------------------------- Times2: rst 8 jr FPAdd -; --------------------------------------------------------------------------- Plus1: call OP2Set1 jr FPAdd -; --------------------------------------------------------------------------- page0_C20: call Mov9ToOP2 jr FPAdd -; --------------------------------------------------------------------------- page0_C25: call Mov9ToOP2 jr FPSub -; --------------------------------------------------------------------------- Minus1: call OP2Set1 - FPSub: - ld hl, 8483h + ld hl, OP2 ld a, (hl) - xor 80h ; '' + xor 80h ld (hl), a - FPAdd: res 6, (iy+0Eh) call page0_FB5 jr page0_C41 -; --------------------------------------------------------------------------- page0_C3D: set 6, (iy+0Eh) - page0_C41: call CkOP2FP0 ret z @@ -116,16 +90,15 @@ cp 10h jp nc, OP2ToOP1 ld b, a - page0_C5E: - ld hl, 847Ah + ld hl, OP1+2 call SHR16 djnz page0_C5E ld a, (OP2) - and 80h ; '' + and 80h ld c, a ld a, (OP1) - and 80h ; '' + and 80h xor c ld a, c ld (OP1), a @@ -135,74 +108,56 @@ call sub_1397 call page0_141D ld a, (OP1) - xor 80h ; '' + xor 80h ld (OP1), a jp page0_CD2 -; --------------------------------------------------------------------------- page0_C8E: jr z, page0_C9C cp 10h ret nc ld b, a - page0_C94: - ld hl, 8485h + ld hl, OP2+2 call SHR16 djnz page0_C94 - page0_C9C: ld a, (OP1) - and 80h ; '' + and 80h ld (OP1), a ld c, a ld a, (OP2) - and 80h ; '' + and 80h xor c jr nz, page0_CC4 - page0_CAD: call page0_139F jr nc, page0_CB8 call sub_12F5 call INCO1EXP - page0_CB8: call sub_CDF bit 6, (iy+0Eh) jr z, page0_D06 jp LJNORND -; --------------------------------------------------------------------------- page0_CC4: call page0_141D jr nc, page0_CD2 call page0_139F call sub_1415 - page0_CCF: call OP2ToOP1 - page0_CD2: call sub_CDF bit 6, (iy+0Eh) jp z, LJRND jp LJNORND -; End of function Trunc - - -; =============== S U B R O U T I N E ======================================= - sub_CDF: - ; Trunc:loc_CD2p - - - - - ld hl, 847Ah + ld hl, OP1+2 ld b, 6 - call sub_1525 + call AreBBytesAtHLZero ret nz ld a, (hl) cp 10h @@ -211,53 +166,31 @@ inc hl ld (hl), a jp OP1Set0 -; End of function sub_CDF - - -; =============== S U B R O U T I N E ======================================= - page0_CF2: - - - ld a, 5 jr page0_CF7 -; --------------------------------------------------------------------------- - page0_CF6: xor a - page0_CF7: call GETCONOP2 - page0_CFA: set 6, (iy+0Eh) jr page0_D26 -; End of function page0_CF2 - -; --------------------------------------------------------------------------- DToR: call page0_FB5 call page0_CF2 -; START OF FUNCTION CHUNK FOR Trunc - page0_D06: jp page0_E2D -; END OF FUNCTION CHUNK FOR Trunc -; --------------------------------------------------------------------------- - RToD: call page0_FB5 call page0_CF6 jr page0_D06 -; --------------------------------------------------------------------------- Cube: call FPSquare jr FPMult -; --------------------------------------------------------------------------- TimesPt5: ld hl, page0_FC3 @@ -266,19 +199,12 @@ call Mov9ToOP2 jr FPMult -; =============== S U B R O U T I N E ======================================= - - FPSquare: rst 8 FPMult: res 6, (iy+0Eh) call page0_FB5 -; End of function FPSquare - -; START OF FUNCTION CHUNK FOR page0_CF2 - page0_D26: call CkOP1FP0 ret z @@ -287,25 +213,21 @@ call page0_E9E ld a, d ld (OP1+1), a - page0_D37: call ZeroOP3 ld b, 8 - ld hl, 848Dh - + ld hl, OP2+10 page0_D3F: dec hl cp (hl) jr nz, page0_D4F djnz page0_D3F - page0_D45: ld hl, 848Fh call SHR16 rrd pop hl dec hl - page0_D4F: push hl push bc @@ -314,7 +236,6 @@ and 0Fh jr z, page0_D96 ld b, a - page0_D58: ld de, 8497h ld hl, (OP1+8) @@ -324,52 +245,50 @@ ld (de), a dec de ld a, (de) - adc a, l + adc a, l daa ld (de), a dec de ld hl, (OP1+6) ld a, (de) - adc a, h + adc a, h daa ld (de), a dec de ld a, (de) - adc a, l + adc a, l daa ld (de), a dec de ld hl, (OP1+4) ld a, (de) - adc a, h + adc a, h daa ld (de), a dec de ld a, (de) - adc a, l + adc a, l daa ld (de), a dec de ld hl, (OP1M) ld a, (de) - adc a, h + adc a, h daa ld (de), a dec de ld a, (de) - adc a, l + adc a, l daa ld (de), a jp nc, page0_D94 dec de ex de, hl inc (hl) - page0_D94: djnz page0_D58 - page0_D96: - ld hl, 848Fh + ld hl, OP3+1 call SHR16 rrd ld a, c @@ -380,7 +299,6 @@ and 0Fh jr z, page0_DE6 ld b, a - page0_DA8: ld de, 8497h ld hl, (OP1+8) @@ -390,50 +308,48 @@ ld (de), a dec de ld a, (de) - adc a, l + adc a, l daa ld (de), a dec de ld hl, (OP1+6) ld a, (de) - adc a, h + adc a, h daa ld (de), a dec de ld a, (de) - adc a, l + adc a, l daa ld (de), a dec de ld hl, (OP1+4) ld a, (de) - adc a, h + adc a, h daa ld (de), a dec de ld a, (de) - adc a, l + adc a, l daa ld (de), a dec de ld hl, (OP1M) ld a, (de) - adc a, h + adc a, h daa ld (de), a dec de ld a, (de) - adc a, l + adc a, l daa ld (de), a jp nc, page0_DE4 dec de ex de, hl inc (hl) - page0_DE4: djnz page0_DA8 - page0_DE6: pop bc dec b @@ -446,30 +362,24 @@ call SHR16 rrd call INCO1EXP - page0_DFD: call page0_11CB bit 6, (iy+0Eh) ret nz jr page0_E2D -; END OF FUNCTION CHUNK FOR page0_CF2 -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR Trunc -LJRND: - ld hl, 847Ah +LJRND: ld hl, OP1+2 ld a, (hl) - and 0F0h ; + and 0F0h jr nz, page0_E2D ld c, 10h - page0_E11: dec c jp z, OP1Set0 call page0_1301 inc hl ld a, (hl) - and 0F0h ; + and 0F0h jp z, page0_E11 ld a, 10h sub c @@ -478,92 +388,70 @@ sub c jp c, OP1Set0 ld (OP1+1), a - page0_E2D: - ; page0_CF2+113j ... ld a, (OP1) - and 80h ; '' + and 80h ld (OP1), a ld hl, 8481h ld a, (hl) ld (hl), 0 dec hl - add a, 0B0h ; 'Ч + add a, 0B0h ret nc call sub_1373 ret nc inc hl ld (hl), 10h jp INCO1EXP -; END OF FUNCTION CHUNK FOR Trunc -; --------------------------------------------------------------------------- InvOP1SC: call InvOP2S - -; =============== S U B R O U T I N E ======================================= - - InvOP1S: - ; Trunc:InvSubp call CkOP1FP0 ld a, (OP1) jr nz, page0_E56 - or 80h ; '' - + or 80h page0_E56: - xor 80h ; '' + xor 80h ld (OP1), a ret -; End of function InvOP1S - - -; =============== S U B R O U T I N E ======================================= - InvOP2S: call CkOP2FP0 ld a, (OP2) jr nz, page0_E66 - or 80h ; '' - + or 80h page0_E66: - xor 80h ; '' + xor 80h ld (OP2), a ret -; End of function InvOP2S -; --------------------------------------------------------------------------- - and 80h ; '' +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;I don't think this is used anywhere. + and 80h ld (OP1), a ret - -; =============== S U B R O U T I N E ======================================= +#endif - -frac: - call CkOP1FP0 +frac: call CkOP1FP0 ret z xor a ld (OP1+9), a ld a, (OP1+1) - sub 80h ; '' + sub 80h ret c cp 0Fh jr c, page0_E8E jr page0_EBE -; --------------------------------------------------------------------------- page0_E86: ld a, (OP1+1) - cp 80h ; '' + cp 80h jp c, LJRND - page0_E8E: call page0_12EF call DecO1Exp jr page0_E86 -; --------------------------------------------------------------------------- page0_E96: ld a, (OP2+1) @@ -571,8 +459,6 @@ inc a ld d, a jr page0_EA2 -; --------------------------------------------------------------------------- - page0_E9E: ld a, (OP2+1) ld d, a @@ -581,42 +467,33 @@ ld a, (OP1+1) add a, d jr nc, page0_EAF - add a, 80h ; '' + add a, 80h jr nc, page0_EB3 jp ErrOverflow -; --------------------------------------------------------------------------- page0_EAF: - add a, 80h ; '' + add a, 80h jr nc, page0_EBD - page0_EB3: ld d, a ld a, (OP2) - ld hl, 8478h + ld hl, OP1 xor (hl) ld (hl), a ret -; --------------------------------------------------------------------------- page0_EBD: pop bc - page0_EBE: jp OP1Set0 -; End of function frac - -; --------------------------------------------------------------------------- page0_EC1: call Mov9ToOP2 jr fpdiv -; --------------------------------------------------------------------------- page0_EC6: set 6, (iy+0Eh) jr page0_ED7 -; --------------------------------------------------------------------------- fprecip: rst 8 @@ -642,7 +519,7 @@ ld b, 10h page0_EF7: - ld hl, 8490h + ld hl, OP3+2 push hl ld c, a ld hl, 848Ch @@ -656,11 +533,8 @@ jr nz, page0_F13 pop hl jr page0_EBE -; --------------------------------------------------------------------------- - page0_F13: ld c, 0 - page0_F15: ld hl, 848Ch ld de, 8481h @@ -668,11 +542,8 @@ call page0_1301 ld (hl), a jr page0_F25 -; --------------------------------------------------------------------------- - page0_F24: inc c - page0_F25: ld de, 8481h ld hl, (OP2+8) @@ -728,12 +599,9 @@ bit 0, b jr z, page0_F74 jr page0_F7F -; --------------------------------------------------------------------------- - page0_F70: bit 0, b jr z, page0_F7F - page0_F74: ld a, c add a, a @@ -744,8 +612,6 @@ dec b jr z, page0_F8A jr page0_F15 -; --------------------------------------------------------------------------- - page0_F7F: pop hl ld (hl), c @@ -755,25 +621,22 @@ push hl ld c, 0 jr page0_F15 -; --------------------------------------------------------------------------- - page0_F8A: pop hl ld (hl), c - page0_F8C: call OP3ToOP1 bit 6, (iy+0Eh) jp z, LJRND +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;This jump is not at all necessary. jr LJNORND -; START OF FUNCTION CHUNK FOR Trunc - +#endif LJNORND: ld c, 11h - page0_F9A: ld a, (OP1M) - and 0F0h ; + and 0F0h ret nz dec c jr z, page0_FAC @@ -781,23 +644,13 @@ call DecO1Exp jr nc, page0_F9A ret -; --------------------------------------------------------------------------- - page0_FAC: jp OP1Set0 -; END OF FUNCTION CHUNK FOR Trunc -; --------------------------------------------------------------------------- -int: - ld d, 0 - -Round: - call Page0Call_3E73 +int: ld d, 0 +Round: call Page0Call_3E73 ret -; =============== S U B R O U T I N E ======================================= - - page0_FB5: xor a ld (OP1+9), a @@ -805,12 +658,11 @@ ld (OP1+10), a ld (OP2+10), a ret -; End of function page0_FB5 page0_FC3: .db 0 - .db 7Fh ;  - .db 50h ; P + .db 7Fh + .db 50h .db 0 .db 0 .db 0 @@ -819,8 +671,8 @@ .db 0 page0_FCC: .db 0 - .db 7Fh ;  - .db 25h ; % + .db 7Fh + .db 25h .db 0 .db 0 .db 0 @@ -829,22 +681,19 @@ .db 0 page0_FD5: .db 0 - .db 7Fh ;  - .db 75h ; u + .db 7Fh + .db 75h .db 0 .db 0 .db 0 .db 0 .db 0 .db 0 -; --------------------------------------------------------------------------- page0_FDE: - ld a, 0E3h ; '㧍 - + ld a, 0E3h page0_FE0: - ld hl, 8478h - + ld hl, OP1 page0_FE3: push hl push af @@ -856,7 +705,7 @@ ret page0_FED: .db 0Ch - .db 80h ; + .db 80h .db 10h .db 0 .db 0 @@ -866,7 +715,7 @@ .db 0 page0_FF6: .db 0Ch - .db 80h ; + .db 80h .db 0 .db 0 .db 0 @@ -875,7 +724,7 @@ .db 0 .db 0 .db 0Ch - .db 80h ; + .db 80h .db 0 .db 0 .db 0 @@ -896,7 +745,7 @@ .db 0 unk_1011: .db 0 - .db 80h ; + .db 80h .db 10h .db 0 .db 0 @@ -905,24 +754,17 @@ .db 0 .db 0 .db 0 -; --------------------------------------------------------------------------- OPSet0DE: ld hl, unk_1008 - page0_101D: jp mov9B2 -; --------------------------------------------------------------------------- page0_1020: ld hl, unk_1011 jr page0_101D -; =============== S U B R O U T I N E ======================================= - - HLTimes9: - ; DataSize:page0_2138p ... ld b, h ld c, l add hl, hl @@ -933,95 +775,67 @@ ret c add hl, bc ret -; End of function HLTimes9 - -; --------------------------------------------------------------------------- CkOP1Cplx: ld a, (OP1) - page0_1032: and 1Fh cp 0Ch ret -; =============== S U B R O U T I N E ======================================= - - CkOP1Real: - ; EOP1NotRealp ... ld a, (OP1) and 1Fh ret -; End of function CkOP1Real - -; --------------------------------------------------------------------------- page0_103D: call OP2ToOP1 - page0_1040: - ld hl, 8478h + ld hl, OP1 ld a, (hl) - and 0E0h ; '্ + and 0E0h ld (hl), a ret -; --------------------------------------------------------------------------- COP1Set0: call OP1Set0 - page0_104B: call OP2Set0 - -; =============== S U B R O U T I N E ======================================= - - page0_104E: ld a, (OP1) - and 0E0h ; '্ + and 0E0h or 0Ch ld (OP1), a ld a, (OP2) - and 0E0h ; '্ + and 0E0h or 0Ch ld (OP2), a ret -; End of function page0_104E - -; --------------------------------------------------------------------------- page0_1063: call MovFrOP1 inc hl inc hl jp mov9B2 -; --------------------------------------------------------------------------- CpOP4OP3: call OP4ToOP1 - call BCALL_4120 + call OP3ToOP2 jr cpop1op2 -; --------------------------------------------------------------------------- Mov9OP2Cp: call Mov9ToOP2 jr cpop1op2 -; --------------------------------------------------------------------------- AbsO1O2Cp: call ClrOP1S call ClrOP2S -; START OF FUNCTION CHUNK FOR sub_BD1 - cpop1op2: ld a, (OP1M) or a call z, ZeroOP1 ld a, (OP2M) or a - -page0_1089: call z, ZeroOP2 ld a, (OP1) or a @@ -1030,13 +844,11 @@ and 80h ; '' jr nz, page0_10C3 call OP1MOP2EXP - ld hl, 8485h - ld de, 847Ah - + ld hl, OP2+2 + ld de, OP1+2 page0_10A3: jr nz, page0_10C3 ld b, 7 - page0_10A7: ld a, (de) cp (hl) @@ -1045,24 +857,18 @@ inc de djnz page0_10A7 jr page0_10C3 -; --------------------------------------------------------------------------- - page0_10B0: - and 80h ; '' + and 80h jr z, page0_10C1 - ld hl, 8479h + ld hl, OP1+1 ld a, (OP2+1) sub (hl) inc hl - ld de, 8485h + ld de, OP2+2 jr page0_10A3 -; --------------------------------------------------------------------------- - page0_10C1: sub 1 - page0_10C3: - ; sub_BD1:page0_10A3j ... push af ld a, (OP1+1) or a @@ -1072,443 +878,249 @@ call z, OP2Set0 pop af ret -; END OF FUNCTION CHUNK FOR sub_BD1 - -; =============== S U B R O U T I N E ======================================= - OP3ToOP4: - ld hl, 848Eh - ld de, 8499h - jp Mov11B -; End of function OP3ToOP4 - - -; =============== S U B R O U T I N E ======================================= - - -OP1ToOP4: - ld hl, 8478h - ld de, 8499h - jp Mov11B -; End of function OP1ToOP4 - - -; =============== S U B R O U T I N E ======================================= - - -OP2ToOP4: - ld hl, 8483h - ld de, 8499h - jp Mov11B -; End of function OP2ToOP4 - -; --------------------------------------------------------------------------- - -OP4ToOP2: - ld hl, 8499h - ld de, 8483h + ld hl, OP3 + ld de, OP4 jp Mov11B -; =============== S U B R O U T I N E ======================================= - - -BCALL_4120: - ld hl, 848Eh - ld de, 8483h +OP1ToOP4: + ld hl, OP1 + ld de, OP4 + jp Mov11B +OP2ToOP4: + ld hl, OP2 + ld de, OP4 + jp Mov11B +OP4ToOP2: + ld hl, OP4 + ld de, OP2 + jp Mov11B +OP3ToOP2: + ld hl, OP3 + ld de, OP2 jr Mov11B -; End of function BCALL_4120 - - -; =============== S U B R O U T I N E ======================================= - - OP1ToOP3: - ld de, 848Eh -; End of function OP1ToOP3 - - -; =============== S U B R O U T I N E ======================================= - - -sub_1103: - ld hl, 8478h + ld de, OP3 +Mov11B_FromOP1: + ld hl, OP1 jr Mov11B -; --------------------------------------------------------------------------- - OP5ToOP2: - ld hl, 84A4h - ld de, 8483h - jr Mov11B -; --------------------------------------------------------------------------- - -OP5ToOP6: - ld hl, 84A4h - ld de, 84AFh + ld hl, OP5 + ld de, OP2 jr Mov11B -; --------------------------------------------------------------------------- - +OP5ToOP6: + ld hl, OP5 + ld de, OP6 + jr Mov11B OP5ToOP4: - ld hl, 84A4h - ld de, 8499h + ld hl, OP5 + ld de, OP4 jr Mov11B -; --------------------------------------------------------------------------- - OP1ToOP2: - ld hl, 8478h - ld de, 8483h - jr Mov11B -; --------------------------------------------------------------------------- - -OP6ToOP2: - ld hl, 84AFh - ld de, 8483h + ld hl, OP1 + ld de, OP2 jr Mov11B -; --------------------------------------------------------------------------- - +OP6ToOP2: + ld hl, OP6 + ld de, OP2 + jr Mov11B OP6ToOP1: - ld hl, 84AFh - jr page0_117C -; --------------------------------------------------------------------------- - + ld hl, OP6 + jr Mov11B_ToOP1 OP4ToOP1: - ld hl, 8499h - jr page0_117C -; --------------------------------------------------------------------------- - + ld hl, OP4 + jr Mov11B_ToOP1 OP5ToOP1: - ld hl, 84A4h - jr page0_117C -; --------------------------------------------------------------------------- - + ld hl, OP5 + jr Mov11B_ToOP1 OP3ToOP1: - ld hl, 848Eh - jr page0_117C -; --------------------------------------------------------------------------- - + ld hl, OP3 + jr Mov11B_ToOP1 OP6ToOP5: - ld hl, 84AFh - jr page0_114C -; --------------------------------------------------------------------------- - + ld hl, OP6 + jr Mov11B_ToOP5 OP4ToOP5: - ld hl, 8499h - -page0_114C: - ld de, 84A4h + ld hl, OP4 +Mov11B_ToOP5: + ld de, OP5 jr Mov11B -; --------------------------------------------------------------------------- - OP3ToOP5: - ld hl, 848Eh - ld de, 84A4h + ld hl, OP3 + ld de, OP5 jr Mov11B -; --------------------------------------------------------------------------- - OP2ToOP5: - ld hl, 8483h - ld de, 84A4h - jr Mov11B -; --------------------------------------------------------------------------- - -OP2ToOP6: - ld hl, 8483h - ld de, 84AFh + ld hl, OP2 + ld de, OP5 jr Mov11B -; --------------------------------------------------------------------------- - -OP1ToOP6: - ld hl, 8478h - ld de, 84AFh +OP2ToOP6: + ld hl, OP2 + ld de, OP6 jr Mov11B -; --------------------------------------------------------------------------- - -OP1ToOP5: - ld hl, 8478h - ld de, 84A4h +OP1ToOP6: + ld hl, OP1 + ld de, OP6 jr Mov11B -; --------------------------------------------------------------------------- - +OP1ToOP5: + ld hl, OP1 + ld de, OP5 + jr Mov11B OP2ToOP1: - ld hl, 8483h - -page0_117C: - ld de, 8478h - -Mov11B: - ldi - -Mov10B: - ldi -; End of function sub_1103 - - -; =============== S U B R O U T I N E ======================================= - + ld hl, OP2 +Mov11B_ToOP1: + ld de, OP1 +Mov11B: ldi +Mov10B: ldi Mov9B: -mov9B2: - - ldi - -Mov8B: - ldi +mov9B2: ldi +Mov8B: ldi Mov7B: -Mov7B2: +Mov7B2: ldi +Mov6B: ldi - -page0_1189: - ldi - -page0_118B: +Mov5B: ldi - -page0_118D: +Mov4B: ldi - -page0_118F: +Mov3B: ldi ldi ldi ret -; End of function mov9B2 -; --------------------------------------------------------------------------- - ld de, 849Bh - ld hl, 8485h +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;This doesn't seem to be referenced anywhere. + ld de, OP4+2 + ld hl, OP2+2 jr Mov8B -; --------------------------------------------------------------------------- +#endif page0_119E: - ld hl, 847Ah - ld de, 849Bh + ld hl, OP1+2 + ld de, OP4+2 jr Mov8B -; --------------------------------------------------------------------------- - page0_11A6: - ld hl, 849Bh + ld hl, OP4+2 jr page0_11AE -; --------------------------------------------------------------------------- - page0_11AB: - ld hl, 8485h - + ld hl, OP2+2 page0_11AE: - ld de, 847Ah + ld de, OP1+2 jr Mov8B -; --------------------------------------------------------------------------- - page0_11B3: - ld de, 8485h - ld hl, 8490h - jr Mov7B2 -; --------------------------------------------------------------------------- - -page0_11BB: - ld de, 847Ah - ld hl, 84A6h + ld de, OP2+2 + ld hl, OP3+2 jr Mov7B2 -; --------------------------------------------------------------------------- - +page0_11BB: + ld de, OP1+2 + ld hl, OP5+2 + jr Mov7B2 page0_11C3: - ld de, 847Ah - ld hl, 8490h + ld de, OP1+2 + ld hl, OP3+2 jr Mov7B2 - -; =============== S U B R O U T I N E ======================================= - - page0_11CB: - ld de, 847Ah - ld hl, 8490h + ld de, OP1+2 + ld hl, OP3+2 jr Mov8B -; End of function page0_11CB - -; --------------------------------------------------------------------------- - page0_11D3: - ld de, 8490h + ld de, OP3+2 jr Mov7B2 -; --------------------------------------------------------------------------- - OP2ToOP3: - ld hl, 8483h - + ld hl, OP2 page0_11DB: - ld de, 848Eh + ld de, OP3 jr Mov11B -; --------------------------------------------------------------------------- - OP4ToOP3: - ld hl, 8499h + ld hl, OP4 jr page0_11DB -; --------------------------------------------------------------------------- - OP5ToOP3: - ld hl, 84A4h + ld hl, OP5 jr page0_11DB -; --------------------------------------------------------------------------- - OP4ToOP6: - ld hl, 8499h - ld de, 84AFh + ld hl, OP4 + ld de, OP6 jr Mov11B - -; =============== S U B R O U T I N E ======================================= - - Mov9ToOP1: - ld de, 8478h - + ld de, OP1 page0_11F5: jr mov9B2 -; End of function Mov9ToOP1 - -; --------------------------------------------------------------------------- - Mov9OP1OP2: rst 20h - -; =============== S U B R O U T I N E ======================================= - - Mov9ToOP2: - ; Trunc:page0_C20p ... - ld de, 8483h + ld de, OP2 jr page0_11F5 -; End of function Mov9ToOP2 - - -; =============== S U B R O U T I N E ======================================= - - MovFrOP1: - - ld hl, 8478h + ld hl, OP1 jr page0_11F5 -; End of function MovFrOP1 - -; --------------------------------------------------------------------------- - OP4Set1: - ld hl, 8499h + ld hl, OP4 jr page0_1254 -; --------------------------------------------------------------------------- - OP3Set1: - ld hl, 848Eh + ld hl, OP3 jr page0_1254 -; --------------------------------------------------------------------------- - OP2Set8: - ld hl, 8483h - ld a, 80h ; '' + ld hl, OP2 + ld a, 80h jr page0_1256 -; --------------------------------------------------------------------------- - OP2Set5: - ld a, 50h ; 'P' -; START OF FUNCTION CHUNK FOR OP2Set0 - + ld a, 50h OP2SetA: - ld hl, 8483h + ld hl, OP2 jr page0_1256 -; END OF FUNCTION CHUNK FOR OP2Set0 -; --------------------------------------------------------------------------- - OP2Set4: - ld hl, 8483h - ld a, 40h ; '@' + ld hl, OP2 + ld a, 40h jr page0_1256 -; --------------------------------------------------------------------------- - OP2Set3: - ld hl, 8483h - + ld hl, OP2 page0_1224: - ld a, 30h ; '0' + ld a, 30h jr page0_1256 -; --------------------------------------------------------------------------- - page0_1228: pop hl - -; =============== S U B R O U T I N E ======================================= - - OP1Set1: - ld hl, 8478h + ld hl, OP1 jr page0_1254 -; End of function OP1Set1 - -; --------------------------------------------------------------------------- - OP1Set4: - ld hl, 8478h - ld a, 40h ; '@' + ld hl, OP1 + ld a, 40h jr page0_1256 -; --------------------------------------------------------------------------- - OP1Set3: - ld hl, 8478h - ld a, 30h ; '0' + ld hl, OP1 + ld a, 30h jr page0_1256 -; --------------------------------------------------------------------------- - OP3Set2: - ld hl, 848Eh + ld hl, OP3 jr page0_1249 -; --------------------------------------------------------------------------- - OP1Set2: - ld hl, 8478h + ld hl, OP1 jr page0_1249 -; --------------------------------------------------------------------------- - OP2Set2: - ld hl, 8483h - + ld hl, OP2 page0_1249: - ld a, 20h ; ' ' + ld a, 20h jr page0_1256 -; --------------------------------------------------------------------------- - page0_124D: ld a, 10h jr page0_125C - -; =============== S U B R O U T I N E ======================================= - - OP2Set1: - ; Trunc:Minus1p - ld hl, 8483h - + ld hl, OP2 page0_1254: ld a, 10h -; End of function OP2Set1 - -; START OF FUNCTION CHUNK FOR sub_CDF - page0_1256: ld (hl), 0 inc hl - ld (hl), 80h ; '' - + ld (hl), 80h page0_125B: inc hl - page0_125C: ld (hl), a xor a jr page0_1262 -; END OF FUNCTION CHUNK FOR sub_CDF -; --------------------------------------------------------------------------- - Zero16D: xor a ld (hl), a -; START OF FUNCTION CHUNK FOR sub_CDF - page0_1262: inc hl ld (hl), a @@ -1522,83 +1134,41 @@ ld (hl), a inc hl ld (hl), a - page0_126E: inc hl ld (hl), a ret -; END OF FUNCTION CHUNK FOR sub_CDF -; --------------------------------------------------------------------------- - OP5Set0: - ld hl, 84A4h + ld hl, OP5 jr OPSet0 -; --------------------------------------------------------------------------- - OP4Set0: - ld hl, 8499h + ld hl, OP4 jr OPSet0 -; --------------------------------------------------------------------------- - OP3Set0: - ld hl, 848Eh + ld hl, OP3 jr OPSet0 -; --------------------------------------------------------------------------- - page0_1280: bit fmtReal, (iy+numMode) jp nz, ErrNon_Real - -; =============== S U B R O U T I N E ======================================= - - OP2Set0: - ; sub_BD1+4FEp ... - - - xor a jr OP2SetA -; End of function OP2Set0 - - -; =============== S U B R O U T I N E ======================================= - - OP1Set0: - ld hl, 8478h - + ld hl, OP1 OPSet0: xor a jr page0_1256 -; End of function OP1Set0 - -; --------------------------------------------------------------------------- - page0_1290: - ld hl, 847Ah + ld hl, OP1+2 jr Zero16D - -; =============== S U B R O U T I N E ======================================= - - ZeroOP1: - ld hl, 8478h + ld hl, OP1 jr ZeroOP -; End of function ZeroOP1 - - -; =============== S U B R O U T I N E ======================================= - - ZeroOP2: - ld hl, 8483h + ld hl, OP2 jr ZeroOP -; --------------------------------------------------------------------------- - ZeroOP3: - ld hl, 848Eh - + ld hl, OP3 ZeroOP: xor a ld (hl), a @@ -1607,86 +1177,47 @@ inc hl ld (hl), a jr page0_125B -; End of function ZeroOP2 - - -; =============== S U B R O U T I N E ======================================= - - -ClrLp: - ld (hl), 0 +ClrLp: ld (hl), 0 inc hl djnz ClrLp ret -; End of function ClrLp -; --------------------------------------------------------------------------- +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;Apparently not used anywhere. ld a, c - -; =============== S U B R O U T I N E ======================================= - - +#endif ShRAcc: - rra rra rra rra and 0Fh ret -; End of function ShRAcc - -; --------------------------------------------------------------------------- - page0_12B8: ld a, c - -; =============== S U B R O U T I N E ======================================= - - ShLAcc: add a, a add a, a add a, a add a, a ret -; End of function ShLAcc - -; --------------------------------------------------------------------------- - page0_12BE: - ld hl, 847Ah + ld hl, OP1+2 xor a jr SHR14 -; --------------------------------------------------------------------------- - page0_12C4: - ld hl, 8479h - -ShR18: - xor a - -SHR18A: - rrd + ld hl, OP1+1 +ShR18: xor a +SHR18A: rrd inc hl jr page0_12D1 -; --------------------------------------------------------------------------- - page0_12CD: - ld hl, 847Ah - -; =============== S U B R O U T I N E ======================================= - - -SHR16: - xor a - + ld hl, OP1+2 +SHR16: xor a page0_12D1: rrd inc hl - -SHR14: - rrd +SHR14: rrd inc hl rrd inc hl @@ -1701,52 +1232,36 @@ rrd inc hl ret -; End of function SHR16 -; --------------------------------------------------------------------------- +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;Apparently not referenced anywhere. ld hl, 8496h jr page0_12F2 - -; =============== S U B R O U T I N E ======================================= - +#endif page0_12EF: ld hl, 8480h - page0_12F2: xor a jr SHL14 -; End of function page0_12EF - - -; =============== S U B R O U T I N E ======================================= - - sub_12F5: - ld hl, 847Ah - + ld hl, OP1+2 page0_12F8: ld a, 1 jr page0_12D1 -; End of function sub_12F5 -; --------------------------------------------------------------------------- +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;Apparently not referenced anywhere. ld hl, 8497h jr SHL16 - -; =============== S U B R O U T I N E ======================================= - +#endif page0_1301: ld hl, 8481h - -SHL16: - xor a +SHL16: xor a rld dec hl - -SHL14: - rld +SHL14: rld dec hl rld dec hl @@ -1761,56 +1276,48 @@ rld dec hl ret -; End of function page0_1301 - -; --------------------------------------------------------------------------- page0_131E: ld a, (OP2) +page0_1321: + ld de, OP4+2 + jr SHRDRND -page0_1321: - ld de, 849Bh - jr SHRDRND -; --------------------------------------------------------------------------- +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;Apparently not necessary. ld a, 1 +#endif -SRDO1: - ld de, 847Ah +SRDO1: ld de, OP1+2 jr SHRDRND -; --------------------------------------------------------------------------- page0_132D: ld a, b ld hl, 84A5h sub (hl) - page0_1332: - ld de, 8485h - + ld de, OP2+2 SHRDRND: - srl a - ld hl, 8490h + srl a + ld hl, OP3+2 jp nz, page0_1350 ex de, hl call Mov8B ret nc - page0_1342: - ld hl, 8490h + ld hl, OP3+2 xor a call SHR14 rrd cp 5 ret c jr page0_136D -; --------------------------------------------------------------------------- - page0_1350: push af ld b, a call ClrLp ld c, a - ld hl, 8490h + ld hl, OP3+2 add hl, bc ex de, hl cpl @@ -1818,34 +1325,26 @@ jr z, page0_1363 ld c, a ldir - page0_1363: pop af jr c, page0_1342 ld a, (hl) - cp 50h ; 'P' + cp 50h ret c ld hl, 8497h - page0_136D: ld a, 1 ld b, 8 jr ADDPROPLP -; =============== S U B R O U T I N E ======================================= - - sub_1373: ld a, 1 - MANTPA: ld b, 7 - ADDPROP: or a - ADDPROPLP: - adc a, (hl) + adc a, (hl) daa ld (hl), a ret nc @@ -1853,174 +1352,125 @@ ld a, 0 djnz ADDPROPLP ret -; End of function sub_1373 - -; --------------------------------------------------------------------------- page0_1382: ld a, (OP2) and 1 ld a, b call z, ShLAcc - page0_138B: ld b, 8 jr ADDPROP -; --------------------------------------------------------------------------- - page0_138F: ld hl, 84A2h ld de, 848Ch jr ADD16D - -; =============== S U B R O U T I N E ======================================= - - sub_1397: ld hl, 8481h ld de, 848Ch jr ADD16D -; End of function sub_1397 - - -; =============== S U B R O U T I N E ======================================= - - page0_139F: ld hl, 848Ch ld de, 8481h jr ADD16D -; --------------------------------------------------------------------------- +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;Apparently not referenced anywhere. ld de, 848Bh jr page0_13AF -; --------------------------------------------------------------------------- ld de, 8480h - +#endif page0_13AF: ld hl, 848Bh xor a jr ADD14D -; --------------------------------------------------------------------------- - page0_13B5: ld hl, 8497h ld de, 8481h - -ADD16D: - ld a, (de) +ADD16D: ld a, (de) add a, (hl) daa ld (de), a dec de dec hl - -ADD14D: - - ld a, (de) - adc a, (hl) +ADD14D: ld a, (de) + adc a, (hl) daa ld (de), a dec de dec hl ld a, (de) - adc a, (hl) + adc a, (hl) daa ld (de), a dec de dec hl ld a, (de) - adc a, (hl) + adc a, (hl) daa ld (de), a dec de dec hl - page0_13D3: ld a, (de) - adc a, (hl) - daa - ld (de), a - dec de - dec hl - ld a, (de) - adc a, (hl) + adc a, (hl) daa ld (de), a dec de dec hl ld a, (de) - adc a, (hl) + adc a, (hl) daa ld (de), a dec de dec hl ld a, (de) - adc a, (hl) + adc a, (hl) + daa + ld (de), a + dec de + dec hl + ld a, (de) + adc a, (hl) daa ld (de), a dec de dec hl ret -; End of function page0_139F - -; --------------------------------------------------------------------------- - page0_13EC: ld a, (OP5) - and 80h ; '' - + and 80h page0_13F1: ld hl, 8497h ld de, 848Ch jr nz, SUB16D jp ADD16D -; --------------------------------------------------------------------------- - page0_13FC: ld a, (OP5) - and 80h ; '' + and 80h ld hl, 8497h ld de, 848Ch jr nz, SUB16D jp page0_13D3 -; --------------------------------------------------------------------------- - page0_140C: ld hl, 8496h ld de, 8480h xor a jr ADD14D - -; =============== S U B R O U T I N E ======================================= - - sub_1415: ld hl, 8481h ld de, 848Ch jr SUB16D -; End of function sub_1415 - - -; =============== S U B R O U T I N E ======================================= - - page0_141D: ld hl, 848Ch jr page0_142D -; --------------------------------------------------------------------------- - page0_1422: ld hl, 8481h ld de, 8497h jr SUB16D -; --------------------------------------------------------------------------- - page0_142A: ld hl, 8497h - page0_142D: ld de, 8481h - SUB16D: ld a, (de) sub (hl) @@ -2028,7 +1478,6 @@ ld (de), a dec de dec hl - SUB14D: ld a, (de) sbc a, (hl) @@ -2048,7 +1497,6 @@ ld (de), a dec de dec hl - page0_1448: ld a, (de) sbc a, (hl) @@ -2075,93 +1523,58 @@ dec de dec hl ret -; End of function page0_141D - -; --------------------------------------------------------------------------- - page0_1461: ld de, 84A1h xor a jr SUB14D -; --------------------------------------------------------------------------- - page0_1467: ld hl, 8480h ld de, 8496h xor a jr SUB14D -; --------------------------------------------------------------------------- - page0_1470: ld hl, 8496h ld de, 8480h xor a jr SUB14D -; --------------------------------------------------------------------------- - OP2ExOP6: - ld hl, 84AFh + ld hl, OP6 jr page0_1498 -; --------------------------------------------------------------------------- - OP5ExOP6: - ld hl, 84A4h - ld de, 84AFh + ld hl, OP5 + ld de, OP6 jr page0_14B6 -; --------------------------------------------------------------------------- - OP1ExOP5: - ld hl, 84A4h + ld hl, OP5 jr page0_14B3 -; --------------------------------------------------------------------------- - OP1ExOP6: - ld hl, 84AFh + ld hl, OP6 jr page0_14B3 -; --------------------------------------------------------------------------- - OP2ExOP4: - ld hl, 8499h + ld hl, OP4 jr page0_1498 -; --------------------------------------------------------------------------- - OP2ExOP5: - ld hl, 84A4h - + ld hl, OP5 page0_1498: - ld de, 8483h + ld de, OP2 jr page0_14B6 -; --------------------------------------------------------------------------- - OP1ExOP3: - ld hl, 848Eh + ld hl, OP3 jr page0_14B3 -; --------------------------------------------------------------------------- - OP1ExOP4: - ld hl, 8499h + ld hl, OP4 jr page0_14B3 -; --------------------------------------------------------------------------- - page0_14A7: call j_RndGuard call OP1ExOP2 call j_RndGuard - -; =============== S U B R O U T I N E ======================================= - - OP1ExOP2: - ld hl, 8483h - + ld hl, OP2 page0_14B3: - ld de, 8478h - + ld de, OP1 page0_14B6: ld b, 0Bh - -ExLp: - ld a, (de) +ExLp: ld a, (de) ld c, (hl) ld (hl), a ld a, c @@ -2170,285 +1583,219 @@ inc de djnz ExLp ret -; End of function OP1ExOP2 - -; --------------------------------------------------------------------------- CkOP1C0: ld a, (OP2M) or a ret nz - -; =============== S U B R O U T I N E ======================================= - - CkOP1FP0: - ; page0_CF2:loc_D26p ... ld a, (OP1M) and a ret -; End of function CkOP1FP0 - - -; =============== S U B R O U T I N E ======================================= - - CkOP2FP0: - ; page0_CF2+38p ... ld a, (OP2M) and a ret -; End of function CkOP2FP0 -; --------------------------------------------------------------------------- - -page0_14D1: +RealPosNo0DoInt: call CkOP1Real ret nz - -PosNo0Int: +PosNo0DoInt: ld a, (OP1M) sub 10h ret c - -; =============== S U B R O U T I N E ======================================= - - -CKPosInt: +CKPosDoInt: ld a, (OP1) - and 80h ; '' + and 80h ret nz -; End of function CKPosInt - - -; =============== S U B R O U T I N E ======================================= - - -page0_14E1: - ld hl, 8479h - -CKInt: +CKOP1DoInt: + ld hl, OP1+1 +CKDoInt: ld d, 1 - jr page0_14EA -; --------------------------------------------------------------------------- - + jr {+} CKOdd: ld d, 0 - -page0_14EA: - ld a, (hl) ++: ld a, (hl) ld e, a - sub 80h ; '' + sub 80h ret c cp 0Eh - jr c, page0_14F5 + jr c, {+} xor a ret -; --------------------------------------------------------------------------- - -page0_14F5: - srl a ++: srl a ld b, 0 ld c, a inc hl add hl, bc ld a, (hl) bit 0, d - jr nz, page0_1509 + jr nz, {+} bit 0, e call z, ShRAcc and 1 ret -; --------------------------------------------------------------------------- - -page0_1509: - bit 0, e - jr nz, page0_1510 ++: bit 0, e + jr nz, {+} and 0Fh ret nz - -page0_1510: - ld a, 6 ++: ld a, 6 sub c ret z inc hl ld b, a - jr sub_1525 -; End of function page0_14E1 + jr AreBBytesAtHLZero -; --------------------------------------------------------------------------- - -page0_1518: +IsOP1One: ld a, 10h jr CKOP1M -; --------------------------------------------------------------------------- - -page0_151C: +IsOP1Zero: xor a - CKOP1M: - ld hl, 847Ah + ld hl, OP1+2 cp (hl) ret nz inc hl ld b, 7 - -; =============== S U B R O U T I N E ======================================= - - -sub_1525: +AreBBytesAtHLZero: xor a - page0_1526: cp (hl) ret nz inc hl djnz page0_1526 ret -; End of function sub_1525 - -; --------------------------------------------------------------------------- GETCONOP1: - ld de, 8478h - jr page0_1534 - -; =============== S U B R O U T I N E ======================================= - - + ld de, OP1 + jr GETCON_FromDE GETCONOP2: - ld de, 8483h - -page0_1534: + ld de, OP2 +GETCON_FromDE: push af xor a ld (de), a inc de pop af ld hl, unk_1544 - call sub_18C3 + call Mov8B_FromOP_A ldi ldi ret -; End of function GETCONOP2 unk_1544: - .db 81h ; ü - .db 57h ; W - .db 29h ; ) - .db 57h ; W - .db 79h ; y - .db 51h ; Q - .db 30h ; 0 - .db 82h ; é - .db 32h ; 2 + .db 81h + .db 57h + .db 29h + .db 57h + .db 79h + .db 51h + .db 30h + .db 82h + .db 32h PIDIV2: - .db 80h ; Ç + .db 80h .db 15h - .db 70h ; p - .db 79h ; y - .db 63h ; c - .db 26h ; & - .db 79h ; y - .db 48h ; H - .db 97h ; ù + .db 70h + .db 79h + .db 63h + .db 26h + .db 79h + .db 48h + .db 97h PIDIV4: - .db 7Fh ;  - .db 78h ; x - .db 53h ; S - .db 98h ; ÿ + .db 7Fh + .db 78h + .db 53h + .db 98h .db 16h - .db 33h ; 3 - .db 97h ; ù - .db 44h ; D - .db 83h ; â - .db 7Fh ;  - .db 43h ; C - .db 42h ; B - .db 94h ; ö - .db 48h ; H + .db 33h + .db 97h + .db 44h + .db 83h + .db 7Fh + .db 43h + .db 42h + .db 94h + .db 48h .db 19h .db 3 - .db 25h ; % + .db 25h .db 18h - .db 80h ; Ç - .db 31h ; 1 - .db 41h ; A - .db 59h ; Y - .db 26h ; & - .db 53h ; S - .db 58h ; X - .db 98h ; ÿ + .db 80h + .db 31h + .db 41h + .db 59h + .db 26h + .db 53h + .db 58h + .db 98h .db 0 - .db 7Eh ; ~ + .db 7Eh .db 17h - .db 45h ; E - .db 32h ; 2 - .db 92h ; Æ - .db 51h ; Q - .db 99h ; Ö - .db 43h ; C - .db 30h ; 0 - .db 80h ; Ç - .db 23h ; # + .db 45h + .db 32h + .db 92h + .db 51h + .db 99h + .db 43h + .db 30h + .db 80h + .db 23h .db 2 - .db 58h ; X - .db 50h ; P - .db 92h ; Æ - .db 99h ; Ö - .db 40h ; @ - .db 46h ; F + .db 58h + .db 50h + .db 92h + .db 99h + .db 40h + .db 46h PItimes2: - .db 62h ; b - .db 83h ; â + .db 62h + .db 83h .db 18h - .db 53h ; S + .db 53h .db 7 .db 17h - .db 96h ; û + .db 96h PI: - .db 31h ; 1 - .db 41h ; A - .db 59h ; Y - .db 26h ; & - .db 53h ; S - .db 58h ; X + .db 31h + .db 41h + .db 59h + .db 26h + .db 53h + .db 58h unk_1590: - .db 98h ; ÿ - .db 78h ; x - .db 53h ; S - .db 98h ; ÿ + .db 98h + .db 78h + .db 53h + .db 98h .db 16h - .db 33h ; 3 - .db 97h ; ù + .db 33h + .db 97h unk_1597: - .db 45h ; E + .db 45h unk_1598: .db 15h - .db 70h ; p - .db 79h ; y - .db 63h ; c - .db 26h ; & - .db 79h ; y - .db 49h ; I + .db 70h + .db 79h + .db 63h + .db 26h + .db 79h + .db 49h ExpToHex: - ld a, 80h ; '' + ld a, 80h sub (hl) jr nc, page0_15A7 res 7, (hl) ret -; --------------------------------------------------------------------------- page0_15A7: ld (hl), a ret -; End of function ExpToHex - -; --------------------------------------------------------------------------- OP1ExpToDec: - ld hl, 8479h + ld hl, OP1+1 call ExpToHex ld a, (hl) and 0F0h ; @@ -2466,94 +1813,48 @@ daa jr nc, page0_15BC jp ErrOverflow -; --------------------------------------------------------------------------- - ckop2pos: ld a, (OP2) jr page0_15CE - -; =============== S U B R O U T I N E ======================================= - - CkOP1Pos: ld a, (OP1) - page0_15CE: - and 80h ; '' + and 80h ret -; End of function CkOP1Pos - - -; =============== S U B R O U T I N E ======================================= - ClrOP2S: - ld hl, 8483h + ld hl, OP2 jr page0_15D9 -; End of function ClrOP2S - - -; =============== S U B R O U T I N E ======================================= - - ClrOP1S: - - ld hl, 8478h - + ld hl, OP1 page0_15D9: ld a, (hl) - page0_15DA: res 7, (hl) ret -; End of function ClrOP1S - -; --------------------------------------------------------------------------- FDIV100: call FDIV10 - FDIV10: call CkOP1FP0 ret z call DecO1Exp jp z, OP1Set0 ret - -; =============== S U B R O U T I N E ======================================= - - DecO1Exp: ld a, (OP1+1) dec a ld (OP1+1), a ret -; End of function DecO1Exp - - -; =============== S U B R O U T I N E ======================================= - INCO1EXP: - - - - - ld hl, 8479h - -INCEXP: - inc (hl) + ld hl, OP1+1 +INCEXP: inc (hl) ret nz jp ErrOverflow -; End of function INCO1EXP - - -; =============== S U B R O U T I N E ======================================= - CkValidNum: ld a, (OP1) - page0_15FE: and 1Fh push af @@ -2562,62 +1863,44 @@ jr nz, page0_1639 call CkOP2FP0 jr nz, page0_1614 - page0_160C: call OP2Set0 pop af ld (OP2), a push af - page0_1614: ld a, (OP2+1) - cp 0E4h ; '䧍 + cp 0E4h jp nc, ErrOverflow cp 1Dh jr c, page0_160C - page0_1620: call CkOP1FP0 jr nz, page0_162D - page0_1625: call OP1Set0 pop af ld (OP1), a ret -; --------------------------------------------------------------------------- - page0_162D: ld a, (OP1+1) - cp 0E4h ; '䧍 + cp 0E4h jp nc, ErrOverflow cp 1Dh jr c, page0_1625 - page0_1639: pop af ret -; End of function CkValidNum - -; --------------------------------------------------------------------------- GETEXP: ld a, (OP1+1) - cp 80h ; '' + cp 80h ret -; =============== S U B R O U T I N E ======================================= - - page0_1641: ld a, (OP1+1) - cp 24h ; '$' + cp 24h ret -; End of function page0_1641 - - -; =============== S U B R O U T I N E ======================================= - HTimesL: ld b, h @@ -2626,16 +1909,10 @@ ld e, h ex de, hl or a - page0_164E: - adc hl, de + adc hl, de djnz page0_164E ret -; End of function HTimesL - - -; =============== S U B R O U T I N E ======================================= - EOP1NotReal: call CkOP1Real @@ -2664,76 +1941,46 @@ xor a ld (OP1+3), a ret -; END OF FUNCTION CHUNK FOR page0_1671 - -; =============== S U B R O U T I N E ======================================= - sub_1680: - - ld a, 40h ; '@' - + ld a, 40h page0_1682: ld h, a - ld l, 5Dh ; ']' + ld l, 5Dh ld a, 1 jr AHLtoOP1 -; End of function sub_1680 - -; --------------------------------------------------------------------------- - ThetaName: - ld a, 5Bh ; '[' + ld a, 5Bh jr REALNAME -; --------------------------------------------------------------------------- - RName: - ld a, 52h ; 'R' + ld a, 52h jr REALNAME -; --------------------------------------------------------------------------- - REGEQNAME: ld h, 1 ld a, 3 jr page0_169B -; --------------------------------------------------------------------------- - RECURNNAME: ld a, 0 - ld h, 21h ; '!' - + ld h, 21h page0_169B: - ld l, 62h ; 'b' + ld l, 62h ld (OP1), a jr HLtoOP1 -; --------------------------------------------------------------------------- - -XName: - ld a, 58h ; 'X' +XName: ld a, 58h jr REALNAME -; --------------------------------------------------------------------------- - -YName: - ld a, 59h ; 'Y' +YName: ld a, 59h jr REALNAME -; --------------------------------------------------------------------------- - -TName: - ld a, 54h ; 'T' - +TName: ld a, 54h REALNAME: push af call ZeroOP1 pop af ld (OP1+1), a ret -; --------------------------------------------------------------------------- - SETesTOfps: ld hl, (FPS) ld (ES), hl ret -; --------------------------------------------------------------------------- markTableDirty: call page0_1641 @@ -2742,25 +1989,20 @@ set 7, (hl) ret -; =============== S U B R O U T I N E ======================================= - - page0_16C4: ld a, (OP1+1) - cp 5Ch ; '\' + cp 5Ch jr nz, page0_16D3 ld a, (OP1M) ld hl, 8D8Eh cp (hl) ret -; --------------------------------------------------------------------------- page0_16D3: - cp 5Dh ; ']' + cp 5Dh ret nz ld hl, 8D2Eh ld b, 14h - page0_16DB: push bc push hl @@ -2777,74 +2019,46 @@ djnz page0_16DB or 1 ret -; End of function page0_16C4 - - -; =============== S U B R O U T I N E ======================================= - page0_16F4: - - - call ChkFindSym jp c, ErrUndefined - page0_16FA: bit 6, (hl) ret z jp SetTblGraphDraw -; End of function page0_16F4 - - -; =============== S U B R O U T I N E ======================================= - OP1MOP2EXP: ld a, (OP1+1) ld hl, 8484h sub (hl) ret -; End of function OP1MOP2EXP - -; --------------------------------------------------------------------------- page0_1708: - ld e, 81h ; 'g - + ld e, 81h OP1EXPMinusE: ld a, (OP1+1) sub e ret -; --------------------------------------------------------------------------- page0_170F: - ld e, 7Fh ; '' + ld e, 7Fh jr OP1EXPMinusE -; --------------------------------------------------------------------------- - page0_1713: - ld e, 8Ch ; '̧ + ld e, 8Ch jr OP1EXPMinusE -; --------------------------------------------------------------------------- - page0_1717: call IsOP1Num jp z, ErrInvalid ret -; --------------------------------------------------------------------------- CHKERRBREAK: call IsOnInterruptSet jp nz, ErrBreak ret -; --------------------------------------------------------------------------- - page0_1725: bit 5, (iy+9) ret -; --------------------------------------------------------------------------- - page0_172A: bit drawingGraph, (iy+graphFlags) ret @@ -2874,7 +2088,6 @@ .db 0AAh _2ByteTokTableEnd: - GETLASTENTRY: ld hl, 8E2Ah ld b, (hl) @@ -2883,11 +2096,8 @@ jr z, page0_1755 inc (hl) jr page0_1757 -; --------------------------------------------------------------------------- - page0_1755: ld (hl), 0 - page0_1757: ld a, b or a @@ -2896,11 +2106,9 @@ call FINDPROGSYM ex de, hl ret -; --------------------------------------------------------------------------- GETLASTENTRYPTR: ld hl, 8DA9h - page0_1766: dec a ret z @@ -2910,14 +2118,11 @@ add hl, de inc hl jr page0_1766 -; --------------------------------------------------------------------------- - page0_176F: call CheckSplitFlag ret z bit grfSChanged, (iy+sGrFlags) jr z, page0_1799 - REGCLRCHNG: call j_ClrLCDFull call j_RunIndicOn @@ -2952,17 +2157,14 @@ page0_17B0: call CkOP1Real - page0_17B3: cp 15h ret z cp 17h ret z jr page0_17BE - page0_17BB: call CkOP1Real - page0_17BE: cp 5 ret z @@ -2970,13 +2172,12 @@ ret z cp 6 ret - page0_17C7: ld a, d or a ret nz ld a, e - cp 3Fh ; '?' + cp 3Fh ret CheckSplitFlag: @@ -3010,7 +2211,6 @@ rst 10h call j_DelRes jp OP2ToOP1 -; --------------------------------------------------------------------------- RESETWINTOP: push af @@ -3018,68 +2218,47 @@ call CheckSplitFlag jr z, page0_1803 add a, 4 - page0_1803: ld (winTop), a pop af ret -; --------------------------------------------------------------------------- page0_1808: - cp 0FEh ; + cp 0FEh ret nz ld b, a ld a, (keyExtend) - cp 0BDh ; 'ݧ + cp 0BDh ld a, b ret -; --------------------------------------------------------------------------- -SetYUp: - push af +SetYUp: push af ld a, 7 - page0_1816: call lcd_busy out (10h), a pop af ret -; --------------------------------------------------------------------------- -SetXUp: - push af +SetXUp: push af ld a, 5 jr page0_1816 -; --------------------------------------------------------------------------- ISO1NONTLSTorPROG: call page0_17B0 ret z call page0_17BB ret z - -; =============== S U B R O U T I N E ======================================= - - ISO1NONTEMPLST: ld a, (OP1+1) - cp 5Dh ; ']' + cp 5Dh ret -; End of function ISO1NONTEMPLST - - -; =============== S U B R O U T I N E ======================================= - IS_A_LSTorCLST: - ; page0_19F8+66p ... cp 1 ret z cp 0Dh ret -; End of function IS_A_LSTorCLST - -; --------------------------------------------------------------------------- CHK_HL_999: push hl @@ -3089,27 +2268,22 @@ pop hl ret c jp ErrDimension -; --------------------------------------------------------------------------- page0_1842: set 6, (iy+0Fh) ret -; --------------------------------------------------------------------------- page0_1847: res 6, (iy+0Fh) ret -; --------------------------------------------------------------------------- page0_184C: bit 6, (iy+0Fh) ret -; --------------------------------------------------------------------------- page0_1851: call EOP1NotReal jp PushRealO1 -; --------------------------------------------------------------------------- equ_or_newequ: and 1Fh @@ -3117,18 +2291,15 @@ ret z cp 0Bh ret -; --------------------------------------------------------------------------- page0_185F: ld a, (iy+17h) and 3 cp 1 ret -; --------------------------------------------------------------------------- page0_1867: ld hl, 91D0h - page0_186A: push hl rst 20h @@ -3136,42 +2307,25 @@ pop de jp MovFrOP1 -; =============== S U B R O U T I N E ======================================= - - errd_op1notpos: - - - call CkOP1Pos - page0_1876: ret z - page0_1877: jp ErrDomain -; End of function errd_op1notpos - -; --------------------------------------------------------------------------- - ErrD_OP1Not_R: call CkOP1Real jr page0_1876 -; --------------------------------------------------------------------------- - -ErrD_OP1NotPosInt: - call CKPosInt +ErrD_OP1NotPosDoInt: + call CKPosDoInt jr page0_1876 -; --------------------------------------------------------------------------- ErrD_OP1_LE_0: call errd_op1notpos - ErrD_OP1_0: call CkOP1FP0 ret nz jr page0_1877 -; --------------------------------------------------------------------------- FINDSYM_GET_SIZE: call FIND_E_UNDEF @@ -3180,8 +2334,6 @@ call ldHLind pop de ret -; --------------------------------------------------------------------------- - STO_STATVAR: push af call CkValidNum @@ -3189,65 +2341,46 @@ call j_CMP_STATPTR ex de, hl jp MovFrOP1 -; --------------------------------------------------------------------------- - Rcl_StatVar: call j_CMP_STATPTR rst 20h ret -; --------------------------------------------------------------------------- - CkOP2Real: ld a, (OP2) and 1Fh ret -; --------------------------------------------------------------------------- - page0_18AE: ld a, (OP1+1) - cp 5Eh ; '^' + cp 5Eh scf ret z xor a ret -; --------------------------------------------------------------------------- Bit_VertSplit: bit vertSplit, (iy+sGrFlags) ret -; --------------------------------------------------------------------------- GET_X_INDIRECT: call j_GET_INDEX_LST call j_GETL1TOP1A ret -; =============== S U B R O U T I N E ======================================= - - -sub_18C3: +Mov8B_FromOP_A: push bc ld c, 9 ld b, a xor a - jr page0_18CB -; --------------------------------------------------------------------------- - -page0_18CA: - add a, c - -page0_18CB: - dec b - jp p, page0_18CA + jr {+} +-: add a, c ++: dec b + jp p, {-} ld c, a ld b, 0 add hl, bc call Mov8B pop bc ret -; End of function sub_18C3 - -; --------------------------------------------------------------------------- GetBytePaged: or a @@ -3259,25 +2392,16 @@ out (6), a ld b, (hl) ld a, c - jr page0_18F1 -; --------------------------------------------------------------------------- - + jr OutPort6Ret IsOP1Num5: call sub_1901 ld de, 812Bh - ld bc, 2Bh ; '+' + ld bc, 2Bh ldir - -page0_18F0: - pop af -; START OF FUNCTION CHUNK FOR sub_1901 - -page0_18F1: +-: pop af +OutPort6Ret: out (6), a ret -; END OF FUNCTION CHUNK FOR sub_1901 -; --------------------------------------------------------------------------- - page0_18F4: call sub_1901 push bc @@ -3285,26 +2409,14 @@ xor a cpir pop bc - jr page0_18F0 - -; =============== S U B R O U T I N E ======================================= - - + jr {-} sub_1901: - - - - in a, (6) pop de push af push de ld a, (unk_8156) - jr page0_18F1 -; End of function sub_1901 - -; --------------------------------------------------------------------------- - + jr OutPort6Ret page0_190B: push bc call sub_1901 @@ -3314,45 +2426,30 @@ ld a, b pop bc ret -; --------------------------------------------------------------------------- IsEditEmpty: call IsAtBtm ret nz - IsAtTop: ld hl, (editCursor) - page0_191D: ld de, (editTop) jr CpHLDE -; =============== S U B R O U T I N E ======================================= - - IsAtBtm: ld de, (editTail) ld hl, (editBtm) -; End of function IsAtBtm - - -; =============== S U B R O U T I N E ======================================= - CpHLDE: - ; handleONKeyPress+1A0p ... push hl or a sbc hl, de pop hl ret -; End of function CpHLDE - -; --------------------------------------------------------------------------- ExecuteNewPrgm: push af - ld de, 8479h + ld de, OP1+1 call strcopy inc hl push hl @@ -3378,7 +2475,6 @@ inc bc ldir jp Page0Call_3E2B -; --------------------------------------------------------------------------- FillBasePageTable: in a, (6) @@ -3387,9 +2483,8 @@ call NZIf83Plus ld a, 15h jr nz, page0_1972 - ld a, 69h ; 'i' + ld a, 69h ld de, 9C6Fh - page0_1972: push af out (6), a @@ -3400,8 +2495,7 @@ ld de, 8080h or a rst 28h - ld (hl), l - add a, b + .dw 8075h pop de jr nz, page0_1996 pop af @@ -3409,31 +2503,23 @@ inc hl ld b, (hl) ld c, b - page0_198D: ld (de), a call sub_19A4 djnz page0_198D sub c jr page0_199C -; --------------------------------------------------------------------------- - page0_1996: pop af ld (de), a call sub_19A4 dec a - page0_199C: cp 7 jr nz, page0_1972 pop af out (6), a ret - -; =============== S U B R O U T I N E ======================================= - - sub_19A4: dec de ld hl, 9C25h @@ -3442,11 +2528,6 @@ ret nz ld de, 824Fh ret -; End of function sub_19A4 - - -; =============== S U B R O U T I N E ======================================= - MemChk: ld hl, (OPS) @@ -3456,29 +2537,18 @@ jr nc, page0_19C0 ld hl, 0 ret -; --------------------------------------------------------------------------- - page0_19C0: inc hl ret -; End of function MemChk - -; --------------------------------------------------------------------------- - CMPPRGNAMLEN1: push hl jr page0_19C9 - -; =============== S U B R O U T I N E ======================================= - - CMPPRGNAMLEN: push hl - ld hl, 8479h - + ld hl, OP1+1 page0_19C9: ld a, (hl) - sub 5Dh ; ']' + sub 5Dh ld d, a ld bc, 8 xor a @@ -3497,45 +2567,19 @@ ret nz inc a ret -; End of function CMPPRGNAMLEN - -; --------------------------------------------------------------------------- FindGroupSym: ld a, 17h jr page0_19E9 - -; =============== S U B R O U T I N E ======================================= - - FINDPROGSYM: ld a, 5 -; End of function FINDPROGSYM - -; START OF FUNCTION CHUNK FOR ChkFindSym - page0_19E9: - ; ChkFindSym+3j call Page0Call_3E13 ret -; END OF FUNCTION CHUNK FOR ChkFindSym - -; =============== S U B R O U T I N E ======================================= - ChkFindSym: - - - - call page0_17B0 jr z, page0_19E9 -; End of function ChkFindSym - - -; =============== S U B R O U T I N E ======================================= - - FindSym: call Page0Call_3E19 ret @@ -3550,31 +2594,27 @@ sbc hl, bc ld (OPBase), hl ld a, (OP1+6) - cp 24h ; '$' + cp 24h jr z, page0_1A32 ld hl, (unk_982E) or a sbc hl, bc ld (unk_982E), hl - cp 72h ; 'r' + cp 72h jr z, page0_1A29 - cp 3Ah ; ':' + cp 3Ah jr z, page0_1A29 call CkOP1Real call IS_A_LSTorCLST jr z, page0_1A32 call page0_17B0 jr z, page0_1A32 - page0_1A29: - ; page0_19F8+22j ld hl, (progPtr) or a sbc hl, bc ld (progPtr), hl - page0_1A32: - ; page0_19F8+2Aj ... ld de, (OPS) add hl, bc push hl @@ -3592,16 +2632,14 @@ pop af jr z, page0_1A4C ldir - page0_1A4C: pop de pop bc push de push bc ld b, c - ld hl, 8478h + ld hl, OP1 dec b - page0_1A55: ld a, (hl) ld (de), a @@ -3612,49 +2650,36 @@ call IS_A_LSTorCLST jr nz, page0_1A6C ld a, (OP1+6) - cp 24h ; '$' + cp 24h jr z, page0_1A6C ld (hl), 0 - -page0_1A6C: - ; page0_19F8+70j - ld a, (hl) +page0_1A6C: ld a, (hl) ld (de), a pop bc ld a, (OP1+6) - cp 24h ; '$' + cp 24h jr z, page0_1A97 - cp 5Eh ; '^' - jr z, page0_1A82 - cp 21h ; '!' + cp 5Eh jr z, page0_1A82 - cp 23h ; '#' + cp 21h + jr z, page0_1A82 + cp 23h jr nz, page0_1A8E - page0_1A82: - ; page0_19F8+84j ld a, (OP1+5) or a jr nz, page0_1A8E ld hl, (OP1+3) ld (newDataPtr), hl - page0_1A8E: - ; page0_19F8+8Ej call sub_23C4 pop de push de inc de call page0_207C - page0_1A97: pop hl ret -; End of function page0_19F8 - - -; =============== S U B R O U T I N E ======================================= - page0_1A99: push af @@ -3679,7 +2704,6 @@ pop af pop bc jr z, page0_1AD2 - page0_1ABB: ldd ldd @@ -3693,7 +2717,6 @@ ld a, b or c jp nz, page0_1ABB - page0_1AD2: pop de pop bc @@ -3720,26 +2743,18 @@ call sub_23C4 call page0_1FF3 ld bc, (freeRAM) - page0_1AFF: call ADJPARSER call ADJMATH pop de ret -; --------------------------------------------------------------------------- page0_1B07: push de - page0_1B08: dec de call sub_23C4 jr page0_1AFF -; End of function page0_1A99 - - -; =============== S U B R O U T I N E ======================================= - InsertMem: call INSERTMEMA @@ -3748,11 +2763,6 @@ call DELVAR3DC pop de ret -; End of function InsertMem - - -; =============== S U B R O U T I N E ======================================= - INSERTMEMA: push de @@ -3772,21 +2782,13 @@ ld hl, (FPS) dec hl lddr - page0_1B30: pop bc pop de ret -; End of function INSERTMEMA - - -; =============== S U B R O U T I N E ======================================= - EnoughMem: - ; CMPMEMNEED+5p ... ex de, hl - page0_1B34: call MemChk or a @@ -3797,7 +2799,6 @@ ld bc, (OPBase) inc bc ld d, 0 - page0_1B46: xor a sbc hl, bc @@ -3821,37 +2822,23 @@ call DelVar pop de jr page0_1B34 -; --------------------------------------------------------------------------- - page0_1B63: ld e, 9 sbc hl, de jr page0_1B46 -; --------------------------------------------------------------------------- - page0_1B69: pop de ret -; End of function EnoughMem - -; --------------------------------------------------------------------------- - page0_1B6B: call page0_17B0 jr nz, page0_1B75 call CMPPRGNAMLEN jr sub_1B7E -; --------------------------------------------------------------------------- - page0_1B75: call ISO1NONTEMPLST jr nz, sub_1B7E call CMPPRGNAMLEN inc a - -; =============== S U B R O U T I N E ======================================= - - sub_1B7E: add a, 7 ld b, 0 @@ -3859,79 +2846,48 @@ call page0_17B0 ret z ld a, (OP1+1) - cp 5Dh ; ']' + cp 5Dh ret z ld c, 9 ret -; End of function sub_1B7E - - -; =============== S U B R O U T I N E ======================================= - CMPMEMNEED: - ; sub_1BA3:HandleRunIndicatorFp ... push hl call sub_1B7E add hl, bc call EnoughMem pop bc ret -; End of function CMPMEMNEED - -; --------------------------------------------------------------------------- CREATEPVAR4: push af jr CREATEPVAR3 - -; =============== S U B R O U T I N E ======================================= - - sub_1B9D: call HLTimes9 -; End of function sub_1B9D - -; START OF FUNCTION CHUNK FOR sub_1BA3 - page0_1BA0: jp c, ErrMemory -; END OF FUNCTION CHUNK FOR sub_1BA3 - -; =============== S U B R O U T I N E ======================================= - - sub_1BA3: - - - - ld de, 2 add hl, de jr c, page0_1BA0 - page0_1BA9: ld (OP1), a call page0_17B3 jr z, page0_1BC3 ld a, (OP1+1) - cp 5Dh ; ']' + cp 5Dh jr nz, HandleRunIndicatorF call CMPPRGNAMLEN cp 7 jp nc, ErrSyntax inc a jr page0_1BC6 -; --------------------------------------------------------------------------- - page0_1BC3: call CMPPRGNAMLEN - page0_1BC6: push af call CMPMEMNEED jr c, page0_1BA0 - CREATEPVAR3: or 1 call page0_1A99 @@ -3944,7 +2900,6 @@ pop de ld (OP1+3), de xor a - page0_1BE6: ld (OP1M), a xor a @@ -3957,7 +2912,6 @@ call page0_19F8 ld de, (OP1+3) ret -; --------------------------------------------------------------------------- HandleRunIndicatorF: call CMPMEMNEED @@ -3965,7 +2919,7 @@ CREATEVAR3: ld a, (OP1+1) - cp 24h ; '$' + cp 24h call page0_1A99 push de call OP1ToOP4 @@ -3982,36 +2936,22 @@ call sub_19F6 ld de, (OP1+3) ret -; End of function sub_1BA3 - -; --------------------------------------------------------------------------- - CreateCplx: ld a, 0Ch ld hl, 12h jr page0_1C3D -; --------------------------------------------------------------------------- - CreateReal: xor a ld hl, 9 - page0_1C3D: jp page0_1BA9 -; --------------------------------------------------------------------------- - CreateTempRList: ld a, 1 call j_CREATETEMP ret c - -; =============== S U B R O U T I N E ======================================= - - CreateRList: ld a, 1 push hl - page0_1C49: call sub_1B9D pop bc @@ -4027,8 +2967,6 @@ dec de pop hl ret -; --------------------------------------------------------------------------- - page0_1C5A: ex de, hl ld (hl), e @@ -4040,52 +2978,36 @@ bit 3, a jr z, page0_1C6A ld (hl), 0Ch - page0_1C6A: dec hl dec hl ex de, hl pop hl ret -; End of function CreateRList - -; --------------------------------------------------------------------------- - CREATETCLIST: ld a, 0Dh call j_CREATETEMP ret c - CreateCList: ld a, 0Dh push hl add hl, hl jr page0_1C49 -; --------------------------------------------------------------------------- - CreateTempRMat: ld a, 2 call j_CREATETEMP ret c - CreateRMat: push hl call HTimesL ld a, 2 jr page0_1C49 -; --------------------------------------------------------------------------- - CreateTempString: ld a, 4 call j_CREATETEMP ret c - CreateStrng: ld a, 4 - -; =============== S U B R O U T I N E ======================================= - - CreateVar: push hl call sub_1BA3 @@ -4097,51 +3019,32 @@ dec hl ex de, hl ret -; End of function CreateVar - -; --------------------------------------------------------------------------- - Create0Equ: ld hl, 0 jr CreateEqu -; --------------------------------------------------------------------------- - CreateTempEqu: ld a, 3 call j_CREATETEMP ret c - CreateEqu: ld a, 3 jr CreateVar -; --------------------------------------------------------------------------- - CreatePict: ld a, 7 ld hl, 2F4h jr CreateVar -; --------------------------------------------------------------------------- - CreateGDB: ld a, 8 jr CreateVar -; --------------------------------------------------------------------------- - CreateAppVar: ld a, 15h jr CreateVar -; --------------------------------------------------------------------------- - CreateProtProg: ld a, 6 jr CreateVar -; --------------------------------------------------------------------------- - CreateProg: ld a, 5 jr CreateVar -; --------------------------------------------------------------------------- - page0_1CC3: ld a, 17h ld (OP1), a @@ -4164,13 +3067,10 @@ pop af push bc jp page0_1BE6 -; --------------------------------------------------------------------------- - CHKDEL: ld a, (OP1) ld hl, (chkDelPtr2) call DataSize - CHKDELA: push de ld a, (OP4) @@ -4185,7 +3085,6 @@ inc de ex de, hl call DelMem - page0_1D17: ld hl, (chkDelPtr3) call CkOP1Real @@ -4195,8 +3094,6 @@ or b ld (hl), a ret -; --------------------------------------------------------------------------- - page0_1D24: add hl, de ex de, hl @@ -4208,12 +3105,7 @@ inc de call InsertMem jr page0_1D17 - -; =============== S U B R O U T I N E ======================================= - - ADJPARSER: - ; sub_1FA3+2Fp ld hl, (basic_start) or a sbc hl, de @@ -4231,14 +3123,7 @@ sbc hl, bc ld (basic_end), hl ret -; End of function ADJPARSER - - -; =============== S U B R O U T I N E ======================================= - - ADJMATH: - ; sub_1FA3:DELVAR3Dp ld hl, (iMathPtr1) or a sbc hl, de @@ -4248,7 +3133,6 @@ or a sbc hl, bc ld (iMathPtr1), hl - page0_1D69: ld hl, (iMathPtr2) or a @@ -4259,7 +3143,6 @@ or a sbc hl, bc ld (iMathPtr2), hl - page0_1D7A: ld hl, (iMathPtr3) or a @@ -4270,7 +3153,6 @@ or a sbc hl, bc ld (iMathPtr3), hl - page0_1D8B: ld hl, (iMathPtr4) or a @@ -4281,7 +3163,6 @@ or a sbc hl, bc ld (iMathPtr4), hl - page0_1D9C: ld hl, (iMathPtr5) or a @@ -4292,7 +3173,6 @@ or a sbc hl, bc ld (iMathPtr5), hl - ADJM7: ld hl, (asm_data_ptr1) or a @@ -4303,7 +3183,6 @@ or a sbc hl, bc ld (asm_data_ptr1), hl - page0_1DBE: ld hl, (asm_data_ptr2) or a @@ -4314,7 +3193,6 @@ or a sbc hl, bc ld (asm_data_ptr2), hl - page0_1DCF: ld hl, (fmtMatMem) or a @@ -4325,7 +3203,6 @@ or a sbc hl, bc ld (fmtMatMem), hl - page0_1DE0: ld hl, (newDataPtr) or a @@ -4336,7 +3213,6 @@ or a sbc hl, bc ld (newDataPtr), hl - page0_1DF1: ld hl, (EQS) or a @@ -4347,7 +3223,6 @@ or a sbc hl, bc ld (EQS), hl - page0_1E02: ld hl, (unk_9313) or a @@ -4358,7 +3233,6 @@ or a sbc hl, bc ld (unk_9313), hl - page0_1E13: ld hl, (ES) or a @@ -4369,7 +3243,6 @@ or a sbc hl, bc ld (ES), hl - page0_1E24: ld hl, (insDelPtr) or a @@ -4380,7 +3253,6 @@ or a sbc hl, bc ld (insDelPtr), hl - page0_1E35: ld hl, (unk_9306) or a @@ -4391,7 +3263,6 @@ or a sbc hl, bc ld (unk_9306), hl - page0_1E46: ld hl, (unk_9311) or a @@ -4402,7 +3273,6 @@ or a sbc hl, bc ld (unk_9311), hl - page0_1E57: ld hl, (editDat) or a @@ -4413,7 +3283,6 @@ or a sbc hl, bc ld (editDat), hl - page0_1E68: ld hl, (chkDelPtr1) or a @@ -4424,7 +3293,6 @@ or a sbc hl, bc ld (chkDelPtr1), hl - page0_1E79: ld hl, (XOutDat) or a @@ -4435,7 +3303,6 @@ or a sbc hl, bc ld (XOutDat), hl - page0_1E8A: ld hl, (YOutDat) or a @@ -4446,7 +3313,6 @@ or a sbc hl, bc ld (YOutDat), hl - page0_1E9B: ld hl, (fOutDat) or a @@ -4457,7 +3323,6 @@ or a sbc hl, bc ld (fOutDat), hl - page0_1EAC: ld hl, (unk_84E7) or a @@ -4468,7 +3333,6 @@ or a sbc hl, bc ld (unk_84E7), hl - page0_1EBD: ld hl, (inputDat) or a @@ -4479,7 +3343,6 @@ or a sbc hl, bc ld (inputDat), hl - page0_1ECE: ld hl, (chkDelPtr2) or a @@ -4491,11 +3354,6 @@ sbc hl, bc ld (chkDelPtr2), hl ret -; End of function ADJMATH - - -; =============== S U B R O U T I N E ======================================= - DELMEMA: push de @@ -4512,26 +3370,18 @@ ex de, hl jr z, page0_1EF1 ldir - page0_1EF1: pop de pop bc ret -; End of function DELMEMA - - -; =============== S U B R O U T I N E ======================================= - GET_FORM_NUM: call Page0Call_2407 ld a, (hl) - cp 24h ; '$' + cp 24h jr nz, page0_1EFE xor a ret -; --------------------------------------------------------------------------- - page0_1EFE: ld b, 0 ld c, a @@ -4539,14 +3389,7 @@ sbc hl, bc ld a, (hl) ret -; End of function GET_FORM_NUM - - -; =============== S U B R O U T I N E ======================================= - - page0_1F06: - ; sub_1FA3:page0_1FB0p push hl or a sbc hl, bc @@ -4561,7 +3404,6 @@ push de jr z, page0_1F1B lddr - page0_1F1B: ld (OPS), de pop de @@ -4571,22 +3413,14 @@ ld (OPBase), hl call DelVarEntry ret -; End of function page0_1F06 - -; --------------------------------------------------------------------------- DelVarArc: call IsBZero jr z, DelVarNoArc - page0_1F31: call page0_1F38 call Page0Call_3E25 ret - -; =============== S U B R O U T I N E ======================================= - - page0_1F38: push af push bc @@ -4601,41 +3435,23 @@ ld b, 0 ld c, a pop hl - page0_1F4E: call page0_1F06 pop de pop bc pop af ret -; End of function page0_1F38 - - -; =============== S U B R O U T I N E ======================================= - IsBZero: ld a, b or a ret -; End of function IsBZero - - -; =============== S U B R O U T I N E ======================================= - DelVar: - ; EnoughMem+2Ap ... - - - - call IsBZero jp nz, Page0Call_254D - DelVarNoArc: ld a, (hl) - DELVARIO: bit 6, a call nz, SetTblGraphDraw @@ -4658,9 +3474,9 @@ push af call sub_1FA3 ld de, 9315h - call sub_1103 + call Mov11B_FromOP1 pop hl - ld l, 3Fh ; '?' + ld l, 3Fh call page0_1671 rst 10h call nc, DelVar @@ -4670,19 +3486,11 @@ and (hl) ld (hl), a ld hl, 9315h - jp page0_117C -; End of function DelVar - - -; =============== S U B R O U T I N E ======================================= - - + jp Mov11B_ToOP1 sub_1FA3: push bc - page0_1FA4: push de - page0_1FA5: ld b, 0 push hl @@ -4691,21 +3499,17 @@ add a, 7 ld c, a pop hl - page0_1FB0: call page0_1F06 pop hl pop af call DataSize - DelMem: call DELMEMA - DELVAR3D: call ADJMATH nop nop - DELVAR3C: ld hl, (fpBase) or a @@ -4726,29 +3530,20 @@ sbc hl, bc ld (tempMem), hl jr page0_1FF3 -; --------------------------------------------------------------------------- - DELVAR3DC: call sub_23C4 jr DELVAR3D -; --------------------------------------------------------------------------- - page0_1FED: ld hl, (unk_982E) or a jr page0_1FF6 -; --------------------------------------------------------------------------- - page0_1FF3: - ; sub_1FA3+43j ld hl, 0FE66h - page0_1FF6: ld (freeRAM), bc dec hl dec hl dec hl - page0_1FFD: ld c, (hl) dec hl @@ -4771,12 +3566,9 @@ dec hl pop de jr page0_201B -; --------------------------------------------------------------------------- - page0_2019: add hl, bc ex de, hl - page0_201B: inc hl inc hl @@ -4792,7 +3584,6 @@ inc c inc c inc c - page0_202F: ld b, 0 pop af @@ -4803,12 +3594,6 @@ ret c add hl, bc jp page0_1FFD -; End of function sub_1FA3 - - -; =============== S U B R O U T I N E ======================================= - - IsFixedName: ld a, (hl) and 1Fh @@ -4819,24 +3604,17 @@ push hl call Page0Call_2407 ld a, (hl) - cp 24h ; '$' + cp 24h jr z, page0_205E - cp 72h ; 'r' + cp 72h jr z, page0_205E - cp 3Ah ; ':' + cp 3Ah jr z, page0_205E ld a, 1 - page0_205E: - ; IsFixedName+16j ... cp 1 pop hl ret -; End of function IsFixedName - - -; =============== S U B R O U T I N E ======================================= - DelVarEntry: ld hl, (unk_982E) @@ -4846,7 +3624,6 @@ add hl, de add hl, bc ld (unk_982E), hl - page0_206F: ld hl, (progPtr) or a @@ -4855,9 +3632,7 @@ add hl, de add hl, bc ld (progPtr), hl - page0_207C: - ; DelVarEntry+13j ld hl, (editSym) or a sbc hl, de @@ -4865,7 +3640,6 @@ add hl, de add hl, bc ld (editSym), hl - page0_2089: ld hl, (tSymPtr1) or a @@ -4874,7 +3648,6 @@ add hl, de add hl, bc ld (tSymPtr1), hl - page0_2096: ld hl, (tSymPtr2) or a @@ -4883,7 +3656,6 @@ add hl, de add hl, bc ld (tSymPtr2), hl - page0_20A3: ld hl, (chkDelPtr3) or a @@ -4892,7 +3664,6 @@ add hl, de add hl, bc ld (chkDelPtr3), hl - page0_20B0: ld hl, (chkDelPtr4) or a @@ -4901,7 +3672,6 @@ add hl, de add hl, bc ld (chkDelPtr4), hl - page0_20BD: ld hl, (XOutSym) or a @@ -4910,7 +3680,6 @@ add hl, de add hl, bc ld (XOutSym), hl - page0_20CA: ld hl, (YOutSym) or a @@ -4919,7 +3688,6 @@ add hl, de add hl, bc ld (YOutSym), hl - page0_20D7: ld hl, (inputSym) or a @@ -4929,8 +3697,6 @@ add hl, bc ld (inputSym), hl ret -; --------------------------------------------------------------------------- - page0_20E5: ld hl, (fmtMatSym) or a @@ -4940,21 +3706,13 @@ add hl, bc ld (fmtMatSym), hl ret -; End of function DelVarEntry - -; --------------------------------------------------------------------------- - DataSizeA: ld d, b ld e, c jr page0_211A -; --------------------------------------------------------------------------- - page0_20F6: pop bc ret -; --------------------------------------------------------------------------- - Page0Call_20F8: push de ld de, 9 @@ -4965,14 +3723,7 @@ jr z, page0_20F6 pop de jr page0_211A - -; =============== S U B R O U T I N E ======================================= - - DataSize: - - - ld de, 9 and 1Fh ret z @@ -4983,7 +3734,6 @@ inc hl ld d, (hl) dec hl - page0_211A: push hl ex de, hl @@ -4997,210 +3747,130 @@ jr nz, page0_212F add hl, hl jr page0_2138 -; --------------------------------------------------------------------------- - page0_212F: cp 3 jr nc, page0_213D cp 1 call nz, HTimesL - page0_2138: call HLTimes9 jr c, page0_2141 - page0_213D: ld de, 2 add hl, de - page0_2141: jp c, ErrMemory ex de, hl pop hl or a ret -; End of function DataSize - -; --------------------------------------------------------------------------- - POPMCPLXO1: - ld de, 8478h - + ld de, OP1 POPMCPLX: call FPOPCPLX - -MOVCPLX: - call mov9B2 +MOVCPLX:call mov9B2 inc de inc de jp mov9B2 -; --------------------------------------------------------------------------- - -popOP5: - call PopRealO5 +popOP5: call PopRealO5 ld a, (OP5) and 1Fh cp 0Ch ret nz call OP5ToOP6 jr PopRealO5 -; --------------------------------------------------------------------------- - -popOP3: - call PopRealO3 +popOP3: call PopRealO3 ld a, (OP3) and 1Fh cp 0Ch ret nz call OP3ToOP4 jr PopRealO3 -; --------------------------------------------------------------------------- - -popOP1: - call PopRealO1 +popOP1: call PopRealO1 call CkOP1Real cp 0Ch ret nz rst 8 jr PopRealO1 -; --------------------------------------------------------------------------- - PopRealO6: - ld de, 84AFh + ld de, OP6 jr PopReal - -; =============== S U B R O U T I N E ======================================= - - PopRealO5: - - ld de, 84A4h + ld de, OP5 jr PopReal -; --------------------------------------------------------------------------- - PopRealO4: - ld de, 8499h + ld de, OP4 jr PopReal -; --------------------------------------------------------------------------- - PopRealO3: - - ld de, 848Eh + ld de, OP3 jr PopReal -; --------------------------------------------------------------------------- - PopRealO2: - ld de, 8483h + ld de, OP2 jr PopReal -; --------------------------------------------------------------------------- - PopRealO1: - - ld de, 8478h - + ld de, OP1 PopReal: call FPOPREAL jp mov9B2 -; End of function PopRealO5 - - -; =============== S U B R O U T I N E ======================================= - - FPOPCPLX: call FPOPREAL - FPOPREAL: ld bc, 9 - -FPOPFPS: - ld hl, (FPS) +FPOPFPS:ld hl, (FPS) or a sbc hl, bc jr page0_21BC -; --------------------------------------------------------------------------- - DeallocFPS: call HLTimes9 ex de, hl - DeallocFPS1: ld hl, (FPS) or a sbc hl, de - page0_21BC: ld (FPS), hl ret -; End of function FPOPCPLX - -; --------------------------------------------------------------------------- - AllocFPS: call HLTimes9 - AllocFPS1: call ErrNotEnoughMem ld hl, (FPS) add hl, de jr page0_21BC -; --------------------------------------------------------------------------- - PushRealO6: - ld hl, 84AFh + ld hl, OP6 jr PushReal -; --------------------------------------------------------------------------- - PushRealO5: - ld hl, 84A4h + ld hl, OP5 jr PushReal -; --------------------------------------------------------------------------- - PushRealO4: - ld hl, 8499h + ld hl, OP4 jr PushReal -; --------------------------------------------------------------------------- - PushRealO3: - ld hl, 848Eh + ld hl, OP3 jr PushReal -; --------------------------------------------------------------------------- - PushRealO2: - ld hl, 8483h + ld hl, OP2 jr PushReal - -; =============== S U B R O U T I N E ======================================= - - PushRealO1: - - ld hl, 8478h - + ld hl, OP1 PushReal: push hl ld hl, 9 call ErrNotEnoughMem pop hl ld de, (FPS) - page0_21F4: call mov9B2 ld (FPS), de ret -; End of function PushRealO1 - -; --------------------------------------------------------------------------- - PushOP5: ld a, (OP5) and 1Fh cp 0Ch jr nz, PushRealO5 - ld hl, 84A4h + ld hl, OP5 jr PUSHMCPLX -; --------------------------------------------------------------------------- - PushOP3: ld a, (OP3) and 1Fh @@ -5210,21 +3880,16 @@ and 0E0h ; '্ or 0Ch ld (OP4), a - PUSHMCPLXO3: - ld hl, 848Eh + ld hl, OP3 jr PUSHMCPLX -; --------------------------------------------------------------------------- - PushOP1: call CkOP1Real cp 0Ch jr nz, PushRealO1 call page0_104E - PUSHMCPLXO1: - ld hl, 8478h - + ld hl, OP1 PUSHMCPLX: push hl ld hl, 12h @@ -5235,386 +3900,240 @@ inc hl inc hl jr page0_21F4 -; --------------------------------------------------------------------------- - ExMCplxO1: ld hl, (FPS) ld bc, 0FFEEh add hl, bc - ld de, 8478h + ld de, OP1 ld b, 9 call ExLp inc de inc de - -Exch9: - ld b, 9 +Exch9: ld b, 9 jp ExLp -; --------------------------------------------------------------------------- - CpyTo1FPS11: - ld de, 8478h + ld de, OP1 ld hl, (FPS) - ld c, 6Ch ; 'l' + ld c, 6Ch jr page0_226F -; --------------------------------------------------------------------------- - CpyTo2FPS5: - ld de, 8483h + ld de, OP2 jr page0_226A -; --------------------------------------------------------------------------- - CpyTo1FPS5: - ld de, 8478h - + ld de, OP1 page0_226A: ld hl, (FPS) - ld c, 36h ; '6' - + ld c, 36h page0_226F: jp CpyStack -; --------------------------------------------------------------------------- - CpyTo2FPS6: - ld de, 8483h + ld de, OP2 jr page0_227A -; --------------------------------------------------------------------------- - CpyTo1FPS6: - ld de, 8478h - + ld de, OP1 page0_227A: ld hl, (FPS) - ld c, 3Fh ; '?' + ld c, 3Fh jr page0_226F -; --------------------------------------------------------------------------- - CpyTo2FPS7: - ld de, 8483h + ld de, OP2 jr page0_2289 -; --------------------------------------------------------------------------- - CpyTo1FPS7: - ld de, 8478h - + ld de, OP1 page0_2289: ld hl, (FPS) - ld c, 48h ; 'H' + ld c, 48h jr CpyStack -; --------------------------------------------------------------------------- - CpyTo1FPS8: - ld de, 8478h + ld de, OP1 jr page0_2298 -; --------------------------------------------------------------------------- - CpyTo2FPS8: - ld de, 8483h - + ld de, OP2 page0_2298: ld hl, (FPS) - ld c, 51h ; 'Q' + ld c, 51h jr CpyStack -; --------------------------------------------------------------------------- - CpyTo1FPS10: - ld de, 8478h + ld de, OP1 ld hl, (FPS) - ld c, 63h ; 'c' + ld c, 63h jr CpyStack -; --------------------------------------------------------------------------- - CpyTo1FPS9: - ld de, 8478h + ld de, OP1 ld hl, (FPS) - ld c, 5Ah ; 'Z' + ld c, 5Ah jr CpyStack -; --------------------------------------------------------------------------- - CpyTo2FPS4: - ld de, 8483h - + ld de, OP2 page0_22B6: ld hl, (FPS) - ld c, 2Dh ; '-' + ld c, 2Dh jr CpyStack -; --------------------------------------------------------------------------- - CpyTo6FPS3: - ld de, 84AFh + ld de, OP6 jr CPYFPS3 -; --------------------------------------------------------------------------- - CpyTo6FPS2: - ld de, 84AFh + ld de, OP6 jr CPYFPS2 -; --------------------------------------------------------------------------- - CpyTo2FPS3: - ld de, 8483h + ld de, OP2 jr CPYFPS3 -; --------------------------------------------------------------------------- - CPYCTO1FPS3: call CpyTo2FPS2 - CpyTo1FPS3: - ld de, 8478h - + ld de, OP1 CPYFPS3: ld hl, (FPS) - ld c, 24h ; '$' + ld c, 24h jr CpyStack -; --------------------------------------------------------------------------- - CpyTo1FPS4: - ld de, 8478h + ld de, OP1 jr page0_22B6 -; --------------------------------------------------------------------------- - CpyTo3FPS2: - ld de, 848Eh + ld de, OP3 jr CPYFPS2 -; --------------------------------------------------------------------------- - CpyTo5FPST: - ld de, 84A4h + ld de, OP5 jr CPYFPST -; --------------------------------------------------------------------------- - CpyTo6FPST: - ld de, 84AFh + ld de, OP6 jr CPYFPST -; --------------------------------------------------------------------------- - CpyTo4FPST: - ld de, 8499h + ld de, OP4 jr CPYFPST -; --------------------------------------------------------------------------- - CpyTo3FPST: - ld de, 848Eh + ld de, OP3 jr CPYFPST -; --------------------------------------------------------------------------- - CpyTo2FPST: - ld de, 8483h + ld de, OP2 jr CPYFPST -; --------------------------------------------------------------------------- - CpyTo1FPST: - ld de, 8478h - + ld de, OP1 CPYFPST: ld hl, (FPS) - page0_2302: ld c, 9 -; START OF FUNCTION CHUNK FOR CpyTo2FPS2 - CpyStack: - xor a ld b, a sbc hl, bc jp mov9B2 -; END OF FUNCTION CHUNK FOR CpyTo2FPS2 -; --------------------------------------------------------------------------- - CpyTo3FPS1: - ld de, 848Eh + ld de, OP3 jr CPYFPS1 -; --------------------------------------------------------------------------- - CpyTo2FPS1: - ld de, 8483h + ld de, OP2 jr CPYFPS1 -; --------------------------------------------------------------------------- - CpyTo1FPS1: - ld de, 8478h - + ld de, OP1 CPYFPS1: ld hl, (FPS) - page0_231B: ld c, 12h jr CpyStack - -; =============== S U B R O U T I N E ======================================= - - CpyTo2FPS2: - - - - ld de, 8483h + ld de, OP2 jr CPYFPS2 -; --------------------------------------------------------------------------- - CpyTo1FPS2: - ld de, 8478h - + ld de, OP1 CPYFPS2: ld hl, (FPS) - _checkThirdBankA: ld c, 1Bh jr CpyStack -; End of function CpyTo2FPS2 - -; --------------------------------------------------------------------------- - CpyO3ToFPST: - ld de, 848Eh + ld de, OP3 jr CpyToFPST -; --------------------------------------------------------------------------- - CpyO2ToFPST: - ld de, 8483h + ld de, OP2 jr CpyToFPST -; --------------------------------------------------------------------------- - CpyO6ToFPST: - ld de, 84AFh + ld de, OP6 jr CpyToFPST -; --------------------------------------------------------------------------- - CpyO1ToFPST: - ld de, 8478h - + ld de, OP1 CpyToFPST: ld hl, (FPS) - page0_2343: ld c, 9 - CpyToStack: xor a ld b, a sbc hl, bc ex de, hl jp mov9B2 -; --------------------------------------------------------------------------- - CpyO3ToFPS1: - ld de, 848Eh + ld de, OP3 jr CpyToFPS1 -; --------------------------------------------------------------------------- - CpyO5ToFPS1: - ld de, 84A4h + ld de, OP5 jr CpyToFPS1 -; --------------------------------------------------------------------------- - CpyO2ToFPS1: - ld de, 8483h + ld de, OP2 jr CpyToFPS1 -; --------------------------------------------------------------------------- - CpyO1ToFPS1: - ld de, 8478h - + ld de, OP1 CpyToFPS1: ld hl, (FPS) ld c, 12h jr CpyToStack -; --------------------------------------------------------------------------- - CpyO2ToFPS2: - ld de, 8483h + ld de, OP2 jr CpyToFPS2 -; --------------------------------------------------------------------------- - CpyO3ToFPS2: - ld de, 848Eh + ld de, OP3 jr CpyToFPS2 -; --------------------------------------------------------------------------- - CpyO6ToFPS2: - ld de, 84AFh + ld de, OP6 jr CpyToFPS2 -; --------------------------------------------------------------------------- - CpyO1ToFPS2: - ld de, 8478h - + ld de, OP1 CpyToFPS2: ld hl, (FPS) ld c, 1Bh jr CpyToStack -; --------------------------------------------------------------------------- - CpyO5ToFPS3: - ld de, 84A4h + ld de, OP5 jr CpyToFPS3 -; --------------------------------------------------------------------------- - CpyO2ToFPS3: - ld de, 8483h + ld de, OP2 jr CpyToFPS3 -; --------------------------------------------------------------------------- - CpyO1ToFPS3: - ld de, 8478h - + ld de, OP1 CpyToFPS3: ld hl, (FPS) - ld c, 24h ; '$' + ld c, 24h jr CpyToStack -; --------------------------------------------------------------------------- - CpyO1ToFPS6: - ld de, 8478h - ld c, 3Fh ; '?' + ld de, OP1 + ld c, 3Fh jr page0_239F -; --------------------------------------------------------------------------- - CpyO1ToFPS7: - ld de, 8478h - ld c, 48h ; 'H' - + ld de, OP1 + ld c, 48h page0_239F: ld hl, (FPS) jr CpyToStack -; --------------------------------------------------------------------------- - CpyO1ToFPS5: - ld de, 8478h + ld de, OP1 ld hl, (FPS) - ld c, 36h ; '6' + ld c, 36h jr CpyToStack -; --------------------------------------------------------------------------- - CpyO2ToFPS4: - ld de, 8483h + ld de, OP2 jr page0_23B6 -; --------------------------------------------------------------------------- - CpyO1ToFPS4: - ld de, 8478h - + ld de, OP1 page0_23B6: ld hl, (FPS) - ld c, 2Dh ; '-' + ld c, 2Dh jr CpyToStack - -; =============== S U B R O U T I N E ======================================= - - ErrNotEnoughMem: - call EnoughMem ret nc jp ErrMemory -; End of function ErrNotEnoughMem - - -; =============== S U B R O U T I N E ======================================= - sub_23C4: - ; page0_1A99+5Cp ... xor a ld h, a ld l, a @@ -5622,18 +4141,13 @@ ld b, h ld c, l ret -; End of function sub_23C4 - -; --------------------------------------------------------------------------- FPSMINUS9: ld hl, (FPS) - HLMINUS9: ld de, 0FFF7h add hl, de ret -; --------------------------------------------------------------------------- Page0Call_23D4: push hl @@ -5642,13 +4156,11 @@ call nc, DelVar pop hl ret -; --------------------------------------------------------------------------- Page0Call_23DE: call sub_1680 rst 10h ret -; --------------------------------------------------------------------------- Page0Call_23E3: call sub_1680 @@ -5658,18 +4170,15 @@ call CreateRList call popErrorHandleR ret -; --------------------------------------------------------------------------- Page0Call_23F6: inc hl inc hl inc hl inc hl - Page0Call_23FA: inc hl inc hl - Page0Call_23FC: or a bit 7, h @@ -5678,80 +4187,46 @@ set 6, h scf ret -; --------------------------------------------------------------------------- Page0Call_2406: dec hl - -; =============== S U B R O U T I N E ======================================= - - Page0Call_2407: - ; page0_1F38+Cp ... dec hl - HLMinus5: dec hl dec hl - Page0Call_240A: dec hl - Page0Call_240B: dec hl dec hl ret -; End of function Page0Call_2407 - -; --------------------------------------------------------------------------- - Page0Call_240E: call ChkFindSym jr page0_2414 -; --------------------------------------------------------------------------- - Page0Call_2413: rst 10h - page0_2414: ret c - Page0Call_2415: push af call IsBZero jp nz, page0_2551 pop af ret -; --------------------------------------------------------------------------- - Page0Call_241E: rst 10h ret c - -; =============== S U B R O U T I N E ======================================= - - Page0Call_2420: - ; FIND_E_UNDEF+4j push af call IsBZero jp nz, Page0Call_254D pop af ret -; End of function Page0Call_2420 - - -; =============== S U B R O U T I N E ======================================= - - FIND_E_UNDEF: rst 10h jp c, ErrUndefined jr Page0Call_2420 -; End of function FIND_E_UNDEF - -; --------------------------------------------------------------------------- - SetupPagedPtr: push af ld a, b @@ -5761,11 +4236,9 @@ ld (pagedCount), a pop af ret -; --------------------------------------------------------------------------- PagedGet: push hl - page0_243F: ld a, (pagedCount) or a @@ -5778,8 +4251,6 @@ ld (pagedPutPtr), hl pop hl ret -; --------------------------------------------------------------------------- - page0_2453: push bc push de @@ -5795,7 +4266,6 @@ ld hl, (pagedGetPtr) bit 7, h jr nz, page0_2489 - page0_2472: ldi bit 7, h @@ -5805,17 +4275,13 @@ ld (pagedPN), a out (6), a ld hl, 4000h - page0_2483: ld a, b or c jr nz, page0_2472 jr page0_248B -; --------------------------------------------------------------------------- - page0_2489: ldir - page0_248B: ld (pagedGetPtr), hl pop af @@ -5823,7 +4289,6 @@ pop de pop bc jr page0_243F -; --------------------------------------------------------------------------- Page0Call_2495: and 1Fh @@ -5914,258 +4379,145 @@ ;#endif Page0Call_24B5: - ld a, 0B2h ; 'ҧ - jr page0_24DF -; --------------------------------------------------------------------------- - + ld a, 0B2h + jr jpJError Page0Call_24B9: - ld a, 0B3h ; 'ӧ - jr page0_24DF -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR INCO1EXP - + ld a, 0B3h + jr jpJError ErrOverflow: - ld a, 81h ; 'g - jr page0_24DF -; END OF FUNCTION CHUNK FOR INCO1EXP -; --------------------------------------------------------------------------- - + ld a, 81h + jr jpJError ErrDivBy0: - ld a, 82h ; '§ - jr page0_24DF -; --------------------------------------------------------------------------- - + ld a, 82h + jr jpJError ErrSingularMat: - ld a, 83h ; 'ç - jr page0_24DF -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR errd_op1notpos - + ld a, 83h + jr jpJError ErrDomain: - ld a, 84h ; 'ħ - jr page0_24DF -; END OF FUNCTION CHUNK FOR errd_op1notpos -; --------------------------------------------------------------------------- - + ld a, 84h + jr jpJError ErrIncrement: - ld a, 85h ; 'ŧ - jr page0_24DF -; --------------------------------------------------------------------------- - + ld a, 85h + jr jpJError ErrNon_Real: - ld a, 87h ; 'ǧ - jr page0_24DF -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR sub_1BA3 - + ld a, 87h + jr jpJError ErrSyntax: - ld a, 88h ; 'ȧ - jr page0_24DF -; END OF FUNCTION CHUNK FOR sub_1BA3 -; --------------------------------------------------------------------------- - + ld a, 88h + jr jpJError Page0Call_24D9: - ld a, 9Eh ; 'ާ - jr page0_24DF -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR EOP1NotReal - + ld a, 9Eh + jr jpJError ErrDataType: - ld a, 89h ; 'ɧ -; END OF FUNCTION CHUNK FOR EOP1NotReal -; START OF FUNCTION CHUNK FOR INCO1EXP - -page0_24DF: + ld a, 89h +jpJError: jr JError -; END OF FUNCTION CHUNK FOR INCO1EXP -; --------------------------------------------------------------------------- - Page0Call_24E1: - ld a, 9Dh ; 'ݧ + ld a, 9Dh jr JError -; --------------------------------------------------------------------------- - ErrArgument: - ld a, 8Ah ; 'ʧ + ld a, 8Ah jr JError -; --------------------------------------------------------------------------- - ErrDimMismatch: - ld a, 8Bh ; '˧ + ld a, 8Bh jr JError -; --------------------------------------------------------------------------- - ErrDimension: - ld a, 8Ch ; '̧ + ld a, 8Ch jr JError -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR page0_16F4 - ErrUndefined: - ; FIND_E_UNDEF+1j - ld a, 8Dh ; 'ͧ + ld a, 8Dh jr JError -; END OF FUNCTION CHUNK FOR page0_16F4 -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR DataSize - ErrMemory: - - ld a, 8Eh ; 'Χ + ld a, 8Eh jr JError -; END OF FUNCTION CHUNK FOR DataSize -; --------------------------------------------------------------------------- - ErrMemory_NoGoTo: ld a, 0Eh jr JError -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR EOP1NotReal - ErrInvalid: - - ld a, 8Fh ; 'ϧ + ld a, 8Fh jr JError -; END OF FUNCTION CHUNK FOR EOP1NotReal -; --------------------------------------------------------------------------- - Page0Call_2501: - ld a, 90h ; 'Ч + ld a, 90h jr JError -; --------------------------------------------------------------------------- - Page0Call_2505: - ld a, 91h ; 'ѧ + ld a, 91h jr JError -; --------------------------------------------------------------------------- - Page0Call_2509: - ld a, 92h ; 'ҧ + ld a, 92h jr JError -; --------------------------------------------------------------------------- - Page0Call_250D: - ld a, 93h ; 'ӧ + ld a, 93h jr JError -; --------------------------------------------------------------------------- - ErrBreak: - ld a, 86h ; 'Ƨ + ld a, 86h jr JError -; --------------------------------------------------------------------------- - ErrStat: ld a, 15h jr JError -; --------------------------------------------------------------------------- - ld a, 96h ; '֧ + ld a, 96h jr JError -; --------------------------------------------------------------------------- - ErrSignChange: - ld a, 98h ; 'ا - jr JError -; --------------------------------------------------------------------------- - -ErrIterations: - ld a, 99h ; '٧ + ld a, 98h jr JError -; --------------------------------------------------------------------------- - -ErrBadGuess: - ld a, 9Ah ; 'ڧ +ErrIterations: + ld a, 99h jr JError -; --------------------------------------------------------------------------- - +ErrBadGuess: + ld a, 9Ah + jr JError ErrTolTooSmall: - ld a, 9Ch ; 'ܧ + ld a, 9Ch jr JError -; --------------------------------------------------------------------------- - ErrStatPlot: ld a, 1Bh jr JError -; --------------------------------------------------------------------------- - ld a, 0AAh ; 'ʧ - jr JError -; --------------------------------------------------------------------------- - -Page0Call_2535: - ld a, 26h ; '&' + ld a, 0AAh jr JError -; --------------------------------------------------------------------------- - +Page0Call_2535: + ld a, 26h + jr JError Page0Call_2539: - ld a, 28h ; '(' + ld a, 28h jr JError -; --------------------------------------------------------------------------- - Page0Call_253D: - ld a, 2Dh ; '-' - jr JError -; --------------------------------------------------------------------------- - -Page0Call_2541: - ld a, 2Eh ; '.' + ld a, 2Dh jr JError -; --------------------------------------------------------------------------- - -ErrCustom1: - ld a, 0ABh ; '˧ +Page0Call_2541: + ld a, 2Eh jr JError -; --------------------------------------------------------------------------- - -ErrCustom2: - ld a, 0ACh ; '̧ +ErrCustom1: + ld a, 0ABh jr JError -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR DelVar - -Page0Call_254D: - ; Page0Call_2420+4j - ld a, 0AFh ; 'ϧ +ErrCustom2: + ld a, 0ACh jr JError -; END OF FUNCTION CHUNK FOR DelVar -; --------------------------------------------------------------------------- - +Page0Call_254D: + ld a, 0AFh + jr JError page0_2551: - ld a, 2Fh ; '/' + ld a, 2Fh jr JError -; --------------------------------------------------------------------------- - Page0Call_2555: - ld a, 30h ; '0' + ld a, 30h jr JError -; --------------------------------------------------------------------------- - Page0Call_2559: - ld a, 31h ; '1' + ld a, 31h jr JError -; --------------------------------------------------------------------------- - ErrLinkXmit: - ld a, 9Fh ; 'ߧ -; START OF FUNCTION CHUNK FOR DelVar - -JError: - - call Page0Call_3E0D + ld a, 9Fh +JError: call Page0Call_3E0D ld (errNo), a - JErrorNo: call Page0Call_3E0D call NZIf83Plus jr z, page0_2573 - ld a, 0C0h ; '' + ld a, 0C0h out (0), a jr page0_257B -; --------------------------------------------------------------------------- - page0_2573: - ld a, 80h ; '' + ld a, 80h out (8), a res silentLinkActive, (iy+silentLinkFlags) - page0_257B: res indicOnly, (iy+indicFlags) res 4, (iy+24h) @@ -6183,16 +4535,10 @@ pop af out (6), a ld a, (errNo) - noErrorEntry: ret -; END OF FUNCTION CHUNK FOR DelVar - -; =============== S U B R O U T I N E ======================================= - pushErrorHandleR: - ; handleONKeyPress-3FFp ... pop de push hl ld b, a @@ -6213,14 +4559,7 @@ ld (errSP), sp ex de, hl jp (hl) -; End of function pushErrorHandleR - - -; =============== S U B R O U T I N E ======================================= - - popErrorHandleR: - ; handleONKeyPress:loc_400p ... pop bc ld sp, (errSP) pop af @@ -6232,11 +4571,6 @@ pop af push bc ret -; End of function popErrorHandleR - - -; =============== S U B R O U T I N E ======================================= - strcopy: ld a, (hl) @@ -6246,9 +4580,6 @@ inc hl inc de jr strcopy -; End of function strcopy - -; --------------------------------------------------------------------------- strCat: ld a, (de) @@ -6257,12 +4588,8 @@ inc de jr strCat -; =============== S U B R O U T I N E ======================================= - - Page0Call_25E7: ld hl, unk_9320 - isInSet: push bc ld c, a diff -r adad2f097dcb -r 486c42a314bc source/page00/misc.asm --- a/source/page00/misc.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page00/misc.asm Thu May 22 01:29:08 2014 -0400 @@ -1,528 +1,395 @@ -aDone: .asc 'Done',0 -a0: .asc '=0',0 -aErr: .asc 'ERR ',0 -aErr_0: .asc 'ERR:',0 -aError: .asc 'ERROR',0 -aMatrix: .asc 'MATRIX',0C1h,0 -aName: .asc 'Name=',0 -aRcl: .asc 'Rcl ',0 -a______: .asc '______',0 -a_____: .asc '_____',0 - .asc ' ',0 -aYVars: .asc 'Y-Vars',0 -aFail: .asc ' FAIL',0 -aRamFree: .asc 'RAM FREE',0 -aArcFree: .asc 'ARC FREE',0 -aName_0: .asc 'Name',0 -aNormal: .asc 'Normal',0 -aOk: .asc 'OK',0 -aPlot1: .asc 'Plot1',0 -aPlot2: .asc 'Plot2',0 -aPlot3: .asc 'Plot3',0 -unk_2690: - .asc '(',01h,')',0 -aReal: .asc 'Real',0 -aPlot: .asc 'Plot',0 -aPrgm: .asc 'Prgm',0 -aRam: .asc 'RAM',0 -aRom: .asc 'ROM',0 -aId: .asc 'ID',0 -aSelect: .asc 'SELECT',0 -aTransmit: .asc ' TRANSMIT',0 -unk_26BF: - .asc '[=',0 -aX: .asc 'X=',0 -aT: .asc 'T=',0 -unk_26C8: - .asc 01h,'=',0 -aEval: .asc 'Eval ',0 -aTmax: .asc 'Tmax',0 -aTmin: .asc 'Tmin',0 -aMemoryBackup: .asc 'MEMORY BACKUP',0 -aIdlist: .asc 'IDList',0 -aAppvars: .asc 'AppVars',0 - .dw 2300h -aExpirationDate:.asc 'Expiration Date:',0 - .dw 2300h -aExpiredOn: .asc 'Expired on:',0 - .dw 2A00h -aTrialsRemaining:.asc 'Trials Remaining:',0 -aApplicationS: .asc 'Application(s):',0 - .dw 3A00h -aPressAnyKey___:.asc 'Press any Key...',0 - .dw 140Ah -aTexasInstrumentsInc:.asc 'Texas Instruments Inc.',0 -aApp: .asc 'App',0 -aDefragmenting___:.asc 'Defragmenting...',0 -aCatalog: .asc 'CATALOG',0 -aDelete: .asc 'DELETE:',0 -aAll: .asc 'All',0 -a?: .asc '=?',0 -aOperatingSystem:.asc 'Operating System',0 -aArcVarsCleared:.asc 'Arc Vars Cleared',0 -aAppsCleared: .asc ' Apps Cleared',0 -aArcVarsAppsCleared:.asc 'Arc Vars & Apps Cleared',0 -aDf: .asc 'df=',0 -aArea: .asc 'Area=',0 -aUp: .asc 'up=',0 -aLow: .asc 'low=',0 -aDone_0: .asc ' DONE',0 -aCopying: .asc 'Copying',0 -aVariablesTo: .asc 'Variables to',0 -aGroup: .asc 'Group:',0 -aResettingAll___:.asc 'Resetting All...',0 -aUngrouping: .asc 'Ungrouping:',0 -aGarbage: .asc 'Garbage',0 -aCollecting___: .asc 'Collecting...',0 -aBaseCode1_19: .asc 'BASE Code 1.19 ',0 -aStart?: .asc 'START?',0 -aTooFewVars: .asc 'Too Few Vars',0 -aLargestSingle: .asc 'Largest single',0CEh,0 -aVariable: .asc 'Variable= ',0 -aApp_0: .asc 'App =',0 -; --------------------------------------------------------------------------- +aDone: .asc 'Done',0 +a0: .asc '=0',0 +aErr: .asc 'ERR ',0 +aErr_0: .asc 'ERR:',0 +aError: .asc 'ERROR',0 +aMatrix: .asc 'MATRIX',0C1h,0 +aName: .asc 'Name=',0 +aRcl: .asc 'Rcl ',0 +a______: .asc '______',0 +a_____: .asc '_____',0 + .asc ' ',0 +aYVars: .asc 'Y-Vars',0 +aFail: .asc ' FAIL',0 +aRamFree: .asc 'RAM FREE',0 +aArcFree: .asc 'ARC FREE',0 +aName_0: .asc 'Name',0 +aNormal: .asc 'Normal',0 +aOk: .asc 'OK',0 +aPlot1: .asc 'Plot1',0 +aPlot2: .asc 'Plot2',0 +aPlot3: .asc 'Plot3',0 +unk_2690: .asc '(',01h,')',0 +aReal: .asc 'Real',0 +aPlot: .asc 'Plot',0 +aPrgm: .asc 'Prgm',0 +aRam: .asc 'RAM',0 +aRom: .asc 'ROM',0 +aId: .asc 'ID',0 +aSelect: .asc 'SELECT',0 +aTransmit: .asc ' TRANSMIT',0 +unk_26BF: .asc '[=',0 +aX: .asc 'X=',0 +aT: .asc 'T=',0 +unk_26C8: .asc 01h,'=',0 +aEval: .asc 'Eval ',0 +aTmax: .asc 'Tmax',0 +aTmin: .asc 'Tmin',0 +aMemoryBackup: .asc 'MEMORY BACKUP',0 +aIdlist: .asc 'IDList',0 +aAppvars: .asc 'AppVars',0 + .dw 2300h +aExpirationDate: .asc 'Expiration Date:',0 + .dw 2300h +aExpiredOn: .asc 'Expired on:',0 + .dw 2A00h +aTrialsRemaining: .asc 'Trials Remaining:',0 +aApplicationS: .asc 'Application(s):',0 + .dw 3A00h +aPressAnyKey___: .asc 'Press any Key...',0 + .dw 140Ah +aTexasInstrumentsInc: .asc 'Texas Instruments Inc.',0 +aApp: .asc 'App',0 +aDefragmenting___: .asc 'Defragmenting...',0 +aCatalog: .asc 'CATALOG',0 +aDelete: .asc 'DELETE:',0 +aAll: .asc 'All',0 +a?: .asc '=?',0 +aOperatingSystem: .asc 'Operating System',0 +aArcVarsCleared: .asc 'Arc Vars Cleared',0 +aAppsCleared: .asc ' Apps Cleared',0 +aArcVarsAppsCleared: .asc 'Arc Vars & Apps Cleared',0 +aDf: .asc 'df=',0 +aArea: .asc 'Area=',0 +aUp: .asc 'up=',0 +aLow: .asc 'low=',0 +aDone_0: .asc ' DONE',0 +aCopying: .asc 'Copying',0 +aVariablesTo: .asc 'Variables to',0 +aGroup: .asc 'Group:',0 +aResettingAll___: .asc 'Resetting All...',0 +aUngrouping: .asc 'Ungrouping:',0 +aGarbage: .asc 'Garbage',0 +aCollecting___: .asc 'Collecting...',0 +aBaseCode1_19: .asc 'BASE Code 1.19 ',0 +aStart?: .asc 'START?',0 +aTooFewVars: .asc 'Too Few Vars',0 +aLargestSingle: .asc 'Largest single',0CEh,0 +aVariable: .asc 'Variable= ',0 +aApp_0: .asc 'App =',0 CPYTO2ES1: - ld de, 8483h + ld de, OP2 jr page0_28A0 -; --------------------------------------------------------------------------- - CPYTO6ES1: - ld de, 84AFh + ld de, OP6 jr page0_28A0 -; --------------------------------------------------------------------------- - CPYTO1ES1: - ld de, 8478h - + ld de, OP1 page0_28A0: ld hl, (ES) jp page0_231B -; --------------------------------------------------------------------------- - CPYTO3ES1: - ld de, 848Eh + ld de, OP3 jr page0_28A0 -; --------------------------------------------------------------------------- - CPYTO3ES2: - ld de, 848Eh + ld de, OP3 jr page0_28B8 - -; =============== S U B R O U T I N E ======================================= - - CPYTO2ES2: - ld de, 8483h + ld de, OP2 jr page0_28B8 -; --------------------------------------------------------------------------- - CPYTO1ES2: - ld de, 8478h - + ld de, OP1 page0_28B8: ld hl, (ES) jp _checkThirdBankA -; End of function CPYTO2ES2 -; --------------------------------------------------------------------------- - ld de, 848Eh +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;Don't think this is necessary. + ld de, OP3 jr page0_28CE -; --------------------------------------------------------------------------- +#endif CPYTO2ES3: - ld de, 8483h + ld de, OP2 jr page0_28CE -; --------------------------------------------------------------------------- + +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;Don't think this is necessary. call CPYTO2ES2 +#endif CPYTO1ES3: - ld de, 8478h - + ld de, OP1 page0_28CE: - ld c, 24h ; '$' - + ld c, 24h page0_28D0: ld hl, (ES) jp CpyStack -; --------------------------------------------------------------------------- - CPYTO3ES4: - ld de, 848Eh + ld de, OP3 jr page0_28E8 -; --------------------------------------------------------------------------- - CPYTO6ES3: - ld de, 84AFh + ld de, OP6 jr page0_28CE -; --------------------------------------------------------------------------- - CPYTO2ES4: - ld de, 8483h + ld de, OP2 jr page0_28E8 -; --------------------------------------------------------------------------- - CPYTO1ES4: - ld de, 8478h - + ld de, OP1 page0_28E8: - ld c, 2Dh ; '-' + ld c, 2Dh jr page0_28D0 -; --------------------------------------------------------------------------- - CPYTO2ES5: - ld de, 8483h + ld de, OP2 jr page0_28F4 -; --------------------------------------------------------------------------- - CPYTO1ES5: - ld de, 8478h - + ld de, OP1 page0_28F4: - ld c, 36h ; '6' + ld c, 36h jr page0_28D0 -; --------------------------------------------------------------------------- - CPYTO4EST: - ld de, 8499h + ld de, OP4 jr page0_2905 -; --------------------------------------------------------------------------- - CPYTO2EST: - ld de, 8483h + ld de, OP2 jr page0_2905 -; --------------------------------------------------------------------------- - CPYTO1EST: - ld de, 8478h - + ld de, OP1 page0_2905: ld hl, (ES) jp page0_2302 -; --------------------------------------------------------------------------- - CPYTO2ES6: - ld de, 8483h + ld de, OP2 jr page0_2913 -; --------------------------------------------------------------------------- - CPYTO1ES6: - ld de, 8478h - + ld de, OP1 page0_2913: - ld c, 3Fh ; '?' + ld c, 3Fh + jr page0_28D0 +CPYTO2ES7: + ld de, OP2 + jr page0_291F +CPYTO1ES7: + ld de, OP1 +page0_291F: + ld c, 48h jr page0_28D0 -; --------------------------------------------------------------------------- - -CPYTO2ES7: - ld de, 8483h - jr page0_291F -; --------------------------------------------------------------------------- - -CPYTO1ES7: - ld de, 8478h - -page0_291F: - ld c, 48h ; 'H' +CPYTO2ES8: + ld de, OP2 + jr page0_292B +CPYTO1ES8: + ld de, OP1 +page0_292B: + ld c, 51h jr page0_28D0 -; --------------------------------------------------------------------------- +CPYTO1ES9: + ld de, OP1 + jr page0_2937 +CPYTO2ES9: + ld de, OP2 +page0_2937: + ld c, 5Ah + jr page0_28D0 -CPYTO2ES8: - ld de, 8483h - jr page0_292B -; --------------------------------------------------------------------------- - -CPYTO1ES8: - ld de, 8478h - -page0_292B: - ld c, 51h ; 'Q' - jr page0_28D0 -; --------------------------------------------------------------------------- - -CPYTO1ES9: - ld de, 8478h - jr page0_2937 -; --------------------------------------------------------------------------- - -CPYTO2ES9: - ld de, 8483h - -page0_2937: - ld c, 5Ah ; 'Z' - jr page0_28D0 -; --------------------------------------------------------------------------- - ld de, 848Eh +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;Not referenced anywhere. + ld de, OP3 jr Page0Call_2948 -; --------------------------------------------------------------------------- +#endif CPYTO2ES10: - ld de, 8483h + ld de, OP2 jr Page0Call_2948 -; --------------------------------------------------------------------------- - CPYTO1ES10: - ld de, 8478h - + ld de, OP1 Page0Call_2948: - ld c, 63h ; 'c' - + ld c, 63h page0_294A: jr page0_28D0 -; --------------------------------------------------------------------------- - CPYTO2ES11: - ld de, 8483h + ld de, OP2 jr page0_2954 -; --------------------------------------------------------------------------- - CPYTO1ES11: - ld de, 8478h - + ld de, OP1 page0_2954: - ld c, 6Ch ; 'l' + ld c, 6Ch jr page0_294A -; --------------------------------------------------------------------------- - CPYTO2ES12: - ld de, 8483h + ld de, OP2 jr page0_2960 -; --------------------------------------------------------------------------- - CPYTO1ES12: - ld de, 8478h - + ld de, OP1 page0_2960: - ld c, 75h ; 'u' + ld c, 75h jr page0_294A -; --------------------------------------------------------------------------- - CPYTO2ES13: - ld de, 8483h + ld de, OP2 jr page0_296C -; --------------------------------------------------------------------------- - CPYTO1ES13: - ld de, 8478h - + ld de, OP1 page0_296C: - ld c, 7Eh ; '~' + ld c, 7Eh jr page0_294A -; --------------------------------------------------------------------------- - CPYTO1ES14: - ld de, 8478h - ld c, 87h ; 'ǧ + ld de, OP1 + ld c, 87h jr page0_294A -; --------------------------------------------------------------------------- - CPYTO1ES16: - ld de, 8478h - ld c, 99h ; '٧ + ld de, OP1 + ld c, 99h jr page0_294A -; --------------------------------------------------------------------------- - CPYTO1ES17: - ld de, 8478h - ld c, 0A2h ; '§ + ld de, OP1 + ld c, 0A2h jr page0_294A -; --------------------------------------------------------------------------- - CPYTO1ES18: - ld de, 8478h - ld c, 0ABh ; '˧ + ld de, OP1 + ld c, 0ABh jr page0_294A -; --------------------------------------------------------------------------- - ld c, 0B4h ; 'ԧ + ld c, 0B4h jr page0_294A -; --------------------------------------------------------------------------- - CPYTO1ES15: - ld de, 8478h - + ld de, OP1 page0_2993: - ld c, 90h ; 'Ч + ld c, 90h jr page0_294A -; --------------------------------------------------------------------------- - CPYTO2ES15: - ld de, 8483h + ld de, OP2 jr page0_2993 -; --------------------------------------------------------------------------- - ld de, 8483h + +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;Not referenced anywhere. + ld de, OP2 jr page0_29A4 -; --------------------------------------------------------------------------- +#endif CPYO1TOEST: - ld de, 8478h - + ld de, OP1 page0_29A4: ld hl, (ES) jp page0_2343 -; --------------------------------------------------------------------------- - CPYO1TOES1: ld c, 12h - page0_29AC: - ld de, 8478h - + ld de, OP1 page0_29AF: ld hl, (ES) jp CpyToStack -; --------------------------------------------------------------------------- - ld de, 848Eh + +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;Not referenced anywhere. + ld de, OP3 +#endif page0_29B8: ld c, 12h jr page0_29AF -; --------------------------------------------------------------------------- - CPYO6TOES1: - ld de, 84AFh + ld de, OP6 jr page0_29B8 -; --------------------------------------------------------------------------- - CPYO6TOES3: - ld de, 84AFh - ld c, 24h ; '$' + ld de, OP6 + ld c, 24h jr page0_29AF -; --------------------------------------------------------------------------- - CPYO1TOES2: ld c, 1Bh jr page0_29AC -; --------------------------------------------------------------------------- - CPYO2TOES2: ld c, 1Bh - page0_29CE: - ld de, 8483h + ld de, OP2 jr page0_29AF -; --------------------------------------------------------------------------- - CPYO1TOES3: - ld c, 24h ; '$' + ld c, 24h jr page0_29AC -; --------------------------------------------------------------------------- - CPYO1TOES4: - ld c, 2Dh ; '-' + ld c, 2Dh jr page0_29AC -; --------------------------------------------------------------------------- - CPYO1TOES5: - ld c, 36h ; '6' + ld c, 36h jr page0_29AC -; --------------------------------------------------------------------------- - CPYO1TOES6: - ld c, 3Fh ; '?' + ld c, 3Fh jr page0_29AC -; --------------------------------------------------------------------------- +CPYO1TOES7: + ld c, 48h + jr page0_29AC -CPYO1TOES7: - ld c, 48h ; 'H' - jr page0_29AC -; --------------------------------------------------------------------------- +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;Not referenced anywhere. ld c, 12h jr page0_29CE -; --------------------------------------------------------------------------- - ld c, 24h ; '$' + ld c, 24h jr page0_29CE -; --------------------------------------------------------------------------- +#endif CPYO2TOES4: - ld c, 2Dh ; '-' - jr page0_29CE -; --------------------------------------------------------------------------- - -CPYO2TOES5: - ld c, 36h ; '6' + ld c, 2Dh jr page0_29CE -; --------------------------------------------------------------------------- - +CPYO2TOES5: + ld c, 36h + jr page0_29CE CPYO2TOES6: - ld c, 3Fh ; '?' + ld c, 3Fh jr page0_29CE -; --------------------------------------------------------------------------- - CPYO2TOES7: - ld c, 48h ; 'H' + ld c, 48h jr page0_29CE -; --------------------------------------------------------------------------- - CPYO2TOES8: - ld c, 51h ; 'Q' + ld c, 51h jr page0_29CE -; --------------------------------------------------------------------------- +CPYO2TOES9: + ld c, 5Ah + jr page0_29CE -CPYO2TOES9: - ld c, 5Ah ; 'Z' +#ifndef DEVIATE_FROM_ORIGINAL_FILE +;Not referenced anywhere. + ld c, 63h jr page0_29CE -; --------------------------------------------------------------------------- - ld c, 63h ; 'c' - jr page0_29CE -; --------------------------------------------------------------------------- - ld c, 6Ch ; 'l' + ld c, 6Ch +#endif page0_2A0D: jr page0_29CE -; --------------------------------------------------------------------------- - CPYO1TOES8: - ld c, 51h ; 'Q' + ld c, 51h jr page0_29AC -; --------------------------------------------------------------------------- - CPYO1TOES9: - ld c, 5Ah ; 'Z' + ld c, 5Ah jr page0_29AC -; --------------------------------------------------------------------------- - CPYO1TOES10: - ld c, 63h ; 'c' + ld c, 63h jr page0_29AC -; --------------------------------------------------------------------------- - CPYO1TOES11: - ld c, 6Ch ; 'l' - + ld c, 6Ch page0_2A1D: jr page0_29AC -; --------------------------------------------------------------------------- - CPYO1TOES12: - ld c, 75h ; 'u' + ld c, 75h jr page0_2A1D -; --------------------------------------------------------------------------- - ld c, 7Eh ; '~' + +#ifndef DEVIATE_FROM_ORIGINAL_FILE + ld c, 7Eh jr page0_2A0D -; --------------------------------------------------------------------------- +#endif CPYO1TOES13: - ld c, 7Eh ; '~' + ld c, 7Eh jr page0_2A1D -; --------------------------------------------------------------------------- - CPYO1TOES14: - ld c, 87h ; 'ǧ + ld c, 87h jr page0_2A1D -; --------------------------------------------------------------------------- - Page0Call_2A2F: - ld c, 90h ; 'Ч + ld c, 90h jr page0_2A1D -; --------------------------------------------------------------------------- - ld c, 90h ; 'Ч - jr page0_29CE -; =============== S U B R O U T I N E ======================================= - +#ifndef DEVIATE_FROM_ORIGINAL_FILE + ld c, 90h + jr page0_29CE +#endif -BCALL: - push hl +BCALL: push hl push hl push hl push af @@ -561,34 +428,27 @@ bit 6, h jr z, page0_2A73 res 6, h - ld a, 7Bh ; '{' + ld a, 7Bh jr page0_2A88 -; --------------------------------------------------------------------------- - page0_2A6D: res 7, h - ld a, 7Fh ; '' + ld a, 7Fh jr page0_2A88 -; --------------------------------------------------------------------------- - page0_2A73: ld de, 8230h in a, (6) - and 7Fh ; '' - cp 20h ; ' ' + and 7Fh + cp 20h jr c, page0_2A81 ld de, 9C06h - page0_2A81: add a, e ld e, a jr nc, page0_2A86 inc d - page0_2A86: ld a, (de) ld b, a - page0_2A88: call sub_249F ld de, 4000h @@ -611,14 +471,11 @@ neg add a, b jr page0_2AAB -; --------------------------------------------------------------------------- - page0_2AA6: ld a, (de) or a jr nz, page0_2AAB ld a, c - page0_2AAB: call sub_249F pop hl @@ -626,13 +483,8 @@ pop bc pop af ret -; End of function BCALL -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR sub_38 - -DoBJUMP: - ex (sp), hl +DoBJUMP:ex (sp), hl push af push bc push de @@ -647,34 +499,27 @@ bit 6, d jr z, page0_2AD3 res 6, d - ld a, 7Bh ; '{' + ld a, 7Bh jr page0_2AE8 -; --------------------------------------------------------------------------- - page0_2ACD: res 7, d - ld a, 7Fh ; '' + ld a, 7Fh jr page0_2AE8 -; --------------------------------------------------------------------------- - page0_2AD3: ld hl, 8230h in a, (6) - and 7Fh ; '' - cp 20h ; ' ' + and 7Fh + cp 20h jr c, page0_2AE1 ld hl, 9C06h - page0_2AE1: add a, l ld l, a jr nc, page0_2AE6 inc h - page0_2AE6: ld a, (hl) ld b, a - page0_2AE8: call sub_249F ld hl, 4000h @@ -688,12 +533,10 @@ ld a, (hl) jr z, page0_2AFA neg - page0_2AFA: add a, b jr nz, page0_2AFE ld a, c - page0_2AFE: call sub_249F ex de, hl @@ -702,13 +545,8 @@ pop af ex (sp), hl ret -; END OF FUNCTION CHUNK FOR sub_38 - -; =============== S U B R O U T I N E ======================================= - sNameEq: - push hl push hl push af @@ -735,21 +573,16 @@ inc de ld (hl), a in a, (2) - and 80h ; '' + and 80h ld a, (de) jr nz, page0_2B2E and 1Fh - page0_2B2E: out (6), a pop hl pop de pop af ret -; End of function sNameEq - -; --------------------------------------------------------------------------- - sUnderScr: ex (sp), hl push af @@ -759,12 +592,7 @@ pop hl ret -; =============== S U B R O U T I N E ======================================= - - -sFAIL: - - ex (sp), hl +sFAIL: ex (sp), hl push af push de ld e, (hl) @@ -772,11 +600,10 @@ ld d, (hl) inc hl in a, (2) - and 80h ; '' + and 80h ld a, (hl) jr nz, page0_2B4C and 1Fh - page0_2B4C: out (6), a ex de, hl @@ -784,4 +611,3 @@ pop af ex (sp), hl ret -; End of function sFAIL diff -r adad2f097dcb -r 486c42a314bc source/page00/system.asm --- a/source/page00/system.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page00/system.asm Thu May 22 01:29:08 2014 -0400 @@ -45,7 +45,7 @@ or a jr nz, {++} ;ON was pressed; now what? - bit appWantIntrpt, (iy+appFlags) + bit appWantDoIntrpt, (iy+appFlags) jr nz, {+} res onInterrupt, (iy+onFlags) jr jpCoorMon diff -r adad2f097dcb -r 486c42a314bc source/page01/initial.asm --- a/source/page01/initial.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page01/initial.asm Thu May 22 01:29:08 2014 -0400 @@ -2243,7 +2243,7 @@ aD9_12_TestLParen: .db 0D4h ; � .db 8 - .asc 0D9h,12h,'-Test(' + .asc 0D9h,12h,'-Test(' a2SampDATest: .db 0D5h ; � .db 0Ch @@ -5929,7 +5929,7 @@ call VPutS ld de, 80A0h call p01sub_657F - ld hl, 8479h + ld hl, OP1+1 call VPutS ld a, 2Dh ; '-' ld (OP1), a diff -r adad2f097dcb -r 486c42a314bc source/page02/initial.asm --- a/source/page02/initial.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page02/initial.asm Thu May 22 01:29:08 2014 -0400 @@ -477,7 +477,7 @@ inc a ld (OP6+1), a call GETM1TOOP1 - call BCALL_4120 + call OP3ToOP2 call AbsO1O2Cp jr c, p02loc_41D2 jr z, p02loc_41D2 @@ -1033,7 +1033,7 @@ jp z, Trunc cp 8 jp c, frac - jp z, BCALL_405D + jp z, DoInt cp 0Ah jp z, FPSquare ld a, (OP6+4+1) @@ -1167,7 +1167,7 @@ p02loc_453E: ; UnOPExec2+431j - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt call j_ConvOP1 ld hl, 0FFh or a @@ -1317,7 +1317,7 @@ p02loc_4614: rst 8 call GETM1TOOP1 - call BCALL_405A + call FPAdd_AbsoluteValues ld a, (OP6) cp 1 jr nz, p02loc_4631 @@ -2220,7 +2220,7 @@ p02loc_4AD3: p02sub_4AD3: - call CKPosInt + call CKPosDoInt jr z, p02loc_4ADB p02loc_4AD8: @@ -2231,7 +2231,7 @@ call ckop2pos jr nz, p02loc_4AD8 ld hl, 8484h - call CKInt + call CKDoInt jr nz, p02loc_4AD8 call page0_1713 jr nc, p02loc_4AD8 @@ -2255,7 +2255,7 @@ call FPMult call OP2ToOP3 ld hl, page0_FC3 - call page0_BEC + call FPAdd_FromHL call Trunc rst 8 call OP3ToOP1 @@ -2278,7 +2278,7 @@ ; START OF FUNCTION CHUNK FOR UnOPExec2 ToFrac: - call page0_14E1 + call CKOP1DoInt jr z, p02loc_4B43 ld a, (OP1+1) cp 84h ; '�' @@ -2319,7 +2319,7 @@ call OP4ToOP2 call FPMult ld hl, 8610h - call page0_BEC + call FPAdd_FromHL ld a, (OP1+1) cp 84h ; '�' jr nc, p02loc_4BE6 @@ -2330,7 +2330,7 @@ call OP4ToOP2 call FPMult ld hl, 8619h - call page0_BEC + call FPAdd_FromHL call OP1ExOP5 ld de, 8619h call MovFrOP1 @@ -2359,7 +2359,7 @@ call fpdiv call InvOP1S ld hl, userMenuSA - call page0_BEC + call FPAdd_FromHL call OP2Set1 pop af ld (OP2+1), a @@ -2829,13 +2829,13 @@ p02sub_4ECE: - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt call ckop2pos jr nz, p02loc_4EE2 call OP1ToOP5 call OP2ToOP4 ld hl, 8484h - call CKInt + call CKDoInt p02loc_4EE2: jp nz, ErrDomain @@ -2882,7 +2882,7 @@ call OP5ToOP1 call Minus1 call OP1ToOP5 - call BCALL_4120 + call OP3ToOP2 call FPMult pop af @@ -2901,12 +2901,12 @@ p02loc_4F53: p02sub_4F53: - call page0_14E1 + call CKOP1DoInt p02loc_4F56: jp nz, ErrDomain call OP1ExOP2 - call page0_14E1 + call CKOP1DoInt jr nz, p02loc_4F56 call cpop1op2 call c, OP1ExOP2 @@ -2917,7 +2917,7 @@ call j_Random call PopRealO2 call FPMult - call BCALL_405D + call DoInt call PopRealO2 rst 30h ret @@ -3085,7 +3085,7 @@ pop af and 80h ; '�' ld (OP1), a - ld hl, 8479h + ld hl, OP1+1 ld d, (hl) pop af ld (hl), a @@ -4120,7 +4120,7 @@ p02sub_5604: and 0Fh jr nz, p02loc_55A3 - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt ld a, (OP1+1) cp 81h ; '�' ccf @@ -4401,7 +4401,7 @@ p02loc_5787: call p02sub_5A0F - call BCALL_4120 + call OP3ToOP2 p02loc_578D: call GETM1TOOP1 @@ -4504,7 +4504,7 @@ call nz, GetLToOP1 call CkOP1Pos jp nz, ErrStat - call page0_14E1 + call CKOP1DoInt jr z, p02loc_5818 set 1, (iy+0) @@ -4642,7 +4642,7 @@ inc hl ld (hl), 19h call FPMult - call BCALL_405D + call DoInt call OP2Set1 ld a, 90h ; '�' ld (OP2M), a @@ -5310,7 +5310,7 @@ cp 0B1h ; '�' jr nz, p02loc_5C40 pop af - jp z, BCALL_405D + jp z, DoInt cp 0Ch jp z, CplxFloor ld d, 8 @@ -6255,7 +6255,7 @@ p02sub_6136: ; BinOPExec2:p02loc_6100p call EOP1NotReal - call PosNo0Int + call PosNo0DoInt jp nz, ErrDomain call j_ConvOP1 ret @@ -6345,7 +6345,7 @@ ; START OF FUNCTION CHUNK FOR UnOPExec2 p02loc_619B: - call PosNo0Int + call PosNo0DoInt jp nz, ErrDomain call j_ConvOP1 ex de, hl @@ -6432,7 +6432,7 @@ p02loc_621B: cp 0DDh ; '�' jp nz, p02loc_62A5 - call page0_14D1 + call RealPosNo0DoInt jp nz, ErrDomain call j_ConvOP1 jp c, ErrDimension @@ -6574,7 +6574,7 @@ ; --------------------------------------------------------------------------- p02loc_62EC: - call page0_14D1 + call RealPosNo0DoInt p02loc_62EF: jp nz, ErrDomain @@ -6582,7 +6582,7 @@ jp c, ErrDimension push de call popOP1 - call page0_14D1 + call RealPosNo0DoInt jr nz, p02loc_62EF call j_ConvOP1 push de @@ -6978,7 +6978,7 @@ p02sub_6520: ; BinOPExec2+839p ... - call page0_14D1 + call RealPosNo0DoInt jr nz, p02loc_6531 ld a, (OP1+1) cp 82h ; '�' @@ -7161,7 +7161,7 @@ ld (OP1+1), a call Round pop bc - ld hl, 8479h + ld hl, OP1+1 ld a, (hl) ld (hl), b cp 80h ; '�' @@ -7228,7 +7228,7 @@ p02loc_663A: call EOP1NotReal - call page0_14E1 + call CKOP1DoInt jp nz, ErrInvalid ld hl, nMin call Mov9OP2Cp @@ -7457,7 +7457,7 @@ p02sub_67D4: call EOP1NotReal - jp ErrD_OP1NotPosInt + jp ErrD_OP1NotPosDoInt ; End of function p02sub_67D4 ; --------------------------------------------------------------------------- @@ -7664,7 +7664,7 @@ p02loc_692D: call EOP1NotReal - call CKPosInt + call CKPosDoInt jp nz, ErrInvalid call CkOP1FP0 jp nz, ErrInvalid @@ -7907,7 +7907,7 @@ call OP1ToOP3 call PopRealO1 rst 30h - call BCALL_4120 + call OP3ToOP2 jr p02loc_6AFE ; End of function CSub @@ -7970,7 +7970,7 @@ call CpyTo2FPST call FPSub call CpyO1ToFPST - call BCALL_4120 + call OP3ToOP2 call CpyTo1FPS2 call FPMult call CpyO1ToFPS2 @@ -8243,7 +8243,7 @@ CplxMult: call OP2ToOP4 - call BCALL_4120 + call OP3ToOP2 call FPMult call OP1ExOP4 call FPMult @@ -8264,7 +8264,7 @@ call OP2ToOP4 - call BCALL_4120 + call OP3ToOP2 call fpdiv call OP1ExOP4 call fpdiv @@ -8296,9 +8296,9 @@ CplxFloor: call OP2ToOP4 - call BCALL_405D + call DoInt call OP1ExOP4 - call BCALL_405D + call DoInt rst 8 call OP4ToOP1 @@ -8385,7 +8385,7 @@ call CkOP1FP0 ret z call ZeroOP3 - ld hl, 8479h + ld hl, OP1+1 ld a, (hl) rra ld (OP3+1), a @@ -8442,7 +8442,7 @@ ld de, 8480h or a call ADD16D - ld hl, 8479h + ld hl, OP1+1 call page0_12EF rld push bc @@ -8591,7 +8591,7 @@ p02loc_6E8E: call ZeroOP2 ld (OP3), a - call page0_1518 + call IsOP1One jp z, p02loc_6F01 p02loc_6E9A: @@ -8607,7 +8607,7 @@ call SRDO1 call page0_13B5 jp nc, p02loc_6E9F - call page0_151C + call IsOP1Zero jr z, p02loc_6EFC call page0_142A ld hl, OP3 @@ -8819,7 +8819,7 @@ ld a, (OP1+1) cpl ld (OP1+1), a - call page0_151C + call IsOP1Zero jr nz, p02loc_6FDF call INCO1EXP jr p02loc_6FE7 @@ -9502,7 +9502,7 @@ dec c jp p, p02loc_7298 call page0_140C - ld hl, 8479h + ld hl, OP1+1 ld a, b cp (hl) jr z, p02loc_72B2 @@ -10143,7 +10143,7 @@ jr nz, p02loc_7620 call CkOP1FP0 jr z, p02loc_7623 - call page0_1518 + call IsOP1One p02loc_7620: jp nz, ErrDomain @@ -10603,7 +10603,7 @@ call OP1ToOP3 call OP5ToOP1 call Minus1 - call BCALL_4120 + call OP3ToOP2 call FPMult p02loc_78AF: @@ -10666,7 +10666,7 @@ jr c, p02loc_78F3 cp 80h ; '�' jr nz, p02loc_78F7 - call page0_1518 + call IsOP1One jr nz, p02loc_78F7 p02loc_78F3: @@ -10991,7 +10991,7 @@ ld a, (OP1+1) cp 80h ; '�' jp nz, ErrDomain - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt ld b, 4 pop af jr nz, p02loc_7B1C diff -r adad2f097dcb -r 486c42a314bc source/page03/initial.asm --- a/source/page03/initial.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page03/initial.asm Thu May 22 01:29:08 2014 -0400 @@ -2065,7 +2065,7 @@ dec hl p03loc_4B48: - ld de, 8479h + ld de, OP1+1 jr p03loc_4B5E ; --------------------------------------------------------------------------- @@ -2080,7 +2080,7 @@ dec hl ld b, (hl) inc b - ld de, 8479h + ld de, OP1+1 p03loc_4B5E: ld a, (hl) @@ -5913,7 +5913,7 @@ pop af call nc, FPMult pop hl - call page0_BEC + call FPAdd_FromHL ld hl, OP1 call j_XYRND ret @@ -6058,12 +6058,12 @@ p03loc_5DB3: ld d, 0Ch call Page0Call_39C9 - ld hl, 8479h - call CKInt + ld hl, OP1+1 + call CKDoInt jp nz, j_BCALL_4EAF p03loc_5DC1: - ld hl, 8479h + ld hl, OP1+1 call CKOdd jr nz, p03loc_5DD2 bit 2, (iy+1Eh) @@ -6095,7 +6095,7 @@ bit 7, (hl) jr nz, p03loc_5E1D inc hl - call CKInt + call CKDoInt jr nz, p03loc_5E1D ld a, (OP2+1) cp 80h ; '�' @@ -6802,7 +6802,7 @@ res 7, (hl) call FPMult ld hl, Xmin - jp page0_BEC + jp FPAdd_FromHL ; End of function p03sub_62BC ; --------------------------------------------------------------------------- @@ -7483,11 +7483,11 @@ p03sub_6692: - ld de, 8479h + ld de, OP1+1 ld a, 5Dh ; ']' ld (de), a inc de - call page0_118B + call Mov5B ex de, hl ld (hl), 0 ret @@ -7696,7 +7696,7 @@ call CMPPRGNAMLEN ld c, a dec c - ld hl, 8479h + ld hl, OP1+1 ld a, (OP1M) cp 6 jr nc, p03loc_67EB @@ -9330,7 +9330,7 @@ p03loc_7174: ld de, nameBuff - call page0_118B + call Mov5B call CancelAlpha call Page03_37A7 ld bc, 2 @@ -9593,7 +9593,7 @@ jr nz, p03loc_7308 p03loc_7301: - ld hl, 8479h + ld hl, OP1+1 call j_RstrSomeFlags ret ; --------------------------------------------------------------------------- @@ -9766,7 +9766,7 @@ bit 6, (iy+1Ch) jr nz, p03loc_7426 ld hl, nameBuff - ld de, 8479h + ld de, OP1+1 ld bc, 5 ldir ld a, 1 diff -r adad2f097dcb -r 486c42a314bc source/page04/initial.asm --- a/source/page04/initial.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page04/initial.asm Thu May 22 01:29:08 2014 -0400 @@ -951,7 +951,7 @@ call FPMult call j_RndGuard pop hl - call page0_BEC + call FPAdd_FromHL call CkValidNum pop de jp MovFrOP1 @@ -2345,8 +2345,8 @@ ld l, 63h ; 'c' ld (OP1+1), hl pop de - ld hl, 8479h - call page0_1189 + ld hl, OP1+1 + call Mov6B ld a, (hl) call p04sub_4D45 push de @@ -2613,7 +2613,7 @@ call j_RclX call OP1ToOP5 call j_RclY - call ZmInt + call ZmDoInt jp p04loc_4DB0 ; --------------------------------------------------------------------------- @@ -2915,7 +2915,7 @@ ld a, 1Fh call j_RclSysTok ld hl, PlotStart - call page0_BEC + call FPAdd_FromHL jp Minus1 ; End of function p04sub_501E @@ -3487,7 +3487,7 @@ p04loc_53FF: push bc - call BCALL_4120 + call OP3ToOP2 call cpop1op2 pop bc jr z, p04loc_5417 @@ -4597,7 +4597,7 @@ jr z, p04loc_5B1F bit webMode, (iy+seqFlags) jr z, p04loc_5B12 - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt ld hl, nMin call Mov9ToOP2 jr p04loc_5B1A @@ -4663,7 +4663,7 @@ call IsRecursiveMode jr z, p04loc_5B7F p04loc_5B68: - call page0_14E1 + call CKOP1DoInt jp nz, ErrDomain rst 18h call RECURNNAME @@ -5011,12 +5011,12 @@ XYCENT: ld hl, Xmin rst 20h - call page0_BEC + call FPAdd_FromHL call TimesPt5 call OP1ToOP5 ld hl, Ymin rst 20h - call page0_BEC + call FPAdd_FromHL jp TimesPt5 ; --------------------------------------------------------------------------- @@ -5075,7 +5075,7 @@ push bc ld de, OP2 call mov9B2 - call page0_117C + call Mov11B_ToOP1 call FPSub call CkOP1Pos jp nz, Page0Call_2509 @@ -5215,7 +5215,7 @@ ; =============== S U B R O U T I N E ======================================= -ZmInt: +ZmDoInt: call COPYRNG call int @@ -5248,7 +5248,7 @@ pop af call j_SetXXOP2 rst 30h -; End of function ZmInt +; End of function ZmDoInt ; =============== S U B R O U T I N E ======================================= @@ -6886,7 +6886,7 @@ cp 8Bh ; '�' jp z, ZmSquare cp 8Ch ; '�' - jp z, ZmInt + jp z, ZmDoInt cp 8Dh ; '�' jp z, ZmPrev cp 8Eh ; '�' @@ -6903,7 +6903,7 @@ p04sub_6786: - ld hl, 8479h + ld hl, OP1+1 inc (hl) rst 10h call nc, DelVar @@ -7958,7 +7958,7 @@ call OP1ToOP4 call j_RclN ld hl, PlotStep - call page0_BEC + call FPAdd_FromHL call OP1ToOP3 rst 8 ld hl, nMax @@ -9169,7 +9169,7 @@ Ceiling: call InvOP1S - call BCALL_405D + call DoInt jp InvOP1S ; End of function Ceiling @@ -10407,7 +10407,7 @@ p04sub_7BC8: push af call PopRealO1 - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt ld a, (OP1+1) cp 83h ; '�' jr nc, p04loc_7BE1 @@ -10447,7 +10447,7 @@ call FPMult call CpyTo3FPST call CpyO2ToFPST - call BCALL_4120 + call OP3ToOP2 call InvSub p04loc_7C13: @@ -10647,7 +10647,7 @@ p04sub_7D7F: call PopRealO1 - call page0_14D1 + call RealPosNo0DoInt jp nz, ErrDomain call GETEXP cp 81h ; '�' diff -r adad2f097dcb -r 486c42a314bc source/page05/initial.asm --- a/source/page05/initial.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page05/initial.asm Thu May 22 01:29:08 2014 -0400 @@ -827,7 +827,7 @@ ld (editTail), hl call parseEditBuf call page0_1847 - call page0_14D1 + call RealPosNo0DoInt jp nz, ErrDimension call j_ConvOP1 sub a @@ -1767,7 +1767,7 @@ p05loc_4983: ; Page05_3435+35j ld hl, nameBuff - ld de, 8479h + ld de, OP1+1 call Mov8B ld hl, (editCursor) ld de, nameBuff @@ -3228,7 +3228,7 @@ Page05_322B: ld hl, nameBuff ld de, OP2 - call page0_118B + call Mov5B ld hl, 0 xor a bit grfSplit, (iy+sGrFlags) @@ -3250,7 +3250,7 @@ jr nz, p05loc_51FA ld de, nameBuff ld hl, OP2 - call page0_118B + call Mov5B ret ; End of function Page05_322B @@ -5823,7 +5823,7 @@ call PushRealO2 bit grfRecurM, (iy+grfModeFlags) jr z, p05loc_5F87 - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt call OP1ToOP3 ld hl, nMin call Mov9OP2Cp @@ -6078,7 +6078,7 @@ jp z, p05loc_616A bit grfRecurM, (iy+grfModeFlags) jr z, p05loc_60D6 - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt call OP1ToOP3 ld hl, nMin call Mov9OP2Cp @@ -8147,7 +8147,7 @@ ret z call EOP1NotReal bit grfRecurM, (iy+grfModeFlags) - call nz, ErrD_OP1NotPosInt + call nz, ErrD_OP1NotPosDoInt call p05sub_6077 call p05sub_607D ex de, hl @@ -9731,7 +9731,7 @@ ; --------------------------------------------------------------------------- p05loc_74A6: - call page0_118B + call Mov5B p05loc_74A9: ; NameToBuf+16j @@ -10040,7 +10040,7 @@ ret ; --------------------------------------------------------------------------- ld de, nameBuff - call page0_118B + call Mov5B ex de, hl ld (hl), 0 ld hl, nameBuff diff -r adad2f097dcb -r 486c42a314bc source/page06/initial.asm --- a/source/page06/initial.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page06/initial.asm Thu May 22 01:29:08 2014 -0400 @@ -76,7 +76,7 @@ p06loc_408A: call CursorDown ld hl, nameBuff - ld de, 8479h + ld de, OP1+1 call Mov11B call p06sub_4080 ret z @@ -168,7 +168,7 @@ ld (curRow), hl call DisplayColonChar call j_nameToOP1 - ld hl, 8479h + ld hl, OP1+1 call j_PutPS call j_HomeUp call DisplayColonChar @@ -2669,7 +2669,7 @@ call CPYTO1ES9 call CPYTO2ES10 call FPSub - call BCALL_4120 + call OP3ToOP2 call FPMult call OP1ToOP6 call FPMult @@ -2681,7 +2681,7 @@ call CPYTO1ES9 call CPYTO2ES11 call FPSub - call BCALL_4120 + call OP3ToOP2 call FPMult call OP1ToOP4 call FPMult @@ -5970,7 +5970,7 @@ ld hl, lower rst 20h ld hl, upper - call page0_BEC + call FPAdd_FromHL call TimesPt5 ld de, (editDat) ld hl, OP1 @@ -6540,7 +6540,7 @@ call j_varnameToOP1hl sub a ld (de), a - ld hl, 8479h + ld hl, OP1+1 ld a, (hl) cp 62h ; 'b' jr z, p06loc_66AF @@ -10751,7 +10751,7 @@ p06sub_7E6C: ; SetNorm_Vals+3j ld de, YOffset - jp page0_118B + jp Mov5B ; End of function p06sub_7E6C ; --------------------------------------------------------------------------- diff -r adad2f097dcb -r 486c42a314bc source/page07/initial.asm --- a/source/page07/initial.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page07/initial.asm Thu May 22 01:29:08 2014 -0400 @@ -5026,7 +5026,7 @@ ld a, c bit 2, (iy+2Ah) jr z, p07loc_557B - ld hl, 8479h + ld hl, OP1+1 cp (hl) jr z, p07loc_5580 inc a @@ -5132,7 +5132,7 @@ ld (OP1), a pop de ld hl, OP1 - call page0_118B + call Mov5B push de ld hl, 970Eh inc (hl) @@ -5686,7 +5686,7 @@ inc hl p07loc_58FF: - ld de, 8479h + ld de, OP1+1 ld b, c p07loc_5903: @@ -5743,7 +5743,7 @@ inc hl p07loc_594F: - ld de, 8479h + ld de, OP1+1 ldir xor a ld b, 7 @@ -6018,7 +6018,7 @@ sub a ld (hl), a ld hl, nameBuff - ld de, 8479h + ld de, OP1+1 call Mov11B ld hl, (editCursor) ld de, nameBuff @@ -6293,7 +6293,7 @@ ld a, (mcxCurApp) cp 46h ; 'F' jr nz, p07loc_5D11 - ld hl, 8479h + ld hl, OP1+1 rst 20h call FINDPROGSYM jr c, p07loc_5CDA @@ -8536,7 +8536,7 @@ jr nz, p07loc_68F1 call CkOP1FP0 jr z, p07loc_68EE - ld hl, 8479h + ld hl, OP1+1 ld a, (OP6+7) sub (hl) jr c, p07loc_68F1 @@ -9671,7 +9671,7 @@ p07sub_7156: - ld hl, 8479h + ld hl, OP1+1 ld b, (ix+0) p07loc_715C: @@ -9710,12 +9710,12 @@ p07loc_7185: cp 1Fh jr nz, p07loc_7198 - call PosNo0Int + call PosNo0DoInt jp nz, ErrDomain call CpyTo1FPS1 p07loc_7192: - call PosNo0Int + call PosNo0DoInt jp nz, ErrDomain p07loc_7198: @@ -10108,7 +10108,7 @@ p07loc_7427: ld (OP1), a - ld hl, 8479h + ld hl, OP1+1 ld (hl), 0FEh ; '�' p07loc_742F: @@ -10135,7 +10135,7 @@ ret c ld (OP1), a push hl - ld hl, 8479h + ld hl, OP1+1 ld (hl), 0FEh ; '�' pop hl ret nz @@ -10400,7 +10400,7 @@ ret c ld (OP1), a push hl - ld hl, 8479h + ld hl, OP1+1 ld (hl), 0FEh ; '�' pop hl ret nz @@ -10859,7 +10859,7 @@ dec (hl) ld a, 2Ah ; '*' call j_PutC - ld hl, 8479h + ld hl, OP1+1 call j_PutS call j_EraseEOL ld a, (mcxCurApp) @@ -11856,7 +11856,7 @@ ld bc, 8 p07loc_7C85: - ld de, 8479h + ld de, OP1+1 ld a, 1 rst 28h ; --------------------------------------------------------------------------- diff -r adad2f097dcb -r 486c42a314bc source/page78/initial.asm --- a/source/page78/initial.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page78/initial.asm Thu May 22 01:29:08 2014 -0400 @@ -1802,12 +1802,12 @@ call popErrorHandleR ld hl, OP1M push hl - call page0_118B + call Mov5B push de call CpyTo1FPS2 pop de pop hl - call page0_118B + call Mov5B call SetTblGraphDraw ld bc, 24h ; '$' call FPOPFPS @@ -1950,10 +1950,10 @@ call p78sub_538F call p78sub_53C8 ld hl, OP1M - call page0_118B + call Mov5B call p78sub_53C8 ld hl, OP1M - call page0_118B + call Mov5B p78loc_4C59: call p78sub_53B4 @@ -2004,7 +2004,7 @@ call p78sub_538F call p78sub_53C8 ld hl, OP1M - call page0_118B + call Mov5B call p78sub_53B4 call INCFETCH cp 58h ; 'X' @@ -2031,7 +2031,7 @@ call p78sub_538F call p78sub_53C8 ld hl, OP1M - call page0_118B + call Mov5B call p78sub_53B4 call CKENDLIN cp 82h ; '�' @@ -2059,7 +2059,7 @@ call p78loc_49F9 pop de ld hl, OP1M - call page0_118B + call Mov5B p78loc_4D07: ld a, (OP2) @@ -2532,7 +2532,7 @@ ld a, (OP1+1) cp 82h ; '�' jp nc, ErrDomain - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt call ConvOP1 ret ; End of function p78sub_4FF4 @@ -3126,13 +3126,13 @@ ex de, hl call ZeroOP1 ld hl, OP1M - call page0_118B + call Mov5B ld hl, OP1M ld (hl), 1 - call page0_118B + call Mov5B ld hl, OP1M ld (hl), 31h ; '1' - call page0_118B + call Mov5B ex de, hl ld (hl), 1 pop de @@ -3370,7 +3370,7 @@ pop de inc hl inc hl - call page0_118B + call Mov5B inc hl inc hl pop bc @@ -4760,7 +4760,7 @@ pop af ld hl, (nextParseByte) ld de, OP1 - call page0_118B + call Mov5B dec hl ld (nextParseByte), hl ld hl, (OP1+1) @@ -5381,7 +5381,7 @@ p78sub_6128: - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt call EOP1NotReal call RECURNNAME call StoOther @@ -5534,7 +5534,7 @@ jp c, p78loc_62DB call PopRealO1 call j_RndGuard - call CKPosInt + call CKPosDoInt jr z, p78loc_622D jr p78loc_6235 ; --------------------------------------------------------------------------- @@ -5687,7 +5687,7 @@ jr nc, p78loc_62D3 push af call ErrD_OP1_LE_0 - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt pop af cp 30h ; '0' jr nz, p78sub_6297 @@ -5707,7 +5707,7 @@ p78loc_62DB: call j_RndGuard - call page0_14D1 + call RealPosNo0DoInt jp nz, ErrDomain jr p78sub_6297 ; --------------------------------------------------------------------------- @@ -5716,7 +5716,7 @@ cp 38h ; '8' jr nc, p78sub_6297 call j_RndGuard - call page0_14D1 + call RealPosNo0DoInt jp nz, ErrDomain ld a, (OP1+1) cp 81h ; '�' @@ -8561,7 +8561,7 @@ cp 5Dh ; ']' jr nz, p78loc_7115 call page0_FB5 - call CKPosInt + call CKPosDoInt jp nz, ErrDimension ld hl, 3E7h call p78sub_71E1 @@ -8630,7 +8630,7 @@ ConvDim00: push hl - call page0_14D1 + call RealPosNo0DoInt jr nz, p78loc_71F5 p78loc_71ED: @@ -8653,7 +8653,7 @@ ld a, (OP1M) or a call z, OP1Set0 - ld hl, 8479h + ld hl, OP1+1 ld a, 83h ; '�' sub (hl) jr c, p78loc_71F5 @@ -9866,7 +9866,7 @@ pop de cp e jr nz, p78loc_77FD - ld hl, 8479h + ld hl, OP1+1 ld d, (hl) inc hl ld e, (hl) @@ -10958,7 +10958,7 @@ ; End of function Page78_2D81 ; --------------------------------------------------------------------------- - ld hl, 8479h + ld hl, OP1+1 ld b, 0 ld c, (hl) inc hl diff -r adad2f097dcb -r 486c42a314bc source/page79/initial.asm --- a/source/page79/initial.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page79/initial.asm Thu May 22 01:29:08 2014 -0400 @@ -29,7 +29,7 @@ call CkOP1Real jp nz, ErrDataType call OP1ToOP6 - ld hl, 8479h + ld hl, OP1+1 ld a, 88h ; '�' cp (hl) jr nc, p79loc_404F @@ -94,7 +94,7 @@ ret z p79loc_40BE: - jp page0_BEC + jp FPAdd_FromHL ; End of function p79sub_4077 @@ -246,7 +246,7 @@ jp nz, ErrDomain ld hl, p79loc_4184 rst 20h - call BCALL_4120 + call OP3ToOP2 call FPMult ret p79loc_4184: @@ -624,7 +624,7 @@ cp 6 jr nc, p79loc_44E6 ld (hl), a - call page0_118B + call Mov5B inc a jr p79loc_44D8 ; --------------------------------------------------------------------------- @@ -834,7 +834,7 @@ call CpyTo3FPST call CpyO1ToFPST call OP2ToOP1 - call BCALL_4120 + call OP3ToOP2 p79loc_46A6: call p79sub_4E86 @@ -1907,7 +1907,7 @@ call CPYTO2ES10 call cpop1op2 ret c - call BCALL_4120 + call OP3ToOP2 call CPYTO1ES9 call cpop1op2 ret c @@ -1943,7 +1943,7 @@ call OP1ToOP3 call CPYTO2ES10 call p79sub_4E08 - call BCALL_4120 + call OP3ToOP2 call CPYTO1ES9 ; End of function p79sub_4DF9 @@ -5451,7 +5451,7 @@ inc (hl) p79loc_6039: - ld hl, 8479h + ld hl, OP1+1 ld a, (MenuCurrent) cp 10h jr nz, p79loc_6044 @@ -7597,7 +7597,7 @@ ld a, d call j_ConvKeyToTok call ZeroOP1 - ld hl, 8479h + ld hl, OP1+1 ld (hl), d inc hl ld (hl), e @@ -7878,7 +7878,7 @@ ld hl, 1 ld (curRow), hl call p79sub_7282 - ld hl, 8479h + ld hl, OP1+1 ld b, 8 p79loc_6A93: @@ -7942,7 +7942,7 @@ pop bc p79loc_6AF7: - ld de, 8479h + ld de, OP1+1 p79loc_6AFA: ld a, (arcPage) @@ -8637,7 +8637,7 @@ call j_PutS call j_newline call CpyTo1FPST - ld hl, 8479h + ld hl, OP1+1 ld b, 8 p79loc_7048: @@ -9400,7 +9400,7 @@ p79loc_74BC: call OP2Set1 call j_RndGuard - call page0_14E1 + call CKOP1DoInt ret z ld a, (OP1+1) cp 84h ; '�' @@ -9551,7 +9551,7 @@ p79sub_75DE: ; p79sub_760A+2Fp ... - ld hl, 8479h + ld hl, OP1+1 inc (hl) inc (hl) ret @@ -9613,7 +9613,7 @@ call OP4ToOP2 call InvSub call p79sub_75DE - call page0_14E1 + call CKOP1DoInt jr nz, p79loc_7607 ld a, 32h ; '2' call p79sub_7726 @@ -9649,7 +9649,7 @@ call OP1ToOP4 call OP2Set4 call fpdiv - call page0_14E1 + call CKOP1DoInt jr nz, p79loc_76AD call OP4ToOP1 call p79sub_771B @@ -9739,7 +9739,7 @@ ld a, 82h ; '�' ld (OP2+1), a call fpdiv - jp page0_14E1 + jp CKOP1DoInt ; End of function p79sub_771B @@ -9981,7 +9981,7 @@ ld hl, cal_PMT call Mov9ToOP2 call FPSub - call BCALL_4120 + call OP3ToOP2 call fpdiv ret ; --------------------------------------------------------------------------- @@ -10194,7 +10194,7 @@ p79sub_7AD2: ; p79sub_7AFD+18p call PopRealO1 - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt ld a, (OP1+1) cp 84h ; '�' jp nc, ErrDomain @@ -10651,7 +10651,7 @@ call CpyTo1FPS2 call CpyTo2FPS5 rst 30h - call BCALL_4120 + call OP3ToOP2 call fpdiv call OP4ToOP2 call InvSub diff -r adad2f097dcb -r 486c42a314bc source/page7A/initial.asm --- a/source/page7A/initial.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page7A/initial.asm Thu May 22 01:29:08 2014 -0400 @@ -319,7 +319,7 @@ call errd_op1notpos rst 18h call OP2ToOP1 - call page0_14E1 + call CKOP1DoInt jp nz, ErrDomain call CkOP1Pos jr z, p7Aloc_43DE @@ -397,7 +397,7 @@ call OP2Set1 call cpop1op2 jp c, OP1Set0 - call BCALL_405D + call DoInt rst 8 call OP5ToOP1 call j_YToX @@ -411,7 +411,7 @@ rst 18h call PushRealO5 call OP5ToOP1 - call page0_14E1 + call CKOP1DoInt jp nz, ErrDomain call CpyTo1FPS2 call CkOP1FP0 @@ -617,7 +617,7 @@ ; --------------------------------------------------------------------------- p7Aloc_4611: - call BCALL_405D + call DoInt call OP1ToOP3 call CpyTo2FPST call InvSub @@ -652,7 +652,7 @@ call p7Asub_46BF call OP1ToOP3 call CpyTo1FPS1 - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt pop af jr c, p7Aloc_465A ld a, (OP1+1) @@ -741,7 +741,7 @@ call p7Asub_46BF call OP1ToOP3 call OP5ToOP1 - call page0_14E1 + call CKOP1DoInt jp nz, ErrDomain call CpyTo1FPST call OP2Set1 @@ -922,7 +922,7 @@ jp nz, OP1Set0 rst 18h call OP2ToOP1 - call BCALL_405D + call DoInt call Plus1 call PopRealO2 jr p7Aloc_4849 @@ -1017,7 +1017,7 @@ call OP2Set2 rst 30h call CpyO1ToFPS2 - call BCALL_4120 + call OP3ToOP2 call p7Aloc_4A13 call fprecip call CpyO1ToFPS1 @@ -1147,7 +1147,7 @@ call OP1ToOP3 call CpyTo1FPST call Minus1 - call BCALL_4120 + call OP3ToOP2 call FPMult rst 18h call CpyTo1FPS1 @@ -1238,7 +1238,7 @@ p7Asub_4A87: ; p7Asub_462D:p7Aloc_463Ap ... - call PosNo0Int + call PosNo0DoInt ret z p7Aloc_4A8B: @@ -1656,7 +1656,7 @@ rst 30h call OP1ToOP5 call CpyTo1FPS6 - call BCALL_4120 + call OP3ToOP2 rst 30h call OP5ToOP2 call FPMult @@ -2959,7 +2959,7 @@ p7Asub_5450: - call BCALL_4120 + call OP3ToOP2 jp fpdiv ; End of function p7Asub_5450 @@ -3269,7 +3269,7 @@ p7Asub_55F8: call OP1ToOP3 call p7Asub_447A - call BCALL_4120 + call OP3ToOP2 call FPMult ret ; End of function p7Asub_55F8 @@ -3346,7 +3346,7 @@ p7Aloc_5682: push af - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt call cpop1op2 jr c, p7Aloc_568E jp nz, ErrDomain @@ -4076,7 +4076,7 @@ call OP1ToOP3 call CpyTo1FPS3 call Plus1 - call BCALL_4120 + call OP3ToOP2 call fpdiv call CpyO1ToFPS5 call OP1Set1 @@ -4109,7 +4109,7 @@ call CpyTo1FPST call cpop1op2 jr nc, p7Aloc_5BC4 - call BCALL_4120 + call OP3ToOP2 call CpyTo1FPS1 call FPSub call j_TenX @@ -4129,7 +4129,7 @@ ; --------------------------------------------------------------------------- p7Aloc_5BC4: - call BCALL_4120 + call OP3ToOP2 call CpyTo1FPS2 call FPSub call j_TenX @@ -4880,7 +4880,7 @@ call j_GETM1TOP1A pop hl bit 1, (hl) - call z, ErrD_OP1NotPosInt + call z, ErrD_OP1NotPosDoInt rst 30h rst 8 pop bc @@ -5062,7 +5062,7 @@ p7Aloc_6260: rst 20h - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt jr p7Aloc_6267 ; --------------------------------------------------------------------------- @@ -5094,7 +5094,7 @@ rst 18h ld hl, 8BBDh rst 20h - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt call ErrD_OP1_LE_0 ld hl, 8BD8h jr p7Aloc_6260 @@ -5129,7 +5129,7 @@ call cpop1op2 jp nc, ErrDomain call OP2ToOP1 - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt ret ; End of function p7Asub_62A7 @@ -5166,7 +5166,7 @@ p7Asub_62DA: ld hl, OP1M - jp page0_118B + jp Mov5B ; End of function p7Asub_62DA @@ -5245,7 +5245,7 @@ jr z, p7Aloc_6326 ld de, 8D2Ah ld hl, OP3M - call page0_118B + call Mov5B call PushRealO6 call j_SET2MVLPTRS jp nz, ErrDimMismatch @@ -5373,7 +5373,7 @@ call z, PushRealO6 ld hl, OP1M ld de, 8D2Ah - call page0_118B + call Mov5B call j_SETMAT1 call page0_1725 call z, PopRealO6 @@ -6070,7 +6070,7 @@ jp nc, ErrDimension call OP4ToOP1 call ErrD_OP1_LE_0 - call ErrD_OP1NotPosInt + call ErrD_OP1NotPosDoInt call OP2Set1 ld hl, 8484h ld (hl), 81h ; '�' @@ -6335,7 +6335,7 @@ call OP2ToOP3 call OP2ToOP1 call Minus1 - call BCALL_4120 + call OP3ToOP2 call FPMult call PopRealO2 call FPMult @@ -6829,7 +6829,7 @@ call OP4ToOP2 call cpop1op2 call c, OP3ToOP4 - call BCALL_4120 + call OP3ToOP2 call OP5ToOP1 call cpop1op2 call c, OP3ToOP5 @@ -7579,11 +7579,11 @@ p7Asub_740D: - ld de, 8479h + ld de, OP1+1 ld a, 5Dh ; ']' ld (de), a inc de - call page0_118B + call Mov5B ex de, hl ld (hl), 0 call FIND_E_UNDEF @@ -7826,7 +7826,7 @@ push hl ld hl, (OP6) push hl - call BCALL_405D + call DoInt rst 8 call CpyTo1FPS3 call cpop1op2 @@ -8173,7 +8173,7 @@ call CpyTo1FPST call Plus1 call TimesPt5 - call BCALL_405D + call DoInt call CpyTo2FPS1 call cpop1op2 jr nz, p7Aloc_77E6 @@ -8304,7 +8304,7 @@ call p7Asub_6EBC call CkOP1FP0 jr z, p7Aloc_78AA - call page0_14E1 + call CKOP1DoInt jr z, p7Aloc_7893 set 1, (iy+0) @@ -8324,7 +8324,7 @@ push bc push hl call j_PUT_INDEX_LST - call BCALL_4120 + call OP3ToOP2 rst 30h call OP1ToOP3 diff -r adad2f097dcb -r 486c42a314bc source/page7B/initial.asm --- a/source/page7B/initial.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page7B/initial.asm Thu May 22 01:29:08 2014 -0400 @@ -1234,7 +1234,7 @@ ; --------------------------------------------------------------------------- p7Bloc_56FC: - call BCALL_4120 + call OP3ToOP2 call cpop1op2 ret z jr nc, p7Bloc_56F8 @@ -5462,7 +5462,7 @@ push de ld hl, j_GetFirstInvalidAppPageToB ld de, 815Ah - call page0_118F + call Mov3B pop de pop hl pop bc @@ -6509,7 +6509,7 @@ dec (hl) ld hl, 811Ah ld de, 811Eh - call page0_118D + call Mov4B ld a, (unk_8101) call p7Bsub_74DA ld de, 811Ah @@ -6556,7 +6556,7 @@ inc (hl) ld de, 811Ah ld hl, 811Eh - call page0_118D + call Mov4B ld a, (unk_8101) inc a call p7Bsub_74DA diff -r adad2f097dcb -r 486c42a314bc source/page7B/jump_table.asm --- a/source/page7B/jump_table.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page7B/jump_table.asm Thu May 22 01:29:08 2014 -0400 @@ -30,8 +30,8 @@ .branch lcd_busy .branch Min .branch Max - .branch BCALL_405A - .branch BCALL_405D + .branch FPAdd_AbsoluteValues + .branch DoInt .branch Trunc .branch InvSub .branch Times2 @@ -96,7 +96,7 @@ .branch OP1ToOP4 .branch OP2ToOP4 .branch OP4ToOP2 - .branch BCALL_4120 + .branch OP3ToOP2 .branch OP1ToOP3 .branch OP5ToOP2 .branch OP5ToOP6 @@ -190,9 +190,9 @@ .branch CkOP1C0 .branch CkOP1FP0 .branch CkOP2FP0 - .branch PosNo0Int - .branch CKPosInt - .branch CKInt + .branch PosNo0DoInt + .branch CKPosDoInt + .branch CKDoInt .branch CKOdd .branch CKOP1M .branch GETCONOP1 @@ -243,7 +243,7 @@ .branch equ_or_newequ .branch errd_op1notpos .branch ErrD_OP1Not_R - .branch ErrD_OP1NotPosInt + .branch ErrD_OP1NotPosDoInt .branch ErrD_OP1_LE_0 .branch ErrD_OP1_0 .branch FINDSYM_GET_SIZE @@ -712,7 +712,7 @@ .branch SetSeqM .branch SetPolM .branch SetParM - .branch ZmInt + .branch ZmDoInt .branch ZmDecml .branch ZmPrev .branch ZmUsr diff -r adad2f097dcb -r 486c42a314bc source/page7C/initial.asm --- a/source/page7C/initial.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page7C/initial.asm Thu May 22 01:29:08 2014 -0400 @@ -1457,7 +1457,7 @@ ld (curRow), a ld a, 1 ld (curRow+1), a - ld hl, 8479h + ld hl, OP1+1 call j_PutS ld a, 14h ld (varClass), a @@ -1821,7 +1821,7 @@ jr c, p7Cloc_4ADA p7Cloc_4ACD: - ld hl, 8479h + ld hl, OP1+1 call page0_17B0 ld a, 0FEh ; '�' jr z, p7Cloc_4AD8 @@ -2886,7 +2886,7 @@ p7Cloc_51C4: ld b, 8 - ld de, 8479h + ld de, OP1+1 ld hl, 8680h p7Cloc_51CC: @@ -4694,7 +4694,7 @@ ; --------------------------------------------------------------------------- p7Cloc_5D1B: - ld hl, 8479h + ld hl, OP1+1 ld a, (hl) call Page0Call_2D93 jr c, p7Cloc_5CAD @@ -4733,7 +4733,7 @@ p7Cloc_5D5B: ld a, (OP2+1) - ld hl, 8479h + ld hl, OP1+1 cp (hl) jp nz, p7Cloc_5CAD rst 10h diff -r adad2f097dcb -r 486c42a314bc source/page7D/initial.asm --- a/source/page7D/initial.asm Tue May 20 03:43:41 2014 -0400 +++ b/source/page7D/initial.asm Thu May 22 01:29:08 2014 -0400 @@ -5343,7 +5343,7 @@ ; --------------------------------------------------------------------------- .dw 8054h ; --------------------------------------------------------------------------- - ld de, bigInteger1 + ld de, bigDoInteger1 ld b, 0 ld a, (unk_8291) ld c, a @@ -7425,7 +7425,7 @@ Page7D_2CAF: call Page0Call_2E65 ld hl, progToEdit - ld de, 8479h + ld de, OP1+1 call Mov8B xor a call FindApp @@ -9212,7 +9212,7 @@ ld bc, 3 p7Dloc_6C76: - ld de, 8479h + ld de, OP1+1 push hl ld a, (OP1) push af @@ -9309,7 +9309,7 @@ call Page7D_2CDF p7Dloc_6D21: - ld de, 8479h + ld de, OP1+1 p7Dloc_6D24: ld a, (arcPage) @@ -10750,7 +10750,7 @@ sub d ld (OP1+4), a ld bc, 4 - ld hl, 8479h + ld hl, OP1+1 call GetCertPage pop de rst 28h @@ -10854,7 +10854,7 @@ ; --------------------------------------------------------------------------- .dw 805Ah ; --------------------------------------------------------------------------- - ld de, 8479h + ld de, OP1+1 ldir ld a, (appSearchPage+1) push af @@ -11150,7 +11150,7 @@ ld (OP1), a ld bc, 8 ld hl, 8484h - ld de, 8479h + ld de, OP1+1 ldir pop af ret @@ -11982,7 +11982,7 @@ ; --------------------------------------------------------------------------- .dw 805Ah ; --------------------------------------------------------------------------- - ld de, 8479h + ld de, OP1+1 ldir ld hl, (appSearchPage) push hl @@ -12427,7 +12427,7 @@ ld (OP1+6), a ld (OP1+7), hl ld bc, 8 - ld hl, 8479h + ld hl, OP1+1 call GetCertPage pop de rst 28h diff -r adad2f097dcb -r 486c42a314bc source/ti83plus.inc --- a/source/ti83plus.inc Tue May 20 03:43:41 2014 -0400 +++ b/source/ti83plus.inc Thu May 22 01:29:08 2014 -0400 @@ -245,9 +245,9 @@ _CkOP1C0 equ 4225h _CkOP1FP0 equ 4228h _CkOP2FP0 equ 422Bh -_PosNo0Int equ 422Eh -_CKPosInt equ 4231h -_CKInt equ 4234h +_PosNo0DoInt equ 422Eh +_CKPosDoInt equ 4231h +_CKDoInt equ 4234h _CKOdd equ 4237h _CKOP1M equ 423Ah _GETCONOP1 equ 423Dh ;a=0 opX=57.29577951308232 (1 radian in degrees) @@ -303,7 +303,7 @@ _equ_or_newequ equ 42C4h _errd_op1notpos equ 42C7h _ErrD_OP1Not_R equ 42CAh -_ErrD_OP1NotPosInt equ 42CDh +_ErrD_OP1NotPosDoInt equ 42CDh _ErrD_OP1_LE_0 equ 42D0h _ErrD_OP1_0 equ 42D3h _FINDSYM_GET_SIZE equ 42D6h ;like findsym, but on output hl is the size of the variable @@ -772,7 +772,7 @@ _SetSeqM equ 4843h _SetPolM equ 4846h _SetParM equ 4849h -_ZmInt equ 484Ch +_ZmDoInt equ 484Ch _ZmDecml equ 484Fh _ZmPrev equ 4852h _ZmUsr equ 4855h @@ -1903,10 +1903,10 @@ SmallEditRow equ 8178h SmallEditColumnRight equ 8179h ;penCol left edge? equ 817Bh -bigInteger1 equ 8182h +bigDoInteger1 equ 8182h SmallEditCancelParse equ 8194h SmallEditRowCount equ 81B7h -bigInteger2 equ 81C3h +bigDoInteger2 equ 81C3h SmallEditPromptString equ 81CCh ramCodeEnd equ 822Fh baseAppBrTab equ 8230h ;table of base pages for apps on page < 20h (starts with eight zeroes because they're OS pages) @@ -1960,18 +1960,18 @@ indicMem equ 846Eh ;eight bytes used by _saveTR and _restoreTR to store image in top right corner indicCounter equ 8476h indicBusy equ 8477h -OP1 equ 8478h -OP1M equ 847Ah -OP2 equ 8483h -OP2M equ 8485h +OP1 equ 8478h +OP1M equ OP1+2 +OP2 equ 8483h +OP2M equ OP2+2 OP2EXT equ 848Ch -OP3 equ 848Eh -OP3M equ 8490h -OP4 equ 8499h -OP4M equ 849Bh -OP5 equ 84A4h -OP5M equ 84A6h -OP6 equ 84AFh +OP3 equ 848Eh +OP3M equ OP3+2 +OP4 equ 8499h +OP4M equ OP4+2 +OP5 equ 84A4h +OP5M equ OP5+2 +OP6 equ 84AFh OP6M equ 84B1h OP6EXT equ 84B8h progToEdit equ 84BFh @@ -2525,7 +2525,7 @@ cmdExec equ 6 ;1=parser is executing command ;---------------------------------------------------------------------- appFlags equ 0Dh ;application flags -appWantIntrpt equ 0 ;1=want ON key interrupts +appWantDoIntrpt equ 0 ;1=want ON key interrupts appTextSave equ 1 ;1=save characters in textShadow appAutoScroll equ 2 ;1=auto-scroll text on last line appMenus equ 3 ;1=process keys that bring up menus, 0=check Lock menu flag @@ -2534,7 +2534,7 @@ appCurWord equ 6 ;1=text cursor covers entire word appExit equ 7 ;1=application handles [EXIT] key itself -appWantIntrptF equ 1 << appWantIntrpt +appWantDoIntrptF equ 1 << appWantDoIntrpt appTextSaveF equ 1 << appTextSave appAutoScrollF equ 1 << appAutoScroll appMenusF equ 1 << appMenus @@ -3273,7 +3273,7 @@ kTrig equ 064h kUsrZm equ 065h kZSto equ 066h -kZInt equ 067h +kZDoInt equ 067h kZStat equ 068h echoStart2 equ 069h kSelect equ 069h @@ -3289,9 +3289,9 @@ kText equ 073h kTanLn equ 074h kEval equ 075h -kInters equ 076h +kDoInters equ 076h kDYDX equ 077h -kFnIntg equ 078h +kFnDoIntg equ 078h kRootG equ 079h kDYDT equ 07Ah kDXDT equ 07Bh @@ -3372,7 +3372,7 @@ kAns equ 0C5h kColon equ 0C6h kNDeriv equ 0C7h -kFnInt equ 0C8h +kFnDoInt equ 0C8h kRoot equ 0C9h kQuest equ 0CAh kQuote equ 0CBh @@ -3470,7 +3470,7 @@ kRound equ kE1BT+29 kIPart equ kE1BT+30 kFPart equ kE1BT+31 -kInt equ kE1BT+32 +kDoInt equ kE1BT+32 kRand equ kE1BT+33 kNPR equ kE1BT+34 kNCR equ kE1BT+35 @@ -3681,12 +3681,12 @@ k2PropZTest equ kE2BT+106 kChiTest equ kE2BT+107 k2SampFTest equ kE2BT+108 -kZIntVal equ kE2BT+109 -kTIntVal equ kE2BT+110 -k2SampTInt equ kE2BT+111 -k2SampZInt equ kE2BT+112 -k1PropZInt equ kE2BT+113 -k2PropZInt equ kE2BT+114 +kZDoIntVal equ kE2BT+109 +kTDoIntVal equ kE2BT+110 +k2SampTDoInt equ kE2BT+111 +k2SampZDoInt equ kE2BT+112 +k1PropZDoInt equ kE2BT+113 +k2PropZDoInt equ kE2BT+114 kDNormal equ kE2BT+115 kInvNorm equ kE2BT+116 kDT equ kE2BT+117 @@ -3778,7 +3778,7 @@ kFAngle equ kE2BT2+49 kLCM equ kE2BT2+50 kGCD equ kE2BT2+51 -kRandInt equ kE2BT2+52 +kRandDoInt equ kE2BT2+52 kRandNorm equ kE2BT2+53 kToPolar equ kE2BT2+54 kToRect equ kE2BT2+55 @@ -4122,7 +4122,7 @@ tMean equ IMUN+15 ;21h tRoot equ IMUN+16 ;22h 'ROOT' tSeries equ IMUN+17 ;23h 'seq' -tFnInt equ IMUN+18 ;24h 'fnInt' +tFnDoInt equ IMUN+18 ;24h 'fnDoInt' tNDeriv equ IMUN+19 ;25h 'fnIr' tEvalF equ IMUN+20 ;26h tFmin equ IMUN+21 ;27h @@ -4292,7 +4292,7 @@ tZoomIn equ GRCMDS+5 ; 89h 'ZIn' tZoomOut equ GRCMDS+6 ; 8Ah 'ZOut' tZoomSqr equ GRCMDS+7 ; 8Bh 'ZSqr' -tZoomInt equ GRCMDS+8 ; 8Ch 'ZInt' +tZoomDoInt equ GRCMDS+8 ; 8Ch 'ZDoInt' tZoomPrev equ GRCMDS+9 ; 8Dh 'ZPrev' tZoomDec equ GRCMDS+10 ; 8Eh 'ZDecm' tZoomStat equ GRCMDS+11 ; 8Fh 'ZStat @@ -4343,7 +4343,7 @@ tQuest equ tAPost+1 ;QUESTION MARK UNARY equ tQuest+1 ;B0h tChs equ UNARY ;B0h -tInt equ UNARY+1 ;B1h +tDoInt equ UNARY+1 ;B1h tAbs equ UNARY+2 ;B2h tDet equ UNARY+3 ;B3h tIdent equ UNARY+4 ;B4h @@ -4714,7 +4714,7 @@ tFinDBD equ 07h tLCM equ 08h tGCD equ 09h -tRandInt equ 0Ah +tRandDoInt equ 0Ah tRandBin equ 0Bh tSubStrng equ 0Ch tStdDev equ 0Dh @@ -4769,15 +4769,15 @@ t1PropZTest equ 3Eh t2PropZTest equ 3Fh tChiTest equ 40h -tZIntVal equ 41h -t2SampZInt equ 42h -t1PropZInt equ 43h -t2PropZInt equ 44h +tZDoIntVal equ 41h +t2SampZDoInt equ 42h +t1PropZDoInt equ 43h +t2PropZDoInt equ 44h tGraphStyle equ 45h t2SampTTest equ 46h t2SampFTest equ 47h -tTIntVal equ 48h -t2SampTInt equ 49h +tTDoIntVal equ 48h +t2SampTDoInt equ 49h tSetupLst equ 4Ah tFinPMTend equ 4Bh tFinPMTbeg equ 4Ch