Browse Source

Small CP/M 3 Update

pull/90/head
Wayne Warthen 6 years ago
parent
commit
48968766a0
  1. 2
      Source/CPM3/bioskrnl.asm
  2. 72
      Source/CPM3/boot.z80

2
Source/CPM3/bioskrnl.asm

@ -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

72
Source/CPM3/boot.z80

@ -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

Loading…
Cancel
Save