summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo C2016-08-20 10:35:33 +0200
committerLeo C2016-08-20 10:35:33 +0200
commitc486c4dadb569dcb1c92c7778bde875363a09f12 (patch)
treee06f648ebf21b5c9b8c54f62e671960e3e061e3a
parent0c461f1d8b5869c9d263dae1929c3c74c7caa6fd (diff)
downloadddt180-c486c4dadb569dcb1c92c7778bde875363a09f12.zip
Case in/sensitivity option for symbol lookup
-rw-r--r--ddt180.z8031
1 files changed, 24 insertions, 7 deletions
diff --git a/ddt180.z80 b/ddt180.z80
index f9a4014..2959558 100644
--- a/ddt180.z80
+++ b/ddt180.z80
@@ -64,8 +64,11 @@ BP_CNT equ 12 ;Number of breakpoints
BP_SIZE equ 8 ;Size of a breakpoint record
YREG_CNT equ 10 ;Number of Y registers (0..9)
-;-------------------------------------------------------------------------------
+SYMCASE_SENS equ 1 ;Symbols are case sensitive
+SYMCASE_CONV equ 2 ;Convert case when symbols are loaded
+SYMCASE_LOWER equ 4 ;Convert to lower case if set, else to upper case
+;-------------------------------------------------------------------------------
ddtz_base:
jp ddtz_bdos
l0003h:
@@ -75,6 +78,14 @@ sub_0004h:
ret
ddtz_bdos:
jp 0
+screen_width:
+ db 80
+symlen_max:
+ db 16
+
+symattrib:
+ db 0
+
current_cseg defl $ - current_cseg
.phase current_phase + current_cseg
@@ -434,7 +445,7 @@ p_align_@_sym:
ld a,d
or e
pop de
- ld a,(symlen_max)
+ ld a,(symlen_cur)
jr z,$+4
add a,6
add a,c
@@ -1201,6 +1212,11 @@ error1:
fact_symbol:
push bc
ld hl,ddtz_base ;symtbl start
+ ld a,(symattrib)
+ ld c,07fh
+ rra
+ jr c,fs_nxtsym
+ res 5,c
fs_nxtsym:
ld a,(hl) ;symlen
@@ -1228,7 +1244,8 @@ fs_2:
fs_3:
inc de
dec hl
- cp (hl)
+ xor (hl)
+ and c
jr z,fs_2
fs_cont: ;start over
pop de ;inpsym ptr
@@ -2443,7 +2460,7 @@ l0e5eh:
p_sym_list:
inc de
call assert_eol
- ld a,(symlen_max)
+ ld a,(symlen_cur)
add a,7
ld b,a
ld c,0
@@ -2467,7 +2484,7 @@ psym_nxtsym:
ld a,c
add b
ld c,a
- ld a,80 ;screen width
+ ld a,(screen_width)
sub b
cp c
jr nc,psym_nxtsym
@@ -3133,7 +3150,7 @@ rs_61:
ld (hl),e ;
inc hl ;
ld (hl),d ;
- ld hl,symlen_max ;
+ ld hl,symlen_cur ;
cp (hl) ; new max?
jr c,$+3 ;
ld (hl),a ;
@@ -5939,7 +5956,7 @@ disas_arg_16:
disas_argtype:
db 0
-symlen_max: ;max length of symbols read so far
+symlen_cur: ;max length of symbols read so far
db 0
cur_fcb:
dw 0