Title 'Printer Output COMMON Module' ; Revision : Jan. 04, 1984 File : PRINTIO.A86 V1.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; Printer_out : Output through Standard OS Function 5: Printer Output ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Cseg PUBLIC Printer_out, Pout Print_io Equ 05H ; BDOS Function call, Printer Output BDOS Equ 224 ; BDOS Entry point, Software interrupt 224 ;----------------------------------------------------------------------------+ ; Printer_out + ; Output to Printer, Ax points to the No. of bytes to output + ; Followed by the data string + ; + ; Input + ; = Address of the Count and the Data String to output + ; Registers Cx is modified + ; All others unchanged + ; + ;----------------------------------------------------------------------------+ Printer_Out: ; Save Registers Push Ax Push Bx Push Dx Push Es Mov Bx, Cx Mov Cl, Byte Ptr [BX] ; No. of Byte to Output Out: Push Cx Inc Bx Push Bx Mov Dl, Byte Ptr [Bx] Mov Cl, Print_io ; Output Byte to Printer Int Bdos ; Through BDOS function Pop Bx Pop Cx Dec Cl Jnz Out ; Restore Registers Pop Es Pop Dx Pop Bx Pop Ax RET ;----------------------------------------------------------------------------+ ; + ; POUT: Output a byte in
Through BDOS Printer Output Function + ; + ; Input :
= Data byte + ; Output: Printer Port + ; Registers All Changed, Caller must save it's own registers + ; + ;----------------------------------------------------------------------------+ POUT: Mov Cl, Print_io ; Output Byte to Printer Int Bdos ; Through BDOS function Ret End