summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo C2016-08-22 14:24:18 +0200
committerLeo C2016-08-22 14:24:18 +0200
commit4fce2c15e40a51e924e74895adf7f8133f9aa5c3 (patch)
treee226c549f53694458734fc734984c055b78182e6
parent0dc44d1732461b7c3a3cc98e709f117afc165b97 (diff)
downloadddt180-4fce2c15e40a51e924e74895adf7f8133f9aa5c3.zip
Bugfix test_alphanum/test_numeral
-rw-r--r--ddt180.z8026
1 files changed, 14 insertions, 12 deletions
diff --git a/ddt180.z80 b/ddt180.z80
index 1af627f..d8e7241 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:
@@ -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'