|
-
August 17th, 2003, 02:25 PM
#1
Junior Member
asm/printer status/int 17
i've been attempting to use int 17h to check printer status. using function 1 and 2, and 5 all return values that don't seem right (which is always the same value that i left in AH for the function). I have used all values in DX, but no change. The texts I have don't describe it very sufficiently, basically only stating that int 17h is for printer stuff. The material I've found on the net describe it, but only the values, and I tried what seems like the only possibilities for those values. DX is supposed to contain the printer port right? I'm using a printer off USB virtual port, so don't know if that affects anything involved, but only thought I had that wasn't related to syntax necessarily. Perhaps it is returning the correct status in the bits it has set, but it seems to be the same regardless of which function I put in AH. Here is some example code (written for masm) if it is any help:
.model small
.stack 100h
.data
char dw 0
.code
main proc
mov cx,0FFFFh
L1:
mov ah, 1 ;substituted with function 2 as well, and 5 (using DL for character)
mov dx, [char]
int 17h
inc [char]
add ah, 30h ;so hopefully I'll get a character to look up in ASCII and figure
; out the binary from the related hex, also, assembled in debug
; with values in AH unchanging. Printer status says ready under
; control panel.
mov dl, ah
mov ah, 2
int 21h
loop L1
mov ax, 4C00h
int 21h
main endp
end main
-thanks.
If you can\'t explain something to a six-year-old, you really don\'t understand it yourself - Albert Einstein
If life is supposed to be a gift, how come I have to give it back?
If I die and get frozen, and am brought back later in the future, will the life insurance companies want their money back from the beneficiaries?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|