打印机检测程序
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