《电脑报》1992年合订 / 软件操作与技巧 阅读文章

打印机检测程序

Program Chykprint;
Function PR:Boolean;
Type RS=Record
AX,BX,CD,DX,BP,DI,DS,ES,FIAGS:Integer;
End;
Var Regs:RS;
Begin
PR:=False;FillChar (Regs,SizeOF (Regs),00);
With Regs Do begin AX:=$0200;DX:=0;end;
Intr ($17,Regs);
if (Regs.AX and $4000)=0 then begin
if (Regs.AX and $4000)<>0 then PR:=True;
if (Regs.AX and $4000)=0 then PR:=False;
end End;{of Function PR}
Begin
Hires;HiresCoilor(3);
If (Not PR) Then begin
Write(^G^G,^M^J,`请开打印机!');
Repeat Until PR
end
End

ESC 返回 PgUp/PgDn 翻页 software-archive.tifan.la 关于