--- 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
--- 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