INT 10
From Wikipedia, the free encyclopedia
INT 10 is shorthand for "interrupt 0x10" or "interrupt 10h" and is the 16th interrupt vector (interrupts begin at 0, and are usually specified as hexadecimal values). This corresponds to the BIOS interrupt call for video services. Such services include setting the video mode, character and string output, and graphics primitives (reading and writing pixels in graphics mode). To use this call, load ah with the subfunction you want to use, load other parameters in the other registers, and make the call. INT 10h is fairly slow, so many programs bypass this BIOS routine and access the display hardware directly. Setting the video mode, which is done infrequently, can be accomplished by using the BIOS, while drawing graphics on the screen in a game needs to be done quickly, so direct access to video ram is more appropriate than making a BIOS call for every pixel.
[edit] List of supported functions
Please help improve this article or section by expanding it. Further information might be found on the talk page or at requests for expansion. (December 2007) |
Function | Parameters | Return | Notes |
---|---|---|---|
Set video mode | AH = 00h
AL = video mode |
AL = video mode flag / CRT controller mode byte | |
Set text-mode cursor shape | AH = 01h | ||
Set cursor position | AH = 02h
BH = Page, DH = Row, DL = Column |
||
Get cursor position and size | AH = 03h
BH = Page |
AX = 0, CH = Start scan line, CL = End scan line, DH = Row, DL = Column | |
Read light pen position | AH = 04h | Does not work on VGA systems | |
Select active display page | AH = 05h | ||
Scroll up window | AH = 06h
AL = lines to scroll (0 = clear), BH = Blank lines attribute |
||
Scroll down window | AH = 07h
Other : like above |
||
Read character and attribute at cursor position | AH = 08h | ||
Write character and attribute at cursor position | AH = 09h | ||
Write character only at cursor position | AH = 0Ah | ||
Set background/border color | AH = 0Bh
BH = 00h |
||
Set palette | AH = 0Bh
BH = 01h |
||
Write graphics pixel | AH = 0Ch
AL = Color, BH = Page, CX = x, DX = y |
||
Read graphics pixel | AH = 0Dh
BH = Page, CX = x, DX = y |
AL = Color | |
Teletype output | AH = 0Eh | ||
Get current video mode | AH = 0Fh | ||
Write string | AH = 13h
AL = Write mode, BH = Page, BL = Color, CX = String length, DH = Row, DL = Column, ES:BP = Offset of string |
EGA+ (meaning PC AT minimum) |