home *** CD-ROM | disk | FTP | other *** search
- include compiler.inc
-
- ttl PRINTF, 1.05, 10-20-86 jwk
-
-
- ;formatted print to stdout
-
- dseg
- extrn _ftb:byte
- cseg
-
- xtfs <_fmt, putc>
-
- procdef printf, <<arglst, word>>
-
- pushreg
- pushds
- mov ax, offset pc ;pointer to function
- lea dx, arglst ;pointer to first arg
- callit _fmt, <<dx, preg, ss>, <ax, preg, cs>>
- pret
-
- pend printf
-
- statdef pc, <<chr, byte>>
-
- pushreg
- lea si, _ftb[5] ;stdout stream pointer
- mov al, chr
- xor ah, ah
- callit putc <<si, preg, ds>, <ax, reg>>
- pret
-
- iend pc
-
- finish
-
- end
-
-
-
-
-
-
-
-
-