From 46b2e3c74e2964eb1f53b0dfcda533978caaeffe Mon Sep 17 00:00:00 2001 From: Leo C Date: Mon, 22 Aug 2016 16:43:06 +0200 Subject: [PATCH] Bugfix test_alphanum/test_numeral, command Q --- ddt180.z80 | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/ddt180.z80 b/ddt180.z80 index 1af627f..122748d 100644 --- a/ddt180.z80 +++ b/ddt180.z80 @@ -1243,19 +1243,17 @@ fs_nxtsym: inc b push hl ;symtbl ptr push de ;inpsym ptr -fs_2: +fs_nxtchar: ld a,(de) djnz fs_3 - cp a,':' - jr nz,fs_21 - inc de - pop hl - jr fs_cont_1 - -fs_21: call test_sym_char jr z,fs_cont pop hl ;inpsym ptr (discard) + inc de + cp a,':' + jr z,fs_cont_1 + dec de + pop hl ;symtbl ptr inc hl ld a,(hl) ;symval h @@ -1265,12 +1263,13 @@ fs_21: or a ;clear carry pop bc ret + fs_3: inc de dec hl xor (hl) and c - jr z,fs_2 + jr z,fs_nxtchar fs_cont: ;start over pop de ;inpsym ptr fs_cont_1: @@ -2593,7 +2592,7 @@ sub_0ed7h: push de push bc l0edah: - call get_char_upper + ld a,(de) cp (hl) jr nz,l0ee2h inc de @@ -3217,18 +3216,21 @@ test_sym_char: ; return nc if valid alfanumeric char test_alphanum: - cp 'z'+1 + cp 'z' + ret z ccf ret c cp 'a' ret nc - cp 'Z'+1 + cp 'Z' + ret z ccf ret c cp '?' ret nc test_numeral: - cp '9'+1 + cp '9' + ret z ccf ret c cp '0' -- 2.39.2