BIOS 中斷呼叫

來源:互聯網
上載者:User

BIOS 中斷呼叫

維基百科,自由的百科全書跳轉至:
導航、
搜尋

BIOS 中斷呼叫是一組功能,提供DOS程式與一些軟體(例如啟動程式)去使用IBM_PC相容機的BIOS的功能。一些作業系統在系統引導的時候也使用BIOS以檢測並初始化硬體資源。

目錄

 [隱藏] 

  • 1中斷調用
  • 2BIOS中斷向量表
  • 3相關
  • 4外部連結
[編輯]中斷調用

若要調用中斷,可以使用X86組合語言的INT指令。
例如,如下的x86組合語言指令可以使用BIOS的0x10中斷向螢幕列印一個字元。

mov ah, 0x0emov al, '!'int 0x10

[編輯]BIOS中斷向量表
中斷 描述
INT 00h CPU: 除零錯,或商不合法時觸發
INT 01h CPU: 單步陷阱,TF標記為開啟狀態時,每條指令執行後觸發
INT 02h CPU:
非可屏蔽中斷, 如
系統自舉 時發生記憶體錯誤觸發。
INT 03h CPU: 第一個未定義的中斷向量, 約定俗成僅用於偵錯工具
INT 04h CPU: 算數溢出。通常由INTO指令在置溢出位時觸發。
INT 05h 在按下Shift-PrintScreen或BOUND指令檢測到範圍異常時觸發。
INT 06h CPU: Called when the
Undefined Opcode (invalid instruction) exception occurs. Usually installed by the operating system.
INT 07h CPU: Called when an attempt was made to execute a floating-point instruction and no numeric coprocessor was available.
INT 08h IRQ0: Implemented by the system timing component; called 18.2 times per second (once every 55 ms) by thePIC
INT 09h IRQ1: Called after every key press and release (as well as during the time when a key is being held)
INT 0Ah IRQ2:
INT 0Bh IRQ3: Called by
serial ports 2 and 4 (COM2/4) when in need of attention
INT 0Ch IRQ4: Called by serial ports 1 and 3 (COM1/3) when in need of attention
INT 0Dh IRQ5: Called by hard disk controller (PC/XT) or 2nd
parallel port LPT2 (AT) when in need of attention
INT 0Eh IRQ6: Called by
floppy disk controller when in need of attention
INT 0Fh IRQ7: Called by 1st parallel port LPT1 (printer) when in need of attention
INT 10h 顯示服務 - 由BIOS或作業系統設定以供軟體調用

AH=00h 設定顯示模式
AH=01h 設定遊標形態
AH=02h 設定遊標位置
AH=03h 擷取遊標位置與形態
AH=04h 擷取光筆位置
AH=05h 設定顯示頁
AH=06h 清除或捲軸畫面(上)
AH=07h 清除或捲軸畫面(下)
AH=08h 讀取遊標處字元與屬性
AH=09h 更改遊標處字元與屬性
AH=0Ah 更改遊標處字元
AH=0Bh 設定邊界顏色
AH=0Eh 在TTY模式下寫字元
AH=0Fh 取得目前顯示模式
AH=13h 寫字串
INT 11h Installed by the BIOS; returns equipment list
INT 12h Installed by the BIOS or operating system; returns Conventional Memory Size
INT 13h 低階磁碟服務; installed by the BIOS or operating system; called by software programs

AH=00h Reset Disk Drives
AH=01h Check Drive Status
AH=02h Read Sectors From Drive
AH=03h Write Sectors To Drive
AH=04h Verifies Sectors On Drive
AH=05h Format Track On Drive
AH=08h Get Drive Parameters
AH=09h Init Fixed Drive Parameters
AH=0Ch Seek To Specified Track
AH=0Dh Reset Fixed Disk Controller
AH=15h Get Drive Type
AH=16h Get Floppy Drive Media Change Status
INT 14h Routines for communicating via the serial port. Used by software programs.

AH=00h Serial Port Initialization
AH=01h Transmit Character
AH=02h Receive Character
AH=03h Status
INT 15h Miscellaneous (System services support routines)

AH=4FH Keyboard Intercept
AH=83H Event Wait
AH=84H Read Joystick
AH=85H Sysreq Key Callout
AH=86H Wait
AH=87H Move Block
AH=88H Get Extended Memory Size
AH=C0H Get System Parameters
AH=C1H Get Extended BIOS Data Area Segment
AH=C2H Pointing Device Functions
AH=E8h, AL=01h (AX = E801h) Get Extended Memory Size(Newer function, since 1994). Gives results for memory size above 64 Mb.
AH=E8h, AL=20h (AX = E820h) Query System Address Map. The information returned from
e820 supersedes what is returned from the older AX=E801h and AH=88h interfaces.
INT 16h Implemented by the BIOS or operating system. Provides routines to be called by software programs which communicate with the keyboard.

AH=00h Read Character
AH=01h Read Input Status
AH=02h Read Keyboard Shift Status
AH=10h Read Character Extended
AH=11h Read Input Status Extended
AH=12h Read Keyboard Shift Status Extended
INT 17h Print Services - used by software programs to communicate with the printer

AH=00h Print Character to Printer
AH=01h Initialize Printer
AH=02h Check Printer Status
INT 18h Execute Cassette BASIC: True IBM computers contain BASIC in the ROM to be interpreted and executed by this routine in the event of a boot failure (called by the BIOS)
INT 19h After POST this interrupt is used by BIOS to load the operating system.
INT 1Ah 即時的時鐘(RTC)服務 - called by software programs to communicate with the
RTC

AH=00h 讀取 RTC
AH=01h 設定 RTC
AH=02h 讀取 RTC 時間
AH=03h 設定 RTC 時間
AH=04h 讀取 RTC 日期
AH=05h 設定 RTC 日期
AH=06h 設定
RTC Alarm
AH=07h Reset RTC Alarm
INT 1Bh Installed by the operating system; automatically called by INT 9 when Ctrl-Break has been pressed
INT 1Ch Called automatically by INT 08; available for use by software programs when a routine needs to be executed regularly
INT 1Dh Not to be called; simply a pointer to the VPT (Video Parameter Table), which contains data on video modes
INT 1Eh Not to be called; simply a pointer to the DPT (Diskette Parameter Table), containing a variety of information concerning the diskette drives
INT 1Fh Not to be called; simply a pointer to the VGCT (Video Graphics Character Table), which contains the data for ASCII characters 80h to FFh
INT 41h Address pointer: FDPT = Fixed Disk Parameter Table (1st hard drive)
INT 46h Address pointer: FDPT = Fixed Disk Parameter Table (2nd hard drive)
INT 4Ah Called by RTC for alarm
INT 70h IRQ8: 由 RTC 呼叫
INT 74h IRQ12: 由滑鼠呼叫
INT 75h IRQ13: Called by math coprocessor
INT 76h IRQ14: 由第一個 IDE 控制器所呼叫
INT 77h IRQ15: 由第二個 IDE 控制器所呼叫
[編輯]相關
  • Interrupt
  • Interrupt descriptor table
  • INT 13
  • Input/Output Base Address
  • Ralf Brown's Interrupt List
[編輯]外部連結
  • Embedded BIOS User’s Manual
  • http://www.missl.cs.umd.edu/winint/index1.html
  • http://hdebruijn.soo.dto.tudelft.nl/newpage/interupt/out-0100.htm
  • Turbo Pascal examples for reading sectors
  • HTML version of Ralf Brown Interrupt List

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.