Count in octal: Difference between revisions
m
→{{header|8080 Assembly}}
m (→{{header|J}}) |
|||
Line 208:
lhld oldstk ; get CP/M's stack back
sphl ; restore it
ret ;
;------------------------------------------------------
; Octal output routine
Line 224:
mov a,l ; test if hl = 0
ora h
cnz putoct ; recursive call
pop h ; get unshifted hl back
push h
Line 257:
; Console output routine
; print character in A register to console
; preserves BC, DE, and HL
;------------------------------------------------------
putchr: push h
Line 262 ⟶ 263:
push b
mov e,a ; character to E for CP/M
mvi c,
call bdos
pop b
pop d
|