summaryrefslogtreecommitdiff
path: root/ddt180.z80
diff options
context:
space:
mode:
authorLeo C2016-08-14 21:21:56 +0200
committerLeo C2016-08-14 21:21:56 +0200
commit8bc5ea2267aec88cc21937d962c3e077414e2c65 (patch)
treea6567eeba108f5b05945c41d7b294d8f3ee25f3a /ddt180.z80
parent2d914eb7d607546546a41af99ded751e8e416dfb (diff)
downloadddt180-8bc5ea2267aec88cc21937d962c3e077414e2c65.zip
Add version stringv0.2
Minor optimizations (p_fill_space)
Diffstat (limited to 'ddt180.z80')
-rw-r--r--ddt180.z8071
1 files changed, 33 insertions, 38 deletions
diff --git a/ddt180.z80 b/ddt180.z80
index 9dae620..5cf41a9 100644
--- a/ddt180.z80
+++ b/ddt180.z80
@@ -9,7 +9,6 @@
;-------------------------------------------------------------------------------
; Relocation loader
;
-
TPA equ 0100h
cseg
.phase TPA
@@ -80,8 +79,11 @@ ddtz_bdos:
current_cseg defl $ - current_cseg
.phase current_phase + current_cseg
signon:
- db 'DDT/180',TAB
- db '[8101] 003',CR,LF,'$'
+ db 'Symbolic DDTZ/180'
+ db ' - Version '
+ maclib version.inc
+ defvers
+ db CR,LF,'$'
msgz80:
db 'Z80 or better required!',cr,lf,'$'
@@ -287,6 +289,7 @@ l01f3h:
call outbl
djnz l01f3h
ret
+
sub_01f9h:
dec b
push de
@@ -422,6 +425,13 @@ pstr_inl:
ex (sp),hl
ret
+p_fill_space:
+ call outbl
+ ld a,(con_col)
+ cp c
+ jr c,p_fill_space
+ ret
+
inchar:
push hl
push de
@@ -2524,11 +2534,7 @@ psym_nxtsym:
sub b
cp c
jr c,psym_nxtline
-psym_fillcol:
- call outbl
- ld a,(con_col)
- cp c
- jr c,psym_fillcol
+ call p_fill_space
jr psym_nxtsym
psym_nxtline:
@@ -3142,7 +3148,7 @@ rs_3: call read_byte
jr rs_3
rs_4: ld hl,(BDOS+1) ;
- ld e,0 ; setup symlen
+ ld d,0 ; setup symlen
rs_5: dec hl ;
call read_byte ; next char of symbol name
cp TAB ; symbol term?
@@ -3152,8 +3158,8 @@ rs_5: dec hl ;
cp '!' ; TODO: check for valid symbol char instead
jr c,error9 ;
ld (hl),a ;
- inc e ; symlen++
- ld a,e ;
+ inc d ; symlen++
+ ld a,d ;
cp 10h+1 ;
jr c,rs_5 ;
error9:
@@ -3187,18 +3193,17 @@ rs_61:
ld de,(BDOS+1) ;
ld (BDOS+1),hl ;
ex de,hl ;
- pop de ;
- ld (hl),e ; symlen
- ld a,e
+ pop af ;
+ ld (hl),a ; symlen
inc hl ;
pop de ; symval
ld (hl),e ;
inc hl ;
ld (hl),d ;
- ld hl,symlen_max
- cp (hl)
- jr c,$+3
- ld (hl),a
+ ld hl,symlen_max ;
+ cp (hl) ; new max?
+ jr c,$+3 ;
+ ld (hl),a ;
jp rs_1 ;
@@ -3296,18 +3301,15 @@ l1211h:
push hl
call p_disas_line
pop iy
- ld c,b
ld de,(var.@)
ld a,d
or e
- ld b,17
+ ld c,17
jr z,l122dh
- ld b,25
+ ld c,25
l122dh:
- call outbl
- ld a,(con_col)
- cp b
- jr c,l122dh
+ call p_fill_space
+ ld c,b
push bc
call get_line
pop bc
@@ -4491,11 +4493,9 @@ p_disas_line:
call p_disas_instr
and a
ret z
-l193fh:
- call outbl
- ld a,(con_col)
- cp 16
- jr c,l193fh
+
+ ld c,16
+ call p_fill_space
p_offset:
ld de,(var.@)
@@ -5334,15 +5334,10 @@ p_arg:
p_mnemonic:
ld a,(con_col)
+ add a,5
ld c,a
- call pstr
-l1ebch:
- call outbl
- ld a,(con_col)
- sub c
- cp 5
- jr c,l1ebch
- ret
+ call pstr
+ jp p_fill_space
t_MNEMONICS:
DC 'ADC'