Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

INT 10H

From Wikipedia, the free encyclopedia
BIOS interrupt call
This article includes a list ofgeneral references, butit lacks sufficient correspondinginline citations. Please help toimprove this article byintroducing more precise citations.(June 2015) (Learn how and when to remove this message)

INT 10h,INT 10H orINT 16 is shorthand forBIOS interrupt call 10hex, the 17thinterrupt vector in anx86-based computer system. TheBIOS typically sets up areal modeinterrupt handler at this vector that provides video services. Such services include setting the video mode, character and string output, and graphics primitives (reading and writingpixels in graphics mode).

To use this call, load AH with the number of the desired subfunction, load other required parameters in 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.

Furthermore, on a modern x86 system, BIOS calls can only be performed inreal mode orvirtual 8086 mode. v8086 is not an option inlong mode. This means that a modern operating system, which operates inprotected mode (32 bit), orlong mode (64 bit), would need to switch into real mode and back to call the BIOS - a hugely expensive operation. Although most modern systems typically use device drivers that directly set the video mode, it is not feasible for ahobbyist operating system to have a device driver for every video card - a problem that also plagues older, unsupported systems such asWindows 98. Such systems instead can drop into real mode to switch the video mode, and then draw to the framebuffer directly.

InEFI 1.x systems, the INT 10H and theVESA BIOS Extensions (VBE) are replaced by the EFI UGA protocol. In widely usedUEFI 2.x systems, the INT 10H and the VBE are replaced by theUEFI GOP.[1][2]

List of supported functions

[edit]

The list is incomplete; useRalf Brown's Interrupt List for comprehensive information. Please only add IBM/PC or other common standard functions. 00h through 0fh are CGA.

FunctionFunction codeParametersReturn
Set video modeAH=00hAL = video mode

AL = video mode (For Old IBM Only)

AL = video mode flag / CRT controller mode byte
Set text-mode cursor shapeAH=01hCH = Scan Row Start, CL = Scan Row End

Normally a character cell has 8 scan lines, 0–7. So, CX=0607h is a normal underline cursor, CX=0007h is a full-block cursor. If bit 5 of CH is set, that often means "Hide cursor". So CX=2607h is an invisible cursor.

Some video cards have 16 scan lines, 00h-0Fh.

Some video cards don't use bit 5 of CH. With these, make Start>End (e.g. CX=0706h)

Set cursor positionAH=02hBH = Page Number, DH = Row, DL = Column
Get cursor position and shapeAH=03hBH = Page NumberAX = 0, CH = Start scan line, CL = End scan line, DH = Row, DL = Column
Readlight pen position (Does not work onVGA systems)AH=04hAH = Status (0=not triggered, 1=triggered), BX = Pixel X, CH = Pixel Y, CX = Pixel line number for modes 0Fh-10h, DH = Character Y, DL = Character X
Select active display pageAH=05hAL = Page Number
Scroll up windowAH=06hAL = lines to scroll (0 = clear, CH, CL, DH, DL are used),

BH = Background Color and Foreground color. BH = 43h, means that background color is red and foreground color is cyan.Refer theBIOS color attributes

CH = Upper row number, CL = Left column number, DH = Lower row number, DL = Right column number

Scroll down windowAH=07hlike above
Read character and attribute at cursor positionAH=08hBH = Page NumberAH =Color, AL = Character
Write character and attribute at cursor positionAH=09hAL = Character, BH = Page Number, BL =Color, CX = Number of times to print character
Write character only at cursor positionAH=0AhAL = Character, BH = Page Number, CX = Number of times to print character
Set background/border colorAH=0Bh, BH = 00hBL = Background/Border color (border only in text modes)
Set paletteAH=0Bh, BH = 01hBL = Palette ID (was only valid inCGA, but newer cards support it in many or all graphics modes)
Write graphics pixelAH=0ChAL =Color, BH = Page Number, CX = x, DX = y
Read graphics pixelAH=0DhBH = Page Number, CX = x, DX = yAL = Color
Teletype outputAH=0EhAL = Character, BH = Page Number, BL =Color (only in graphic mode)
Get current video modeAH=0FhAL = Video Mode, AH = number of character columns, BH = active page
Change text mode character set[3]AH=11hBH = Number of bytes per character, CX = Number of characters to change, DX = Starting character to change, ES:BP = Offset of character data
Write string (EGA+, meaningPC AT minimum)AH=13hAL = Write mode, BH = Page Number, BL =Color, CX = Number of characters in string, DH = Row, DL = Column, ES:BP = Offset of string
set VESA-Compliant video modes, beginning at 640 by 480 and reaching 1280 by 1024 with 256 colorsAX=4f02hBX = video mode, ifSign bit (bit 15) set, video memory will not be refreshed
OtherVESA VBE commandsAX=4F00h to 4F15hSee specSee spec

See also

[edit]

References

[edit]
  1. ^"What is efifb? — The Linux Kernel documentation".kernel.org. Retrieved2020-11-24.
  2. ^"What is vesafb? — The Linux Kernel documentation".kernel.org. Retrieved2020-11-24.
  3. ^"A Font changing routine".Forever Young Software. RetrievedMarch 8, 2020.
Retrieved from "https://en.wikipedia.org/w/index.php?title=INT_10H&oldid=1296382288"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp