INT 10h Video services INT 16h Keyboard services INT 21h DOS services - "DOS function calls" Most interrupts use AH to specify the desired operation (function). INT 16h will communicate with the keyboard. It is implemented by the BIOS or operating system. It get keystroke from keyboard. This BIOS function can be used. Int 16h and Int 10h are a Bios-level access interrupts, while Int 21h is an MS-Dos- level. Access interrupt. Bios Int 16h: Keyboard Input: ▫ Function 01 Int 16h.


Author: Rowan Stoltenberg DVM
Country: Indonesia
Language: English
Genre: Education
Published: 15 April 2016
Pages: 199
PDF File Size: 18.6 Mb
ePub File Size: 44.12 Mb
ISBN: 336-1-33223-139-9
Downloads: 96746
Price: Free
Uploader: Rowan Stoltenberg DVM


On exit, al contains the character read from the serial port int 16h functions bit seven of ah contains the error status. When this routine is called, it does not return to the caller until a character is received at the serial port.

Art of Assembly: Chapter Thirteen-3

Reading a character from the COM1: Serial Port Status This call returns status information about the serial int 16h functions including whether or not int 16h functions error has occurred, if a character has been received in the receive buffer, if the transmit buffer is empty, and other pieces of useful information.

On entry into this routine, the dx register contains the serial port number. On exit, the ax register contains the following values: Bit Meaning 15 Time out error 14 Transmitter shift register empty 13 Transmitter holding register empty 12 Break detection error 11 Framing error 10 Parity error 9 Overrun error 8 Data available 7 Receive line signal detect 6 Ring indicator 5 Data set ready DSR 4 Clear to send CTS 3 Delta receive line signal detect 2 Trailing edge ring detector 1 Delta data set ready 0 Delta clear to send There are a couple of int 16h functions bits, not pertaining to errors, returned in this status information.

If the data available bit is set bit int 16h functionsthen the serial port has received data and you should read it from the serial port.

The Transmitter holding register empty bit bit 13 tells you if the transmit operation will be delayed while waiting for the current character to be transmitted or if the next character will be immediately transmitted. By testing these two bits, you can perform other operations while waiting for the transmit register to become available or for the int 16h functions register to contain a character.


If you're interested in serial communications, you should obtain a copy of Int 16h functions Campbell's C Programmer's Guide to Serial Communications. Although written specifically for C programmers, this book contains a lot of information useful to programmers working in any programming language.

See the bibliography for more details.

Almost immediately, everyone realized that cassettes were history, so IBM began int 16h functions int 15h for many other services.

Except for the joystick calls, most of these services are beyond the scope of this text. Check on the bibliography if you interested in obtaining information on this BIOS call.


Read a key, test for a key, or int 16h functions keyboard status Parameters: Read a Key From the Keyboard If int 16h functions 16h is called with ah equal to zero, the BIOS will not return control to the caller until a key is available in the system type ahead buffer.

On return, al contains the ASCII code for the key read from the buffer and ah contains the keyboard scan code.

Int 16h Keyboard Interrupt

Write character Just like 09h except int 16h functions the attribute is unchanged mov ah, 0Ah ; Write char mov al, aChar mov bh, videoPage mov cx, int 16h functions int 10h 41 Functions 06h 07h: Teletype output Print the character, move cursor to right, go to beginning of next line if needed mov ah, 0Eh ; Write char and advance cursor mov al, aChar mov bh, videoPage int 10h int 16h functions Function 13h: String Teletype output Print the string at a given row and column String may contain both characters and attribute values.

X-coord of last button press DX: Y-coord of last button press mov ax, 5 mov bx, 0; button ID int 33h test ax, 1 ; left button?


X-coord of last button release DX: To test it, rapidly press random keys to fill up the int 16h functions. Then press Esc and note that the program ends immediately.