Jump to content
xisto Community
/]/]@t

Test Print Is Online

Recommended Posts

Test print is OnLine

Function PrinterOnLine : Boolean;Const PrnStInt : Byte = $17;	  StRq : Byte = $02;	  PrnNum : Word = 0; { 0 para LPT1, 1 para LPT2, etc. }Var   nResult : byte;Begin (* PrinterOnLine*)Asm  mov ah,StRq;  mov dx,PrnNum;  Int $17;  mov nResult,ah;end;  PrinterOnLine := (nResult and $80) = $80;End;

Error:

[Warning] Funcoes.pas(204): Unsafe code 'ASM'

Share this post


Link to post
Share on other sites

Although I don't know this type of programming it would help to know what this is used for and what not. Just posting code doesn't help any members who might have questions about what your post is about or what problems you might have with it.

Share this post


Link to post
Share on other sites

Although I don't know this type of programming it would help to know what this is used for and what not. Just posting code doesn't help any members who might have questions about what your post is about or what problems you might have with it.

Actually, St. Michael, it isn't really that arcane.
Ok, /]/]@t, from the looks of it, your program should work fine.
- Checks printer status, right? -

It's just that your compiler/assembler
either a)doesn't like asm or b)is paranoid.
Probably because you left nResult as a variable.
In either case, turning warnings off should solve the problem.

And I hate to say it, but Saint_Michael's right. Specify your post next time.
Don't expect someone like me to come by and say. *Oh! That's obvious.* :lol:

Btw. what compiler/assembler are you using there?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.