/]/]@t 0 Report post Posted October 23, 2006 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
Saint_Michael 3 Report post Posted October 23, 2006 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
osknockout 0 Report post Posted October 24, 2006 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/assemblereither 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.* Btw. what compiler/assembler are you using there? Share this post Link to post Share on other sites