Count in octal: Difference between revisions

m
(Added uBasic/4tH version)
Line 209:
sphl ; restore it
ret ; back to the ccp w/o warm booting
;------------------------------------------------------
; Console output routine
; print character in A register to console
;------------------------------------------------------
putchr: push h
push d
push b
mov e,a ; character to E for CP/M
mvi c,2 ; console output function
call bdos ; call on BDOS to perform
pop b
pop d
pop h
ret
;------------------------------------------------------
; output CRLF to console
;------------------------------------------------------
crlf: mvi a,cr
call putchr
mvi a,lf
call putchr
ret
;------------------------------------------------------
; Octal output routine
Line 267 ⟶ 245:
rar ; bit 0 of MSB has shifted in
mov l,a
ret
;------------------------------------------------------
; output CRLF to console
;------------------------------------------------------
crlf: mvi a,cr
call putchr
mvi a,lf
call putchr
ret
;------------------------------------------------------
; Console output routine
; print character in A register to console
;------------------------------------------------------
putchr: push h
push d
push b
mov e,a ; character to E for CP/M
mvi c,2 ; console output function
call bdos ; call on BDOS to perform
pop b
pop d
pop h
ret
;-------------------------------------------------------
Line 290:
1777777
</pre>
 
 
=={{header|AArch64 Assembly}}==
211

edits