From 1f0bd36c92051d7429e7e8d9385dcab9ffba6027 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sat, 30 Oct 2021 12:50:48 +0800 Subject: [PATCH 01/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 157 +++++++++++++++-------------------- 1 file changed, 66 insertions(+), 91 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index 02f332cb..c258a03e 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -1075,15 +1075,15 @@ loc_0_741: PUSH AF ;---------------------------------------------------------------------------- loc_0_774: ; CODE XREF: sub_0_50B+6p - ld (word_0_7BF), de + ld (smod_w_7BF), de ld de, 2891h call sub_0_692 ld c, 9 ld de, 74Ch xor a - ld (byte_0_7BA), a + ld (smod_b_7BA), a ld a, 30h - ld (byte_0_7B4), a + ld (smod_b_7B4), a inc de inc de inc de @@ -1098,24 +1098,24 @@ loc_0_792: ; CODE XREF: seg000:07B1j pop bc jr c, unk_0_7B3 push de - ld a, (byte_0_7B4) + ld a, (smod_b_7B4) inc a - ld (byte_0_7B4), a + ld (smod_b_7B4), a ld de, 2891h ld hl, 2895h call sub_0_692 pop de djnz loc_0_792 ;---------------------------------------------------------------------------- -byte_0_7B4: .EQU $+1 +smod_b_7B4: .EQU $+1 unk_0_7B3: LD A,30H ; self modifying CP 30H JR NZ,7BEH -byte_0_7BA: .EQU $+1 +smod_b_7BA: .EQU $+1 LD A,0 OR A JR Z,7CBH -word_0_7BF: .EQU $+1 +smod_w_7BF: .EQU $+1 LD HL,0 LD (HL),A INC HL @@ -1134,14 +1134,14 @@ word_0_7BF: .EQU $+1 RET PUSH AF -byte_0_7DF: .EQU $+1 +smod_b_7DF: .EQU $+1 ADD A,0 - LD (7DFH),A + LD (smod_b_7DF),A POP AF RET - .db 20h ; +loc_0_7E5: .db 20h ; .db 83h ; ? .db 0B8h ; ¸ .db 0EDh ; í @@ -1151,10 +1151,10 @@ byte_0_7DF: .EQU $+1 .db 0DEh ; Þ loc_0_7ED: PUSH AF -word_0_7F0: .EQU $+2 +smod_w_7F0: .EQU $+2 LD IY,289DH LD IX,2899H - XOR (IX+0) + XOR (ix+0) LD H,0 LD L,A ADD HL,HL @@ -1164,7 +1164,7 @@ word_0_7F0: .EQU $+2 ADD IY,BC LD A,(IY) XOR (IX+1) - LD (IX),A + LD (ix+0),A LD A,(IY+1) XOR (IX+2) LD (IX+1),A @@ -1182,12 +1182,12 @@ word_0_7F0: .EQU $+2 sub_0_825: ; CODE XREF: sub_0_8D1+Fp push de push hl - ld hl, (word_0_7F0) + ld hl, (smod_w_7F0) ld bc, 3FFh add hl, bc push hl pop iy - ld ix, 7E5h + ld ix, loc_0_7E5 xor a loc_0_836: ; CODE XREF: sub_0_825+5Bj @@ -1197,9 +1197,7 @@ loc_0_836: ; CODE XREF: sub_0_825+5Bj xor e ld e, a ld b, 8 - -loc_0_841: ; CODE XREF: sub_0_825+3Bj - scf +loc_0_841: scf ; CODE XREF: sub_0_825+3Bj rr h rr l rr d @@ -1217,9 +1215,7 @@ loc_0_841: ; CODE XREF: sub_0_825+3Bj ld a, h xor (ix+3) ld h, a - -loc_0_860: ; CODE XREF: sub_0_825+25j - djnz loc_0_841 +loc_0_860: djnz loc_0_841 ; CODE XREF: sub_0_825+25j ld a, h cpl ld (iy+0), a @@ -1249,22 +1245,22 @@ loc_0_860: ; CODE XREF: sub_0_825+25j ; CODE XREF: sub_0_13BA+Fp ; sub_0_13BA+1Ep loc_0_885: PUSH AF -word_0_887 .equ $+1 ; self modifying +smod_w_887: .equ $+1 ; self modifying LD HL,0 LD DE,1021H XOR H LD H,A LD B,8 - ADD HL,HL - JR NC,899H +loc_0_890: ADD HL,HL + JR NC,loc_0_899 LD A,H XOR D LD H,A LD A,L XOR E LD L,A - DJNZ 890H - LD (887H),HL +loc_0_899: DJNZ loc_0_890 + LD (smod_w_887),HL POP AF RET @@ -1276,8 +1272,8 @@ sub_0_8A0: ; CODE XREF: sub_0_13BA+9p xor a ld h, a ld l, a - ld (byte_0_7DF), a - ld (word_0_887), hl + ld (smod_b_7DF), a + ld (smod_w_887), hl ld hl, 2899h jp loc_0_726 ; End of function sub_0_8A0 @@ -1352,7 +1348,7 @@ loc_0_8FD: ; CODE XREF: sub_0_8D1+28j cp 3 jr c, loc_0_947 ld a, 1 - ld (byte_0_B0A), a + ld (smod_b_B0A), a call loc_0_ACF jp c, loc_0_954 or a @@ -1659,16 +1655,16 @@ loc_0_AF3: ; CODE XREF: seg000:0AEFj ld hl, (2CEBh) ld (ix+0), l ld (ix+1), h -byte_0_B0A: .equ $+1 ; DATA XREF: sub_0_8D1+3Dw +smod_b_B0A: .equ $+1 ; DATA XREF: sub_0_8D1+3Dw ld a,1 ; self modifying value CALL 13BAH - LD A,(byte_0_B0A) + LD A,(smod_b_B0A) CP 5 JR NZ,0B1AH LD A,1 - LD (byte_0_B0A),A + LD (smod_b_B0A),A loc_0_B1A: CALL 0FD1H - LD HL,0B96H + LD HL,loc_0_B96 LD BC,0AH CPIR JP Z,67FH @@ -1720,11 +1716,11 @@ loc_0_B7B: LD HL,2CA7H LD DE,2C9FH CALL 692H LD A,1 - LD (0B0AH),A + LD (smod_b_B0A),A CALL 0EC7H CP 0EBH LD A,6 - JR NZ,0B6AH + JR NZ,loc_0_B6A POP BC LD A,4 RET @@ -1789,7 +1785,7 @@ sub_0_BD3: ; CODE XREF: sub_0_BB4p call sub_0_961 jr nc, loc_0_BDF ld a, 5 - ld (byte_0_B0A), a + ld (smod_b_B0A), a or a ret ;---------------------------------------------------------------------------- @@ -2676,7 +2672,7 @@ sub_0_FD1: ; CODE XREF: sub_0_BD3+37p loc_0_FDB: ; CODE XREF: sub_0_FD1+61j ld a, 5 - ld (2D00h), a + ld (byte_0_2D00), a ld b, 64h call sub_0_DE7 jp c, loc_0_108A @@ -2686,57 +2682,32 @@ loc_0_FDB: ; CODE XREF: sub_0_FD1+61j jp z, sub_0_67F jr loc_0_1024 ;---------------------------------------------------------------------------- - .db 21h ; ! - .db 0 ; - .db 2Dh ; - - .db 35h ; 5 - .db 3Eh ; > - .db 10h ; - .db 0CAh ; Ê - .db 8Ah ; ? - .db 10h ; - .db 6 ; - .db 0Ah ; - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 38h ; 8 - .db 0DBh ; Û - .db 21h ; ! - .db 0A7h ; § - .db 10h ; - .db 1 ; - .db 2 ; - .db 0 ; - .db 0EDh ; í - .db 0B1h ; ± - .db 0CAh ; Ê - .db 7Fh ;  - .db 6 ; - .db 18h ; - .db 12h ; - .db 21h ; ! - .db 0 ; - .db 2Dh ; - - .db 35h ; 5 - .db 3Eh ; > - .db 10h ; - .db 0CAh ; Ê - .db 8Ah ; ? - .db 10h ; - .db 18h ; - .db 0C3h ; à - .db 6 ; - .db 0Ah ; - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 38h ; 8 - .db 11h ; + + LD HL,byte_0_2D00 + DEC (HL) + LD A,10H + JP Z,108AH + LD B,0AH + CALL sub_0_DE7 + JR C,0FE0H + LD HL,10A7H + LD BC,2 + CPIR + JP Z,67FH + JR 1024H + + LD HL,byte_0_2D00 + DEC (HL) + LD A,10H + JP Z,108AH + JR 0FE0H + + LD B,0AH + CALL 0DE7H + JR C,1035H ;---------------------------------------------------------------------------- -loc_0_1024: ; CODE XREF: sub_0_FD1+22j - ld hl, (2CFEh) +loc_0_1024: ld hl, (2CFEh) ; CODE XREF: sub_0_FD1+22j dec hl ld (2CFEh), hl ld a, h @@ -3577,9 +3548,9 @@ loc_0_13D4: ; CODE XREF: sub_0_13BA+26j pop hl pop bc djnz loc_0_13D4 - ld a, (word_0_887+1) + ld a, (smod_w_887+1) call sub_0_1418 - ld a, (word_0_887) + ld a, (smod_w_887) call sub_0_1418 ld a, 0Dh call loc_0_145C @@ -4630,9 +4601,13 @@ byte_0_17A1: .db 0 ; DATA XREF: start+60r sub_0_195+11w word_0_17A2: .db 0 ; DATA XREF: start+88w sub_0_961+7Fw byte_0_17A3: .db 0 .fill $1800-$,0 - .ds 8 + .ds 8 nstack: word_0_1808: .ds 2 - .ds 1505h + .ds 14F6h +byte_0_2D00: .ds 1 + .ds 3 +word_0_2D04: .ds 2 + .ds 9 word_0_2D0F: .ds 2 .end ; start From c95ea4440e83ca7b6803f02b3e8192b26b27d7c7 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sat, 30 Oct 2021 13:58:49 +0800 Subject: [PATCH 02/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 254 +++++++++++++---------------------- 1 file changed, 95 insertions(+), 159 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index c258a03e..18ea00c0 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -1962,8 +1962,7 @@ sub_0_D0E: ; CODE XREF: sub_0_8D1+8Bp call sub_0_D30 ret c -loc_0_D15: ; CODE XREF: sub_0_D0E+13j - ld a, 1Ah +loc_0_D15: ld a, 1Ah ; CODE XREF: sub_0_D0E+13j call loc_0_D68 ret c ld hl, 280Eh @@ -2194,163 +2193,100 @@ loc_0_E03: ; CODE XREF: sub_0_DE7+14j ; End of function sub_0_DE7 ;---------------------------------------------------------------------------- - .db 6 ; - .db 64h ; d - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 0D8h ; Ø - .db 0E6h ; æ - .db 7Fh ;  - .db 21h ; ! - .db 2Ah ; * - .db 0Eh ; - .db 1 ; - .db 2 ; - .db 0 ; - .db 0EDh ; í - .db 0B1h ; ± - .db 28h ; ( - .db 0EEh ; î - .db 1 ; - .db 3 ; - .db 0 ; - .db 0EDh ; í - .db 0B1h ; ± - .db 0C8h ; È - .db 47h ; G - .db 0E6h ; æ - .db 60h ; ` - .db 20h ; - .db 6 ; - .db 3Ah ; : - .db 9Dh ;  - .db 2Ch ; , - .db 0B7h ; · - .db 20h ; - .db 0DDh ; Ý - .db 78h ; x - .db 0C9h ; É - .db 11h ; - .db 13h ; - .db 0Dh ; - .db 0Ah ; - .db 18h ; - .db 6 ; - .db 64h ; d - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 0D8h ; Ø - .db 5Fh ; _ - .db 0E6h ; æ - .db 60h ; ` - .db 7Bh ; { - .db 0C0h ; À - .db 0FEh ; þ - .db 18h ; - .db 28h ; ( - .db 12h ; - .db 21h ; ! - .db 0A2h ; ¢ - .db 0Eh ; - .db 1 ; - .db 4 ; - .db 0 ; - .db 0EDh ; í - .db 0B1h ; ± - .db 28h ; ( - .db 0E7h ; ç - .db 3Ah ; : - .db 9Dh ;  - .db 2Ch ; , - .db 0B7h ; · - .db 20h ; - .db 0E1h ; á - .db 7Bh ; { - .db 0C9h ; É - .db 6 ; - .db 64h ; d - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 0D8h ; Ø - .db 0FEh ; þ - .db 18h ; - .db 20h ; - .db 1Ah ; - .db 6 ; - .db 64h ; d - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 0D8h ; Ø - .db 0FEh ; þ - .db 18h ; - .db 20h ; - .db 10h ; - .db 6 ; - .db 64h ; d - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 0D8h ; Ø - .db 0FEh ; þ - .db 18h ; - .db 20h ; - .db 6 ; - .db 6 ; - .db 64h ; d - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 0D8h ; Ø - .db 21h ; ! - .db 0A6h ; ¦ - .db 0Eh ; - .db 1 ; - .db 0Bh ; - .db 0 ; - .db 0EDh ; í - .db 0B1h ; ± - .db 0CAh ; Ê - .db 7Fh ;  - .db 6 ; - .db 6Fh ; o - .db 3Ah ; : - .db 9Dh ;  - .db 2Ch ; , - .db 0B7h ; · - .db 28h ; ( - .db 5 ; - .db 7Dh ; } - .db 0E6h ; æ - .db 60h ; ` - .db 28h ; ( - .db 0C5h ; Å - .db 7Dh ; } - .db 0E6h ; æ - .db 60h ; ` - .db 0FEh ; þ - .db 40h ; @ - .db 20h ; - .db 0Ah ; - .db 7Dh ; } - .db 0EEh ; î - .db 40h ; @ - .db 0C9h ; É - .db 3Eh ; > - .db 7Fh ;  - .db 0C9h ; É - .db 3Eh ; > - .db 0FFh ; ÿ - .db 0C9h ; É - .db 3Eh ; > - .db 0FFh ; ÿ - .db 0F6h ; ö - .db 80h ; ? - .db 37h ; 7 - .db 0C9h ; É +loc_0_E05: LD B,64H + CALL sub_0_DE7 + RET C + AND 7FH + LD HL,loc_0_E2A + LD BC,2 + CPIR + JR Z,loc_0_E05 + LD BC,3 + CPIR + RET Z + LD B,A + AND 60H + JR NZ,loc_0_E28 + LD A,(2C9DH) + OR A + JR NZ,loc_0_E05 +loc_0_E28: LD A,B + RET + +loc_0_E2A: .db 11h ; dc1 + .db 13h ; dc3 + .db 0dh ; cr + .db 0ah ; lf + .db 18h ; can + +loc_0_E2F: ld b,64H + CALL sub_0_DE7 + RET C + LD E,A +loc_0_E36: AND 60H + LD A,E + RET NZ + CP 18H + JR Z,loc_0_E50 + LD HL,0EA2H + LD BC,4 + CPIR + JR Z,0E2FH + LD A,(2C9DH) + OR A + JR NZ,loc_0_E2F + LD A,E + RET + +loc_0_E50: LD B,64H ; 0e50 06 64 + CALL sub_0_DE7 ; 0e52 cd e7 0d + RET C ; 0e55 d8 + CP 18H ; 0e56 fe 18 + JR NZ,0E74H ; 0e58 20 1a + LD B,'d' ; 0e5a 06 64 + CALL sub_0_DE7 ; 0e5c cd e7 0d + RET C ; 0e5f d8 + CP 18H ; 0e60 fe 18 + JR NZ,0E74H ; 0e62 20 10 + LD B,'d' ; 0e64 06 64 + CALL sub_0_DE7 ; 0e66 cd e7 0d + RET C ; 0e69 d8 + CP 18H ; 0e6a fe 18 + JR NZ,0E74H ; 0e6c 20 06 + LD B,64H ; 0e6e 06 64 + CALL sub_0_DE7 ; 0e70 cd e7 0d + RET C ; 0e73 d8 + LD HL,0EA6H ; 0e74 21 a6 0e + LD BC,0BH ; 0e77 01 0b 00 + CPIR ; 0e7a ed b1 + JP Z,67FH ; 0e7c ca 7f 06 + LD L,A ; 0e7f 6f + LD A,(2C9DH) ; 0e80 3a 9d 2c + OR A ; 0e83 b7 + JR Z,loc_0_E8B ; 0e84 28 05 + LD A,L ; 0e86 7d + AND 60H ; 0e87 e6 60 + JR Z,loc_0_E50 ; 0e89 28 c5 +loc_0_E8B: LD A,L ; 0e8b 7d + AND 60H ; 0e8c e6 60 + CP 40H ; 0e8e fe 40 + JR NZ,loc_0_E9C ; 0e90 20 0a + LD A,L ; 0e92 7d + XOR 40H ; 0e93 ee 40 + RET ; 0e95 c9 + + LD A,7FH ;0e96 3e 7f + RET ;0e98 c9 + + LD A,0FFH ;0e99 3e ff + RET ;0e9b c9 + +loc_0_E9C: LD A,0FFH ;0e9c 3e ff + OR 80H ;0e9e f6 80 + SCF ;0ea0 37 + RET ;0ea1 c9 + + .db 11h ; .db 91h ; ? .db 13h ; From 4c3c078fa4612354f147c1352ba8d022deb730f5 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sat, 30 Oct 2021 15:53:14 +0800 Subject: [PATCH 03/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 217 +++++++++++++---------------------- 1 file changed, 79 insertions(+), 138 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index 18ea00c0..69aed2f1 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -374,7 +374,7 @@ loc_0_477: ; CODE XREF: sub_0_476+8j ; S u b r o u t i n e sub_0_482: ; CODE XREF: sub_0_1289+122p - ld a, (2D04h) + ld a, (byte_0_2D04) ld de, text495h ; Update error string with errors call sub_0_16E7 ld de, text493h @@ -584,13 +584,10 @@ sub_0_5B4: ; CODE XREF: sub_0_5D4+12p ; End of function sub_0_5B4 ;---------------------------------------------------------------------------- - .db 0Eh ; - .db 4 ; - .db 5Fh ; _ - .db 0C3h ; à - .db 5 ; - .db 0 ; +loc_0_5C7: LD C,4 ; punch out + LD E,A + JP bdos ;---------------------------------------------------------------------------- ; S u b r o u t i n e @@ -1372,7 +1369,7 @@ loc_0_92B: ; CODE XREF: sub_0_8D1+47j ld a, 3 ld (byte_0_8AF), a xor a - ld (2D04h), a + ld (byte_0_2D04), a call sub_0_11C1 jr c, loc_0_954 call sub_0_961 @@ -1630,7 +1627,7 @@ loc_0_AC8: ; CODE XREF: seg000:0AC4j loc_0_ACF: ; CODE XREF: sub_0_8D1+40p ; sub_0_BB4+Ep xor a - ld (2D04h), a + ld (byte_0_2D04), a ld a, 4 ld hl, 8AFh cp (hl) @@ -1647,9 +1644,8 @@ loc_0_ACF: ; CODE XREF: sub_0_8D1+40p jr z, loc_0_AF3 ld b, 0Ah -loc_0_AF3: ; CODE XREF: seg000:0AEFj - push bc - ld ix, 2CE0h +loc_0_AF3: push bc + ld ix, 2CE0h ; CODE XREF: seg000:0AEFj ld (ix+3), 20h ld (ix+2), 0 ld hl, (2CEBh) @@ -1657,7 +1653,7 @@ loc_0_AF3: ; CODE XREF: seg000:0AEFj ld (ix+1), h smod_b_B0A: .equ $+1 ; DATA XREF: sub_0_8D1+3Dw ld a,1 ; self modifying value - CALL 13BAH + CALL sub_0_13BA LD A,(smod_b_B0A) CP 5 JR NZ,0B1AH @@ -1667,12 +1663,12 @@ loc_0_B1A: CALL 0FD1H LD HL,loc_0_B96 LD BC,0AH CPIR - JP Z,67FH -loc_0_B28: LD HL,2D04H + JP Z,sub_0_67F +loc_0_B28: LD HL,byte_0_2D04 INC (HL) CALL 482H loc_0_B2F: POP BC - DJNZ 0AF3H + DJNZ loc_0_AF3 XOR A RET @@ -1687,7 +1683,7 @@ loc_0_B39: POP BC RET loc_0_B40: LD HL,2CE0H - CALL 688H + CALL sub_0_688 JR 0B68H @@ -1706,9 +1702,9 @@ loc_0_B48: LD IX,2CA7H LD A,3 loc_0_B6A: PUSH AF LD HL,2CE0H - CALL 688H + CALL sub_0_688 POP AF - CALL 13BAH + CALL sub_0_13BA CALL 0FC9H JP 0B28H @@ -1798,7 +1794,7 @@ loc_0_BDF: ; CODE XREF: sub_0_BD3+3j loc_0_BE9: ; CODE XREF: sub_0_BD3+Ej xor a - ld (2D04h), a + ld (byte_0_2D04), a call sub_0_FAA call sub_0_FC9 call sub_0_D30 @@ -1821,10 +1817,10 @@ loc_0_BE9: ; CODE XREF: sub_0_BD3+Ej ;---------------------------------------------------------------------------- -loc_0_C1C: LD HL,2D04H +loc_0_C1C: LD HL,byte_0_2D04 INC (HL) CALL 482H - LD HL,2D04H + LD HL,byte_0_2D04 LD A,0AH CP (HL) JP NZ,0BF0H @@ -1852,10 +1848,10 @@ loc_0_C1C: LD HL,2D04H OR A RET -loc_0_C57: LD HL,2D04H +loc_0_C57: LD HL,byte_0_2D04 INC (HL) CALL 482H - LD HL,2D04H + LD HL,byte_0_2D04 LD A,0AH CP (HL) JR NZ,0C6AH @@ -1884,7 +1880,7 @@ loc_0_C93: LD A,0FFH RET loc_0_C97: XOR A - LD (2D04H),A + LD (byte_0_2D04),A LD DE,2CF9H LD HL,2CABH LD BC,2CABH @@ -1902,7 +1898,7 @@ loc_0_CB6: CALL 0C97H LD DE,2CE0H CALL 692H LD A,3 - CALL 13BAH + CALL sub_0_13BA JP 0C7FH loc_0_CCA: CALL 0C97H @@ -1912,7 +1908,7 @@ loc_0_CCA: CALL 0C97H LD DE,2CE0H CALL 692H LD A,3 - CALL 13BAH + CALL sub_0_13BA JP 0C0AH loc_0_CE4: .db 6 ; @@ -2242,21 +2238,21 @@ loc_0_E50: LD B,64H ; 0e50 06 64 CALL sub_0_DE7 ; 0e52 cd e7 0d RET C ; 0e55 d8 CP 18H ; 0e56 fe 18 - JR NZ,0E74H ; 0e58 20 1a - LD B,'d' ; 0e5a 06 64 + JR NZ,loc_0_0E74 ; 0e58 20 1a + LD B,64h ; 0e5a 06 64 CALL sub_0_DE7 ; 0e5c cd e7 0d RET C ; 0e5f d8 CP 18H ; 0e60 fe 18 - JR NZ,0E74H ; 0e62 20 10 - LD B,'d' ; 0e64 06 64 + JR NZ,loc_0_0E74 ; 0e62 20 10 + LD B,64H ; 0e64 06 64 CALL sub_0_DE7 ; 0e66 cd e7 0d RET C ; 0e69 d8 CP 18H ; 0e6a fe 18 - JR NZ,0E74H ; 0e6c 20 06 + JR NZ,loc_0_0E74 ; 0e6c 20 06 LD B,64H ; 0e6e 06 64 CALL sub_0_DE7 ; 0e70 cd e7 0d RET C ; 0e73 d8 - LD HL,0EA6H ; 0e74 21 a6 0e +loc_0_0E74: LD HL,0EA6H ; 0e74 21 a6 0e LD BC,0BH ; 0e77 01 0b 00 CPIR ; 0e7a ed b1 JP Z,67FH ; 0e7c ca 7f 06 @@ -3115,19 +3111,13 @@ sub_0_11FA: ; CODE XREF: sub_0_8D1+6Fp ld a, 43h jr z, loc_0_121A ld a, 15h - -loc_0_121A: ; CODE XREF: sub_0_11FA+1Cj - call loc_0_145C - -loc_0_121D: ; CODE XREF: sub_0_11FA+5Ej - ld a, (2D07h) +loc_0_121A: call loc_0_145C ; CODE XREF: sub_0_11FA+1Cj +loc_0_121D: ld a, (2D07h) ; CODE XREF: sub_0_11FA+5Ej or a ld b, 82h jr z, loc_0_1227 ld b, 32h - -loc_0_1227: ; CODE XREF: sub_0_11FA+29j - call sub_0_1289 +loc_0_1227: call sub_0_1289 ; CODE XREF: sub_0_11FA+29j jr c, loc_0_125A push af call sub_0_50B @@ -3147,15 +3137,13 @@ loc_0_1227: ; CODE XREF: sub_0_11FA+29j call sub_0_D30 jr c, loc_0_1285 -loc_0_1250: ; CODE XREF: sub_0_11FA+3Bj - call sub_0_FC9 +loc_0_1250: call sub_0_FC9 ; CODE XREF: sub_0_11FA+3Bj ld a, 6 call loc_0_145C jr loc_0_121D ;---------------------------------------------------------------------------- -loc_0_125A: ; CODE XREF: sub_0_11FA+30j - cp 0F6h +loc_0_125A: cp 0F6h ; CODE XREF: sub_0_11FA+30j jr nz, loc_0_126D call sub_0_D0E jr c, loc_0_1285 @@ -3196,14 +3184,14 @@ loc_0_1285: ; CODE XREF: sub_0_11FA+54j sub_0_1289: ; CODE XREF: sub_0_11C1+18p ; sub_0_11FA+2Dp ld a, b - ld (2D03h), a + ld (byte_0_2D03), a xor a - ld (2D04h), a + ld (byte_0_2D04), a ld a, 0 ld (2D09h), a loc_0_1296: ; CODE XREF: sub_0_1289+12Aj - ld a, (2D03h) + ld a, (byte_0_2D03) ld b, a call sub_0_DE7 ld (2D08h), a @@ -3440,17 +3428,17 @@ loc_0_137F: ; CODE XREF: sub_0_1289+FBj loc_0_139A: ; CODE XREF: sub_0_1289+102j ld a, 28h - ld (2D03h), a + ld (byte_0_2D03), a ld a, 15h loc_0_13A1: ; CODE XREF: sub_0_1289+10Bj ; sub_0_1289+10Fj call loc_0_145C call sub_0_FC9 - ld hl, 2D04h + ld hl, byte_0_2D04 inc (hl) call sub_0_482 - ld a, (2D04h) + ld a, (byte_0_2D04) cp 5 jp nz, loc_0_1296 ld a, 0FFh @@ -3504,23 +3492,9 @@ loc_0_13D4: ; CODE XREF: sub_0_13BA+26j .db 2Ah ; * .db 18h ; .db 42h ; B - .db 0 ; - .db 30h ; 0 - .db 31h ; 1 - .db 32h ; 2 - .db 33h ; 3 - .db 34h ; 4 - .db 35h ; 5 - .db 36h ; 6 - .db 37h ; 7 - .db 38h ; 8 - .db 39h ; 9 - .db 61h ; a - .db 62h ; b - .db 63h ; c - .db 64h ; d - .db 65h ; e - .db 66h ; f + .db 0 ; + +loc_0_1408: .text "0123456789abcdef" ;---------------------------------------------------------------------------- @@ -3529,7 +3503,7 @@ loc_0_13D4: ; CODE XREF: sub_0_13BA+26j sub_0_1418: ; CODE XREF: sub_0_13BA+12p ; sub_0_13BA+21p ... push af - ld hl, 1408h + ld hl,loc_0_1408 ld b, 0 rra rra @@ -3541,7 +3515,7 @@ sub_0_1418: ; CODE XREF: sub_0_13BA+12p ld a, (hl) call loc_0_145C pop af - ld hl, 1408h + ld hl,loc_0_1408 ld b, 0 and 0Fh ld c, a @@ -3551,70 +3525,36 @@ sub_0_1418: ; CODE XREF: sub_0_13BA+12p ; End of function sub_0_1418 ;---------------------------------------------------------------------------- - .db 32h ; 2 - .db 5Bh ; [ - .db 14h ; - .db 1 ; - .db 9 ; - .db 0 ; - .db 21h ; ! - .db 77h ; w - .db 14h ; - .db 0EDh ; í - .db 0B1h ; ± - .db 0CAh ; Ê - .db 7Fh ;  - .db 6 ; - .db 0E6h ; æ - .db 60h ; ` - .db 20h ; - .db 10h ; - .db 3Ah ; : - .db 9Dh ;  - .db 2Ch ; , - .db 0B7h ; · - .db 28h ; ( - .db 0Ah ; - .db 21h ; ! - .db 5Bh ; [ - .db 14h ; - .db 0CBh ; Ë - .db 0F6h ; ö - .db 3Eh ; > - .db 18h ; - .db 0CDh ; Í - .db 5Ch ; \ - .db 14h ; - .db 3Eh ; > - .db 0 ; -;---------------------------------------------------------------------------- - -loc_0_145C: ; CODE XREF: sub_0_DDC+5p sub_0_11C1+13p - ; ... - ld (byte_0_1468), a - -loc_0_145F: ; CODE XREF: seg000:1465j - call sub_0_588 - call sub_0_5CD - jr z, loc_0_145F -;---------------------------------------------------------------------------- - .db 3Eh ; > -byte_0_1468: .db 0 ; DATA XREF: seg000:145Cw - .db 0C3h ; à - .db 0C7h ; Ç - .db 5 ; - .db 3Ah ; : - .db 68h ; h - .db 14h ; - .db 0E6h ; æ - .db 7Fh ;  - .db 0FEh ; þ - .db 40h ; @ - .db 20h ; - .db 0E5h ; å - .db 18h ; - .db 0D9h ; Ù - .db 18h ; + LD (145BH),A ;1438 32 5b 14 + LD BC,9 ;143b 01 09 00 + LD HL,smod_0_1477 ;143e 21 77 14 + CPIR ;1441 ed b1 + JP Z,67FH ;1443 ca 7f 06 + AND 60H ;1446 e6 60 + JR NZ,145AH ;1448 20 10 + LD A,(2C9DH) ;144a 3a 9d 2c + OR A ;144d b7 + JR Z,145AH ;144e 28 0a + LD HL,145BH ;1450 21 5b 14 + SET 6,(HL) ;1453 cb f6 + LD A,18H ;1455 3e 18 + CALL loc_0_145C ;1457 cd 5c 14 + LD A,0 +loc_0_145C: LD (smod_0_1468),A +loc_0_145F: CALL sub_0_588 + CALL sub_0_5CD + JR Z,loc_0_145F +smod_0_1468: .equ $+1 + LD A,0 ;1467 3e 00 + JP loc_0_5C7 ;1469 c3 c7 05 + + LD A,(smod_0_1468) ;146c 3a 68 14 + AND 7FH ;146f e6 7f + CP 40H ;1471 fe 40 + JR NZ,145AH ;1473 20 e5 + JR 1450H ;1475 18 d9 + +smod_0_1477: .db 18h ; .db 0Dh ; .db 8Dh ;  .db 10h ; @@ -4542,8 +4482,9 @@ nstack: word_0_1808: .ds 2 .ds 14F6h byte_0_2D00: .ds 1 - .ds 3 -word_0_2D04: .ds 2 - .ds 9 + .ds 2 +byte_0_2D03: .ds 1 +byte_0_2D04: .ds 1 + .ds 10 word_0_2D0F: .ds 2 .end ; start From 79dfbafc13342191c6be76f104266e49565fc26d Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sat, 30 Oct 2021 16:36:58 +0800 Subject: [PATCH 04/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 170 ++++++++++++++--------------------- 1 file changed, 65 insertions(+), 105 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index 69aed2f1..c01eb304 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -592,14 +592,12 @@ loc_0_5C7: LD C,4 ; punch out ; S u b r o u t i n e -sub_0_5CD: ; CODE XREF: seg000:1462p - ld c, 8 +sub_0_5CD: ld c, 8 ; CODE XREF: seg000:1462p call bdos ; BDOS function 8 (A_STATOUT) - Auxiliary Output status or a ret ; End of function sub_0_5CD - ;---------------------------------------------------------------------------- ; S u b r o u t i n e @@ -946,9 +944,7 @@ sub_0_6FA: ; CODE XREF: seg000:0799p or a ex af, af' ld a, 4 - -loc_0_702: ; CODE XREF: sub_0_6FA+11j - ex af, af' +loc_0_702: ex af, af' ; CODE XREF: sub_0_6FA+11j ld a, (de) sbc a, (hl) ld (bc), a @@ -1031,52 +1027,25 @@ loc_0_741: PUSH AF POP HL POP DE POP BC - RET + RET - .db 0 ; - .db 0CAh ; Ê - .db 9Ah ; ? - .db 3Bh ; ; - .db 0 ; - .db 0E1h ; á - .db 0F5h ; õ - .db 5 ; - .db 80h ; ? - .db 96h ; ? - .db 98h ; ? - .db 0 ; - .db 40h ; @ - .db 42h ; B - .db 0Fh ; - .db 0 ; - .db 0A0h ; - .db 86h ; ? - .db 1 ; - .db 0 ; - .db 10h ; - .db 27h ; ' - .db 0 ; - .db 0 ; - .db 0E8h ; è - .db 3 ; - .db 0 ; - .db 0 ; - .db 64h ; d - .db 0 ; - .db 0 ; - .db 0 ; - .db 0Ah ; - .db 0 ; - .db 0 ; - .db 0 ; ;---------------------------------------------------------------------------- + +loc_0_750: .db 0, 0CAh, 9Ah, 3Bh + .db 0, 0E1h, 0F5h, 5 + .db 80h, 96h, 98h, 0 + .db 40h, 42h, 0Fh, 0 + .db 0A0h, 86h, 1, 0 + .db 10h, 27h, 0, 0 + .db 0E8h, 3, 0, 0 + .db 64h, 0, 0, 0 + .db 0Ah, 0, 0, 0 -loc_0_774: ; CODE XREF: sub_0_50B+6p - ld (smod_w_7BF), de +loc_0_774: ld (smod_w_7BF), de; CODE XREF: sub_0_50B+6p ld de, 2891h call sub_0_692 - ld c, 9 - ld de, 74Ch + ld c,+(loc_0_774-loc_0_750)/4 + ld de,loc_0_750-4 xor a ld (smod_b_7BA), a ld a, 30h @@ -1086,14 +1055,12 @@ loc_0_774: ; CODE XREF: sub_0_50B+6p inc de inc de ld b, 0Ah - -loc_0_792: ; CODE XREF: seg000:07B1j - push bc +loc_0_792: push bc ; CODE XREF: seg000:07B1j ld hl, 2891h ld bc, 2895h call sub_0_6FA pop bc - jr c, unk_0_7B3 + jr c, loc_0_7B3 push de ld a, (smod_b_7B4) inc a @@ -1105,7 +1072,7 @@ loc_0_792: ; CODE XREF: seg000:07B1j djnz loc_0_792 ;---------------------------------------------------------------------------- smod_b_7B4: .EQU $+1 -unk_0_7B3: LD A,30H ; self modifying +loc_0_7B3: LD A,30H ; self modifying CP 30H JR NZ,7BEH smod_b_7BA: .EQU $+1 @@ -3525,62 +3492,55 @@ sub_0_1418: ; CODE XREF: sub_0_13BA+12p ; End of function sub_0_1418 ;---------------------------------------------------------------------------- - LD (145BH),A ;1438 32 5b 14 - LD BC,9 ;143b 01 09 00 - LD HL,smod_0_1477 ;143e 21 77 14 - CPIR ;1441 ed b1 - JP Z,67FH ;1443 ca 7f 06 - AND 60H ;1446 e6 60 - JR NZ,145AH ;1448 20 10 - LD A,(2C9DH) ;144a 3a 9d 2c - OR A ;144d b7 - JR Z,145AH ;144e 28 0a - LD HL,145BH ;1450 21 5b 14 - SET 6,(HL) ;1453 cb f6 - LD A,18H ;1455 3e 18 - CALL loc_0_145C ;1457 cd 5c 14 - LD A,0 -loc_0_145C: LD (smod_0_1468),A + LD (smod_b_145B),A + LD BC,+(loc_0_1480-stab_0_7B3) + LD HL,stab_0_7B3 + CPIR + JP Z,sub_0_67F + AND 60H + JR NZ,loc_0_145A + LD A,(2C9DH) + OR A + JR Z,loc_0_145A +loc_0_1450: LD HL,smod_b_145B + SET 6,(HL) + LD A,18H + CALL loc_0_145C +smod_b_145B: .equ $+1 +loc_0_145A: LD A,0 +loc_0_145C: LD (smod_b_1468),A loc_0_145F: CALL sub_0_588 CALL sub_0_5CD JR Z,loc_0_145F -smod_0_1468: .equ $+1 - LD A,0 ;1467 3e 00 - JP loc_0_5C7 ;1469 c3 c7 05 - - LD A,(smod_0_1468) ;146c 3a 68 14 - AND 7FH ;146f e6 7f - CP 40H ;1471 fe 40 - JR NZ,145AH ;1473 20 e5 - JR 1450H ;1475 18 d9 - -smod_0_1477: .db 18h ; - .db 0Dh ; - .db 8Dh ;  - .db 10h ; - .db 90h ;  - .db 11h ; - .db 91h ; ? - .db 13h ; - .db 93h ; ? - .db 50h ; P - .db 14h ; - .db 50h ; P - .db 14h ; - .db 50h ; P - .db 14h ; - .db 50h ; P - .db 14h ; - .db 50h ; P - .db 14h ; - .db 50h ; P - .db 14h ; - .db 6Ch ; l - .db 14h ; - .db 6Ch ; l - .db 14h ; - .db 50h ; P - .db 14h ; +smod_b_1468: .equ $+1 + LD A,0 + JP loc_0_5C7 + +loc_0_146C: LD A,(smod_b_1468) + AND 7FH + CP 40H + JR NZ,loc_0_145A + JR loc_0_1450 + +stab_0_7B3: .db 18h + .db 0Dh + .db 8Dh + .db 10h + .db 90h + .db 11h + .db 91h + .db 13h + .db 93h + +loc_0_1480: .dw loc_0_1450 + .dw loc_0_1450 + .dw loc_0_1450 + .dw loc_0_1450 + .dw loc_0_1450 + .dw loc_0_1450 + .dw loc_0_146C + .dw loc_0_146C + .dw loc_0_1450 ;---------------------------------------------------------------------------- From d1c75888cdcab744a6bdae4ebe9be70ac35765e3 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sat, 30 Oct 2021 17:19:54 +0800 Subject: [PATCH 05/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 311 +++++++++++++---------------------- 1 file changed, 111 insertions(+), 200 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index c01eb304..19b4a6fd 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -96,7 +96,7 @@ loc_0_164: ; CODE XREF: start+5Ej call sub_0_3C9 loc_0_174: ; CODE XREF: start+25j start+3Bj - ; ... + ld de, str_sxfr ld c, C_WRITESTR call bdos ; Output string @@ -114,7 +114,6 @@ loc_0_185: ; DATA XREF: sub_0_195+17w ;---------------------------------------------------------------------------- - ; S u b r o u t i n e sub_0_195: ; CODE XREF: start+15p @@ -182,7 +181,6 @@ str_info: .text "usage: rz [-?pbcrxyz] [du:fn]\r\n\n" .text "these values override options from sender\r\n$" ;---------------------------------------------------------------------------- - ; S u b r o u t i n e sub_0_39A: ; CODE XREF: start+48p @@ -349,7 +347,6 @@ sub_0_471: ; CODE XREF: sub_0_961+92p ;---------------------------------------------------------------------------- - ; S u b r o u t i n e sub_0_476: ; CODE XREF: sub_0_4A4+37p @@ -459,7 +456,7 @@ text508h: .text "\r\n$" ; S u b r o u t i n e sub_0_50B: ; CODE XREF: sub_0_D0Ep sub_0_D30+30p - ; ... + ld hl, 2CABh ld de, 51Fh call loc_0_774 @@ -804,7 +801,7 @@ sub_0_669: LD A,80H ; S u b r o u t i n e sub_0_67F: ; CODE XREF: sub_0_39A+Fp sub_0_BD3+42j - ; ... + add hl, bc sla c add hl, bc @@ -820,7 +817,7 @@ sub_0_67F: ; CODE XREF: sub_0_39A+Fp sub_0_BD3+42j ; S u b r o u t i n e sub_0_688: ; CODE XREF: seg000:0726p sub_0_BD3+13p - ; ... + xor a push bc push de @@ -837,7 +834,7 @@ sub_0_688: ; CODE XREF: seg000:0726p sub_0_BD3+13p ; S u b r o u t i n e sub_0_692: ; CODE XREF: seg000:077Bp seg000:07ADp - ; ... + push bc push de push hl @@ -1244,7 +1241,7 @@ sub_0_8A0: ; CODE XREF: sub_0_13BA+9p ;---------------------------------------------------------------------------- byte_0_8AF: .db 4 ; DATA XREF: sub_0_3C9+Aw sub_0_8D1+34r - ; ... + byte_0_8B0: .db 0 ; DATA XREF: sub_0_8D1+23r byte_0_8B1: .db 0 ; DATA XREF: sub_0_961r byte_0_8B2: .db 0 ; DATA XREF: sub_0_961+14r @@ -1795,10 +1792,10 @@ loc_0_C1C: LD HL,byte_0_2D04 SCF RET - CALL 0EC7H +loc_0_C30: CALL 0EC7H JP 0BF0H - LD DE,2CA7H +loc_0_C36: LD DE,2CA7H LD HL,2CABH CALL 6D3H JP NZ,0BF0H @@ -1878,34 +1875,29 @@ loc_0_CCA: CALL 0C97H CALL sub_0_13BA JP 0C0AH -loc_0_CE4: .db 6 ; - .db 0FEh ; þ - .db 4 ; - .db 0Bh ; - .db 0FFh ; ÿ - .db 0Ah ; - .db 0FCh ; ü - .db 1Ch ; - .db 0Ch ; - .db 73h ; s - .db 0Ch ; - .db 57h ; W - .db 0Ch ; - .db 36h ; 6 - .db 0Ch ; - .db 30h ; 0 - .db 0Ch ; - .db 1Ch ; - .db 0Ch ; - .db 1Ch ; - .db 0Ch ; - .db 0EBh ; ë - .db 0EAh ; ê - .db 0E9h ; é - .db 0E8h ; è - .db 0FFh ; ÿ - .db 0FEh ; þ - .db 10h ; +loc_0_CE4: .db 6 + .db 0FEh + .db 4 + .db 0Bh + .db 0FFh + .db 0Ah + .db 0FCh + + .dw loc_0_C1C + .dw loc_0_C73 + .dw loc_0_C57 + .dw loc_0_C36 + .dw loc_0_C30 + .dw loc_0_C1C + .dw loc_0_C1C + + .db 0EBh + .db 0EAh + .db 0E9h + .db 0E8h + .db 0FFh + .db 0FEh + .db 010h .dw loc_0_C93 .dw loc_0_C1C @@ -1941,7 +1933,6 @@ loc_0_D15: ld a, 1Ah ; CODE XREF: sub_0_D0E+13j ;---------------------------------------------------------------------------- - ; S u b r o u t i n e sub_0_D30: ; CODE XREF: sub_0_BD3+20p @@ -1967,9 +1958,7 @@ loc_0_D41: call loc_0_D68 ret c -loc_0_D52: ; CODE XREF: sub_0_D30+Fj sub_0_D30+15j - ; ... - ld a, (hl) +loc_0_D52: ld a, (hl) ; CODE XREF: sub_0_D30+Fj sub_0_D30+15j ld (loc_0_D41+1), a inc hl dec bc @@ -1982,104 +1971,58 @@ loc_0_D52: ; CODE XREF: sub_0_D30+Fj sub_0_D30+15j call sub_0_FAA xor a ret -; End of function sub_0_D30 ;---------------------------------------------------------------------------- -loc_0_D68: ; CODE XREF: sub_0_D0E+9p sub_0_D30+1Ep - ; ... - ld (byte_0_D6F), a +loc_0_D68: ld (byte_0_D6F), a ; CODE XREF: sub_0_D0E+9p sub_0_D30+1Ep push bc push de push hl -;---------------------------------------------------------------------------- - .db 0Eh ; -byte_0_D6F: .db 0 ; DATA XREF: seg000:0D68w - .db 21h ; ! - .db 0Eh ; - .db 28h ; ( - .db 0CDh ; Í - .db 69h ; i - .db 6 ; - .db 20h ; - .db 1Fh ; - .db 21h ; ! - .db 0Eh ; - .db 28h ; ( - .db 0CDh ; Í - .db 4Ah ; J - .db 6 ; - .db 0Eh ; - .db 1Ah ; - .db 11h ; - .db 11h ; - .db 28h ; ( - .db 0CDh ; Í - .db 5 ; - .db 0 ; - .db 0Eh ; - .db 2Ch ; , - .db 1Eh ; - .db 1 ; - .db 0CDh ; Í - .db 5 ; - .db 0 ; - .db 0Eh ; - .db 15h ; - .db 11h ; - .db 0A3h ; £ - .db 17h ; - .db 0CDh ; Í - .db 71h ; q - .db 4 ; - .db 30h ; 0 - .db 0D7h ; × - .db 0E1h ; á - .db 0D1h ; Ñ - .db 0C1h ; Á - .db 0C9h ; É - .db 21h ; ! - .db 0E0h ; à - .db 2Ch ; , - .db 0CDh ; Í - .db 88h ; ? - .db 6 ; - .db 6 ; - .db 4 ; - .db 0C5h ; Å - .db 3Eh ; > - .db 8 ; - .db 0CDh ; Í - .db 0BAh ; º - .db 13h ; - .db 6 ; - .db 64h ; d - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 38h ; 8 - .db 8 ; - .db 0FEh ; þ - .db 4Fh ; O - .db 28h ; ( - .db 8 ; - .db 0FEh ; þ - .db 0FDh ; ý - .db 28h ; ( - .db 4 ; - .db 0C1h ; Á - .db 10h ; - .db 0E8h ; è - .db 0C5h ; Å - .db 0C1h ; Á - .db 6 ; - .db 1 ; - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 0AFh ; ¯ - .db 0C9h ; É - .db 18h ; +byte_0_D6F: .equ $+1 +loc_0_D6E: LD C,0 + LD HL,280EH + CALL sub_0_669 + JR NZ,loc_0_0D97 + LD HL,280EH + CALL sub_0_64A + LD C,1AH ;set dma + LD DE,2811H + CALL bdos + LD C,2CH ;??? + LD E,1 + CALL bdos + LD C,15H ;wr. seq. + LD DE,17A3H + CALL sub_0_471 + JR NC,loc_0_D6E +loc_0_0D97: POP HL + POP DE + POP BC + RET + +sub_0_D9B: LD HL,2CE0H + CALL sub_0_688 + LD B,4 +loc_0_0DA3: PUSH BC + LD A,8 + CALL 13BAH + LD B,64H + CALL sub_0_DE7 + JR C,loc_0_DB8 + CP 4FH + JR Z,loc_0_DBC + CP 0FDH + JR Z,loc_0_DBC +loc_0_DB8: POP BC + DJNZ loc_0_0DA3 + PUSH BC +loc_0_DBC: POP BC + LD B,1 + CALL sub_0_DE7 + XOR A + RET + +stab_0_DC4: .db 18h ; .db 18h ; .db 18h ; .db 18h ; @@ -2102,20 +2045,10 @@ byte_0_D6F: .db 0 ; DATA XREF: seg000:0D68w .db 0 ; ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_DD9: ; CODE XREF: sub_0_8D1+83p - ld hl, 0DC4h -; End of function sub_0_DD9 - - -;---------------------------------------------------------------------------- - -; S u b r o u t i n e - -sub_0_DDC: ; CODE XREF: sub_0_DDC+9j sub_0_13BA+6p - ld a, (hl) +sub_0_DD9: ld hl,stab_0_DC4 ; CODE XREF: sub_0_8D1+83p +sub_0_DDC: ld a, (hl) ; CODE XREF: sub_0_DDC+9j sub_0_13BA+6p inc hl or a ret z @@ -2123,37 +2056,27 @@ sub_0_DDC: ; CODE XREF: sub_0_DDC+9j sub_0_13BA+6p call loc_0_145C pop hl jr sub_0_DDC -; End of function sub_0_DDC - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_DE7: ; CODE XREF: sub_0_FD1+11p - ; sub_0_11C1+2Dp ... - push bc - call sub_0_16AA +sub_0_DE7: push bc ; CODE XREF: sub_0_FD1+11p + call sub_0_16AA ; sub_0_11C1+2Dp ... call nz, sub_0_16A5 cp 1Bh ld a, 18h ld c, 0Ah call z, sub_0_57F pop bc - -loc_0_DF8: ; CODE XREF: sub_0_DE7+16j - call sub_0_5D4 +loc_0_DF8: call sub_0_5D4 ; CODE XREF: sub_0_DE7+16j jr nz, loc_0_E03 djnz loc_0_DF8 ld a, 0FEh scf - ret -;---------------------------------------------------------------------------- + ret -loc_0_E03: ; CODE XREF: sub_0_DE7+14j - or a +loc_0_E03: or a ; CODE XREF: sub_0_DE7+14j ret -; End of function sub_0_DE7 ;---------------------------------------------------------------------------- loc_0_E05: LD B,64H @@ -2219,7 +2142,7 @@ loc_0_E50: LD B,64H ; 0e50 06 64 LD B,64H ; 0e6e 06 64 CALL sub_0_DE7 ; 0e70 cd e7 0d RET C ; 0e73 d8 -loc_0_0E74: LD HL,0EA6H ; 0e74 21 a6 0e +loc_0_0E74: LD HL,loc_0_EA6 ; 0e74 21 a6 0e LD BC,0BH ; 0e77 01 0b 00 CPIR ; 0e7a ed b1 JP Z,67FH ; 0e7c ca 7f 06 @@ -2238,23 +2161,23 @@ loc_0_E8B: LD A,L ; 0e8b 7d XOR 40H ; 0e93 ee 40 RET ; 0e95 c9 - LD A,7FH ;0e96 3e 7f - RET ;0e98 c9 +loc_0_E96: LD A,7FH + RET - LD A,0FFH ;0e99 3e ff - RET ;0e9b c9 +loc_0_E99: LD A,0FFH + RET -loc_0_E9C: LD A,0FFH ;0e9c 3e ff - OR 80H ;0e9e f6 80 - SCF ;0ea0 37 - RET ;0ea1 c9 +loc_0_E9C: LD A,0FFH +loc_0_E9E: OR 80H + SCF + RET .db 11h ; .db 91h ; ? .db 13h ; .db 93h ; ? - .db 11h ; +loc_0_EA6: .db 11h ; .db 91h ; ? .db 13h ; .db 93h ; ? @@ -2265,28 +2188,19 @@ loc_0_E9C: LD A,0FFH ;0e9c 3e ff .db 6Bh ; k .db 6Ch ; l .db 6Dh ; m - .db 99h ; ? - .db 0Eh ; - .db 96h ; ? - .db 0Eh ; - .db 9Eh ; ? - .db 0Eh ; - .db 9Eh ; ? - .db 0Eh ; - .db 9Eh ; ? - .db 0Eh ; - .db 9Eh ; ? - .db 0Eh ; - .db 9Eh ; ? - .db 0Eh ; - .db 50h ; P - .db 0Eh ; - .db 50h ; P - .db 0Eh ; - .db 50h ; P - .db 0Eh ; - .db 50h ; P - .db 0Eh ; + + .dw loc_0_E99 + .dw loc_0_E96 + .dw loc_0_E9E + .dw loc_0_E9E + .dw loc_0_E9E + .dw loc_0_E9E + .dw loc_0_E9E + .dw loc_0_E50 + .dw loc_0_E50 + .dw loc_0_E50 + .dw loc_0_E50 + .db 0B7h ; · .db 2Ah ; * .db 0EBh ; ë @@ -2520,18 +2434,15 @@ loc_0_E9C: LD A,0FFH ;0e9c 3e ff ; S u b r o u t i n e sub_0_FAA: ; CODE XREF: seg000:0AE5p sub_0_BD3+1Ap - ; ... + ld hl, 2CE9h ld de, 2CEDh ldi ldi ld hl, 0 ld (2CEFh), hl -; End of function sub_0_FAA - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e sub_0_FBA: ; CODE XREF: sub_0_11FA+4Ep @@ -3850,7 +3761,7 @@ loc_0_15CD: ; CODE XREF: sub_0_15A5+1Bj ; S u b r o u t i n e sub_0_15D9: ; CODE XREF: sub_0_1522p sub_0_1522+1Ap - ; ... + ld a, (hl) cp 21h jr c, loc_0_15F8 @@ -4392,7 +4303,7 @@ sub_0_1779: ; CODE XREF: sub_0_172E+16p ; S u b r o u t i n e sub_0_1786: ; CODE XREF: start+1Ep sub_0_4A4+Cp - ; ... + push hl call sub_0_178C pop hl From 37490e7d44402a4e43aa94955ae960aabdbdb519 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sat, 30 Oct 2021 19:26:00 +0800 Subject: [PATCH 06/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 181 +++++++++++++---------------------- 1 file changed, 69 insertions(+), 112 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index 19b4a6fd..03e692df 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -1111,7 +1111,7 @@ loc_0_7E5: .db 20h ; .db 0BBh ; » .db 0DEh ; Þ -loc_0_7ED: PUSH AF +sub_0_7ED: PUSH AF smod_w_7F0: .EQU $+2 LD IY,289DH LD IX,2899H @@ -2105,7 +2105,7 @@ loc_0_E2A: .db 11h ; dc1 .db 0ah ; lf .db 18h ; can -loc_0_E2F: ld b,64H +sub_0_E2F: ld b,64H CALL sub_0_DE7 RET C LD E,A @@ -2120,46 +2120,46 @@ loc_0_E36: AND 60H JR Z,0E2FH LD A,(2C9DH) OR A - JR NZ,loc_0_E2F + JR NZ,sub_0_E2F LD A,E RET -loc_0_E50: LD B,64H ; 0e50 06 64 - CALL sub_0_DE7 ; 0e52 cd e7 0d - RET C ; 0e55 d8 - CP 18H ; 0e56 fe 18 - JR NZ,loc_0_0E74 ; 0e58 20 1a - LD B,64h ; 0e5a 06 64 - CALL sub_0_DE7 ; 0e5c cd e7 0d - RET C ; 0e5f d8 - CP 18H ; 0e60 fe 18 - JR NZ,loc_0_0E74 ; 0e62 20 10 - LD B,64H ; 0e64 06 64 - CALL sub_0_DE7 ; 0e66 cd e7 0d - RET C ; 0e69 d8 - CP 18H ; 0e6a fe 18 - JR NZ,loc_0_0E74 ; 0e6c 20 06 - LD B,64H ; 0e6e 06 64 - CALL sub_0_DE7 ; 0e70 cd e7 0d - RET C ; 0e73 d8 -loc_0_0E74: LD HL,loc_0_EA6 ; 0e74 21 a6 0e - LD BC,0BH ; 0e77 01 0b 00 - CPIR ; 0e7a ed b1 - JP Z,67FH ; 0e7c ca 7f 06 - LD L,A ; 0e7f 6f - LD A,(2C9DH) ; 0e80 3a 9d 2c - OR A ; 0e83 b7 - JR Z,loc_0_E8B ; 0e84 28 05 - LD A,L ; 0e86 7d - AND 60H ; 0e87 e6 60 - JR Z,loc_0_E50 ; 0e89 28 c5 -loc_0_E8B: LD A,L ; 0e8b 7d - AND 60H ; 0e8c e6 60 - CP 40H ; 0e8e fe 40 - JR NZ,loc_0_E9C ; 0e90 20 0a - LD A,L ; 0e92 7d - XOR 40H ; 0e93 ee 40 - RET ; 0e95 c9 +loc_0_E50: LD B,64H + CALL sub_0_DE7 + RET C + CP 18H + JR NZ,loc_0_0E74 + LD B,64h + CALL sub_0_DE7 + RET C + CP 18H + JR NZ,loc_0_0E74 + LD B,64H + CALL sub_0_DE7 + RET C + CP 18H + JR NZ,loc_0_0E74 + LD B,64H + CALL sub_0_DE7 + RET C +loc_0_0E74: LD HL,loc_0_EA6 + LD BC,0BH + CPIR + JP Z,sub_0_67F + LD L,A + LD A,(2C9DH) + OR A + JR Z,loc_0_E8B + LD A,L + AND 60H + JR Z,loc_0_E50 +loc_0_E8B: LD A,L + AND 60H + CP 40H + JR NZ,loc_0_E9C + LD A,L + XOR 40H + RET loc_0_E96: LD A,7FH RET @@ -2172,7 +2172,6 @@ loc_0_E9E: OR 80H SCF RET - .db 11h ; .db 91h ; ? .db 13h ; @@ -2201,77 +2200,34 @@ loc_0_EA6: .db 11h ; .dw loc_0_E50 .dw loc_0_E50 - .db 0B7h ; · - .db 2Ah ; * - .db 0EBh ; ë - .db 2Ch ; , - .db 0EDh ; í - .db 5Bh ; [ - .db 0EFh ; ï - .db 2Ch ; , - .db 0EDh ; í - .db 52h ; R - .db 0DAh ; Ú - .db 4Eh ; N - .db 0Fh ; - .db 0CDh ; Í - .db 0A0h ; - .db 8 ; - .db 21h ; ! - .db 0 ; - .db 0 ; - .db 22h ; " - .db 0F9h ; ù - .db 2Ch ; , - .db 0CDh ; Í - .db 2Fh ; / - .db 0Eh ; - .db 0DAh ; Ú - .db 38h ; 8 - .db 0Fh ; - .db 0CDh ; Í - .db 0A2h ; ¢ - .db 0Fh ; - .db 0CCh ; Ì - .db 0EDh ; í - .db 7 ; - .db 0C4h ; Ä - .db 85h ; ? - .db 8 ; - .db 2Ah ; * - .db 0EBh ; ë - .db 2Ch ; , - .db 0EDh ; í - .db 4Bh ; K - .db 0EFh ; ï - .db 2Ch ; , - .db 0EDh ; í - .db 42h ; B - .db 0CAh ; Ê - .db 4Eh ; N - .db 0Fh ; - .db 3 ; - .db 0EDh ; í - .db 43h ; C - .db 0EFh ; ï - .db 2Ch ; , - .db 2Ah ; * - .db 0F9h ; ù - .db 2Ch ; , - .db 23h ; # - .db 22h ; " - .db 0F9h ; ù - .db 2Ch ; , - .db 2Ah ; * - .db 0EDh ; í - .db 2Ch ; , - .db 77h ; w - .db 23h ; # - .db 22h ; " - .db 0EDh ; í - .db 2Ch ; , - .db 18h ; - .db 0CFh ; Ï + OR A ;0ec7 b7 + LD HL,(2CEBH) ;0ec8 2a eb 2c + LD DE,(2CEFH) ;0ecb ed 5b ef 2c + SBC HL,DE ;0ecf ed 52 + JP C,0F4EH ;0ed1 da 4e 0f + CALL sub_0_8A0 ;0ed4 cd a0 08 + LD HL,0 ;0ed7 21 00 00 + LD (2CF9H),HL ;0eda 22 f9 2c +loc_0_EDD: CALL sub_0_E2F ;0edd cd 2f 0e + JP C,0F38H ;0ee0 da 38 0f + CALL sub_0_FA2 ;0ee3 cd a2 0f + CALL Z,sub_0_7ED ;0ee6 cc ed 07 + CALL NZ,loc_0_885 ;0ee9 c4 85 08 + LD HL,(2CEBH) ;0eec 2a eb 2c + LD BC,(2CEFH) ;0eef ed 4b ef 2c + SBC HL,BC ;0ef3 ed 42 + JP Z,0F4EH ;0ef5 ca 4e 0f + INC BC ;0ef8 03 + LD (2CEFH),BC ;0ef9 ed 43 ef 2c + LD HL,(2CF9H) ;0efd 2a f9 2c + INC HL ;0f00 23 + LD (2CF9H),HL ;0f01 22 f9 2c + LD HL,(2CEDH) ;0f04 2a ed 2c + LD (HL),A ;0f07 77 + INC HL ;0f08 23 + LD (2CEDH),HL ;0f09 22 ed 2c + JR loc_0_EDD ;0f0c 18 cf + .db 0E8h ; è .db 0E9h ; é .db 0EAh ; ê @@ -2420,7 +2376,8 @@ loc_0_EA6: .db 11h ; .db 0C3h ; à .db 73h ; s .db 0Fh ; - .db 5Fh ; _ + +sub_0_FA2: .db 5Fh ; _ .db 3Ah ; : .db 9Eh ; ? .db 2Ch ; , From 05fb150ad357a1244b7f714cfea665054e91b8d1 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 31 Oct 2021 06:57:51 +0800 Subject: [PATCH 07/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 56 ++++++++++++++---------------------- 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index 03e692df..38c1d849 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -900,19 +900,16 @@ loc_0_6E0: POP HL RET ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_6E4: ; CODE XREF: sub_0_11FA+4Bp - push bc +sub_0_6E4: push bc ; CODE XREF: sub_0_11FA+4Bp push de push hl or a ex af, af' ld a, 4 -loc_0_6EB: ; CODE XREF: sub_0_6E4+10j - ex af, af' +loc_0_6EB: ex af, af' ; CODE XREF: sub_0_6E4+10j ld a, (de) adc a, (hl) ld (bc), a @@ -926,15 +923,11 @@ loc_0_6EB: ; CODE XREF: sub_0_6E4+10j pop de pop bc ret -; End of function sub_0_6E4 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_6FA: ; CODE XREF: seg000:0799p - push bc +sub_0_6FA: push bc ; CODE XREF: seg000:0799p push de push hl ex de, hl @@ -956,7 +949,6 @@ loc_0_702: ex af, af' ; CODE XREF: sub_0_6FA+11j pop de pop bc ret -; End of function sub_0_6FA ;---------------------------------------------------------------------------- @@ -972,29 +964,20 @@ loc_0_71C: INC HL ADC A,(HL) LD (HL),A DJNZ loc_0_71C -loc_0_723: POP HL +loc_0_723: POP HL POP BC RET ;---------------------------------------------------------------------------- -loc_0_726: ; CODE XREF: sub_0_8A0+Cj - call sub_0_688 - -;---------------------------------------------------------------------------- - -; S u b r o u t i n e - -sub_0_729: ; CODE XREF: seg000:0A77p - push bc +loc_0_726: call sub_0_688 ; CODE XREF: sub_0_8A0+Cj +sub_0_729: push bc ; CODE XREF: seg000:0A77p push hl ld a, (hl) sub 1 ld (hl), a ld b, 3 - -loc_0_731: ; CODE XREF: sub_0_729+Dj - inc hl +loc_0_731: inc hl ; CODE XREF: sub_0_729+Dj ld a, (hl) sbc a, 0 ld (hl), a @@ -1002,7 +985,6 @@ loc_0_731: ; CODE XREF: sub_0_729+Dj pop hl pop bc ret -; End of function sub_0_729 ;---------------------------------------------------------------------------- @@ -3437,11 +3419,11 @@ sub_0_1492: ; CODE XREF: start+56p sub_0_961+79p sub_0_14A7: ; CODE XREF: sub_0_1492+Ep xor a ld (de), a - ld (2D0Dh), a + ld (byte_0_2D0D), a ld (2D0Ch), a call sub_0_1687 ld a, c - ld (2D0Eh), a + ld (byte_0_2D0E), a push de ld a, (hl) cp 3Ah @@ -3473,7 +3455,7 @@ loc_0_14D7: ; CODE XREF: sub_0_14A7+29j loc_0_14E5: ; CODE XREF: sub_0_14A7+2Ej ; sub_0_14A7+33j ... - ld a, (2D0Dh) + ld a, (byte_0_2D0D) ld (de), a push de inc de @@ -3507,7 +3489,7 @@ loc_0_1513: ; CODE XREF: sub_0_14A7+64j ld bc, 5 add hl, bc ex de, hl - ld a, (2D0Eh) + ld a, (byte_0_2D0E) ld (de), a loc_0_151D: ; CODE XREF: sub_0_1492+13j @@ -3598,7 +3580,7 @@ sub_0_1552: ; CODE XREF: sub_0_154A+2p sub 40h cp b jr nc, loc_0_15CA - ld (2D0Dh), a + ld (byte_0_2D0D), a inc hl ld a, (hl) cp 20h @@ -3630,7 +3612,7 @@ loc_0_1589: ; CODE XREF: sub_0_1552+28j call sub_0_15FA cp c jr nc, loc_0_15CA - ld (2D0Eh), a + ld (byte_0_2D0E), a xor a ret ;---------------------------------------------------------------------------- @@ -3704,10 +3686,10 @@ loc_0_15CA: ; CODE XREF: sub_0_1552+3j loc_0_15CD: ; CODE XREF: sub_0_15A5+1Bj dec de ld a, (de) - ld (2D0Eh), a + ld (byte_0_2D0E), a dec de ld a, (de) - ld (2D0Dh), a + ld (byte_0_2D0D), a xor a ret ; End of function sub_0_15A5 @@ -4308,11 +4290,15 @@ byte_0_17A3: .db 0 .ds 8 nstack: word_0_1808: .ds 2 - .ds 14F6h + .ds 1087h +byte_0_2891: .ds 1 + .ds 46Eh byte_0_2D00: .ds 1 .ds 2 byte_0_2D03: .ds 1 byte_0_2D04: .ds 1 - .ds 10 + .ds 8 +byte_0_2D0D: .ds 1 +byte_0_2D0E: .ds 1 word_0_2D0F: .ds 2 .end ; start From 171d4d4ae7dc0f209f512f85e2d4b2cf810bdfee Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 31 Oct 2021 07:24:41 +0800 Subject: [PATCH 08/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 318 ++++++++--------------------------- 1 file changed, 69 insertions(+), 249 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index 38c1d849..6cb319a8 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -3639,17 +3639,13 @@ sub_0_159D: ; CODE XREF: sub_0_14A7+30p ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_15A5: ; CODE XREF: sub_0_159D+2p - call sub_0_1662 +sub_0_15A5: call sub_0_1662 ; CODE XREF: sub_0_159D+2p jr z, loc_0_15CA ex de, hl inc hl - -loc_0_15AC: ; CODE XREF: sub_0_15A5+23j - ld a, (de) +loc_0_15AC: ld a, (de) ; CODE XREF: sub_0_15A5+23j or a jr z, loc_0_15CA inc de @@ -3657,17 +3653,13 @@ loc_0_15AC: ; CODE XREF: sub_0_15A5+23j push hl push de ld b, 8 - -loc_0_15B6: ; CODE XREF: sub_0_15A5+17j - ld a, (de) +loc_0_15B6: ld a, (de) ; CODE XREF: sub_0_15A5+17j cp (hl) jr nz, loc_0_15BE inc hl inc de djnz loc_0_15B6 - -loc_0_15BE: ; CODE XREF: sub_0_15A5+13j - pop de +loc_0_15BE: pop de ; CODE XREF: sub_0_15A5+13j pop hl jr z, loc_0_15CD ex de, hl @@ -3675,16 +3667,11 @@ loc_0_15BE: ; CODE XREF: sub_0_15A5+13j add hl, bc ex de, hl jr loc_0_15AC -;---------------------------------------------------------------------------- -loc_0_15CA: ; CODE XREF: sub_0_1552+3j - ; sub_0_1552+14j ... - or 0FFh - ret -;---------------------------------------------------------------------------- +loc_0_15CA: or 0FFh ; CODE XREF: sub_0_1552+3j + ret ; sub_0_1552+14j ... -loc_0_15CD: ; CODE XREF: sub_0_15A5+1Bj - dec de +loc_0_15CD: dec de ; CODE XREF: sub_0_15A5+1Bj ld a, (de) ld (byte_0_2D0E), a dec de @@ -3692,16 +3679,11 @@ loc_0_15CD: ; CODE XREF: sub_0_15A5+1Bj ld (byte_0_2D0D), a xor a ret -; End of function sub_0_15A5 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_15D9: ; CODE XREF: sub_0_1522p sub_0_1522+1Ap - - ld a, (hl) +sub_0_15D9: ld a, (hl) ; CODE XREF: sub_0_1522p sub_0_1522+1Ap cp 21h jr c, loc_0_15F8 cp 3Dh @@ -3721,25 +3703,17 @@ sub_0_15D9: ; CODE XREF: sub_0_1522p sub_0_1522+1Ap or a ret z cp 3Bh - ret -;---------------------------------------------------------------------------- + ret -loc_0_15F8: ; CODE XREF: sub_0_15D9+3j - xor a +loc_0_15F8: xor a ; CODE XREF: sub_0_15D9+3j ret -; End of function sub_0_15D9 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_15FA: ; CODE XREF: sub_0_1552+3Dp - push bc +sub_0_15FA: push bc ; CODE XREF: sub_0_1552+3Dp ld bc, 1100h - -loc_0_15FE: ; CODE XREF: sub_0_15FA+22j - ld a, (hl) +loc_0_15FE: ld a, (hl) ; CODE XREF: sub_0_15FA+22j call sub_0_15D9 jr z, loc_0_161E inc hl @@ -3759,54 +3733,32 @@ loc_0_15FE: ; CODE XREF: sub_0_15FA+22j jr c, loc_0_1622 ld c, a djnz loc_0_15FE - -loc_0_161E: ; CODE XREF: sub_0_15FA+8j - ld a, c +loc_0_161E: ld a, c ; CODE XREF: sub_0_15FA+8j pop bc or a ret -;---------------------------------------------------------------------------- - -loc_0_1622: ; CODE XREF: sub_0_15FA+Ej - ; sub_0_15FA+13j ... - pop bc - scf +; +loc_0_1622: pop bc ; CODE XREF: sub_0_15FA+Ej + scf ; sub_0_15FA+13j ... ret -; End of function sub_0_15FA - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_1625: ; CODE XREF: sub_0_1552+1Ep - ; sub_0_1552+2Ap ... - sub 30h - ret c +sub_0_1625: sub 30h ; CODE XREF: sub_0_1552+1Ep + ret c ; sub_0_1552+2Ap ... cp 0Ah ccf ret -; End of function sub_0_1625 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_162C: ; CODE XREF: sub_0_1492+8p - xor a +sub_0_162C: xor a ; CODE XREF: sub_0_1492+8p ld (de), a inc de call sub_0_1632 -; End of function sub_0_162C - - -;---------------------------------------------------------------------------- - -; S u b r o u t i n e - -sub_0_1632: ; CODE XREF: sub_0_14A7+44p - ld b, 0Bh +sub_0_1632: ld b, 0Bh ; CODE XREF: sub_0_14A7+44p ld a, 20h call sub_0_1645 xor a @@ -3818,86 +3770,58 @@ sub_0_1632: ; CODE XREF: sub_0_14A7+44p inc de ld b, 3 xor a -; End of function sub_0_1632 - - -;---------------------------------------------------------------------------- - -; S u b r o u t i n e - -sub_0_1645: ; CODE XREF: sub_0_1632+4p - ; sub_0_1645+2j - ld (de), a - inc de +sub_0_1645: ld (de), a ; CODE XREF: sub_0_1632+4p + inc de ; sub_0_1645+2j djnz sub_0_1645 ret -; End of function sub_0_1645 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_164A: ; CODE XREF: sub_0_1552p - push hl +sub_0_164A: push hl ; CODE XREF: sub_0_1552p push de ld de, 2Eh jp loc_0_1669 -; End of function sub_0_164A - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_1652: ; CODE XREF: sub_0_1552+7p - push hl +sub_0_1652: push hl ; CODE XREF: sub_0_1552+7p push de ld de, 2Ch jp loc_0_1669 -; End of function sub_0_1652 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_165A: ; CODE XREF: sub_0_1552+38p - push hl +sub_0_165A: push hl ; CODE XREF: sub_0_1552+38p push de ld de, 2Dh jp loc_0_1669 -; End of function sub_0_165A - - +; ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_1662: ; CODE XREF: sub_0_15A5p - push de +sub_0_1662: push de ; CODE XREF: sub_0_15A5p ld de, 15h jp loc_0_1676 + ;---------------------------------------------------------------------------- -loc_0_1669: ; CODE XREF: sub_0_164A+5j - ; sub_0_1652+5j ... - ld hl, (word_0_2D0F) - ld a, h +loc_0_1669: ld hl, (word_0_2D0F) ; CODE XREF: sub_0_164A+5j + ld a, h ; sub_0_1652+5j ... or l jr z, loc_0_1671 add hl, de - -loc_0_1671: ; CODE XREF: sub_0_1662+Cj - ld a, (hl) +loc_0_1671: ld a, (hl) ; CODE XREF: sub_0_1662+Cj pop de pop hl or a ret + ;---------------------------------------------------------------------------- -loc_0_1676: ; CODE XREF: sub_0_1662+4j - ld hl, (word_0_2D0F) +loc_0_1676: ld hl, (word_0_2D0F) ; CODE XREF: sub_0_1662+4j add hl, de ld e, (hl) inc hl @@ -3908,20 +3832,16 @@ loc_0_1676: ; CODE XREF: sub_0_1662+4j pop de or a ret -; End of function sub_0_1662 ;---------------------------------------------------------------------------- - ld (word_0_2D0F),hl +loc_0_1683: ld (word_0_2D0F),hl ret ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_1687: ; CODE XREF: sub_0_14A7+8p - ; sub_0_1632+Ap - push af - push de +sub_0_1687: push af ; CODE XREF: sub_0_14A7+8p + push de ; sub_0_1632+Ap push hl ld c, 19h call sub_0_16AF @@ -3936,65 +3856,43 @@ sub_0_1687: ; CODE XREF: sub_0_14A7+8p pop de pop af ret -; End of function sub_0_1687 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_169E: ; CODE XREF: sub_0_961+88p - ld a, 11h +sub_0_169E: ld a, 11h ; CODE XREF: sub_0_961+88p call sub_0_16B8 inc a ret -; End of function sub_0_169E - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_16A5: ; CODE XREF: sub_0_DE7+4p - ld a, 1 +sub_0_16A5: ld a, 1 ; CODE XREF: sub_0_DE7+4p jp sub_0_16B8 -; End of function sub_0_16A5 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_16AA: ; CODE XREF: sub_0_DE7+1p - ld a, 0Bh +sub_0_16AA: ld a, 0Bh ; CODE XREF: sub_0_DE7+1p jp sub_0_16B8 -; End of function sub_0_16AA - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_16AF: ; CODE XREF: sub_0_1687+5p - ; sub_0_1687+Dp - push de - push bc +sub_0_16AF: push de ; CODE XREF: sub_0_1687+5p + push bc ; sub_0_1687+Dp call bdos pop bc pop de or a ret -; End of function sub_0_16AF - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_16B8: ; CODE XREF: sub_0_169E+2p - ; sub_0_16A5+2j ... - push hl - push de +sub_0_16B8: push hl ; CODE XREF: sub_0_169E+2p + push de ; sub_0_16A5+2j ... push bc ld c, a call bdos @@ -4003,15 +3901,11 @@ sub_0_16B8: ; CODE XREF: sub_0_169E+2p pop de pop hl ret -; End of function sub_0_16B8 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_16C4: ; CODE XREF: sub_0_4A4+10p - push bc +sub_0_16C4: push bc ; CODE XREF: sub_0_4A4+10p push hl push de push af @@ -4026,43 +3920,29 @@ sub_0_16C4: ; CODE XREF: sub_0_4A4+10p pop hl pop bc ret -; End of function sub_0_16C4 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_16DA: ; CODE XREF: sub_0_16C4+6p - ; sub_0_16C4+Ep ... - ld a, (de) - and 7Fh +sub_0_16DA: ld a, (de) ; CODE XREF: sub_0_16C4+6p + and 7Fh ; sub_0_16C4+Ep ... cp 20h jr z, loc_0_16E3 ld (hl), a inc hl - -loc_0_16E3: ; CODE XREF: sub_0_16DA+5j - inc de +loc_0_16E3: inc de ; CODE XREF: sub_0_16DA+5j djnz sub_0_16DA ret -; End of function sub_0_16DA - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_16E7: ; CODE XREF: sub_0_482+6p sub_0_4A4+1Fp - push bc +sub_0_16E7: push bc ; CODE XREF: sub_0_482+6p sub_0_4A4+1Fp ld b, 0 jp loc_0_16F0 - -;---------------------------------------------------------------------------- -sub_0_16ED: PUSH BC ; unref. ? +sub_0_16ED: PUSH BC LD B,0FFH -loc_0_16F0: ; CODE XREF: sub_0_16E7+3j - push hl +loc_0_16F0: push hl ; CODE XREF: sub_0_16E7+3j push af ld h, 64h call sub_0_1703 @@ -4073,19 +3953,12 @@ loc_0_16F0: ; CODE XREF: sub_0_16E7+3j pop hl pop bc ret -; End of function sub_0_16E7 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_1703: ; CODE XREF: sub_0_16E7+Dp - ; sub_0_16E7+12p - ld l, 0FFh - -loc_0_1705: ; CODE XREF: sub_0_1703+4j - sub h +sub_0_1703: ld l, 0FFh ; CODE XREF: sub_0_16E7+Dp +loc_0_1705: sub h ; CODE XREF: sub_0_1703+4j inc l jr nc, loc_0_1705 add a, h @@ -4099,32 +3972,17 @@ loc_0_1705: ; CODE XREF: sub_0_1703+4j ld a, 20h jr z, loc_0_171A xor a -; End of function sub_0_1703 - - -;---------------------------------------------------------------------------- - -; S u b r o u t i n e - -sub_0_1717: ; CODE XREF: sub_0_16E7+15p - ; sub_0_1703+Aj - add a, 30h +sub_0_1717: add a, 30h ; CODE XREF: sub_0_16E7+15p ld b, a - -loc_0_171A: ; CODE XREF: sub_0_1703+11j - ld (de), a +loc_0_171A: ld (de), a ; CODE XREF: sub_0_1703+11j inc de ld a, h ret -; End of function sub_0_1717 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_171E: ; CODE XREF: sub_0_1492+4p - push af +sub_0_171E: push af ; CODE XREF: sub_0_1492+4p push hl loc_0_1720: ld a, (hl) or a @@ -4136,14 +3994,11 @@ loc_0_1720: ld a, (hl) loc_0_172B: pop hl pop af ret -; End of function sub_0_171E ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_172E: ; CODE XREF: start+2Fp sub_0_961+70p - push bc +sub_0_172E: push bc ; CODE XREF: start+2Fp sub_0_961+70p push de push hl ld c, a @@ -4152,9 +4007,7 @@ sub_0_172E: ; CODE XREF: start+2Fp sub_0_961+70p push hl inc hl inc hl - -loc_0_1737: ; CODE XREF: sub_0_172E+25j - call sub_0_176B +loc_0_1737: call sub_0_176B ; CODE XREF: sub_0_172E+25j or a jr z, loc_0_1760 ld (hl), e @@ -4172,23 +4025,16 @@ loc_0_1737: ; CODE XREF: sub_0_172E+25j xor a ld (de), a inc de - -loc_0_1751: ; CODE XREF: sub_0_172E+1Ej - ld a, b +loc_0_1751: ld a, b ; CODE XREF: sub_0_172E+1Ej or a jr nz, loc_0_1737 - -loc_0_1755: ; CODE XREF: sub_0_172E+14j - call sub_0_1779 +loc_0_1755: call sub_0_1779 ; CODE XREF: sub_0_172E+14j call sub_0_176B or a jr z, loc_0_1760 or 0FFh - -loc_0_1760: ; CODE XREF: sub_0_172E+Dj - ; sub_0_172E+1Aj ... - pop hl - push af +loc_0_1760: pop hl ; CODE XREF: sub_0_172E+Dj + push af ; sub_0_172E+1Aj ... ld a, (hl) sub b inc hl @@ -4198,17 +4044,12 @@ loc_0_1760: ; CODE XREF: sub_0_172E+Dj pop de pop bc ret -; End of function sub_0_172E - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_176B: ; CODE XREF: sub_0_172E+9p - ; sub_0_172E+2Ap ... - ld a, (de) - and 7Fh +sub_0_176B: ld a, (de) ; CODE XREF: sub_0_172E+9p + and 7Fh ; sub_0_172E+2Ap ... inc de cp 20h jr z, sub_0_176B @@ -4216,17 +4057,12 @@ sub_0_176B: ; CODE XREF: sub_0_172E+9p jr z, sub_0_176B dec de ret -; End of function sub_0_176B - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_1779: ; CODE XREF: sub_0_172E+16p - ; sub_0_172E+27p ... - ld a, (de) - and 7Fh +sub_0_1779: ld a, (de) ; CODE XREF: sub_0_172E+16p + and 7Fh ; sub_0_172E+27p ... ret z cp 20h ret z @@ -4234,51 +4070,35 @@ sub_0_1779: ; CODE XREF: sub_0_172E+16p ret z inc de jr sub_0_1779 -; End of function sub_0_1779 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_1786: ; CODE XREF: start+1Ep sub_0_4A4+Cp - - push hl +sub_0_1786: push hl ; CODE XREF: start+1Ep sub_0_4A4+Cp call sub_0_178C pop hl ret -; End of function sub_0_1786 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_178C: ; CODE XREF: sub_0_1786+1p - push bc - -loc_0_178D: ; CODE XREF: sub_0_178C+3j - ld (hl), a +sub_0_178C: push bc ; CODE XREF: sub_0_1786+1p +loc_0_178D: ld (hl), a ; CODE XREF: sub_0_178C+3j inc hl djnz loc_0_178D pop bc ret -; End of function sub_0_178C - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_1793: ; CODE XREF: sub_0_171E+6p - and 7Fh +sub_0_1793: and 7Fh ; CODE XREF: sub_0_171E+6p cp 61h ret c cp 7Bh ret nc and 5Fh ret -; End of function sub_0_1793 ;---------------------------------------------------------------------------- word_0_179E: .dw 2D11h ; DATA XREF: start+18r start+35r From 611394b76a386f481e31b02c3791ed9ab89900ec Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 31 Oct 2021 07:57:27 +0800 Subject: [PATCH 09/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 204 +++++++++++++---------------------- 1 file changed, 72 insertions(+), 132 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index 6cb319a8..4d4da26b 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -1612,7 +1612,7 @@ loc_0_B1A: CALL 0FD1H JP Z,sub_0_67F loc_0_B28: LD HL,byte_0_2D04 INC (HL) - CALL 482H + CALL sub_0_482 loc_0_B2F: POP BC DJNZ loc_0_AF3 XOR A @@ -1751,7 +1751,7 @@ loc_0_BE9: ; CODE XREF: sub_0_BD3+Ej call sub_0_64E ld a, 9 call sub_0_13BA - call sub_0_FD1 +loc_0_C0A: call sub_0_FD1 ld hl, loc_0_CE4 ld bc, 7 cpir @@ -1765,7 +1765,7 @@ loc_0_BE9: ; CODE XREF: sub_0_BD3+Ej loc_0_C1C: LD HL,byte_0_2D04 INC (HL) - CALL 482H + CALL sub_0_482 LD HL,byte_0_2D04 LD A,0AH CP (HL) @@ -1796,7 +1796,7 @@ loc_0_C36: LD DE,2CA7H loc_0_C57: LD HL,byte_0_2D04 INC (HL) - CALL 482H + CALL sub_0_482 LD HL,byte_0_2D04 LD A,0AH CP (HL) @@ -1825,7 +1825,7 @@ loc_0_C93: LD A,0FFH SCF RET -loc_0_C97: XOR A +sub_0_C97: XOR A LD (byte_0_2D04),A LD DE,2CF9H LD HL,2CABH @@ -1833,13 +1833,13 @@ loc_0_C97: XOR A CALL 6E4H JP 0FBAH -loc_0_CAA: CALL 0C97H - JP 0C0AH +loc_0_CAA: CALL sub_0_C97 + JP loc_0_C0A -loc_0_CB0: CALL 0C97H +loc_0_CB0: CALL sub_0_C97 JP 0C7FH -loc_0_CB6: CALL 0C97H +loc_0_CB6: CALL sub_0_C97 LD HL,2CABH LD DE,2CE0H CALL 692H @@ -1847,7 +1847,7 @@ loc_0_CB6: CALL 0C97H CALL sub_0_13BA JP 0C7FH -loc_0_CCA: CALL 0C97H +loc_0_CCA: CALL sub_0_C97 CALL 0D30H JP C,0C47H LD HL,2CABH @@ -1855,7 +1855,7 @@ loc_0_CCA: CALL 0C97H CALL 692H LD A,3 CALL sub_0_13BA - JP 0C0AH + JP loc_0_C0A loc_0_CE4: .db 6 .db 0FEh @@ -2415,7 +2415,7 @@ sub_0_FC9: ; CODE XREF: sub_0_BD3+1Dp sub_0_FD1: ; CODE XREF: sub_0_BD3+37p xor a - ld (2D01h), a + ld (byte_0_2D01), a ld hl, 400h ld (2CFEh), hl @@ -2872,7 +2872,7 @@ loc_0_109C: ; CODE XREF: sub_0_FD1+C1j sub_0_11C1: ; CODE XREF: sub_0_8D1+63p ; sub_0_11C1+30j ld a, 0FFh - ld (2D02h), a + ld (byte_0_2D02), a call sub_0_FAA ld a, (2C9Eh) cp 10h @@ -2916,10 +2916,10 @@ loc_0_11F3: ; CODE XREF: sub_0_11C1+1Cj sub_0_11FA: ; CODE XREF: sub_0_8D1+6Fp ; sub_0_8D1+7Dp ... ld a, 0FFh - ld (2D02h), a + ld (byte_0_2D02), a ld (2CA3h), a xor a - ld (2D07h), a + ld (byte_0_2D07), a call sub_0_FAA ld hl, 2CABh call sub_0_688 @@ -2929,7 +2929,7 @@ sub_0_11FA: ; CODE XREF: sub_0_8D1+6Fp jr z, loc_0_121A ld a, 15h loc_0_121A: call loc_0_145C ; CODE XREF: sub_0_11FA+1Cj -loc_0_121D: ld a, (2D07h) ; CODE XREF: sub_0_11FA+5Ej +loc_0_121D: ld a, (byte_0_2D07) ; CODE XREF: sub_0_11FA+5Ej or a ld b, 82h jr z, loc_0_1227 @@ -2939,7 +2939,7 @@ loc_0_1227: call sub_0_1289 ; CODE XREF: sub_0_11FA+29j push af call sub_0_50B pop af - ld hl, 2D07h + ld hl, byte_0_2D07 cp (hl) jr z, loc_0_1250 dec a @@ -2975,7 +2975,7 @@ loc_0_126D: ; CODE XREF: sub_0_11FA+3Fj ; sub_0_11FA+62j cp 0FFh jr nz, loc_0_1285 - ld a, (2D02h) + ld a, (byte_0_2D02) cp 0FFh jr nz, loc_0_1285 ld a, (2C9Eh) @@ -3005,13 +3005,13 @@ sub_0_1289: ; CODE XREF: sub_0_11C1+18p xor a ld (byte_0_2D04), a ld a, 0 - ld (2D09h), a + ld (byte_0_2D09), a loc_0_1296: ; CODE XREF: sub_0_1289+12Aj ld a, (byte_0_2D03) ld b, a call sub_0_DE7 - ld (2D08h), a + ld (byte_0_2D08), a ld hl, 12AEh ld bc, 4 cpir @@ -3226,13 +3226,13 @@ loc_0_1296: ; CODE XREF: sub_0_1289+12Aj loc_0_137A: ; CODE XREF: sub_0_1289+22j ld a, 0 - ld (2D09h), a + ld (byte_0_2D09), a loc_0_137F: ; CODE XREF: sub_0_1289+FBj ld b, 0Ah call sub_0_DE7 jr nc, loc_0_137F - ld a, (2D02h) + ld a, (byte_0_2D02) cp 0FFh jr nz, loc_0_139A ld a, (2C9Eh) @@ -3265,12 +3265,10 @@ loc_0_13A1: ; CODE XREF: sub_0_1289+10Bj ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_13BA: ; CODE XREF: sub_0_BD3+34p - ld (2CE8h), a - ld hl, 1403h +sub_0_13BA: ld (2CE8h), a ; CODE XREF: sub_0_BD3+34p + ld hl,loc_0_1403 call sub_0_DDC call sub_0_8A0 ld a, (2CE8h) @@ -3278,9 +3276,7 @@ sub_0_13BA: ; CODE XREF: sub_0_BD3+34p call sub_0_1418 ld hl, 2CE0h ld b, 4 - -loc_0_13D4: ; CODE XREF: sub_0_13BA+26j - push bc +loc_0_13D4: push bc ; CODE XREF: sub_0_13BA+26j ld a, (hl) inc hl push hl @@ -3305,7 +3301,7 @@ loc_0_13D4: ; CODE XREF: sub_0_13BA+26j ; End of function sub_0_13BA ;---------------------------------------------------------------------------- - .db 2Ah ; * +loc_0_1403: .db 2Ah ; * .db 2Ah ; * .db 18h ; .db 42h ; B @@ -3314,13 +3310,10 @@ loc_0_13D4: ; CODE XREF: sub_0_13BA+26j loc_0_1408: .text "0123456789abcdef" ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_1418: ; CODE XREF: sub_0_13BA+12p - ; sub_0_13BA+21p ... - push af - ld hl,loc_0_1408 +sub_0_1418: push af ; CODE XREF: sub_0_13BA+12p + ld hl,loc_0_1408 ; sub_0_13BA+21p ... ld b, 0 rra rra @@ -3339,10 +3332,10 @@ sub_0_1418: ; CODE XREF: sub_0_13BA+12p add hl, bc ld a, (hl) jp loc_0_145C -; End of function sub_0_1418 ;---------------------------------------------------------------------------- - LD (smod_b_145B),A + +loc_0_1438: LD (smod_b_145B),A LD BC,+(loc_0_1480-stab_0_7B3) LD HL,stab_0_7B3 CPIR @@ -3393,12 +3386,10 @@ loc_0_1480: .dw loc_0_1450 .dw loc_0_1450 ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_1492: ; CODE XREF: start+56p sub_0_961+79p - push bc - ld (2D0Ah), a +sub_0_1492: push bc ; CODE XREF: start+56p sub_0_961+79p + ld (byte_0_2D0A), a call sub_0_171E push de call sub_0_162C @@ -3409,18 +3400,14 @@ sub_0_1492: ; CODE XREF: start+56p sub_0_961+79p pop de pop bc jr loc_0_151D -; End of function sub_0_1492 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_14A7: ; CODE XREF: sub_0_1492+Ep - xor a +sub_0_14A7: xor a ; CODE XREF: sub_0_1492+Ep ld (de), a ld (byte_0_2D0D), a - ld (2D0Ch), a + ld (byte_0_2D0C), a call sub_0_1687 ld a, c ld (byte_0_2D0E), a @@ -3429,49 +3416,40 @@ sub_0_14A7: ; CODE XREF: sub_0_1492+Ep cp 3Ah jr nz, loc_0_14BD inc hl - -loc_0_14BD: ; CODE XREF: sub_0_14A7+13j - ld b, 8 +loc_0_14BD: ld b, 8 ; CODE XREF: sub_0_14A7+13j call sub_0_1522 pop de ld a, (hl) - ld (2D0Bh), a + ld (byte_0_2D0B), a cp 3Ah jr nz, loc_0_14FE inc hl - ld a, (2D0Ah) + ld a, (byte_0_2D0A) or a jr z, loc_0_14D7 call sub_0_154A jr z, loc_0_14E5 - -loc_0_14D7: ; CODE XREF: sub_0_14A7+29j - call sub_0_159D +loc_0_14D7: call sub_0_159D ; CODE XREF: sub_0_14A7+29j jr z, loc_0_14E5 - ld a, (2D0Ah) + ld a, (byte_0_2D0A) or a jr nz, loc_0_14E5 call sub_0_154A - -loc_0_14E5: ; CODE XREF: sub_0_14A7+2Ej - ; sub_0_14A7+33j ... - ld a, (byte_0_2D0D) - ld (de), a +loc_0_14E5: ld a, (byte_0_2D0D); CODE XREF: sub_0_14A7+2Ej + ld (de), a ; sub_0_14A7+33j ... push de inc de call sub_0_1632 pop de xor a - ld (2D0Ch), a + ld (byte_0_2D0C), a push de ld b, 8 call sub_0_1522 pop de ld a, (hl) - ld (2D0Bh), a - -loc_0_14FE: ; CODE XREF: sub_0_14A7+22j - ld a, (2D0Bh) + ld (byte_0_2D0B), a +loc_0_14FE: ld a, (byte_0_2D0B); CODE XREF: sub_0_14A7+22j ex de, hl ld bc, 8 add hl, bc @@ -3483,30 +3461,21 @@ loc_0_14FE: ; CODE XREF: sub_0_14A7+22j push de call sub_0_1522 pop de - -loc_0_1513: ; CODE XREF: sub_0_14A7+64j - ex de, hl +loc_0_1513: ex de, hl ; CODE XREF: sub_0_14A7+64j ld bc, 5 add hl, bc ex de, hl ld a, (byte_0_2D0E) ld (de), a - -loc_0_151D: ; CODE XREF: sub_0_1492+13j - ld a, (2D0Ch) +loc_0_151D: ld a, (byte_0_2D0C); CODE XREF: sub_0_1492+13j or a ret -; End of function sub_0_14A7 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_1522: ; CODE XREF: sub_0_14A7+18p - ; sub_0_14A7+4Fp ... - call sub_0_15D9 - ret z +sub_0_1522: call sub_0_15D9 ; CODE XREF: sub_0_14A7+18p + ret z ; sub_0_14A7+4Fp ... inc de cp 2Ah jr nz, loc_0_1533 @@ -3514,60 +3483,39 @@ sub_0_1522: ; CODE XREF: sub_0_14A7+18p ld (de), a call sub_0_1543 jr loc_0_153A -;---------------------------------------------------------------------------- - -loc_0_1533: ; CODE XREF: sub_0_1522+7j - ld (de), a +;loc_0_1533: ld (de), a ; CODE XREF: sub_0_1522+7j inc hl cp 3Fh call z, sub_0_1543 - -loc_0_153A: ; CODE XREF: sub_0_1522+Fj - djnz sub_0_1522 - -loc_0_153C: ; CODE XREF: sub_0_1522+1Fj - call sub_0_15D9 +loc_0_153A: djnz sub_0_1522 ; CODE XREF: sub_0_1522+Fj +loc_0_153C: call sub_0_15D9 ; CODE XREF: sub_0_1522+1Fj ret z inc hl jr loc_0_153C -; End of function sub_0_1522 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_1543: ; CODE XREF: sub_0_1522+Cp - ; sub_0_1522+15p - push hl - ld hl, 2D0Ch +sub_0_1543: push hl ; CODE XREF: sub_0_1522+Cp + ld hl, byte_0_2D0C ; sub_0_1522+15p inc (hl) pop hl ret -; End of function sub_0_1543 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_154A: ; CODE XREF: sub_0_14A7+2Bp - ; sub_0_14A7+3Bp - push hl - push de +sub_0_154A: push hl ; CODE XREF: sub_0_14A7+2Bp + push de ; sub_0_14A7+3Bp call sub_0_1552 pop de pop hl ret -; End of function sub_0_154A - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_1552: ; CODE XREF: sub_0_154A+2p - call sub_0_164A +sub_0_1552: call sub_0_164A ; CODE XREF: sub_0_154A+2p jr z, loc_0_15CA ex de, hl inc hl @@ -3587,13 +3535,9 @@ sub_0_1552: ; CODE XREF: sub_0_154A+2p ret z call sub_0_1625 ret c - -loc_0_1574: ; CODE XREF: sub_0_1552+Fj - push hl +loc_0_1574: push hl ; CODE XREF: sub_0_1552+Fj ld b, 2 - -loc_0_1577: ; CODE XREF: sub_0_1552+30j - ld a, (hl) +loc_0_1577: ld a, (hl) ; CODE XREF: sub_0_1552+30j cp 20h jr z, loc_0_1589 call sub_0_1625 @@ -3603,9 +3547,7 @@ loc_0_1577: ; CODE XREF: sub_0_1552+30j ld a, (hl) cp 20h jr nz, loc_0_159A - -loc_0_1589: ; CODE XREF: sub_0_1552+28j - pop hl +loc_0_1589: pop hl ; CODE XREF: sub_0_1552+28j call sub_0_165A ld c, a inc c @@ -3614,29 +3556,20 @@ loc_0_1589: ; CODE XREF: sub_0_1552+28j jr nc, loc_0_15CA ld (byte_0_2D0E), a xor a - ret -;---------------------------------------------------------------------------- - -loc_0_159A: ; CODE XREF: sub_0_1552+2Dj - ; sub_0_1552+35j - pop hl - jr loc_0_15CA -; End of function sub_0_1552 + ret +loc_0_159A: pop hl ; CODE XREF: sub_0_1552+2Dj + jr loc_0_15CA ; sub_0_1552+35j ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_159D: ; CODE XREF: sub_0_14A7+30p - push hl +sub_0_159D: push hl ; CODE XREF: sub_0_14A7+30p push de call sub_0_15A5 pop de pop hl ret -; End of function sub_0_159D - ;---------------------------------------------------------------------------- ; S u b r o u t i n e @@ -4114,10 +4047,17 @@ word_0_1808: .ds 2 byte_0_2891: .ds 1 .ds 46Eh byte_0_2D00: .ds 1 - .ds 2 +byte_0_2D01: .ds 1 +byte_0_2D02: .ds 1 byte_0_2D03: .ds 1 byte_0_2D04: .ds 1 - .ds 8 + .ds 2 +byte_0_2D07: .ds 1 +byte_0_2D08: .ds 1 +byte_0_2D09: .ds 1 +byte_0_2D0A: .ds 1 +byte_0_2D0B: .ds 1 +byte_0_2D0C: .ds 1 byte_0_2D0D: .ds 1 byte_0_2D0E: .ds 1 word_0_2D0F: .ds 2 From 21ecc5de54997df8f648a2b871edc67618926529 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 31 Oct 2021 08:42:03 +0800 Subject: [PATCH 10/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 136 +++++++++++++---------------------- 1 file changed, 50 insertions(+), 86 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index 4d4da26b..f5b7702b 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -3021,7 +3021,8 @@ loc_0_1296: ; CODE XREF: sub_0_1289+12Aj .db 2 ; .db 1 ; .db 4 ; - .db 18h ; + .db 18h ; + .db 6Ah ; j .db 13h ; .db 5Fh ; _ @@ -3041,60 +3042,44 @@ loc_0_1296: ; CODE XREF: sub_0_1289+12Aj .db 22h ; " .db 5 ; .db 2Dh ; - - .db 6 ; - .db 0Ah ; - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 32h ; 2 - .db 0D9h ; Ù - .db 12h ; - .db 0DAh ; Ú - .db 7Ah ; z - .db 13h ; - .db 6 ; - .db 0Ah ; - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 0DAh ; Ú - .db 7Ah ; z - .db 13h ; - .db 0C6h ; Æ - .db 0 ; - .db 0FEh ; þ - .db 0FFh ; ÿ - .db 0C2h ;  - .db 7Ah ; z - .db 13h ; - .db 0CDh ; Í - .db 0A0h ; - .db 8 ; - .db 0DDh ; Ý - .db 2Ah ; * - .db 0EDh ; í - .db 2Ch ; , - .db 6 ; - .db 0Ah ; + + ld b,0ah + call sub_0_DE7 + ld (12D9H),A + jp c,loc_0_137A + ld b,0ah + call sub_0_DE7 + jp c,loc_0_137A + add a,0 + cp 0ffh + jp nz,loc_0_137A + call sub_0_8A0 + ld ix,(2CEDH) + ld b,0ah + .db 0DDh ; Ý .db 0E5h ; å .db 0CDh ; Í .db 0E7h ; ç .db 0Dh ; + .db 0DDh ; Ý .db 0E1h ; á .db 32h ; 2 .db 8 ; .db 2Dh ; - + .db 0DAh ; Ú .db 7Ah ; z .db 13h ; + .db 0DDh ; Ý .db 77h ; w .db 0 ; .db 0DDh ; Ý .db 23h ; # .db 0CDh ; Í + .db 0DDh ; Ý .db 7 ; .db 0CDh ; Í @@ -3182,46 +3167,31 @@ loc_0_1296: ; CODE XREF: sub_0_1289+12Aj .db 0D9h ; Ù .db 12h ; .db 0C9h ; É - .db 3Ah ; : - .db 8 ; - .db 2Dh ; - - .db 6Fh ; o - .db 3Ah ; : - .db 0DFh ; ß - .db 7 ; - .db 95h ; ? - .db 28h ; ( - .db 0E9h ; é - .db 0C3h ; à - .db 7Ah ; z - .db 13h ; - .db 6 ; - .db 0Ah ; - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 3Eh ; > - .db 0F6h ; ö - .db 0D8h ; Ø - .db 0C3h ; à - .db 7Ah ; z - .db 13h ; - .db 3Eh ; > - .db 0FFh ; ÿ - .db 21h ; ! - .db 9 ; - .db 2Dh ; - - .db 0BEh ; ¾ - .db 20h ; - .db 4 ; - .db 3Eh ; > - .db 0FFh ; ÿ - .db 37h ; 7 - .db 0C9h ; É - .db 77h ; w - .db 0C3h ; à - .db 0A4h ; ¤ - .db 13h ; + + ld a,(byte_0_2D08) + ld l,a + ld a,(smod_b_7DF) + sub l + jr z,$-15h + jp loc_0_137A + + ld b,0ah + call sub_0_DE7 + ld a,0f6h + ret c + jp loc_0_137A + + ld a,0ffh + ld hl,byte_0_2D09 + cp (hl) + jr nz,loc_0_1367 + ld a,0ffh + scf + ret + +loc_0_1367: ld (hl),a + jp loc_0_13A4 + ;---------------------------------------------------------------------------- loc_0_137A: ; CODE XREF: sub_0_1289+22j @@ -3243,15 +3213,11 @@ loc_0_137F: ; CODE XREF: sub_0_1289+FBj jr loc_0_13A1 ;---------------------------------------------------------------------------- -loc_0_139A: ; CODE XREF: sub_0_1289+102j - ld a, 28h +loc_0_139A: ld a, 28h ; CODE XREF: sub_0_1289+102j ld (byte_0_2D03), a ld a, 15h - -loc_0_13A1: ; CODE XREF: sub_0_1289+10Bj - ; sub_0_1289+10Fj - call loc_0_145C - call sub_0_FC9 +loc_0_13A1: call loc_0_145C ; CODE XREF: sub_0_1289+10Bj +loc_0_13A4: call sub_0_FC9 ; sub_0_1289+10Fj ld hl, byte_0_2D04 inc (hl) call sub_0_482 @@ -3261,8 +3227,6 @@ loc_0_13A1: ; CODE XREF: sub_0_1289+10Bj ld a, 0FFh scf ret -; End of function sub_0_1289 - ;---------------------------------------------------------------------------- ; S u b r o u t i n e @@ -3483,7 +3447,7 @@ sub_0_1522: call sub_0_15D9 ; CODE XREF: sub_0_14A7+18p ld (de), a call sub_0_1543 jr loc_0_153A -;loc_0_1533: ld (de), a ; CODE XREF: sub_0_1522+7j +loc_0_1533: ld (de), a ; CODE XREF: sub_0_1522+7j inc hl cp 3Fh call z, sub_0_1543 From ce165129053e7c0a5b330467823d1537109660aa Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 31 Oct 2021 08:53:14 +0800 Subject: [PATCH 11/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 400 +++++++++++++---------------------- 1 file changed, 148 insertions(+), 252 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index f5b7702b..cdedaa7d 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -2612,259 +2612,155 @@ loc_0_109C: ; CODE XREF: sub_0_FD1+C1j .db 0FFh ; ÿ .db 0FEh ; þ .db 0FCh ; ü - .db 0CDh ; Í - .db 0A0h ; - .db 8 ; - .db 0CDh ; Í - .db 2Fh ; / - .db 0Eh ; - .db 0D8h ; Ø - .db 32h ; 2 - .db 1 ; - .db 2Dh ; - - .db 0CDh ; Í - .db 0EDh ; í - .db 7 ; - .db 21h ; ! - .db 0A7h ; § - .db 2Ch ; , - .db 6 ; - .db 4 ; - .db 0C5h ; Å - .db 0E5h ; å - .db 0CDh ; Í - .db 2Fh ; / - .db 0Eh ; - .db 0CDh ; Í - .db 0EDh ; í - .db 7 ; - .db 0E1h ; á - .db 0C1h ; Á - .db 77h ; w - .db 23h ; # - .db 0D8h ; Ø - .db 10h ; - .db 0F1h ; ñ - .db 6 ; - .db 4 ; - .db 0C5h ; Å - .db 0CDh ; Í - .db 2Fh ; / - .db 0Eh ; - .db 0CDh ; Í - .db 0EDh ; í - .db 7 ; - .db 0C1h ; Á - .db 0D8h ; Ø - .db 10h ; - .db 0F5h ; õ - .db 21h ; ! - .db 99h ; ? - .db 28h ; ( - .db 11h ; - .db 0E9h ; é - .db 7 ; - .db 0CDh ; Í - .db 0D3h ; Ó - .db 6 ; - .db 28h ; ( - .db 34h ; 4 - .db 18h ; - .db 3Bh ; ; - .db 0CDh ; Í - .db 0A0h ; - .db 8 ; - .db 0CDh ; Í - .db 2Fh ; / - .db 0Eh ; - .db 0D8h ; Ø - .db 32h ; 2 - .db 1 ; - .db 2Dh ; - - .db 0CDh ; Í - .db 85h ; ? - .db 8 ; - .db 21h ; ! - .db 0A7h ; § - .db 2Ch ; , - .db 6 ; - .db 4 ; - .db 0C5h ; Å - .db 0E5h ; å - .db 0CDh ; Í - .db 2Fh ; / - .db 0Eh ; - .db 0CDh ; Í - .db 85h ; ? - .db 8 ; - .db 0E1h ; á - .db 0C1h ; Á - .db 77h ; w - .db 23h ; # - .db 0D8h ; Ø - .db 10h ; - .db 0F1h ; ñ - .db 6 ; - .db 2 ; - .db 0C5h ; Å - .db 0CDh ; Í - .db 2Fh ; / - .db 0Eh ; - .db 0CDh ; Í - .db 85h ; ? - .db 8 ; - .db 0C1h ; Á - .db 0D8h ; Ø - .db 10h ; - .db 0F5h ; õ - .db 7Ch ; | - .db 0B5h ; µ - .db 20h ; - .db 9 ; - .db 3Eh ; > - .db 0FFh ; ÿ - .db 32h ; 2 - .db 0A6h ; ¦ - .db 2Ch ; , - .db 3Ah ; : - .db 1 ; - .db 2Dh ; - - .db 0C9h ; É - .db 3Eh ; > - .db 0FFh ; ÿ - .db 37h ; 7 - .db 0C9h ; É - .db 0CDh ; Í - .db 0A0h ; - .db 8 ; - .db 0CDh ; Í - .db 94h ; ? - .db 11h ; - .db 0D8h ; Ø - .db 32h ; 2 - .db 1 ; - .db 2Dh ; - - .db 0CDh ; Í - .db 85h ; ? - .db 8 ; - .db 21h ; ! - .db 0A7h ; § - .db 2Ch ; , - .db 6 ; - .db 4 ; - .db 0C5h ; Å - .db 0E5h ; å - .db 0CDh ; Í - .db 94h ; ? - .db 11h ; - .db 30h ; 0 - .db 3 ; - .db 0E1h ; á - .db 0C1h ; Á - .db 0C9h ; É - .db 0CDh ; Í - .db 85h ; ? - .db 8 ; - .db 0E1h ; á - .db 0C1h ; Á - .db 77h ; w - .db 23h ; # - .db 10h ; - .db 0EDh ; í - .db 6 ; - .db 2 ; - .db 0C5h ; Å - .db 0CDh ; Í - .db 94h ; ? - .db 11h ; - .db 30h ; 0 - .db 2 ; - .db 0C1h ; Á - .db 0C9h ; É - .db 0CDh ; Í - .db 85h ; ? - .db 8 ; - .db 0C1h ; Á - .db 10h ; - .db 0F2h ; ò - .db 7Ch ; | - .db 0B5h ; µ - .db 20h ; - .db 18h ; - .db 6 ; - .db 0Ah ; - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 0FEh ; þ - .db 0Dh ; - .db 20h ; - .db 5 ; - .db 6 ; - .db 0Ah ; - .db 0CDh ; Í - .db 0E7h ; ç - .db 0Dh ; - .db 0B7h ; · - .db 3Eh ; > - .db 0FFh ; ÿ - .db 32h ; 2 - .db 0A6h ; ¦ - .db 2Ch ; , - .db 3Ah ; : - .db 1 ; - .db 2Dh ; - - .db 0C9h ; É - .db 3Eh ; > - .db 0FFh ; ÿ - .db 37h ; 7 - .db 0C9h ; É - .db 0CDh ; Í - .db 5 ; - .db 0Eh ; - .db 0D8h ; Ø - .db 0CDh ; Í - .db 0B3h ; ³ - .db 11h ; - .db 20h ; - .db 12h ; - .db 7 ; - .db 7 ; - .db 7 ; - .db 7 ; - .db 47h ; G - .db 0C5h ; Å - .db 0CDh ; Í - .db 5 ; - .db 0Eh ; - .db 0C1h ; Á - .db 0D8h ; Ø - .db 0CDh ; Í - .db 0B3h ; ³ - .db 11h ; - .db 20h ; - .db 2 ; - .db 0B0h ; ° - .db 0C9h ; É - .db 3Eh ; > - .db 0FFh ; ÿ - .db 37h ; 7 - .db 0C9h ; É - .db 6Fh ; o - .db 0D6h ; Ö - .db 30h ; 0 - .db 0FEh ; þ - .db 0Ah ; - .db 38h ; 8 - .db 2 ; - .db 0D6h ; Ö - .db 27h ; ' - .db 6Fh ; o - .db 0E6h ; æ - .db 0F0h ; ð - .db 7Dh ; } - .db 0C9h ; É + CALL 8A0H ;10c5 cd a0 08 + CALL 0E2FH ;10c8 cd 2f 0e + RET C ;10cb d8 + LD (2D01H),A ;10cc 32 01 2d + CALL 7EDH ;10cf cd ed 07 + LD HL,2CA7H ;10d2 21 a7 2c + LD B,4 ;10d5 06 04 + PUSH BC ;10d7 c5 + PUSH HL ;10d8 e5 + CALL 0E2FH ;10d9 cd 2f 0e + CALL 7EDH ;10dc cd ed 07 + POP HL ;10df e1 + POP BC ;10e0 c1 + LD (HL),A ;10e1 77 + INC HL ;10e2 23 + RET C ;10e3 d8 + DJNZ 10D7H ;10e4 10 f1 + LD B,4 ;10e6 06 04 + PUSH BC ;10e8 c5 + CALL 0E2FH ;10e9 cd 2f 0e + CALL 7EDH ;10ec cd ed 07 + POP BC ;10ef c1 + RET C ;10f0 d8 + DJNZ 10E8H ;10f1 10 f5 + LD HL,2899H ;10f3 21 99 28 + LD DE,7E9H ;10f6 11 e9 07 + CALL 6D3H ;10f9 cd d3 06 + JR Z,1132H ;10fc 28 34 + JR 113BH ;10fe 18 3b + ; + CALL 8A0H ;1100 cd a0 08 + CALL 0E2FH ;1103 cd 2f 0e + RET C ;1106 d8 + LD (2D01H),A ;1107 32 01 2d + CALL 885H ;110a cd 85 08 + LD HL,2CA7H ;110d 21 a7 2c + LD B,4 ;1110 06 04 + PUSH BC ;1112 c5 + PUSH HL ;1113 e5 + CALL 0E2FH ;1114 cd 2f 0e + CALL 885H ;1117 cd 85 08 + POP HL ;111a e1 + POP BC ;111b c1 + LD (HL),A ;111c 77 + INC HL ;111d 23 + RET C ;111e d8 + DJNZ 1112H ;111f 10 f1 + LD B,2 ;1121 06 02 + PUSH BC ;1123 c5 + CALL 0E2FH ;1124 cd 2f 0e + CALL 885H ;1127 cd 85 08 + POP BC ;112a c1 + RET C ;112b d8 + DJNZ 1123H ;112c 10 f5 + LD A,H ;112e 7c + OR L ;112f b5 + JR NZ,113BH ;1130 20 09 + LD A,0FFH ;1132 3e ff + LD (2CA6H),A ;1134 32 a6 2c + LD A,(2D01H) ;1137 3a 01 2d + RET ;113a c9 + + LD A,0FFH ;113b 3e ff + SCF ;113d 37 + RET ;113e c9 + + CALL 8A0H ;113f cd a0 08 + CALL 1194H ;1142 cd 94 11 + RET C ;1145 d8 + LD (2D01H),A ;1146 32 01 2d + CALL 885H ;1149 cd 85 08 + LD HL,2CA7H ;114c 21 a7 2c + LD B,4 ;114f 06 04 + PUSH BC ;1151 c5 + PUSH HL ;1152 e5 + CALL 1194H ;1153 cd 94 11 + JR NC,115BH ;1156 30 03 + POP HL ;1158 e1 + POP BC ;1159 c1 + RET ;115a c9 + ; + CALL 885H ;115b cd 85 08 + POP HL ;115e e1 + POP BC ;115f c1 + LD (HL),A ;1160 77 + INC HL ;1161 23 + DJNZ 1151H ;1162 10 ed + LD B,2 ;1164 06 02 + PUSH BC ;1166 c5 + CALL 1194H ;1167 cd 94 11 + JR NC,116EH ;116a 30 02 + POP BC ;116c c1 + RET ;116d c9 + ; + CALL 885H ;116e cd 85 08 + POP BC ;1171 c1 + DJNZ 1166H ;1172 10 f2 + LD A,H ;1174 7c + OR L ;1175 b5 + JR NZ,1190H ;1176 20 18 + LD B,0AH ;1178 06 0a + CALL 0DE7H ;117a cd e7 0d + CP 0DH ;117d fe 0d + JR NZ,1186H ;117f 20 05 + LD B,0AH ;1181 06 0a + CALL 0DE7H ;1183 cd e7 0d + OR A ;1186 b7 + LD A,0FFH ;1187 3e ff + LD (2CA6H),A ;1189 32 a6 2c + LD A,(2D01H) ;118c 3a 01 2d + RET ;118f c9 + ; + LD A,0FFH ;1190 3e ff + SCF ;1192 37 + RET ;1193 c9 + + CALL 0E05H ;1194 cd 05 0e + RET C ;1197 d8 + CALL 11B3H ;1198 cd b3 11 + JR NZ,11AFH ;119b 20 12 + RLCA ;119d 07 + RLCA ;119e 07 + RLCA ;119f 07 + RLCA ;11a0 07 + LD B,A ;11a1 47 + PUSH BC ;11a2 c5 + CALL 0E05H ;11a3 cd 05 0e + POP BC ;11a6 c1 + RET C ;11a7 d8 + CALL 11B3H ;11a8 cd b3 11 + JR NZ,11AFH ;11ab 20 02 + OR B ;11ad b0 + RET ;11ae c9 + ; + LD A,0FFH ;11af 3e ff + SCF ;11b1 37 + RET ;11b2 c9 + ; + LD L,A ;11b3 6f + SUB 30H ;11b4 d6 30 + CP 0AH ;11b6 fe 0a + JR C,11BCH ;11b8 38 02 + SUB 27H ;11ba d6 27 + LD L,A ;11bc 6f + AND 0F0H ;11bd e6 f0 + LD A,L ;11bf 7d + RET ;11c0 c9 + ;---------------------------------------------------------------------------- ; S u b r o u t i n e From cd63ad38fc163b44aa61367eb1bce16bc87f264c Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 31 Oct 2021 09:50:17 +0800 Subject: [PATCH 12/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 156 +++++++++++++++++------------------ 1 file changed, 77 insertions(+), 79 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index cdedaa7d..ec3f2094 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -2099,7 +2099,7 @@ loc_0_E36: AND 60H LD HL,0EA2H LD BC,4 CPIR - JR Z,0E2FH + JR Z,sub_0_E2F LD A,(2C9DH) OR A JR NZ,sub_0_E2F @@ -2182,33 +2182,33 @@ loc_0_EA6: .db 11h ; .dw loc_0_E50 .dw loc_0_E50 - OR A ;0ec7 b7 - LD HL,(2CEBH) ;0ec8 2a eb 2c - LD DE,(2CEFH) ;0ecb ed 5b ef 2c - SBC HL,DE ;0ecf ed 52 - JP C,0F4EH ;0ed1 da 4e 0f - CALL sub_0_8A0 ;0ed4 cd a0 08 - LD HL,0 ;0ed7 21 00 00 - LD (2CF9H),HL ;0eda 22 f9 2c -loc_0_EDD: CALL sub_0_E2F ;0edd cd 2f 0e - JP C,0F38H ;0ee0 da 38 0f - CALL sub_0_FA2 ;0ee3 cd a2 0f - CALL Z,sub_0_7ED ;0ee6 cc ed 07 - CALL NZ,loc_0_885 ;0ee9 c4 85 08 - LD HL,(2CEBH) ;0eec 2a eb 2c - LD BC,(2CEFH) ;0eef ed 4b ef 2c - SBC HL,BC ;0ef3 ed 42 - JP Z,0F4EH ;0ef5 ca 4e 0f - INC BC ;0ef8 03 - LD (2CEFH),BC ;0ef9 ed 43 ef 2c - LD HL,(2CF9H) ;0efd 2a f9 2c - INC HL ;0f00 23 - LD (2CF9H),HL ;0f01 22 f9 2c - LD HL,(2CEDH) ;0f04 2a ed 2c - LD (HL),A ;0f07 77 - INC HL ;0f08 23 - LD (2CEDH),HL ;0f09 22 ed 2c - JR loc_0_EDD ;0f0c 18 cf + OR A + LD HL,(2CEBH) + LD DE,(2CEFH) + SBC HL,DE + JP C,sub_0_F4E + CALL sub_0_8A0 + LD HL,0 + LD (2CF9H),HL +loc_0_EDD: CALL sub_0_E2F + JP C,loc_0_F38 + CALL sub_0_FA2 + CALL Z,sub_0_7ED + CALL NZ,loc_0_885 + LD HL,(2CEBH) + LD BC,(2CEFH) + SBC HL,BC + JP Z,sub_0_F4E + INC BC + LD (2CEFH),BC + LD HL,(2CF9H) + INC HL + LD (2CF9H),HL + LD HL,(2CEDH) + LD (HL),A + INC HL + LD (2CEDH),HL + JR loc_0_EDD .db 0E8h ; è .db 0E9h ; é @@ -2217,20 +2217,15 @@ loc_0_EDD: CALL sub_0_E2F ;0edd cd 2f 0e .db 98h ; ? .db 0FFh ; ÿ .db 0FEh ; þ - .db 52h ; R - .db 0Fh ; - .db 4Eh ; N - .db 0Fh ; - .db 54h ; T - .db 0Fh ; - .db 58h ; X - .db 0Fh ; - .db 58h ; X - .db 0Fh ; - .db 58h ; X - .db 0Fh ; - .db 58h ; X - .db 0Fh ; + + .dw sub_0_F52 + .dw sub_0_F4E + .dw sub_0_F54 + .dw sub_0_F58 + .dw sub_0_F58 + .dw sub_0_F58 + .dw sub_0_F58 + .db 0E8h ; è .db 0E9h ; é .db 0EAh ; ê @@ -2238,20 +2233,16 @@ loc_0_EDD: CALL sub_0_E2F ;0edd cd 2f 0e .db 98h ; ? .db 0FFh ; ÿ .db 0FEh ; þ - .db 52h ; R - .db 0Fh ; - .db 4Eh ; N - .db 0Fh ; - .db 54h ; T - .db 0Fh ; - .db 7Ch ; | - .db 0Fh ; - .db 7Ch ; | - .db 0Fh ; - .db 7Ch ; | - .db 0Fh ; - .db 7Ch ; | - .db 0Fh ; + + .dw sub_0_F52 + .dw sub_0_F4E + .dw sub_0_F54 + .dw sub_0_F7C + .dw sub_0_F7C + .dw sub_0_F7C + .dw sub_0_F7C + +loc_0_F38: .db 21h ; ! .db 23h ; # .db 0Fh ; @@ -2274,16 +2265,21 @@ loc_0_EDD: CALL sub_0_E2F ;0edd cd 2f 0e .db 0CAh ; Ê .db 7Fh ;  .db 6 ; + +sub_0_F4E: .db 3Eh ; > .db 0FFh ; ÿ .db 37h ; 7 .db 0C9h ; É +sub_0_F52: .db 37h ; 7 .db 0C9h ; É +sub_0_F54: .db 3Eh ; > .db 10h ; .db 37h ; 7 .db 0C9h ; É +sub_0_F58: .db 32h ; 2 .db 0FDh ; ý .db 2Ch ; , @@ -2320,6 +2316,8 @@ loc_0_EDD: CALL sub_0_E2F ;0edd cd 2f 0e .db 2Ch ; , .db 0B7h ; · .db 0C9h ; É + +sub_0_F7C: .db 32h ; 2 .db 0FDh ; ý .db 2Ch ; , @@ -2613,17 +2611,17 @@ loc_0_109C: ; CODE XREF: sub_0_FD1+C1j .db 0FEh ; þ .db 0FCh ; ü - CALL 8A0H ;10c5 cd a0 08 - CALL 0E2FH ;10c8 cd 2f 0e + CALL sub_0_8A0 ;10c5 cd a0 08 + CALL sub_0_E2F ;10c8 cd 2f 0e RET C ;10cb d8 - LD (2D01H),A ;10cc 32 01 2d - CALL 7EDH ;10cf cd ed 07 + LD (byte_0_2D01),A ;10cc 32 01 2d + CALL sub_0_7ED ;10cf cd ed 07 LD HL,2CA7H ;10d2 21 a7 2c LD B,4 ;10d5 06 04 PUSH BC ;10d7 c5 PUSH HL ;10d8 e5 - CALL 0E2FH ;10d9 cd 2f 0e - CALL 7EDH ;10dc cd ed 07 + CALL sub_0_E2F ;10d9 cd 2f 0e + CALL sub_0_7ED ;10dc cd ed 07 POP HL ;10df e1 POP BC ;10e0 c1 LD (HL),A ;10e1 77 @@ -2632,8 +2630,8 @@ loc_0_109C: ; CODE XREF: sub_0_FD1+C1j DJNZ 10D7H ;10e4 10 f1 LD B,4 ;10e6 06 04 PUSH BC ;10e8 c5 - CALL 0E2FH ;10e9 cd 2f 0e - CALL 7EDH ;10ec cd ed 07 + CALL sub_0_E2F ;10e9 cd 2f 0e + CALL sub_0_7ED ;10ec cd ed 07 POP BC ;10ef c1 RET C ;10f0 d8 DJNZ 10E8H ;10f1 10 f5 @@ -2643,8 +2641,8 @@ loc_0_109C: ; CODE XREF: sub_0_FD1+C1j JR Z,1132H ;10fc 28 34 JR 113BH ;10fe 18 3b ; - CALL 8A0H ;1100 cd a0 08 - CALL 0E2FH ;1103 cd 2f 0e + CALL sub_0_8A0 ;1100 cd a0 08 + CALL sub_0_E2F ;1103 cd 2f 0e RET C ;1106 d8 LD (2D01H),A ;1107 32 01 2d CALL 885H ;110a cd 85 08 @@ -2652,7 +2650,7 @@ loc_0_109C: ; CODE XREF: sub_0_FD1+C1j LD B,4 ;1110 06 04 PUSH BC ;1112 c5 PUSH HL ;1113 e5 - CALL 0E2FH ;1114 cd 2f 0e + CALL sub_0_E2F ;1114 cd 2f 0e CALL 885H ;1117 cd 85 08 POP HL ;111a e1 POP BC ;111b c1 @@ -2662,7 +2660,7 @@ loc_0_109C: ; CODE XREF: sub_0_FD1+C1j DJNZ 1112H ;111f 10 f1 LD B,2 ;1121 06 02 PUSH BC ;1123 c5 - CALL 0E2FH ;1124 cd 2f 0e + CALL sub_0_E2F ;1124 cd 2f 0e CALL 885H ;1127 cd 85 08 POP BC ;112a c1 RET C ;112b d8 @@ -2679,7 +2677,7 @@ loc_0_109C: ; CODE XREF: sub_0_FD1+C1j SCF ;113d 37 RET ;113e c9 - CALL 8A0H ;113f cd a0 08 + CALL sub_0_8A0 ;113f cd a0 08 CALL 1194H ;1142 cd 94 11 RET C ;1145 d8 LD (2D01H),A ;1146 32 01 2d @@ -2729,34 +2727,34 @@ loc_0_109C: ; CODE XREF: sub_0_FD1+C1j SCF ;1192 37 RET ;1193 c9 - CALL 0E05H ;1194 cd 05 0e + CALL loc_0_E05 ;1194 cd 05 0e RET C ;1197 d8 - CALL 11B3H ;1198 cd b3 11 - JR NZ,11AFH ;119b 20 12 + CALL sub_0_11B3 ;1198 cd b3 11 + JR NZ,loc_0_11AF ;119b 20 12 RLCA ;119d 07 RLCA ;119e 07 RLCA ;119f 07 RLCA ;11a0 07 LD B,A ;11a1 47 PUSH BC ;11a2 c5 - CALL 0E05H ;11a3 cd 05 0e + CALL loc_0_E05 ;11a3 cd 05 0e POP BC ;11a6 c1 RET C ;11a7 d8 - CALL 11B3H ;11a8 cd b3 11 - JR NZ,11AFH ;11ab 20 02 + CALL sub_0_11B3 ;11a8 cd b3 11 + JR NZ,loc_0_11AF ;11ab 20 02 OR B ;11ad b0 RET ;11ae c9 ; - LD A,0FFH ;11af 3e ff +loc_0_11AF: LD A,0FFH ;11af 3e ff SCF ;11b1 37 RET ;11b2 c9 ; - LD L,A ;11b3 6f +sub_0_11B3: LD L,A ;11b3 6f SUB 30H ;11b4 d6 30 CP 0AH ;11b6 fe 0a - JR C,11BCH ;11b8 38 02 + JR C,loc_0_11BC ;11b8 38 02 SUB 27H ;11ba d6 27 - LD L,A ;11bc 6f +loc_0_11BC: LD L,A ;11bc 6f AND 0F0H ;11bd e6 f0 LD A,L ;11bf 7d RET ;11c0 c9 From 32d50a01859e74b95730bd150679c2eb7919a72f Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 31 Oct 2021 10:08:40 +0800 Subject: [PATCH 13/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 209 ++++++++++++----------------------- 1 file changed, 69 insertions(+), 140 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index ec3f2094..381cd2e3 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -2367,93 +2367,71 @@ sub_0_FA2: .db 5Fh ; _ .db 0C9h ; É ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_FAA: ; CODE XREF: seg000:0AE5p sub_0_BD3+1Ap - - ld hl, 2CE9h +sub_0_FAA: ld hl, 2CE9h ; CODE XREF: seg000:0AE5p sub_0_BD3+1Ap ld de, 2CEDh ldi ldi ld hl, 0 ld (2CEFh), hl - -;---------------------------------------------------------------------------- -; S u b r o u t i n e - -sub_0_FBA: ; CODE XREF: sub_0_11FA+4Ep - ld hl, 2CEDh +sub_0_FBA: ld hl, 2CEDh ; CODE XREF: sub_0_11FA+4Ep ld de, 2CF3h - -loc_0_FC0: ; CODE XREF: sub_0_FC9+6j - ldi +loc_0_FC0: ldi ; CODE XREF: sub_0_FC9+6j ldi ldi ldi ret -; End of function sub_0_FBA - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_FC9: ; CODE XREF: sub_0_BD3+1Dp - ; sub_0_11FA+56p ... - ld hl, 2CF3h - ld de, 2CEDh +sub_0_FC9: ld hl, 2CF3h ; CODE XREF: sub_0_BD3+1Dp + ld de, 2CEDh ; sub_0_11FA+56p ... jr loc_0_FC0 -; End of function sub_0_FC9 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_FD1: ; CODE XREF: sub_0_BD3+37p - xor a +sub_0_FD1: xor a ; CODE XREF: sub_0_BD3+37p ld (byte_0_2D01), a ld hl, 400h ld (2CFEh), hl - -loc_0_FDB: ; CODE XREF: sub_0_FD1+61j - ld a, 5 +loc_0_FDB: ld a, 5 ; CODE XREF: sub_0_FD1+61j ld (byte_0_2D00), a - ld b, 64h +loc_0_FE0: ld b, 64h call sub_0_DE7 jp c, loc_0_108A - ld hl, 109Eh + ld hl, stab_0_109E ld bc, 3 cpir jp z, sub_0_67F jr loc_0_1024 + ;---------------------------------------------------------------------------- LD HL,byte_0_2D00 DEC (HL) LD A,10H - JP Z,108AH + JP Z,loc_0_108A LD B,0AH CALL sub_0_DE7 - JR C,0FE0H - LD HL,10A7H + JR C,loc_0_FE0 + LD HL,stab_0_10A7 LD BC,2 CPIR JP Z,67FH - JR 1024H + JR loc_0_1024 LD HL,byte_0_2D00 DEC (HL) LD A,10H - JP Z,108AH - JR 0FE0H + JP Z,loc_0_108A + JR loc_0_FE0 LD B,0AH - CALL 0DE7H - JR C,1035H -;---------------------------------------------------------------------------- - + CALL sub_0_DE7 + JR C,loc_0_1035 loc_0_1024: ld hl, (2CFEh) ; CODE XREF: sub_0_FD1+22j dec hl ld (2CFEh), hl @@ -2462,116 +2440,66 @@ loc_0_1024: ld hl, (2CFEh) ; CODE XREF: sub_0_FD1+22j ld a, 0FCh jp z, loc_0_108A jp loc_0_FDB -;---------------------------------------------------------------------------- - .db 3Eh ; > - .db 0FFh ; ÿ - .db 0C3h ; à - .db 8Ah ; ? - .db 10h ; - .db 3Eh ; > - .db 5 ; - .db 32h ; 2 - .db 0 ; - .db 2Dh ; - - .db 0CDh ; Í - .db 5 ; - .db 0Eh ; - .db 38h ; 8 - .db 46h ; F - .db 21h ; ! - .db 0ADh ; ­ - .db 10h ; - .db 1 ; - .db 2 ; - .db 0 ; - .db 0EDh ; í - .db 0B1h ; ± - .db 0CAh ; Ê - .db 7Fh ;  - .db 6 ; - .db 18h ; - .db 0D3h ; Ó - .db 0CDh ; Í - .db 5 ; - .db 0Eh ; - .db 38h ; 8 - .db 34h ; 4 - .db 21h ; ! - .db 0B3h ; ³ - .db 10h ; - .db 1 ; - .db 4 ; - .db 0 ; - .db 0EDh ; í - .db 0B1h ; ± - .db 0CAh ; Ê - .db 7Fh ;  - .db 6 ; - .db 18h ; - .db 0C1h ; Á - .db 3Eh ; > - .db 10h ; - .db 32h ; 2 - .db 9Eh ; ? - .db 2Ch ; , - .db 0CDh ; Í - .db 3Fh ; ? - .db 11h ; - .db 18h ; - .db 12h ; - .db 3Eh ; > - .db 10h ; - .db 32h ; 2 - .db 9Eh ; ? - .db 2Ch ; , - .db 0CDh ; Í - .db 0 ; - .db 11h ; - .db 18h ; - .db 8 ; - .db 3Eh ; > - .db 20h ; - .db 32h ; 2 - .db 9Eh ; ? - .db 2Ch ; , - .db 0CDh ; Í - .db 0C5h ; Å - .db 10h ; - .db 0F5h ; õ - .db 21h ; ! - .db 0A7h ; § - .db 2Ch ; , - .db 11h ; - .db 0E4h ; ä - .db 2Ch ; , - .db 0CDh ; Í - .db 92h ; ? - .db 6 ; - .db 0F1h ; ñ -;---------------------------------------------------------------------------- -loc_0_108A: ; CODE XREF: sub_0_FD1+14j - ; sub_0_FD1+5Ej - ld hl, 10BFh - ld bc, 6 +;---------------------------------------------------------------------------- +loc_0_1035: + LD A,0FFH ;1035 3e ff + JP loc_0_108A ;1037 c3 8a 10 + + LD A,5 ;103a 3e 05 + LD (2D00H),A ;103c 32 00 2d + CALL 0E05H ;103f cd 05 0e + JR C,108AH ;1042 38 46 + LD HL,10ADH ;1044 21 ad 10 + LD BC,2 ;1047 01 02 00 + CPIR ;104a ed b1 + JP Z,67FH ;104c ca 7f 06 + JR loc_0_1024 ;104f 18 d3 + + CALL 0E05H ;1051 cd 05 0e + JR C,loc_0_108A ;1054 38 34 + LD HL,10B3H ;1056 21 b3 10 + LD BC,4 ;1059 01 04 00 + CPIR ;105c ed b1 + JP Z,067FH ;105e ca 7f 06 + JR loc_0_1024 ;1061 18 c1 + + LD A,10H ;1063 3e 10 + LD (2C9EH),A ;1065 32 9e 2c + CALL 113FH ;1068 cd 3f 11 + JR 107FH ;106b 18 12 + ; + LD A,10H ;106d 3e 10 + LD (2C9EH),A ;106f 32 9e 2c + CALL 1100H ;1072 cd 00 11 + JR 107FH ;1075 18 08 + + LD A,20H ;1077 3e 20 + LD (2C9EH),A ;1079 32 9e 2c + CALL 10C5H ;107c cd c5 10 + PUSH AF ;107f f5 + LD HL,2CA7H ;1080 21 a7 2c + LD DE,2CE4H ;1083 11 e4 2c + CALL 692H ;1086 cd 92 06 + POP AF ;1089 f1 +loc_0_108A: ld hl, 10BFh ; CODE XREF: sub_0_FD1+14j + ld bc, 6 ; sub_0_FD1+5Ej cpir jr nz, loc_0_109C cp 98h jr nz, loc_0_109A ld a, 10h - -loc_0_109A: ; CODE XREF: sub_0_FD1+C5j - scf +loc_0_109A: scf ; CODE XREF: sub_0_FD1+C5j ret + ;---------------------------------------------------------------------------- -loc_0_109C: ; CODE XREF: sub_0_FD1+C1j - or a +loc_0_109C: or a ; CODE XREF: sub_0_FD1+C1j ret -; End of function sub_0_FD1 ;---------------------------------------------------------------------------- - .db 18h ; + +stab_0_109E: .db 18h ; .db 0AAh ; ª .db 2Ah ; * .db 3Ah ; : @@ -2579,8 +2507,9 @@ loc_0_109C: ; CODE XREF: sub_0_FD1+C1j .db 3Ah ; : .db 10h ; .db 0F5h ; õ - .db 0Fh ; - .db 6Bh ; k + .db 0Fh ; + +stab_0_10A7: .db 6Bh ; k .db 18h ; .db 12h ; .db 10h ; From 21403cedb28f71829928a4f71bbee0f91d30e652 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 31 Oct 2021 10:22:18 +0800 Subject: [PATCH 14/14] Update rz.asm --- Source/Apps/Test/rzsz/rz.asm | 93 ++++++++++++++---------------------- 1 file changed, 36 insertions(+), 57 deletions(-) diff --git a/Source/Apps/Test/rzsz/rz.asm b/Source/Apps/Test/rzsz/rz.asm index 381cd2e3..ce598a8b 100644 --- a/Source/Apps/Test/rzsz/rz.asm +++ b/Source/Apps/Test/rzsz/rz.asm @@ -830,12 +830,9 @@ sub_0_688: ; CODE XREF: seg000:0726p sub_0_BD3+13p ; End of function sub_0_688 ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_692: ; CODE XREF: seg000:077Bp seg000:07ADp - - push bc +sub_0_692: push bc ; CODE XREF: seg000:077Bp seg000:07ADp push de push hl ldi @@ -846,7 +843,6 @@ loc_0_697: ldi ; CODE XREF: sub_0_688+8j pop de pop bc ret -; End of function sub_0_692 ;---------------------------------------------------------------------------- @@ -1208,22 +1204,19 @@ loc_0_899: DJNZ loc_0_890 RET ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_8A0: ; CODE XREF: sub_0_13BA+9p - xor a +sub_0_8A0: xor a ; CODE XREF: sub_0_13BA+9p ld h, a ld l, a ld (smod_b_7DF), a ld (smod_w_887), hl ld hl, 2899h jp loc_0_726 -; End of function sub_0_8A0 ;---------------------------------------------------------------------------- -byte_0_8AF: .db 4 ; DATA XREF: sub_0_3C9+Aw sub_0_8D1+34r +byte_0_8AF: .db 4 ; DATA XREF: sub_0_3C9+Aw sub_0_8D1+34r byte_0_8B0: .db 0 ; DATA XREF: sub_0_8D1+23r byte_0_8B1: .db 0 ; DATA XREF: sub_0_961r byte_0_8B2: .db 0 ; DATA XREF: sub_0_961+14r @@ -1231,24 +1224,18 @@ byte_0_8B3: .db 0 ; DATA XREF: seg000:0A3Cr word_0_8B4: .dw 0 ; DATA XREF: sub_0_8B6+17w ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_8B6: ; CODE XREF: sub_0_8D1+20p - xor a +sub_0_8B6: xor a ; CODE XREF: sub_0_8D1+20p ld c, a ld b, 8 ld a, h - -loc_0_8BB: ; CODE XREF: sub_0_8B6+Cj - rlca +loc_0_8BB: rlca ; CODE XREF: sub_0_8B6+Cj set 7, c jr c, loc_0_8C4 rr c djnz loc_0_8BB - -loc_0_8C4: ; CODE XREF: sub_0_8B6+8j - ld a, h +loc_0_8C4: ld a, h ; CODE XREF: sub_0_8B6+8j and c ld h, a ld l, 0 @@ -1256,15 +1243,11 @@ loc_0_8C4: ; CODE XREF: sub_0_8B6+8j dec hl ld (word_0_8B4), hl ret -; End of function sub_0_8B6 - ;---------------------------------------------------------------------------- - ; S u b r o u t i n e -sub_0_8D1: ; CODE XREF: start+7Fp - xor a +sub_0_8D1: xor a ; CODE XREF: start+7Fp ld hl, 2C9Dh ld b, 61h call sub_0_1786 @@ -1282,9 +1265,7 @@ sub_0_8D1: ; CODE XREF: start+7Fp cp 0 jr z, loc_0_8FD ld a, 7 - -loc_0_8FD: ; CODE XREF: sub_0_8D1+28j - ld (2CA4h), a +loc_0_8FD: ld (2CA4h), a ; CODE XREF: sub_0_8D1+28j ld a, 10h ld (2C9Eh), a ld a, (byte_0_8AF) @@ -1301,13 +1282,11 @@ loc_0_8FD: ; CODE XREF: sub_0_8D1+28j cp 0Fh jr nz, loc_0_924 jr locret_0_953 -;---------------------------------------------------------------------------- -loc_0_924: ; CODE XREF: sub_0_8D1+4Bj - ; sub_0_8D1+4Fj - call sub_0_BB4 - jr c, loc_0_954 +loc_0_924: call sub_0_BB4 ; CODE XREF: sub_0_8D1+4Bj + jr c, loc_0_954 ; sub_0_8D1+4Fj jr locret_0_953 + ;---------------------------------------------------------------------------- loc_0_92B: ; CODE XREF: sub_0_8D1+47j @@ -1656,7 +1635,7 @@ loc_0_B6A: PUSH AF loc_0_B7B: LD HL,2CA7H LD DE,2C9FH - CALL 692H + CALL sub_0_692 LD A,1 LD (smod_b_B0A),A CALL 0EC7H @@ -1842,7 +1821,7 @@ loc_0_CB0: CALL sub_0_C97 loc_0_CB6: CALL sub_0_C97 LD HL,2CABH LD DE,2CE0H - CALL 692H + CALL sub_0_692 LD A,3 CALL sub_0_13BA JP 0C7FH @@ -1852,7 +1831,7 @@ loc_0_CCA: CALL sub_0_C97 JP C,0C47H LD HL,2CABH LD DE,2CE0H - CALL 692H + CALL sub_0_692 LD A,3 CALL sub_0_13BA JP loc_0_C0A @@ -2442,45 +2421,45 @@ loc_0_1024: ld hl, (2CFEh) ; CODE XREF: sub_0_FD1+22j jp loc_0_FDB ;---------------------------------------------------------------------------- -loc_0_1035: - LD A,0FFH ;1035 3e ff + +loc_0_1035: LD A,0FFH ;1035 3e ff JP loc_0_108A ;1037 c3 8a 10 LD A,5 ;103a 3e 05 - LD (2D00H),A ;103c 32 00 2d - CALL 0E05H ;103f cd 05 0e - JR C,108AH ;1042 38 46 - LD HL,10ADH ;1044 21 ad 10 + LD (byte_0_2D00),A ;103c 32 00 2d + CALL loc_0_E05 ;103f cd 05 0e + JR C,loc_0_108A ;1042 38 46 + LD HL,stab_0_10AD ;1044 21 ad 10 LD BC,2 ;1047 01 02 00 CPIR ;104a ed b1 - JP Z,67FH ;104c ca 7f 06 + JP Z,sub_0_67F ;104c ca 7f 06 JR loc_0_1024 ;104f 18 d3 - CALL 0E05H ;1051 cd 05 0e + CALL loc_0_E05 ;1051 cd 05 0e JR C,loc_0_108A ;1054 38 34 - LD HL,10B3H ;1056 21 b3 10 + LD HL,stab_0_10B3 ;1056 21 b3 10 LD BC,4 ;1059 01 04 00 CPIR ;105c ed b1 - JP Z,067FH ;105e ca 7f 06 + JP Z,sub_0_67F ;105e ca 7f 06 JR loc_0_1024 ;1061 18 c1 LD A,10H ;1063 3e 10 LD (2C9EH),A ;1065 32 9e 2c - CALL 113FH ;1068 cd 3f 11 + CALL sub_0_113F ;1068 cd 3f 11 JR 107FH ;106b 18 12 ; LD A,10H ;106d 3e 10 LD (2C9EH),A ;106f 32 9e 2c - CALL 1100H ;1072 cd 00 11 - JR 107FH ;1075 18 08 + CALL sub_0_1100 ;1072 cd 00 11 + JR loc_0_107F ;1075 18 08 LD A,20H ;1077 3e 20 LD (2C9EH),A ;1079 32 9e 2c CALL 10C5H ;107c cd c5 10 - PUSH AF ;107f f5 +loc_0_107F: PUSH AF ;107f f5 LD HL,2CA7H ;1080 21 a7 2c LD DE,2CE4H ;1083 11 e4 2c - CALL 692H ;1086 cd 92 06 + CALL sub_0_692 ;1086 cd 92 06 POP AF ;1089 f1 loc_0_108A: ld hl, 10BFh ; CODE XREF: sub_0_FD1+14j ld bc, 6 ; sub_0_FD1+5Ej @@ -2492,8 +2471,6 @@ loc_0_108A: ld hl, 10BFh ; CODE XREF: sub_0_FD1+14j loc_0_109A: scf ; CODE XREF: sub_0_FD1+C5j ret -;---------------------------------------------------------------------------- - loc_0_109C: or a ; CODE XREF: sub_0_FD1+C1j ret @@ -2515,13 +2492,15 @@ stab_0_10A7: .db 6Bh ; k .db 10h ; .db 1Dh ; .db 10h ; - .db 2Ah ; * + +stab_0_10AD: .db 2Ah ; * .db 18h ; .db 51h ; Q .db 10h ; .db 3Fh ; ? - .db 10h ; - .db 43h ; C + .db 10h ; + +stab_0_10B3: .db 43h ; C .db 41h ; A .db 42h ; B .db 18h ; @@ -2570,7 +2549,7 @@ stab_0_10A7: .db 6Bh ; k JR Z,1132H ;10fc 28 34 JR 113BH ;10fe 18 3b ; - CALL sub_0_8A0 ;1100 cd a0 08 +sub_0_1100: CALL sub_0_8A0 ;1100 cd a0 08 CALL sub_0_E2F ;1103 cd 2f 0e RET C ;1106 d8 LD (2D01H),A ;1107 32 01 2d @@ -2606,7 +2585,7 @@ stab_0_10A7: .db 6Bh ; k SCF ;113d 37 RET ;113e c9 - CALL sub_0_8A0 ;113f cd a0 08 +sub_0_113F: CALL sub_0_8A0 ;113f cd a0 08 CALL 1194H ;1142 cd 94 11 RET C ;1145 d8 LD (2D01H),A ;1146 32 01 2d