I'm actually trying to write a simple program which takes in a string and send it to printer to print. But i'm having a problem with testing it, because the signal assembly language sending is to a parallel port, but there are only usb port printers available. Does anybody know how to resolve such problems? Thanks very much for reading.
P/S: I'm using MASM and the code is like this
.model small
.stack 100h
.data
input_message db "Enter a string to print: $"
msg db 100
db ?
db 100 dup(?)
printing_message db 10,13,"Printing.....", 10, 13, "$"
n db ?
.code
mov ax, @DATA
mov ds, ax
mov n , 0
mov ah , 9
lea dx , input_message
int 21h
mov ah , 0Ah
lea dx , msg
int 21h
; printing
mov ah , 9
lea dx , printing_message
int 21h
mov si , 2
mov cl , msg[1]
xor ch , ch
for_output:
mov dx , 1
mov al, msg[si]
mov ah, 00h
int 17h
inc si
loop for_output
;ending
mov ah, 4ch
int 21h
end