]>
cloudbase.mooo.com Git - ddt180.git/blobdiff - ddt180.z80
+sub_hl_a1:\r
+ dec hl\r
+sub_hl_a:\r
+ push bc\r
+ ld c,a\r
+ ld b,0\r
+ or a\r
+ sbc hl,bc\r
+ pop bc\r
+ ret\r
+\r
+sym_getname:\r
+ push de\r
+ push hl\r
+ ld hl,ddtz_base+2\r
+sgn_l:\r
+ ld d,(hl)\r
+ dec hl\r
+ ld e,(hl)\r
+ dec hl\r
+ ld a,(hl)\r
+ cp 0c3h\r
+ jr z,sgn_e\r
+\r
+ ex (sp),hl\r
+ call cp_hl_de\r
+ jr z,sgn_e\r
+ ex (sp),hl\r
+ call sub_hl_a1\r
+ jr sgn_l\r
+sgn_e:\r
+ sub 0c3h\r
+ pop hl\r
+ pop de\r
+ ret\r
+\r
+p_symstr:\r
+ push bc\r
+ ld b,(hl)\r
+pss_l:\r
+ dec hl\r
+ ld a,(hl)\r
+ call outchar\r
+ djnz pss_l\r
+ pop bc\r
+ ret\r
+\r
+p_sym_space:\r
+ if 0\r
+ ld a,(dash_flag)\r
+ or a\r
+ ret nz\r
+ endif\r
+\r
+ push hl\r
+ push bc\r
+ ld c,a\r
+ ld a,(con_col)\r
+ ld b,a\r
+ call sym_getname\r
+ jr z,psb_align\r
+ bit 7,c\r
+ jr z,psb_nd\r
+ ld a,' '\r
+ call outchar\r
+ ld a,'.'\r
+ call outchar\r
+psb_nd:\r
+ call p_symstr\r
+\r
+psb_align:\r
+ ld a,(con_col)\r
+ sub b\r
+ ld b,a\r
+ ld a,(symlen_max)\r
+ bit 7,c\r
+ jr z,$+4\r
+ add a,2\r
+ res 7,c\r
+ add c\r
+ sub b\r
+ ld b,a\r
+ jr z,psb_e\r
+psb_a_l:\r
+ call outbl\r
+ djnz psb_a_l\r
+psb_e:\r
+ pop bc\r
+ pop hl\r
+ ret\r
+\r
+p_label:\r
+ if 0\r
+ ld a,(dash_flag)\r
+ or a\r
+ ret nz\r
+ endif\r
+ push hl\r
+ call sym_getname\r
+ jr z,pl_e\r
+ call p_symstr\r
+ ld a,':'\r
+ call outchar\r
+ call crlf\r
+pl_e:\r
+ pop hl\r
+ ret\r
+\r
lookupch:\r
ld b,0\r
l02f5h:\r
lookupch:\r
ld b,0\r
l02f5h:\r
p_symbols:\r
inc de\r
call assert_eol\r
p_symbols:\r
inc de\r
call assert_eol\r
- ld hl,ddtz_base+2\r
-\r
ld a,(symlen_max)\r
add a,8\r
ld b,a\r
ld a,(symlen_max)\r
add a,8\r
ld b,a\r
sub a,b\r
jr nc,psym_1\r
\r
sub a,b\r
jr nc,psym_1\r
\r
psym_nxtline:\r
ld b,c\r
psym_nxtcol:\r
psym_nxtline:\r
ld b,c\r
psym_nxtcol:\r
-\r
-p_sym_space:\r
- if 0\r
- ld a,(dash_flag)\r
- or a\r
- ret nz\r
- endif\r
-\r
- push hl\r
- push bc\r
- ld c,a\r
- ld a,(con_col)\r
- ld b,a\r
- call sym_getname\r
- jr z,psb_align\r
- bit 7,c\r
- jr z,psb_nd\r
- ld a,' '\r
- call outchar\r
- ld a,'.'\r
- call outchar\r
-psb_nd:\r
- call p_symstr\r
-\r
-psb_align:\r
- ld a,(con_col)\r
- sub b\r
- ld b,a\r
- ld a,(symlen_max)\r
- bit 7,c\r
- jr z,$+4\r
- add a,2\r
- res 7,c\r
- add c\r
- sub b\r
- ld b,a\r
- jr z,psb_e\r
-psb_a_l:\r
- call outbl\r
- djnz psb_a_l\r
-psb_e:\r
- pop bc\r
- pop hl\r
- ret\r
-\r
-\r
-p_symbol:\r
- if 0\r
- ld a,(dash_flag)\r
- or a\r
- ret nz\r
- endif\r
- call sym_getname\r
- ret z\r
- call pstr_inl\r
- dc ' .'\r
-\r
-p_symstr:\r
- push bc\r
- ld b,(hl)\r
-pss_l:\r
- dec hl\r
- ld a,(hl)\r
- call outchar\r
- djnz pss_l\r
- pop bc\r
- ret\r
-\r
-p_label:\r
- if 0\r
- ld a,(dash_flag)\r
- or a\r
- ret nz\r
- endif\r
- push hl\r
- call sym_getname\r
- jr z,pl_e\r
- call p_symstr\r
- ld a,':'\r
- call outchar\r
- call crlf\r
-pl_e:\r
- pop hl\r
- ret\r
-\r
-\r
-sym_getname:\r
- push de\r
- push hl\r
- ld hl,ddtz_base+2\r
-sgn_l:\r
- ld d,(hl)\r
- dec hl\r
- ld e,(hl)\r
- dec hl\r
- ld a,(hl)\r
- cp 0c3h\r
- jr z,sgn_e\r
-\r
- ex (sp),hl\r
- call cp_hl_de\r
- jr z,sgn_e\r
- ex (sp),hl\r
- call sub_hl_a1\r
- jr sgn_l\r
-sgn_e:\r
- sub 0c3h\r
- pop hl\r
- pop de\r
- ret\r
-\r
-sub_hl_a1:\r
- dec hl\r
-sub_hl_a:\r
- push bc\r
- ld c,a\r
- ld b,0\r
- or a\r
- sbc hl,bc\r
- pop bc\r
- ret\r
-\r
cmd_Q:\r
ld a,(de)\r
sub 'J'\r
cmd_Q:\r
ld a,(de)\r
sub 'J'\r