VZEditor/VZ157/SRC/PRINTF.ASM
Yoshihiko Hyodo 6f06b9514a first commit
2024-11-18 22:21:26 +09:00

54 lines
706 B
NASM
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;**************************** ; ##156.95
; 'printf.asm'
;****************************
include vz.inc
bseg
strseg dw 0
endbs
eseg
extrn puts :near
extrn pfbufp :word
$ld_strseg macro
mov ds,cs:strseg
endm
public printf
printf proc
pushm <si,di,ds,es>
movseg es,cs
mov di,pfbufp
push di
call sprintf
pop si
movseg ds,cs
call puts
popm <es,ds,di,si>
ret
printf endp
public sprintf
sprintf proc
push ds
mov cs:strseg,ds
movseg ds,cs
call $sprintf
pop ds
ret
sprintf endp
include sprintf.inc
endes
end
;****************************
; End of 'printf.asm'
; Copyright (C) 1989 by c.mos
;****************************