home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
LPT-TEST.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
2KB
|
43 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME LPT-TEST.DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
'.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
$INCLUDE "DAS-NB02.INC"
COLOR 7, 0
CLS
? "┌────────────────────────────────────────────────────────────────
? "│ fLPTready% ( LPTno? )
? "├───────────────────────────────────────────────────────────────────
? "│ Testing for the printer is just a bit trickier than it could be
? "│ because the printer/DOS is slow in reporting things and there are
? "│ plenty of times you can get a "YES" when there is no printer there!
? "│ This function tests many, many times until it returns it's answer and
? "│ is, therefore, pretty accurate.
? "└────────────────────────────────────────────────────────────────────────
?
LPTno? = 1 ' usually this is it but 2 & 3 exist too
LPTok% = fLPTready%( LPTno? )
IF ( LPTok% = -1 ) THEN PRINT "The printer is ready to go!"
IF ( LPTok% AND &b00000001 ) THEN PRINT "LPT TIMEOUT"
IF ( LPTok% AND &b00001000 ) THEN PRINT "I/O ERROR REPORTED / NO PRINTER"
IF ( LPTok% AND &b00100000 ) THEN PRINT "OUT OF PAPER - FEED ME!"