Small CP/M 3 Update

This commit is contained in:
Wayne Warthen
2020-02-03 14:48:27 -08:00
parent e7794723bf
commit 48968766a0
2 changed files with 73 additions and 1 deletions

View File

@@ -244,7 +244,7 @@ co$next:
push h ; save the vector
push b ; save the count and character
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
call ?co ; if device selected, print it
pop b ; recover count and character

View File

@@ -667,4 +667,76 @@ drvtbladr dw @dtbl ; drive map address (filled in later)
dphtbladr dw dph0 ; dpb map address
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