⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interrup.txt

📁 中断表 dos的中断 中断表 dos的中断
💻 TXT
📖 第 1 页 / 共 2 页
字号:
@Interrupt Services DOS鵅IOS鵈MS鵐ouse
:int table:interrupt table:exceptions:IRQ
^Intel Defined CPU Exception Table (see notes)

%	Interrupt	  Function

	 0	Divide by zero
	 1	Single step
	 2	Non-maskable  (NMI)
	 3	Breakpoint
	 4	Overflow trap
	 5	BOUND range exceeded (186,286,386)
	 6	Invalid opcode (186,286,386)
	 7	Coprocessor not available (286,386)
	 8	Double fault exception (286,386)
	 9	Coprocessor segment overrun (286,386)
	 A	Invalid task state segment (286,386)
	 B	Segment not present (286,386)
	 C	Stack exception (286,386)
	 D	General protection exception (286,386)
	 E	Page fault (286,386)
	 F	Reserved
	10	Coprocessor error (286,386)

^IBM PC Hardware Interrupt Table (in order of priority)

%	IRQ#  Interrupt 	Function

	IRQ0	 8	~timer~ (55ms intervals, 18.2 per second)
	IRQ1	 9	keyboard service required
	IRQ2	 A	slave ~8259~ or EGA/VGA vertical retrace
	IRQ8	70	real time clock  (AT,XT286,PS50+)
	IRQ9	71	software redirected to IRQ2  (AT,XT286,PS50+)
	IRQ10	72	reserved  (AT,XT286,PS50+)
	IRQ11	73	reserved  (AT,XT286,PS50+)
	IRQ12	74	mouse interrupt  (PS50+)
	IRQ13	75	numeric coprocessor error  (AT,XT286,PS50+)
	IRQ14	76	fixed disk controller (AT,XT286,PS50+)
	IRQ15	77	reserved  (AT,XT286,PS50+)
	IRQ3	 B	COM2 or COM4 service required, (COM3-COM8 on MCA PS/2)
	IRQ4	 C	COM1 or COM3 service required
	IRQ5	 D	fixed disk or data request from LPT2
	IRQ6	 E	floppy disk service required
	IRQ7	 F	data request from LPT1 (unreliable on IBM mono)


^Interrupt Table as Implemented by System BIOS/DOS

%      INT #   Locus		Function

	 0	CPU	divide by zero
	 1	CPU	single step
	 2	CPU	non-maskable
	 3	CPU	breakpoint
	 4	CPU	overflow trap
	 5	BIOS	print screen
	 6	CPU	Invalid opcode (186,286,386)
	 7	CPU	coprocessor not available (286,386)
	 8	IRQ0	~timer~ (55ms intervals, 18.21590 per second)
	 9	IRQ1	keyboard service required (see ~INT 9~)
	 A	IRQ2	slave ~8259~ or EGA/VGA vertical retrace
	 B	IRQ3	COM2 service required (PS/2 MCA COM3-COM8)
	 C	IRQ4	COM1 service required
	 D	IRQ5	fixed disk or data request from LPT2
	 E	IRQ6	floppy disk service required
	 F	IRQ7	data request from LPT1 (unreliable on IBM mono)
	10	BIOS	video (see ~INT 10~)
	11	BIOS	Equipment determination (see ~INT 11~)
	12	BIOS	memory size (see ~INT 12~)
	13	BIOS	disk I/O service  (see ~INT 13~)
	14	BIOS	serial communications (see ~INT 14~)
	15	BIOS	system services, cassette (see ~INT 15~)
	16	BIOS	keyboard services (see ~INT 16~)
	17	BIOS	parallel printer (see ~INT 17~)
	18	BIOS	ROM BASIC loader
	19	BIOS	bootstrap loader (unreliable, see ~INT 19~)
	1A	BIOS	time of day	(see ~INT 1A~)
	1B	BIOS	user defined ctrl-break handler (see ~INT 1B~)
	1C	BIOS	user defined clock tick handler (see ~INT 1C~)
	1D	BIOS	~6845~ video parameter pointer
	1E	BIOS	diskette parameter pointer (base table)
	1F	BIOS	graphics character table
	20	DOS	general program termination
	21	DOS	function request services (see ~INT 21~)
	22	DOS	terminate address (see ~INT 22~)
	23	DOS	control break termination address (see ~INT 23~)
	24	DOS	critical error handler (see ~INT 24~)
	25	DOS	absolute disk read (see ~INT 25~)
	26	DOS	absolute disk write (see ~INT 26~)
	27	DOS	terminate and stay resident (see ~INT 27~)
	28	DOS	idle loop, issued by DOS when idle (see ~INT 28~)
	29	DOS	fast TTY console I/O (see ~INT 29~)
	2A	DOS	critical section and NETBIOS (see ~INT 2A~)
	2B	DOS	internal, simple ~IRET~ in DOS 2.0-5.0
	2C	DOS	internal, simple IRET in DOS 2.0-5.0
	2D	DOS	internal, simple IRET in DOS 2.0-5.0
	2E	DOS	exec command from base level command
			interpreter	(see ~INT 2E~)
	2F	DOS	multiplexer (see ~INT 2F~)
	30-31	CPM	far jump vector for CPM (not an interrupt)
	31	DPMI	DOS Protected Mode Interface (for DOS extenders)
	32		reserved
	33		mouse support (see ~INT 33~)
	34-3E		Microsoft/Borland floating point emulation
	3F		overlay manager
	40	BIOS	hard disk
	41	BIOS	fixed disk 0 parameters pointer (see ~INT 13,9~)
	42	BIOS	relocated video handler (EGA/VGA/PS)
	43	BIOS	user font table (EGA/VGA/PS)
	44	BIOS	first 128 graphics characters (also Netware)
	45	BIOS	reserved for BIOS
	46	BIOS	fixed disk 1 parameters ptr (see ~INT 13,9~/INT 41)
	47	BIOS	reserved for BIOS
	48	BIOS	PCjr cordless keyboard translation
	49	BIOS	PCjr non-keyboard scancode translation table
	4A	BIOS	user alarm  (AT,CONV,PS/2) (see ~INT 4A~)
	4B-4F	BIOS	reserved
	50	BIOS	periodic alarm from timer (PS/2)
	51-58	BIOS	reserved
	59	BIOS	GSS Computer Graphics Interface
	5A	BIOS	cluster adapter BIOS entry point
	5B	BIOS	cluster adapter boot
	5C	NETBIOS	NETBIOS interface, TOPS interface
	5D-5F	BIOS	reserved for BIOS
	60-67		reserved for user software interrupts
	67	EMS	LIM/EMS specification (see ~INT 67~)
	68		APPC
	69-6B		reserved by IBM
	6C	DOS	DOS 3.2 real time clock update
		BIOS	system resume vector
	6D-6F		reserved
	70	IRQ8	real time clock  (AT,XT286,PS50+, see ~INT 15~)
	71	IRQ9	software redirected to IRQ2	(AT,XT286,PS50+)
	72	IRQ10	reserved  (AT,XT286,PS50+)
	73	IRQ11	reserved  (AT,XT286,PS50+)
	74	IRQ12	mouse interrupt  (PS50+)
	75	IRQ13	numeric coprocessor NMI error  (AT,XT286,PS50+)
	76	IRQ14	fixed disk controller (AT,XT286,PS50+)
	77	IRQ15	reserved  (AT,XT286,PS50+)
	78-79		unused
	80-85		ROM BASIC
	86-F0	DOS	reserved for BASIC interpreter use
	86	NETBIOS	NETBIOS relocated INT 18
	E0	CPM	CP/M 86 function calls
	F1-FF		reserved by IBM
	FE-FF		may be destroyed by return from protected
			mode using VDISK on 286 machines (Apr 86, DDJ)


	- Intel defined 0 through 20h for use for internal CPU;  IBM
	  redefined interrupts 0 through 1Fh for its own use, hence
	  the duplicate definitions in the tables
	- all interrupts except the internal CPU exceptions push the
	  flags and the CS:IP of the next instruction onto the stack.
	  CPU exception interrupts are similar but push the CS:IP of the
	  causal instruction.	8086/88 divide exceptions are different,
	  they return to the instruction following the division
	- interrupts are disabled upon entry into any interrupt routine and
	  should be enabled by the user or by an ~IRET~
	- in DOS 3.2+ hardware IRQ interrupts are re-vectored through DOS
	  to provide standard stack frames

:int 5
^INT 5 - Print Screen


	no input data


%	related memory:

	50:00	= 00	Print screen has not been called, or upon return
			from a call there were no errors
		= 01	Print screen is already in progress
		= FF	Error encountered during printing


	- invoked from ~INT 9~

:int 8:BIOS timer interrupt
^INT 8 - System timer

	no input data

%	related memory:

	40:6C = Daily timer counter (4 bytes)
	40:70 = 24 hr overflow flag (1 byte)
	40:67 = Day counter on all products after AT
	40:40 = Motor shutoff counter - decremented until 0 then
		shuts off diskette motor


	- ~INT 1C~ is invoked as a user interrupt
	- the byte at 40:70 is a flag that certain DOS functions use
	  and adjust the date if necessary.  Since this is a flag and
	  not a counter it results in DOS (not the ~RTC~) losing days
	  when several midnights pass before a DOS call
	- generated 18.2 times per second by the ~8253~ Programmable Interval
	  Timer (PIT)
	- normal INT 8 execution takes approximately 100 microseconds

	- see	~8253~

:int 9:keyboard interrupt
^INT 9 - Keyboard Interrupt (Hardware Handler)

	no input data

%	related memory:

	40:17 = updates keyboard flag byte 0
	40:18 = updates keyboard flag byte 1
	40:1A = queue head ptr is set to buffer start if Ctrl-Break is hit
	40:1C = updates buffer tail pointer for each keystroke; sets
		queue tail ptr is set to queue start if Ctrl-Break is hit
	40:1E = updates keyboard buffer (32 bytes)
	40:71 = updates bit 7 of the BIOS break flag if Ctrl-Break is hit
	40:72 = updates reset flag with 1234H if Ctrl-Alt-Del pressed
	40:96 = indicates keyboard type (AT,PS/2)
	40:97 = updates keyboard LED flags (AT,PS/2)
	FFFF:0 = reboot code called if Ctrl-Alt-Del pressed

%	related interrupts:

	~INT 5~     invoked if print screen key pressed
	~INT 1B~    invoked if Ctrl-Break key sequence pressed
	~INT 15,85~ invoked on AT if system request key is pressed
	~INT 15,4F~ invoked on machines after PC/AT with AL = scan code


	- records key press and key release via IRQ1/8259 and
	  stores scan codes in the BIOS buffer located at 40:1C
	- keyboard controllers also buffer data when interrupts are
	  disabled at the ~8259~ interrupt controller
	- keyboard controller is capable of storing 16 keystrokes
	  even when interrupts are disabled at the 8259
	- normal INT 9 execution takes approximately 500 microseconds;
	  at least one standard XT BIOS is known to take up to 1.3
	  milliseconds to execute

	- see	~MAKE CODES~   ~KB FLAGS~

:int 10:BIOS video services:video interrupt
^INT 10 - Video BIOS Services

%	For more information, see the following topics:

	 ~INT 10,0~ - Set video mode
	 ~INT 10,1~ - Set cursor type
	 ~INT 10,2~ - Set cursor position
	 ~INT 10,3~ - Read cursor position
	 ~INT 10,4~ - Read light pen
	 ~INT 10,5~ - Select active display page
	 ~INT 10,6~ - Scroll active page up
	 ~INT 10,7~ - Scroll active page down
	 ~INT 10,8~ - Read character and attribute at cursor
	 ~INT 10,9~ - Write character and attribute at cursor
	 ~INT 10,A~ - Write character at current cursor
	 ~INT 10,B~ - Set color palette
	 ~INT 10,C~ - Write graphics pixel at coordinate
	 ~INT 10,D~ - Read graphics pixel at coordinate
	 ~INT 10,E~ - Write text in teletype mode
	 ~INT 10,F~ - Get current video state
	~INT 10,10~ - Set/get palette registers (EGA/VGA)
	~INT 10,11~ - Character generator routine (EGA/VGA)
	~INT 10,12~ - Video subsystem configuration (EGA/VGA)
	~INT 10,13~ - Write string (BIOS after 1/10/86)
	~INT 10,14~ - Load LCD char font (convertible)
	~INT 10,15~ - Return physical display parms (convertible)
	~INT 10,1A~ - Video Display Combination (VGA)
	~INT 10,1B~ - Video BIOS Functionality/State Information (MCGA/VGA)
	~INT 10,1C~ - Save/Restore Video State  (VGA only)
	~INT 10,FE~ - Get DESQView/TopView Virtual Screen Regen Buffer
	~INT 10,FF~ - Update DESQView/TopView Virtual Screen Regen Buffer


	Warning: Some BIOS implementations have a bug that causes register
	BP to be destroyed.   It is advisable to save BP before a call to
	Video BIOS routines on these systems.

	- registers CS, DS, ES, SS, BX, CX, DX are preserved unless
	  explicitly changed
	- see  ~INT 1F~  ~INT 1D~  ~INT 29~  ~INT 21,2~  ~INT 21,6~  ~INT 21,9~

:int 10,0:video modes
^INT 10,0 - Set Video Mode

	AH = 00
	AL = 00  40x25 B/W text (CGA,EGA,MCGA,VGA)
	   = 01  40x25 16 color text (CGA,EGA,MCGA,VGA)
	   = 02  80x25 16 shades of gray text (CGA,EGA,MCGA,VGA)
	   = 03  80x25 16 color text (CGA,EGA,MCGA,VGA)
	   = 04  320x200 4 color graphics (CGA,EGA,MCGA,VGA)
	   = 05  320x200 4 color graphics (CGA,EGA,MCGA,VGA)
	   = 06  640x200 B/W graphics (CGA,EGA,MCGA,VGA)
	   = 07  80x25 Monochrome text (MDA,HERC,EGA,VGA)
	   = 08  160x200 16 color graphics (PCjr)
	   = 09  320x200 16 color graphics (PCjr)
	   = 0A  640x200 4 color graphics (PCjr)
	   = 0B  Reserved (EGA BIOS function 11)
	   = 0C  Reserved (EGA BIOS function 11)
	   = 0D  320x200 16 color graphics (EGA,VGA)
	   = 0E  640x200 16 color graphics (EGA,VGA)
	   = 0F  640x350 Monochrome graphics (EGA,VGA)
	   = 10  640x350 16 color graphics (EGA or VGA with 128K)
		 640x350 4 color graphics (64K EGA)
	   = 11  640x480 B/W graphics (MCGA,VGA)
	   = 12  640x480 16 color graphics (VGA)
	   = 13  320x200 256 color graphics (MCGA,VGA)
	   = 8x  EGA, MCGA or VGA ignore bit 7, see below
	   = 9x  EGA, MCGA or VGA ignore bit 7, see below


	- if AL bit 7=1, prevents EGA,MCGA & VGA from clearing display
	- function updates byte at 40:49;  bit 7 of byte 40:87
	  (EGA/VGA Display Data Area) is set to the value of AL bit 7

:int 10,1
^INT 10,1 - Set Cursor Type


	AH = 01
	CH = cursor starting scan line (cursor top) (low order 5 bits)
	CL = cursor ending scan line (cursor bottom) (low order 5 bits)


	returns nothing


	- cursor scan lines are zero based
	- cursor size can also be set via the ~6845~ CRT controller
	- cursor size can be determined using the CRTC,  ~INT 10,3~  or the
	  ~BIOS Data Area~ bytes 40:60 (ending scan line) and 40:61 (starting
	  scan line)
	- the following is a list of the cursor scan lines associated with
	  most common adapters;  screen sizes over 40 lines may differ
	  depending on adapters.

%		Line	 Starting     Ending	  Character
%	Video	Count	 Scan Line    Scan Line   Point Size

	CGA	 25	    06		 07	      08
	MDA	 25	    0B		 0C	      0E
	EGA	 25	    06		 07	      0E
	EGA	 43	  04/06 	 07	      08
	VGA	 25	    0D		 0E	      10
	VGA	 40	    08		 09	      0A
	VGA	 50	    06		 07	      08

	- use CX = 2000h to disable cursor

:int 10,2
^INT 10,2 - Set Cursor Position


	AH = 02
	BH = page number (0 for graphics modes)
	DH = row
	DL = column


	returns nothing


	- positions relative to 0,0 origin
	- 80x25 uses coordinates 0,0 to 24,79;	40x25 uses 0,0 to 24,39
	- the ~6845~ can also be used to perform this function
	- setting the data in the BIOS Data Area at location 40:50 does not
	  take immediate effect and is not recommended
	- see	~VIDEO PAGES~   ~6845~   ~BDA~

:int 10,3
^INT 10,3 - Read Cursor Position and Size


	AH = 03
	BH = video page


	on return:
	CH = cursor starting scan line (low order 5 bits)
	CL = cursor ending scan line (low order 5 bits)
	DH = row
	DL = column


	- returns data from ~BIOS DATA AREA~ locations 40:50, 40:60 and 40:61
	- the ~6845~ can also be used to read the cursor position
	- the return data can be circumvented by direct port I/O to the 6845
	  CRT Controller since this function returns the data found in the
	  BIOS Data Area without actually checking the controller
	
:int 10,4
^INT 10,4 - Read Light Pen Position


	AH = 04


	on return:
	AH = 0	light pen switch not triggered
	   = 1	light pen triggered
	BX = pixel column (0-319 or 0-639, mode dependent)
	CH = raster line (0-199) (CGA and EGA modes 4, 5 and 6)
	CX = raster line (EGA modes except 4, 5 and 6)
	DH = row (0-24)
	DL = column (0-79 or 0-79 mode dependent)


	- data returned as a byte coordinate, leaving horizontal
	  accuracy to within 2 pixels (320) or 4 pixels (640)
	- vertical accuracy within 2 lines
	- PS/2's don't support the light pen interface

:int 10,5
^INT 10,5 - Select Active Display Page

	AH = 05
	AL = new page number, see ~VIDEO PAGES~

	for PCjr only:
	AL = 80h to read CRT/CPU page registers
	     81h to set CPU page register
		 BL = CPU page register
	     82h to set CRT page register
		 BH = CRT page register
	     83h to set CPU and page registers
		 BH = CRT page register
		 BL = CPU page register


	on return: (PCjr only)
	BH = CRT page register
	BL = CPU page register

:int 10,6
^INT 10,6 - Scroll Window Up


	AH = 06
	AL = number of lines to scroll, previous lines are
	     blanked, if 0 or AL > screen size, window is blanked
	BH = attribute to be used on blank line
	CH = row of upper left corner of scroll window
	CL = column of upper left corner of scroll window
	DH = row of lower right corner of scroll window
	DL = column of lower right corner of scroll window


	returns nothing


	- in video mode 4 (300x200 4 color) on the EGA, MCGA and VGA
	  this function scrolls page 0 regardless of the current page
	- can be used to scroll graphics screens, using character coords
	- on CGA's this function disables video adapter, causing flitter
:int 10,7
^INT 10,7 - Scroll Window Down


	AH = 07
	AL = number of lines to scroll, previous lines are
	     blanked, if 0 or AL > screen size, window is blanked
	BH = attribute to be used on blank line
	CH = row of upper left corner of scroll window
	CL = column of upper left corner of scroll window
	DH = row of lower right corner of scroll window
	DL = column of lower right corner of scroll window

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -