BIOS 中断呼叫

BIOS 中断呼叫
维基百科,自由的百科全书
跳转至: 导航 搜索

BIOS 中断呼叫是一组功能,提供DOS程式与一些软件(例如启动程式)去使用IBM_PC兼容机BIOS的功能。一些操作系统系统引导的时候也使用BIOS以检测并初始化硬件资源。

目录

 [隐藏

[编辑]中断调用

若要调用中断,可以使用X86汇编语言INT指令。 例如,如下的x86汇编语言指令可以使用BIOS的0x10中断向屏幕打印一个字符。

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


[编辑]BIOS中断向量表

中断描述
INT 00hCPU: 除零错,或商不合法时触发
INT 01hCPU: 单步陷阱,TF标记为打开状态时,每条指令执行后触发
INT 02hCPU: 非可屏蔽中断, 如 系统自举 时发生内存错误触发。
INT 03hCPU: 第一个未定义的中断向量, 约定俗成仅用于调试程序
INT 04hCPU: 算数溢出。通常由INTO指令在置溢出位时触发。
INT 05h在按下Shift-PrintScreen或BOUND指令检测到范围异常时触发。
INT 06hCPU: Called when the Undefined Opcode (invalid instruction) exception occurs. Usually installed by the operating system.
INT 07hCPU: Called when an attempt was made to execute a floating-point instruction and no numeric coprocessor was available.
INT 08hIRQ0: Implemented by the system timing component; called 18.2 times per second (once every 55 ms) by thePIC
INT 09hIRQ1: Called after every key press and release (as well as during the time when a key is being held)
INT 0AhIRQ2:
INT 0BhIRQ3: Called by serial ports 2 and 4 (COM2/4) when in need of attention
INT 0ChIRQ4: Called by serial ports 1 and 3 (COM1/3) when in need of attention
INT 0DhIRQ5: Called by hard disk controller (PC/XT) or 2nd parallel port LPT2 (AT) when in need of attention
INT 0EhIRQ6: Called by floppy disk controller when in need of attention
INT 0FhIRQ7: 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 11hInstalled by the BIOS; returns equipment list
INT 12hInstalled by the BIOS or operating system; returns Conventional Memory Size
INT 13h低阶磁盘服务; installed by the BIOS or operating system; called by software programs
AH=00hReset Disk Drives
AH=01hCheck Drive Status
AH=02hRead Sectors From Drive
AH=03hWrite Sectors To Drive
AH=04hVerifies Sectors On Drive
AH=05hFormat Track On Drive
AH=08hGet Drive Parameters
AH=09hInit Fixed Drive Parameters
AH=0ChSeek To Specified Track
AH=0DhReset Fixed Disk Controller
AH=15hGet Drive Type
AH=16hGet Floppy Drive Media Change Status
INT 14hRoutines for communicating via the serial port. Used by software programs.
AH=00hSerial Port Initialization
AH=01hTransmit Character
AH=02hReceive Character
AH=03hStatus
INT 15hMiscellaneous (System services support routines)
AH=4FHKeyboard Intercept
AH=83HEvent Wait
AH=84HRead Joystick
AH=85HSysreq Key Callout
AH=86HWait
AH=87HMove Block
AH=88HGet Extended Memory Size
AH=C0HGet System Parameters
AH=C1HGet Extended BIOS Data Area Segment
AH=C2HPointing 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 16hImplemented by the BIOS or operating system. Provides routines to be called by software programs which communicate with the keyboard.
AH=00hRead Character
AH=01hRead Input Status
AH=02hRead Keyboard Shift Status
AH=10hRead Character Extended
AH=11hRead Input Status Extended
AH=12hRead Keyboard Shift Status Extended
INT 17hPrint Services - used by software programs to communicate with the printer
AH=00hPrint Character to Printer
AH=01hInitialize Printer
AH=02hCheck Printer Status
INT 18hExecute 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 19hAfter 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=07hReset RTC Alarm
INT 1BhInstalled by the operating system; automatically called by INT 9 when Ctrl-Break has been pressed
INT 1ChCalled automatically by INT 08; available for use by software programs when a routine needs to be executed regularly
INT 1DhNot to be called; simply a pointer to the VPT (Video Parameter Table), which contains data on video modes
INT 1EhNot to be called; simply a pointer to the DPT (Diskette Parameter Table), containing a variety of information concerning the diskette drives
INT 1FhNot to be called; simply a pointer to the VGCT (Video Graphics Character Table), which contains the data for ASCII characters 80h to FFh
INT 41hAddress pointer: FDPT = Fixed Disk Parameter Table (1st hard drive)
INT 46hAddress pointer: FDPT = Fixed Disk Parameter Table (2nd hard drive)
INT 4AhCalled by RTC for alarm
INT 70hIRQ8: 由 RTC 呼叫
INT 74hIRQ12: 由鼠标呼叫
INT 75hIRQ13: Called by math coprocessor
INT 76hIRQ14: 由第一个 IDE 控制器所呼叫
INT 77hIRQ15: 由第二个 IDE 控制器所呼叫

[编辑]相关

[编辑]外部链接

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值