summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo C2016-08-10 18:39:19 +0200
committerLeo C2016-08-10 18:39:19 +0200
commitd1f2492ed211e8d3bfe8ee3cda94ceaef598847e (patch)
treefd92d7c62ff21c8e8ec123b34dfd5f5f34d1c1fc
parentc788b3b79519c9f97c29c8c86f96708eef59a63c (diff)
downloadddt180-d1f2492ed211e8d3bfe8ee3cda94ceaef598847e.zip
Add prstr_inl, print string inline
-rw-r--r--ddt180.z8062
1 files changed, 27 insertions, 35 deletions
diff --git a/ddt180.z80 b/ddt180.z80
index 24e2dcc..75b9b4e 100644
--- a/ddt180.z80
+++ b/ddt180.z80
@@ -469,15 +469,21 @@ pstr:
ld c,0 ;0288 0e 00 . .
l028ah:
ld a,(hl) ;028a 7e ~
+ inc hl ;0291 23 #
and a ;028b a7 .
ret z ;028c c8 .
call outchar ;028d cd 5d 02 . ] .
inc c ;0290 0c .
- inc hl ;0291 23 #
and a ;0292 a7 .
ret m ;0293 f8 .
jr l028ah ;0294 18 f4 . .
+pstr_inl:
+ ex (sp),hl
+ call pstr
+ ex (sp),hl
+ ret
+
outbl6:
call outbl2 ;0296 cd 9c 02 . . .
outbl4:
@@ -497,6 +503,7 @@ crlf:
ld (con_col),a ;02b2 32 72 02 2 r .
jp c,mainloop ;02b5 da bd 00 . . .
ret ;02b8 c9 .
+
add_hl_a:
add a,l ;02b9 85 .
ld l,a ;02ba 6f o
@@ -1950,6 +1957,7 @@ l0c30h:
pop af ;0c30 f1 .
pop hl ;0c31 e1 .
ret ;0c32 c9 .
+
l0c33h:
ld b,c ;0c33 41 A
call pstr ;0c34 cd 88 02 . . .
@@ -2871,8 +2879,8 @@ read_symfile:
cp ' '
jp z,p_max_high
- ld hl,msg_symbols
- call pstr
+ call pstr_inl
+ db 'SYMBOLS',CR,LF+80h
dec de
call file_open
@@ -2955,24 +2963,17 @@ rs_61:
;------------------------------------------------------------------------
p_max_high0:
- call assert_eol ;116f cd d6 02 . . .
+ call assert_eol
p_max_high:
- ld hl,msg_high ;1172 21 8d 11 ! . .
- call pstr ;1175 cd 88 02 . . .
- ld hl,(high_load) ;1178 2a 9c 11 * . .
- call out_hl ;117b cd 13 02 . . .
- ld hl,msg_max ;117e 21 94 11 ! . .
- call pstr ;1181 cd 88 02 . . .
- ld hl,(max_load) ;1184 2a 9e 11 * . .
- call out_hl ;1187 cd 13 02 . . .
- jp crlf ;118a c3 a3 02 . . .
-
-msg_symbols:
- db 'SYMBOLS',CR,LF+80h
-msg_high:
+ call pstr_inl
DC 'High = '
-msg_max:
+ ld hl,(high_load)
+ call out_hl
+ call pstr_inl
DC ' Max = '
+ ld hl,(max_load)
+ call out_hl
+ jp crlf
cmd_W:
call get_arg_range ;11a0 cd 7d 03 . } .
@@ -4279,14 +4280,11 @@ p_disas_instr:
ret ;197e c9 .
l197fh:
- ld hl,msg_undef_opcode ;197f 21 89 19 ! . .
- call pstr ;1982 cd 88 02 . . .
- ld b,001h ;1985 06 01 . .
- sub a ;1987 97 .
- ret ;1988 c9 .
-
-msg_undef_opcode:
+ call pstr_inl
DC '???'
+ ld b,001h
+ sub a
+ ret
disas_get_instrlen:
sub a ;198c 97 .
@@ -4783,12 +4781,9 @@ l1c98h:
jp out_hex ;1c9d c3 18 02 . . .
l1ca0h:
- ld hl,b_1ca9_start ;1ca0 21 a9 1c ! . .
- call pstr ;1ca3 cd 88 02 . . .
- jp p_arg_hlixiy ;1ca6 c3 7e 1e . ~ .
-
-b_1ca9_start:
+ call pstr_inl ;1ca3 cd 88 02 . . .
DC '(SP),'
+ jp p_arg_hlixiy ;1ca6 c3 7e 1e . ~ .
l1caeh:
call p_char_lparen ;1cb0 cd 5d 02 . ] .
@@ -4800,12 +4795,9 @@ p_arg_ex_dehl:
jp pstr ;1cbe c3 88 02 . . .
l1cc1h:
- ld hl,b_1cca_start ;1cc1 21 ca 1c ! . .
- call pstr ;1cc4 cd 88 02 . . .
- jp p_arg_hlixiy ;1cc7 c3 7e 1e . ~ .
-
-b_1cca_start:
+ call pstr_inl
DC 'SP,'
+ jp p_arg_hlixiy
p_arg_ex_afaf:
ld hl,b_176d_start ;1ccd 21 6d 17 ! m .