diff options
author | Leo C | 2016-08-22 16:43:06 +0200 |
---|---|---|
committer | Leo C | 2016-08-22 16:43:06 +0200 |
commit | 46b2e3c74e2964eb1f53b0dfcda533978caaeffe (patch) | |
tree | 81338ec1bf6a8811f98e7b8ebb4f5d8032dc69da | |
parent | 0dc44d1732461b7c3a3cc98e709f117afc165b97 (diff) | |
download | ddt180-46b2e3c74e2964eb1f53b0dfcda533978caaeffe.zip |
Bugfix test_alphanum/test_numeral, command Q
-rw-r--r-- | ddt180.z80 | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -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'
|