mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 14:11:48 -06:00
@@ -244,7 +244,7 @@ co$next:
|
|||||||
push h ; save the vector
|
push h ; save the vector
|
||||||
push b ; save the count and character
|
push b ; save the count and character
|
||||||
not$out$ready:
|
not$out$ready:
|
||||||
call coster ! ora a ! jz not$out$ready
|
push b ! call coster ! pop b ! ora a ! jz not$out$ready
|
||||||
pop b ! push b ; restore and resave the character and device
|
pop b ! push b ; restore and resave the character and device
|
||||||
call ?co ; if device selected, print it
|
call ?co ; if device selected, print it
|
||||||
pop b ; recover count and character
|
pop b ; recover count and character
|
||||||
|
|||||||
@@ -667,4 +667,76 @@ drvtbladr dw @dtbl ; drive map address (filled in later)
|
|||||||
dphtbladr dw dph0 ; dpb map address
|
dphtbladr dw dph0 ; dpb map address
|
||||||
cbxsiz equ $ - cbx
|
cbxsiz equ $ - cbx
|
||||||
|
|
||||||
|
if 0
|
||||||
|
;
|
||||||
|
; Print the hex word value in HL
|
||||||
|
;
|
||||||
|
phex16:
|
||||||
|
push af
|
||||||
|
ld a,h
|
||||||
|
call phex8
|
||||||
|
ld a,l
|
||||||
|
call phex8
|
||||||
|
pop af
|
||||||
|
ret
|
||||||
|
;
|
||||||
|
; Print the hex byte value in A
|
||||||
|
;
|
||||||
|
phex8:
|
||||||
|
push af
|
||||||
|
push de
|
||||||
|
call hexascii
|
||||||
|
ld a,d
|
||||||
|
call cout
|
||||||
|
ld a,e
|
||||||
|
call cout
|
||||||
|
pop de
|
||||||
|
pop af
|
||||||
|
ret
|
||||||
|
|
||||||
|
;
|
||||||
|
; Convert binary value in A to ascii hex characters in DE
|
||||||
|
;
|
||||||
|
hexascii:
|
||||||
|
ld d,a
|
||||||
|
call hexconv
|
||||||
|
ld e,a
|
||||||
|
ld a,d
|
||||||
|
rlca
|
||||||
|
rlca
|
||||||
|
rlca
|
||||||
|
rlca
|
||||||
|
call hexconv
|
||||||
|
ld d,a
|
||||||
|
ret
|
||||||
|
;
|
||||||
|
; convert low nibble of A to ascii hex
|
||||||
|
;
|
||||||
|
hexconv:
|
||||||
|
and 0fh ;low nibble only
|
||||||
|
add a,90h
|
||||||
|
daa
|
||||||
|
adc a,40h
|
||||||
|
daa
|
||||||
|
ret
|
||||||
|
;
|
||||||
|
; output character from A
|
||||||
|
;
|
||||||
|
cout:
|
||||||
|
; save all incoming registers
|
||||||
|
push af
|
||||||
|
push bc
|
||||||
|
push de
|
||||||
|
push hl
|
||||||
|
ld e,a
|
||||||
|
ld bc,0100h
|
||||||
|
rst 08
|
||||||
|
pop hl
|
||||||
|
pop de
|
||||||
|
pop bc
|
||||||
|
pop af
|
||||||
|
ret
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user