Specifications

MICROPROCESSADORES
INTERRUPÇÕES
5
Luís Miguel Charrua Figueiredo 5 - 18 E.N.I.D.H.
Notes: if no keystroke is available, this function waits until one is placed in
the keyboard buffer the BIOS scan code is usually, but not always, the same as
the hardware scan code processed by INT 09. It is the same for ASCII keystrokes
and most unshifted special keys (F-keys, arrow keys, etc.), but differs for shifted
special keys. unlike AH=00h, this function does not discard extended keystrokes
INT 16/AH=09h can be used to determine whether this function is supported, but
only on later model PS/2s
SeeAlso
: AH=00h,AH=09h,AH=11h,AH=20h,MEM 0040h:0019h,MEM
0040h:001Eh
INT 16 - KEYBOARD - CHECK FOR ENHANCED KEYSTROKE (enh kbd
support only)
AH = 11h
Return
: ZF set if no keystroke available
ZF clear if keystroke available
AH = BIOS scan code
AL = ASCII character
Notes
: if a keystroke is available, it is not removed from the keyboard buffer
unlike AH=01h, this function does not discard extended keystrokes some versions
of the IBM BIOS Technical Reference erroneously report that CF is returned
instead of ZF INT 16/AH=09h can be used to determine whether this function is
supported, but only on later model PS/2s
SeeAlso
: AH=01h,AH=09h,AH=10h,AH=21h,INT 09,INT 15/AH=4Fh
INT 16 - KEYBOARD - GET EXTENDED SHIFT STATES (enh kbd support
only)
AH = 12h
Return
: AL = shift flags 1 (same as returned by AH=02h) (see #00587)
AH = shift flags 2 (see #00588)
Notes
: AL bit 3 set only for left Alt key on many machines AH bits
7 through 4 always clear on a Compaq SLT/286 INT 16/AH=09h can be used to
determine whether this function is supported, but only on later model PS/2s many
BIOSes (including at least some versions of Phoenix and AMI) will destroy AH on
return from functions higher than AH=12h, returning 12h less than was in AH on
entry (due to a chain of DEC/JZ instructions)
SeeAlso
: AH=02h,AH=09h,AH=22h,AH=51h,INT 17/AH=0Dh,MEM 0040h:0017h
Bitfields for keyboard shift flags 1:
Bit(s) Description (Table 00587)
7 Insert active
6 CapsLock active
5 NumLock active
4 ScrollLock active
3 Alt key pressed (either Alt on 101/102-key keyboards)
2 Ctrl key pressed (either Ctrl on 101/102-key keyboards)
1 left shift key pressed
0 right shift key pressed
SeeAlso
: #00582,#00588,MEM 0040h:0017h,#M0010
Bitfields for keyboard shift flags 2:
Bit(s) Description (Table 00588)
7 SysReq key pressed (SysReq is often labeled SysRq)
6 CapsLock pressed
5 NumLock pressed
4 ScrollLock pressed
3 right Alt key pressed
2 right Ctrl key pressed
1 left Alt key pressed
0 left Ctrl key pressed
SeeAlso
: #00587,MEM 0040h:0018h,#M0011
INT 17 - PRINTER - WRITE CHARACTER
AH = 00h
AL = character to write
DX = printer number (00h-02h)
Return
: AH = printer status (see #00631)
Note
: Under PhysTechSoft's PTS ROM-DOS the parallel port can also be
accessed as COM5.
BUGS
: Some print spoolers trash the BX register on return. Some original
IBM BIOSes set more than one printer status bits at a time, while only one of them
is correct.
SeeAlso
: AH=02h,AH=84h"AX",AX=6F02h,AH=F1h,INT 16/AX=FFE3h,INT
1A/AH=11h"NEC"
SeeAlso
: INT 4B/AH=00h,PORT 0278h"PRINTER",MEM 0040h:0008h,MEM
0040h:0078h
Bitfields for printer status:
Bit(s) Description (Table 00631)
7 not busy
6 acknowledge
5 out of paper
4 selected
3 I/O error
2-1 unused
0 timeout
Notes
: If both, it 5 "out of paper" and 4 "selected" are set, the MS-DOS/PC
DOS kernel assumes that no printer is attached. For Tandy 2000, bit 7 indicates
printer-busy when set rather than clear
INT 17 - PRINTER - INITIALIZE PORT
AH = 01h
DX = printer number (00h-02h)
Return
: AH = printer status (see #00631)
Note
: some printers report that they are ready immediately after initialization
when they actually are not; a more reliable result may obtained by calling AH=02h
after a brief delay
SeeAlso
: AH=02h,AH=FFh"PC-MOS",INT 1A/AH=10h"NEC",INT 4B/AH=01h
INT 17 - PRINTER - GET STATUS
AH = 02h
DX = printer number (00h-02h)
Return
: AH = printer status (see #00631)
Note
: PRINTFIX from MS-DOS 5.0 hooks this function and always returns
AH=90h
SeeAlso
: AH=01h,AH=F2h,INT 1A/AH=12h"NEC",INT 4B/AH=02h
INT 18 - DISKLESS BOOT HOOK (START CASSETTE BASIC)
Desc: called when there is no bootable disk available to the system
Notes
: very few PCs other than those produced by IBM contain BASIC in
ROM, so the action is unpredictable on compatibles; this interrupt often reboots
the system, and often has no effect at all some PC and XT clones had an optional
IBM CASSETTE BASIC stored in the ROM, too. most BIOSes will display an error
message similar to "NO BASIC", and either reboot or return to the caller. PS/2
machines usually pop up a graphical box to the effect that the user should enter a
floppy and press F1. Some clones display the message "No boot device available,
strike F1 to retry, F2 for setup utility" network cards with their own BIOS can hook
this interrupt to allow a diskless boot off the network (even when a hard disk is
present if none of the partitions is marked as the boot partition)
SeeAlso
: INT 2F/AX=4A06h,INT 86"NetBIOS",INT 2F/AX=4A06h,INT
2F/AX=4A07h
INT 19 - SYSTEM - BOOTSTRAP LOADER
Desc: This interrupt reboots the system without clearing memory or restoring
interrupt vectors. Because interrupt vectors are preserved, this interrupt usually
causes a system hang if any TSRs have hooked vectors from 00h through 1Ch,
particularly INT 08.
Notes
: Usually, the BIOS will try to read sector 1, head 0, track 0 from drive
A: to 0000h:7C00h. If this fails, and a hard disk is installed, the BIOS will read
sector 1, head 0, track 0 of the first hard disk. This sector should contain a master
bootstrap loader and a partition table (see #00650). After loading the master boot
sector at 0000h:7C00h, the master bootstrap loader is given control (see #00653).
It will scan the partition table for an active partition, and will then load
the operating system's bootstrap loader (contained in the first sector of the active
partition) and give it control. true IBM PCs and most clones issue an INT 18 if
neither floppy nor hard disk have a valid boot sector to accomplish a warm boot
equivalent to Ctrl-Alt-Del, store 1234h in 0040h:0072h and jump to FFFFh:0000h.
For a cold boot equivalent to a reset, store 0000h at 0040h:0072h
before jumping. VDISK.SYS hooks this interrupt to allow applications to find out