Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Article Q37031, Example 1
◄Contents► ◄Index► ◄Back►
─────────────────────────────────────────────────────────────────────────────
◄Knowledge Base Contents► ◄Knowledge Base Index►
Printer Error Can Hang; CALL INTERRUPT to Check Printer, Example 1
The following code example shows how to change the printer time-out
value for printer 1 in the ROM BIOS table. If your program changes the
printer time-out value, then you should also restore the original
time-out value before stopping the program.
' To try this example in VBDOS.EXE:
' 1. From the File menu, choose New Project.
' 2. Copy the code example to the Code window.
' 3. Press F5 to run the program.
'
' Change the time-out value and retain the old time-out value.
DEF SEG = &H40 ' Starting segment of the ROM BIOS table.
TimeOut% = PEEK (&H78) ' Table Entry for Printer 1 time-out value.
POKE &H78, 1 ' Change the time-out value.
DEF SEG ' Restore BASIC's segment.
' Restore the original time-out value.
DEF SEG = &H40
POKE &H78, TimeOut%
DEF SEG