In this blog I am going to teach u how to write Assembly x86 code. (Execute it by) Booting it from a USB drive or floppy drive and run it!...
1. Custom Master Boot code.
2. The Boot Signature.
3. Windows Xp Master Boot Code.
4. Tools to write into the boot sector.
5. Hello World Boot code.
6. Bios Settings.
7. Assembly translation
Custom Master Boot code
The first 512 bytes of memory in any secondary storage device is the The Master boot code. My aim is to let u write directly into the master boot record.
The Boot Signature (55AAh)
The value 55AA in hex at last Memory location of the boot sector ie. 01FE(value 55) and 01FF(value AA) in Absolute Sector 0(Cylinder 0, Head 0, Sector 1) Represents the boot signature.. All bootable boot enabled devices must have a boot signature.
Windows Xp Master Boot Code
Absolute Sector 0 (Cylinder 0, Head 0, Sector 1)
0 1 2 3 4 5 6 7 8 9 A B C D E F
0000 33 C0 8E D0 BC 00 7C FB 50 07 50 1F FC BE 1B 7C 3.....|.P.P....|
0010 BF 1B 06 50 57 B9 E5 01 F3 A4 CB BD BE 07 B1 04 ...PW...........
0020 38 6E 00 7C 09 75 13 83 C5 10 E2 F4 CD 18 8B F5 8n.|.u..........
0030 83 C6 10 49 74 19 38 2C 74 F6 A0 B5 07 B4 07 8B ...It.8,t.......
0040 F0 AC 3C 00 74 FC BB 07 00 B4 0E CD 10 EB F2 88 ..<.t...........
0050 4E 10 E8 46 00 73 2A FE 46 10 80 7E 04 0B 74 0B N..F.s*.F..~..t.
0060 80 7E 04 0C 74 05 A0 B6 07 75 D2 80 46 02 06 83 .~..t....u..F...
0070 46 08 06 83 56 0A 00 E8 21 00 73 05 A0 B6 07 EB F...V...!.s.....
0080 BC 81 3E FE 7D 55 AA 74 0B 80 7E 10 00 74 C8 A0 ..>.}U.t..~..t..
00A0 00 B4 08 CD 13 72 23 8A C1 24 3F 98 8A DE 8A FC .....r#..$?.....
00B0 43 F7 E3 8B D1 86 D6 B1 06 D2 EE 42 F7 E2 39 56 C..........B..9V
00C0 0A 77 23 72 05 39 46 08 73 1C B8 01 02 BB 00 7C .w#r.9F.s......|
00D0 8B 4E 02 8B 56 00 CD 13 73 51 4F 74 4E 32 E4 8A .N..V...sQOtN2..
00E0 56 00 CD 13 EB E4 8A 56 00 60 BB AA 55 B4 41 CD V......V.`..U.A.
00F0 13 72 36 81 FB 55 AA 75 30 F6 C1 01 74 2B 61 60 .r6..U.u0...t+a`
0100 6A 00 6A 00 FF 76 0A FF 76 08 6A 00 68 00 7C 6A j.j..v..v.j.h.|j
0110 01 6A 10 B4 42 8B F4 CD 13 61 61 73 0E 4F 74 0B .j..B....aas.Ot.
0120 32 E4 8A 56 00 CD 13 EB D6 61 F9 C3 49 6E 76 61 2..V.....a..Inva
0130 6C 69 64 20 70 61 72 74 69 74 69 6F 6E 20 74 61 lid partition ta
0140 62 6C 65 00 45 72 72 6F 72 20 6C 6F 61 64 69 6E ble.Error loadin
0150 67 20 6F 70 65 72 61 74 69 6E 67 20 73 79 73 74 g operating syst
0160 65 6D 00 4D 69 73 73 69 6E 67 20 6F 70 65 72 61 em.Missing opera
0170 74 69 6E 67 20 73 79 73 74 65 6D 00 00 00 00 00 ting system.....
0180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01B0 00 00 00 00 00 2C 44 63 B5 EB 31 E0 00 00 80 01 .....,Dc..1.....
01C0 01 00 07 FE BF 82 3F 00 00 00 84 9E 9D 00 00 00 ......?.........
01D0 81 83 05 FE FF FF C3 9E 9D 00 FE F2 0A 04 00 00 ................
01E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA ..............U.
Tools to write into the boot sector.
The trick here is to write into the physical disk and not just Partitioned/Formatted drives.
To write into the boot sector I Recommend Hexworkshop .Its a hex editor with total access to all writable drives (cd writing not supported for obvious reasons).Especial recommend for USB boot sector writing.
Hello World Boot code.
Open hexworkshop. Next from Disk Menu(in the main menu)Click Open Drive. Important In the open'd Dialog box choose the "Physical Disk" from the select menu. One of the displayed disks will be ur USB Disk Choose and click Ok. Warning! hex Workshop Can Destroy Data on ur Hard disk or usb and even cause windows to stop booting if not used correctly.
The code:
Absolute Sector 0 (Cylinder 0, Head 0, Sector 1)
0 1 2 3 4 5 6 7 8 9 A B C D E F
00000000 31 C0 8E D0 66 BC 00 7C FB 66 B8 C0 07 8E D8 90 1...f..|.f......
00000010 B4 00 B0 00 CD 10 B0 00 B4 05 CD 10 B5 00 B1 07 ................
00000020 B4 01 CD 10 B6 09 B2 09 B7 00 B4 02 CD 10 8C D8 ................
00000030 8E C0 B4 13 B0 00 B7 00 B3 0F B9 0C 00 B6 09 B2 ................
00000040 09 BD 50 00 CD 10 B7 00 B4 08 CD 10 EB FE CD 19 ..P.............
00000050 68 65 6C 6C 6F 20 77 6F 72 6C 64 21 90 90 90 90 hello world!....
00000060 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
00000070 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
00000080 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
000000A0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
000000B0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
000000C0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
000000D0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
000000E0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
000000F0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
00000100 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
00000110 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
00000120 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
00000130 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
00000140 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
00000150 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
00000160 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
00000170 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
00000180 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
00000190 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
000001A0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
000001B0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
000001C0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
000001D0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
000001E0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ................
000001F0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 55 AA ..............U.
Easy TO copy version:
31 C0 8E D0 66 BC 00 7C FB 66 B8 C0 07 8E D8 90
B4 00 B0 00 CD 10 B0 00 B4 05 CD 10 B5 00 B1 07
B4 01 CD 10 B6 09 B2 09 B7 00 B4 02 CD 10 8C D8
8E C0 B4 13 B0 00 B7 00 B3 0F B9 0C 00 B6 09 B2
09 BD 50 00 CD 10 B7 00 B4 08 CD 10 EB FE CD 19
68 65 6C 6C 6F 20 77 6F 72 6C 64 21 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 55 AA
Bios Settings.
boot the computer by setting the first boot device as the usb flash drive.to do this u need to hit del key before windows loads up. go to the boot menu set the first boot device as the device in which u have ur bootsector code. save and exit bios setup. Don't exit without saving if u want the settings to be saved.Warning! can cause windows to stop booting if not done correctly.Maybe even fry ur chip if u mess around too much.
Assembly translation
cli
xor ax,ax
mov ss,ax
mov esp,66FB7C00h
mov ax,07C0h
mov ds,ax
nop
mov ah,00h
mov al,00h
int 10h
mov al,00h
mov ah,05h
int 10h
mov ch,00h
mov cl,07h
mov ah,01h
int 10h
mov dh,09h
mov dl,09h
mov bh,00h
mov ah,02h
int 10h
mov ax,ds
mov es,ax
mov ah,13h
mov al,00h
mov bh,00h
mov bl,0Fh
mov cx,000ch
mov dh,09h
mov dl,09h
mov bp,offset txt ; error prone cause it can point to 150
; insted of 50 might have to correct that
int 10h
mov bh,00h
mov ah,08h
int 10h
loop:
jmp short loop
int 19h
txt:
db 'hello world!'
Nbasm is a Good tool to Tanslate each of these code line to get its x86 binary equilvalant.
Showing posts with label interrupts. Show all posts
Showing posts with label interrupts. Show all posts
Monday, March 23, 2009
Sunday, March 15, 2009
Hello World OS Boot loader
Simply stating, it is an Operating System that does nothing but displays a simple message "Hello World". The source code is written in assembly language (NASM), and can be booted from a floppy disk.
The reader must be familiar with all the OS terminology and boot loader mechanism along with a minimal knowledge of a 16 bit Assembly language and working knowledge with NASM (freely downloadable) and the MSDOS program name Debug.Exe.
Write the boot loader code:
Save the above code in a file, say boot.asm.
Next we have to generate a RAW Binary code file for the above code. So I used NASM. Assuming that NASM is in the system path, we write the following at the COMMAND prompt:
Next we need a floppy disk from which we will boot the OS. So place a floppy disk in the A Drive and before continuing, please backup any data that may be on the floppy Disk, because we would require to format the floppy in this step:
I have quick formatted the disk to save a lot of time, but full format will also do.
Now we need to copy our OS binary to the floppy disk. So we use the Debug.Exe program as follows:
On issuing the -W option in debug program, the binary is RAW written to the boot sector of the floppy disk after which we quit the debug application.
So we are done with our OS. Now restart the system and boot from the floppy disk. We will see the following output on the screen:
Hello World
That's all folks!!!
And then the computer halts as it now receives the HLT instruction.
Points of Interest:
The first point to note here is that this is not a real OS but a kernel boot-loader. And thus the activities I can do here are limited to 512 kb (1 sector). So my code size does not exceed 512 kb which includes the data section.
Apart from that, I guess the code itself is self explanatory. The only tricky part to note is that the loader always tries to search for the Signature 0xAA55 in the boot loader to mark it as valid for loading. So at the end of the 510 byte of my code (and data) space, the extra 2 bytes are provided for the 2 byte signature for the loader to verify my code as valid.
Problems:
The only problem in this OS is that after the OS is copied to the floppy disk, Windows or MSDOS starts thinking that the floppy is not formatted and then onwards, every time I try updating the code above, I have to first format the floppy and then copy the boot sector binary (boot.bin).
Solution:
A legitimate boot sector is supposed to contain information about the disk format starting at address $7C02 (the first two bytes should be a short branch)
The reader must be familiar with all the OS terminology and boot loader mechanism along with a minimal knowledge of a 16 bit Assembly language and working knowledge with NASM (freely downloadable) and the MSDOS program name Debug.Exe.
Write the boot loader code:
;**************************************************
; Hello World OS Boot loader
; Designed by Arnav
; http://pendorasoft.byethost15.com/
;**************************************************
[BITS 16]
[ORG 0x0000]
; code located at 0000:7C00, adjust segment registers
cli
mov ax, 0x07C0
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
; create stack
mov ax, 0x0000
mov ss, ax
mov sp, 0xFFFF
sti
; post message
mov si,msgHello
call DisplayMessage
mov si, msgEnd
call DisplayMessage
hlt
; Display Message
DisplayMessage:
lodsb ; load next character
or al, al ; test for NUL character
jz .DONE
mov ah, 0x0E ; BIOS teletype
mov bh, 0x00 ; display page 0
mov bl, 0x07 ; text attribute
int 0x10 ; invoke BIOS
jmp DisplayMessage
.DONE:
ret
; data section
msgHello db 0x0D, 0x0A, "Hello World", 0x0D, 0x0A, 0x00
msgEnd db 0x0D, 0x0A, "That's all folks!!!", 0x0D, 0x0A, 0x00
;ASM Signature
TIMES 510-($-$$) DB 0
DW 0xAA55
Save the above code in a file, say boot.asm.
Next we have to generate a RAW Binary code file for the above code. So I used NASM. Assuming that NASM is in the system path, we write the following at the COMMAND prompt:
D:\>NASM boot.asm -o boot.bin -f bin
Next we need a floppy disk from which we will boot the OS. So place a floppy disk in the A Drive and before continuing, please backup any data that may be on the floppy Disk, because we would require to format the floppy in this step:
D:\>format a: /q
I have quick formatted the disk to save a lot of time, but full format will also do.
Now we need to copy our OS binary to the floppy disk. So we use the Debug.Exe program as follows:
D:\>debug boot.bin
-W 100 0 0 1
-Q
D:\>
On issuing the -W option in debug program, the binary is RAW written to the boot sector of the floppy disk after which we quit the debug application.
So we are done with our OS. Now restart the system and boot from the floppy disk. We will see the following output on the screen:
Hello World
That's all folks!!!
And then the computer halts as it now receives the HLT instruction.
Points of Interest:
The first point to note here is that this is not a real OS but a kernel boot-loader. And thus the activities I can do here are limited to 512 kb (1 sector). So my code size does not exceed 512 kb which includes the data section.
Apart from that, I guess the code itself is self explanatory. The only tricky part to note is that the loader always tries to search for the Signature 0xAA55 in the boot loader to mark it as valid for loading. So at the end of the 510 byte of my code (and data) space, the extra 2 bytes are provided for the 2 byte signature for the loader to verify my code as valid.
Problems:
The only problem in this OS is that after the OS is copied to the floppy disk, Windows or MSDOS starts thinking that the floppy is not formatted and then onwards, every time I try updating the code above, I have to first format the floppy and then copy the boot sector binary (boot.bin).
Solution:
A legitimate boot sector is supposed to contain information about the disk format starting at address $7C02 (the first two bytes should be a short branch)
Monday, January 26, 2009
Interrupt Services DOS, BIOS, EMS and Mouse
Intel Defined CPU Exception Table (see notes)
IBM PC Hardware Interrupt Table (in order of priority)
Interrupt Table as Implemented by System BIOS/DOS
INT 5 - Print Screen
INT 8 - System timer
INT 9 - Keyboard Interrupt (Hardware Handler)
INT 10 - Video BIOS Services
INT 10,0 - Set Video Mode
INT 10,1 - Set Cursor Type
INT 10,2 - Set Cursor Position
INT 10,3 - Read Cursor Position and Size
INT 10,4 - Read Light Pen Position
INT 10,5 - Select Active Display Page
INT 10,6 - Scroll Window Up
INT 10,7 - Scroll Window Down
INT 10,8 - Read Character and Attribute at Cursor Position
INT 10,9 - Write Character and Attribute at Cursor Position
INT 10,A - Write Character Only at Current Cursor Position
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 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 versions from 1/10/86)
INT 10,14 - Load LCD Character Font (convertible only)
INT 10,15 - Return Physical Display Parms (convertible)
INT 10,1A - Video Display Combination (VGA)
INT 10,1B - Video BIOS Functionality and State Information (MCGA/VGA)
Video BIOS Dynamic Functionality State Table (MCGA/VGA)
Video BIOS Static Functionality Table
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
INT 11 - BIOS Equipment Determination / BIOS Equipment Flags
INT 12 - Memory Size Determination
INT 13 - Diskette BIOS Services
For more information see the following topics:
INT 13,0 - Reset Disk System
INT 13,1 - Disk Status
INT 13,2 - Read Disk Sectors
INT 13,3 - Write Disk Sectors
INT 13,4 - Verify Disk Sectors
INT 13,5 - Format Disk Track
INT 13,6 - Format Track and Set Bad Sector Flags (XT & portable)
INT 13,7 - Format Drive Starting at Specified Track (XT & portable)
INT 13,8 - Get Current Drive Parameters (XT & newer)
INT 13,A - Read Long Sector (XT & newer)
INT 13,B - Write Long Sectors (XT & newer)
INT 13,C - Seek to Cylinder (XT & newer)
INT 13,D - Alternate Disk Reset (XT & newer)
INT 13,E - Read Sector Buffer (XT & portable only)
INT 13,F - Write Sector Buffer (XT & portable only)
INT 13,10 - Test for Drive Ready (XT & newer)
INT 13,11 - Recalibrate Drive (XT & newer)
INT 13,12 - Controller RAM Diagnostic (XT & portable only)
INT 13,13 - Drive Diagnostic (XT & portable only)
INT 13,14 - Controller Internal Diagnostic (XT & newer)
INT 13,15 - Read DASD Type (XT BIOS from 1/10/86 & newer)
INT 13,16 - Change of Disk Status (XT BIOS from 1/10/86 & newer)
INT 13,17 - Set DASD Type for Format (XT BIOS from 1/10/86 & newer)
INT 13,18 - Set Media Type for Format (BIOS date specific)
INT 13,19 - Park Fixed Disk Heads (AT & newer)
INT 13,1A - Format Unit (PS/2 model 50+)
INT 14 - BIOS Asynchronous Communications Services
BIOS Asynchronous Communications Services (Status)
INT 14,0 - Initialize Communications Port Parameters
INT 14,1 - Send Character to Communications Port
INT 14,2 - Receive Character from Communications Port
INT 14,3 - Get Serial Port Status
INT 14,4 - Serial Port Extended Initialization (PS/2 & later systems)
INT 14,5 - Extended Communication Port Control (PS/2 & later systems)
INT 15 - System BIOS Services
For more information see the following topics:
INT 15,0 - Turn Cassette Motor On (PC,PCjr only)
INT 15,1 - Turn Cassette Motor Off (PC,PCjr only)
INT 15,2 - Read Blocks from Cassette (PC,PCjr only)
INT 15,3 - Write Blocks to Cassette (PC,PCjr only)
INT 15,F - Format Periodic Interrupt (PS/2 only)
INT 15,20 - PRINT.
INT 15,21 - Power On Self Test (POST) Error Log (PS/2 except 30)
INT 15,40 - Read / Modify Profiles (convertible only)
INT 15,41 - Wait on External Event (convertible only)
INT 15,42 - Request System Power Off (convertible only)
INT 15,43 - Read System Status (convertible only)
INT 15,44 - (De)activate Internal Modem Power (convertible)
INT 15,4F - Keyboard Intercept (BIOS date specific)
INT 15,80 - Device Open
INT 15,81 - Device Close
INT 15,82 - Program Termination
INT 15,83 - Event Wait
INT 15,84 - Joy-Stick Support
INT 15,85 - System Request Key Pressed
INT 15,86 - Elapsed Time Wait (AT and PS/2)
INT 15,87 - Move Block to/from Extended Memory
INT 15,88 - Extended Memory Size Determination
INT 15,89 - Switch Processor to Protected Mode
INT 15,90 - Device Busy
INT 15,91 - Interrupt Complete
INT 15,C0 - Return System Configuration Parameters (PS/2 only)
INT 15,C1 - Return Extended BIOS Data Area Segment (PS/2 only)
INT 15,C2 - Pointing Device BIOS Interface (PS/2 only)
INT 15,C3 - Enable/Disable Watchdog Timer (PS/2)
INT 15,C4 - Programmable Option Select (PS/2)
INT 16 - Keyboard BIOS Services
For more information, see the following topics:
INT 16,0 - Wait for Keypress and Read Character
INT 16,1 - Get Keyboard Status
INT 16,2 - Read Keyboard Flags
INT 16,3 - Set Keyboard Typematic Rate (AT+)
INT 16,4 - Keyboard Click Adjustment (AT+)
INT 16,5 - Keyboard Buffer Write (AT+)
INT 16,10 - Extended Wait for Keypress and Read Character (AT+)
INT 16,11 - Extended Get Keyboard Status (AT+)
INT 16,12 - Extended Get Keyboard Status (AT+)
INT 17 - Printer BIOS Services
INT 17,0 - Print Character
INT 17,1 - Initialize Printer Port
INT 17,2 - Read Printer Port Status
INT 19 - Bootstrap Loader
INT 1A - System and Real Time Clock BIOS Services
INT 1A,0 - Read System Clock Counter
INT 1A,1 - Set System Clock Counter
INT 1A,2 - Read Time From Real Time Clock (XT 286,AT,PS/2)
INT 1A,3 - Set Time on Real Time Clock (XT 286,AT,PS/2)
INT 1A,4 - Read Real Time Clock Date (XT 286,AT,PS/2)
INT 1A,5 - Set Real Time Clock Date (XT 286,AT,PS/2)
INT 1A,6 - Set Real Time Clock Alarm (XT 286,AT,PS/2)
INT 1A,7 - Disable Real Time Clock Alarm (XT,AT,PS/2)
INT 1A,8 - Set RTC Activated Power On Mode (convertible)
INT 1A,9 - Read RTC Alarm Time and Status (convertible,PS/2)
INT 1A,A - Read System Day Counter (PS/2)
INT 1A,B - Set System Day Counter (PS/2)
INT 1A,80 - Setup Sound Multiplexer (PCjr only)
INT 1B - BIOS Ctrl-Break Handler Address
INT 1C - System Timer Tick (User Routine)
INT 1D - Video Initialization Parameter Table Vector
INT 1E - Disk Initialization Parameter Table Vector
INT 1F - Graphics Display Character Bit Map Table
DOS Interrupt Summary
INT 20 - Program Terminate
INT 21 - DOS Function Dispatcher
INT 21,0 - Program Terminate
INT 21,1 - Keyboard Input with Echo
INT 21,2 - Display Output
INT 21,3 - Wait for Auxiliary Device Input
INT 21,4 - Auxiliary Output
INT 21,5 - Printer Output
INT 21,6 - Direct Console I/O
INT 21,7 - Direct Console Input Without Echo
INT 21,8 - Console Input Without Echo
INT 21,9 - Print String
INT 21,A - Buffered Keyboard Input
INT 21,B - Check Standard Input Status
INT 21,C - Clear Keyboard Buffer and Invoke Keyboard Function
INT 21,D - Disk Reset
INT 21,E - Select Disk
INT 21,F - Open a File Using FCB
INT 21,10 - Close a File Using FCB
INT 21,11 - Search for First Entry Using FCB
INT 21,12 - Search for Next Entry Using FCB
INT 21,13 - Delete File Using FCB
INT 21,14 - Sequential Read Using FCB
INT 21,15 - Sequential Write Using FCB
INT 21,16 - Create a File Using FCB
INT 21,17 - Rename a File Using FCB
INT 21,19 - Get Current Default Drive
INT 21,1A - Set Disk Transfer Address (DTA)
INT 21,1B - Get Allocation Table Information
INT 21,1C - Get Allocation Table Info for Specified Drive
INT 21,1F - Get Pointer to Current Drive Parameter Table (Undocumented)
INT 21,21 - Random Read Using FCB
INT 21,22 - Random Write Using FCB
INT 21,23 - Get File Size Using FCB
INT 21,24 - Set Relative Record Field in FCB
INT 21,25 - Set Interrupt Vector
INT 21,26 - Create New Program Segment Prefix
INT 21,27 - Random Block Read Using FCB
INT 21,28 - Random Block Write Using FCB
INT 21,29 - Parse a Filename for FCB
INT 21,2A - Get Date
INT 21,2B - Set Date
INT 21,2C - Get Time
INT 21,2D - Set Time
INT 21,2E - Set/Reset Verify Switch
INT 21,2F - Get Disk Transfer Address (DTA)
INT 21,30 - Get DOS Version Number
INT 21,31 - Terminate Process and Remain Resident
INT 21,32 - Get Pointer to Drive Parameter Table (Undocumented)
INT 21,33 - Get/Set System Values (Ctl-Break/Boot Drive)
INT 21,34 - Get Address to DOS Critical Flag INDOS
INT 21,35 - Get Interrupt Vector
INT 21,36 - Get Disk Free Space
INT 21,37 - Get/Set Switch Character (Undocumented, DOS 2.
INT 21,38 - Get/Set Country Dependent Information
INT 21,39 - Create Subdirectory (mkdir)
INT 21,3A - Remove Subdirectory (rmdir)
INT 21,3B - Change Current Directory (chdir)
INT 21,3C - Create File Using Handle
INT 21,3D - Open File Using Handle
INT 21,3E - Close File Using Handle
INT 21,3F - Read From File or Device Using Handle
INT 21,40 - Write To File or Device Using Handle
INT 21,41 - Delete File
INT 21,42 - Move File Pointer Using Handle
INT 21,43 - Get/Set File Attributes
INT 21,44 - I/O Control for Devices (IOCTL)
INT 21,44,0 / IOCTL,0 - Get Device Information
INT 21,44,1 / IOCTL,1 - Set Device Information
Device Data Word
INT 21,44,2 / IOCTL,2 - Read From Character Device
INT 21,44,3 / IOCTL,3 - Write to Character Device
INT 21,44,4 / IOCTL,4 - Read from Block Device
INT 21,44,5 / IOCTL,5 - Write to Block Device
INT 21,44,6 / IOCTL,6 - Get Input Status
INT 21,44,7 / IOCTL,7 - Get Output Status
INT 21,44,8 / IOCTL,8 - Device Removable Query
INT 21,44,9 / IOCTL,9 - Device Local or Remote Query
INT 21,44,A / IOCTL,A - Handle Local or Remote Query
INT 21,44,B / IOCTL,B - Set Sharing Retry Count
INT 21,44,C / IOCTL,C - Generic I/O for Handles
INT 21,44,D / IOCTL,D - Generic I/O for Block Devices
INT 21,44,E / IOCTL,E - Get Logical Drive
INT 21,44,F / IOCTL,F - Set Logical Drive
INT 21,45 - Duplicate File Handle
INT 21,46 - Force Duplicate File Handle
INT 21,47 - Get Current Directory
INT 21,48 - Allocate Memory
INT 21,49 - Free Allocated Memory
INT 21,4A - Modify Allocated Memory Block (SETBLOCK)
INT 21,4B - EXEC/Load and Execute Program
INT 21,4C - Terminate Process With Return Code
INT 21,4D - Get Return Code of Sub-process
INT 21,4E - Find First Matching File
INT 21,4F - Find Next Matching File
INT 21,50 - Set Current Process ID (Undocumented DOS 2.
INT 21,51 - Get Current Process ID (Undocumented DOS 2.
INT 21,52 - Get Pointer to DOS "INVARS" (Undocumented)
INT 21,53 - Generate Drive Parameter Table (Undocumented)
INT 21,54 - Get Verify Setting
INT 21,55 - Create New PSP (Undocumented)
INT 21,56 - Rename File
INT 21,57 - Get/Set File Date and Time Using Handle
INT 21,58 - Get/Set Memory Allocation Strategy (Undocumented, DOS 3.
INT 21,59 - Get Extended Error Information (DOS 3.
INT 21,5A - Create Temporary File (DOS 3.
INT 21,5B - Create File (DOS 3.
INT 21,5C - Lock/Unlock File Access (DOS 3.
INT 21,5D - Critical Error Information (Undocumented, DOS 3.
INT 21,5E AL=0 Get Machine Name (DOS 3.
INT 21,5E AL=01 Set Machine Name (DOS 3.
INT 21,5E AL=02 Set Printer Setup (DOS 3.
INT 21,5E AL=03 Get Printer Setup (DOS 3.
INT 21,5E AL=04 Set Printer Mode (DOS 3.
INT 21,5E AL=05 Get Printer Mode (DOS 3.
INT 21,5F AL=00 Get Redirection Mode (DOS 3.
INT 21,5F AL=01 Set Redirection Mode (DOS 3.
INT 21,5F AL=02 Get Redirection List Entry (DOS 3.
INT 21,5F AL=03 Redirect Device (DOS 3.
INT 21,5F AL=04 Cancel Device Redirection (DOS 3.
INT 21,5F AL=05 Get Redirection List Extended Entry (DOS 4.
INT 21,5F AL=06 Get Redirection List (DOS 4.
INT 21,60 - Get Fully Qualified File Name (Undocumented 3.
INT 21,62 - Get PSP address (DOS 3.
INT 21,63 - Get Lead Byte Table (MSDOS 2.
INT 21,63 - Get Lead Byte Table (Asian DOS 3.
INT 21,64 - Set Device Driver Look Ahead (Undocumented)
INT 21,65 - Get Extended Country Information (DOS 3.
INT 21,66 - Get/Set Global Code Page (DOS 3.
INT 21,67 - Set Handle Count (DOS 3.
INT 21,68 - Flush Buffer Using Handle
INT 21,69 - Get/Set Disk Serial Number (Undocumented DOS 4+)
INT 21,6C - Extended Open/Create (DOS 4.
INT 21,F8 - Set OEM Int 21 Handler (functions F9-FF, Undocumented)
INT 22 - Program Terminate
INT 23 - Control-Break Exit Address
INT 24 - Critical Error Handler
INT 25 - Absolute Disk Read
Control Block Format (DOS 4.
INT 26 - Absolute Disk Write
Control Block Format (DOS 4.
INT 27 - Terminate and Stay Resident
INT 28 - DOS Idle Loop / Scheduler (Undocumented)
INT 29 - DOS Fast Character I/O (Undocumented 2.
INT 2A - DOS Network Critical Section and NETBIOS
INT 2A,0 - Network Installation Query
INT 2A,1 - Execute NETBIOS Request With No Error Retry
INT 2A,3 - Check if Direct I/O Allowed
INT 2A,4 - Execute NETBIOS Request
INT 2A,5 - Get Network Resource Information
INT 2A,6 - Network Print Stream Control
INT 2A,80 - Begin DOS Critical Section
INT 2A,81 - End DOS Critical Section
INT 2A,82 - End DOS Critical Sections 0 thru 7
INT 2A,84 - Keyboard Busy Loop
INT 2A,87 - Critical Section
INT 2E - Execute Command Using Base Level Command Interpreter (Undocumented DOS 2.
INT 2F - DOS Multiplex Interrupt
INT 2F,0 - DOS Multiplex Interrupt - Get Installed State
INT 2F,1 - Multiplex Interrupt - Submit file
INT 2F,2 - Multiplex Interrupt - Cancel file
INT 2F,3 - Multiplex Interrupt - Cancel all files
INT 2F,4 - Multiplex Interrupt - Pause / return status
INT 2F,5 - Multiplex Interrupt - End of Status
INT 2F,6 - PRINT.
INT 2F,8 - DRIVER.
INT 2F,2E - Setup Error Code Translation Tables (undoc.
INT 2F,80 - PRINT.
INT 33 - Mouse Function Calls
Mouse functions can be broken down into the following classes:
INT 33,0 - Mouse Reset/Get Mouse Installed Flag
INT 33,1 - Show Mouse Cursor
INT 33,2 - Hide Mouse Cursor
INT 33,3 - Get Mouse Position and Button Status
INT 33,4 - Set Mouse Cursor Position
INT 33,5 - Get Mouse Button Press Information
INT 33,6 - Get Mouse Button Release Information
INT 33,7 - Set Mouse Horizontal Min/Max Position
INT 33,8 - Set Mouse Vertical Min/Max Position
INT 33,9 - Set Mouse Graphics Cursor
INT 33,A - Set Mouse Text Cursor
INT 33,B - Read Mouse Motion Counters
INT 33,C - Set Mouse User Defined Subroutine and Input Mask
INT 33,D - Mouse Light Pen Emulation On
INT 33,E - Mouse Light Pen Emulation Off
INT 33,F - Set Mouse Mickey Pixel Ratio
INT 33,10 - Mouse Conditional OFF
INT 33,13 - Set Mouse Double Speed Threshold
INT 33,14 - Swap Interrupt Subroutines
INT 33,15 - Get Mouse Driver State and Memory Requirements
INT 33,16 - Save Mouse Driver State
INT 33,17 - Restore Mouse Driver State
INT 33,18 - Set alternate subroutine call mask and address
INT 33,19 - Get User Alternate Interrupt Address
INT 33,1A - Set Mouse Sensitivity
INT 33,1B - Get Mouse Sensitivity
INT 33,1C - Set Mouse Interrupt Rate (InPort only)
INT 33,1D - Set Mouse CRT Page
INT 33,1E - Get Mouse CRT Page
INT 33,1F - Disable Mouse Driver
INT 33,20 - Enable Mouse Driver
INT 33,21 - Reset Mouse Software
INT 33,22 - Set Language for Messages
INT 33,23 - Get Language Number
INT 33,24 - Get Driver Version, Mouse Type & IRQ Number
INT 4A - RTC Alarm Handler Vector
INT 67 - Expanded Memory Specification
INT 67,40 - Get EMM Status (LIM EMS 3.
INT 67,41 - Get Page Frame Base Address (LIM EMS 3.
INT 67,42 - Get Page Counts (LIM EMS 3.
INT 67,43 - Get Handle and Allocate Pages (LIM EMS 3.
INT 67,44 - Map Logical Page Into Physical Page Window (LIM EMS)
INT 67,45 - Release Handle and Memory Pages (LIM EMS)
INT 67,46 - Get EMM Version (LIM EMS)
INT 67,47 - Save Page Map Context (LIM EMS 3.
INT 67,48 - Restore Page Map Context (LIM EMS 3.
INT 67,49 - Get I/O Port Addresses (LIM EMS ¾ 3.
INT 67,4A - Get Logical to Physical Page Mapping (LIM EMS ¾ 3.
INT 67,4B - Get Handle Count (LIM EMS)
INT 67,4C - Get Page Count for Handle
INT 67,4D - Get Page Count for All Handles (LIM EMS)
INT 67,4E - Get/Set Page Map Context (LIM EMS 3.
INT 67,4F - Get/Set Partial Page Map (LIM EMS 4.
INT 67,50 - Map/Unmap Multiple Handle Pages (LIM EMS 4.
INT 67,51 - Reallocate Pages (LIM EMS 4.
INT 67,52 - Get/Set Handle Attributes
INT 67,53 Get/Set Handle Name
INT 67,54 - Get Handle Directory (LIM EMS 4.
INT 67,55 - Alter Page Map and Jump (LIM EMS 4.
INT 67,56 - Alter Page Map and Call (LIM EMS 4.
INT 67,57 - Move/Exchange Memory Region (LIM EMS 4.
INT 67,58 - Get Mappable Physical Address Array (LIM EMS 4.
INT 67,59 - Get Expanded Memory Hardware Information (LIM EMS 4.
INT 67,5A - Allocate Standard/Raw Pages (LIM EMS 4.
INT 67,5B - Alternate Map Register Set (LIM EMS 4.
INT 67,5C - Prepare Expanded Memory for Warm Boot (LIM EMS 4.
INT 67,5D - Enable/Disable OS Functions (LIM EMS 4.
INT 67,60 - LIM EMS Get Physical Window Array
INT 70 - Real Time Clock Interrupt (XT 286,AT,PS/2)
IBM PC Hardware Interrupt Table (in order of priority)
Interrupt Table as Implemented by System BIOS/DOS
INT 5 - Print Screen
INT 8 - System timer
INT 9 - Keyboard Interrupt (Hardware Handler)
INT 10 - Video BIOS Services
INT 10,0 - Set Video Mode
INT 10,1 - Set Cursor Type
INT 10,2 - Set Cursor Position
INT 10,3 - Read Cursor Position and Size
INT 10,4 - Read Light Pen Position
INT 10,5 - Select Active Display Page
INT 10,6 - Scroll Window Up
INT 10,7 - Scroll Window Down
INT 10,8 - Read Character and Attribute at Cursor Position
INT 10,9 - Write Character and Attribute at Cursor Position
INT 10,A - Write Character Only at Current Cursor Position
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 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 versions from 1/10/86)
INT 10,14 - Load LCD Character Font (convertible only)
INT 10,15 - Return Physical Display Parms (convertible)
INT 10,1A - Video Display Combination (VGA)
INT 10,1B - Video BIOS Functionality and State Information (MCGA/VGA)
Video BIOS Dynamic Functionality State Table (MCGA/VGA)
Video BIOS Static Functionality Table
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
INT 11 - BIOS Equipment Determination / BIOS Equipment Flags
INT 12 - Memory Size Determination
INT 13 - Diskette BIOS Services
For more information see the following topics:
INT 13,0 - Reset Disk System
INT 13,1 - Disk Status
INT 13,2 - Read Disk Sectors
INT 13,3 - Write Disk Sectors
INT 13,4 - Verify Disk Sectors
INT 13,5 - Format Disk Track
INT 13,6 - Format Track and Set Bad Sector Flags (XT & portable)
INT 13,7 - Format Drive Starting at Specified Track (XT & portable)
INT 13,8 - Get Current Drive Parameters (XT & newer)
INT 13,A - Read Long Sector (XT & newer)
INT 13,B - Write Long Sectors (XT & newer)
INT 13,C - Seek to Cylinder (XT & newer)
INT 13,D - Alternate Disk Reset (XT & newer)
INT 13,E - Read Sector Buffer (XT & portable only)
INT 13,F - Write Sector Buffer (XT & portable only)
INT 13,10 - Test for Drive Ready (XT & newer)
INT 13,11 - Recalibrate Drive (XT & newer)
INT 13,12 - Controller RAM Diagnostic (XT & portable only)
INT 13,13 - Drive Diagnostic (XT & portable only)
INT 13,14 - Controller Internal Diagnostic (XT & newer)
INT 13,15 - Read DASD Type (XT BIOS from 1/10/86 & newer)
INT 13,16 - Change of Disk Status (XT BIOS from 1/10/86 & newer)
INT 13,17 - Set DASD Type for Format (XT BIOS from 1/10/86 & newer)
INT 13,18 - Set Media Type for Format (BIOS date specific)
INT 13,19 - Park Fixed Disk Heads (AT & newer)
INT 13,1A - Format Unit (PS/2 model 50+)
INT 14 - BIOS Asynchronous Communications Services
BIOS Asynchronous Communications Services (Status)
INT 14,0 - Initialize Communications Port Parameters
INT 14,1 - Send Character to Communications Port
INT 14,2 - Receive Character from Communications Port
INT 14,3 - Get Serial Port Status
INT 14,4 - Serial Port Extended Initialization (PS/2 & later systems)
INT 14,5 - Extended Communication Port Control (PS/2 & later systems)
INT 15 - System BIOS Services
For more information see the following topics:
INT 15,0 - Turn Cassette Motor On (PC,PCjr only)
INT 15,1 - Turn Cassette Motor Off (PC,PCjr only)
INT 15,2 - Read Blocks from Cassette (PC,PCjr only)
INT 15,3 - Write Blocks to Cassette (PC,PCjr only)
INT 15,F - Format Periodic Interrupt (PS/2 only)
INT 15,20 - PRINT.
INT 15,21 - Power On Self Test (POST) Error Log (PS/2 except 30)
INT 15,40 - Read / Modify Profiles (convertible only)
INT 15,41 - Wait on External Event (convertible only)
INT 15,42 - Request System Power Off (convertible only)
INT 15,43 - Read System Status (convertible only)
INT 15,44 - (De)activate Internal Modem Power (convertible)
INT 15,4F - Keyboard Intercept (BIOS date specific)
INT 15,80 - Device Open
INT 15,81 - Device Close
INT 15,82 - Program Termination
INT 15,83 - Event Wait
INT 15,84 - Joy-Stick Support
INT 15,85 - System Request Key Pressed
INT 15,86 - Elapsed Time Wait (AT and PS/2)
INT 15,87 - Move Block to/from Extended Memory
INT 15,88 - Extended Memory Size Determination
INT 15,89 - Switch Processor to Protected Mode
INT 15,90 - Device Busy
INT 15,91 - Interrupt Complete
INT 15,C0 - Return System Configuration Parameters (PS/2 only)
INT 15,C1 - Return Extended BIOS Data Area Segment (PS/2 only)
INT 15,C2 - Pointing Device BIOS Interface (PS/2 only)
INT 15,C3 - Enable/Disable Watchdog Timer (PS/2)
INT 15,C4 - Programmable Option Select (PS/2)
INT 16 - Keyboard BIOS Services
For more information, see the following topics:
INT 16,0 - Wait for Keypress and Read Character
INT 16,1 - Get Keyboard Status
INT 16,2 - Read Keyboard Flags
INT 16,3 - Set Keyboard Typematic Rate (AT+)
INT 16,4 - Keyboard Click Adjustment (AT+)
INT 16,5 - Keyboard Buffer Write (AT+)
INT 16,10 - Extended Wait for Keypress and Read Character (AT+)
INT 16,11 - Extended Get Keyboard Status (AT+)
INT 16,12 - Extended Get Keyboard Status (AT+)
INT 17 - Printer BIOS Services
INT 17,0 - Print Character
INT 17,1 - Initialize Printer Port
INT 17,2 - Read Printer Port Status
INT 19 - Bootstrap Loader
INT 1A - System and Real Time Clock BIOS Services
INT 1A,0 - Read System Clock Counter
INT 1A,1 - Set System Clock Counter
INT 1A,2 - Read Time From Real Time Clock (XT 286,AT,PS/2)
INT 1A,3 - Set Time on Real Time Clock (XT 286,AT,PS/2)
INT 1A,4 - Read Real Time Clock Date (XT 286,AT,PS/2)
INT 1A,5 - Set Real Time Clock Date (XT 286,AT,PS/2)
INT 1A,6 - Set Real Time Clock Alarm (XT 286,AT,PS/2)
INT 1A,7 - Disable Real Time Clock Alarm (XT,AT,PS/2)
INT 1A,8 - Set RTC Activated Power On Mode (convertible)
INT 1A,9 - Read RTC Alarm Time and Status (convertible,PS/2)
INT 1A,A - Read System Day Counter (PS/2)
INT 1A,B - Set System Day Counter (PS/2)
INT 1A,80 - Setup Sound Multiplexer (PCjr only)
INT 1B - BIOS Ctrl-Break Handler Address
INT 1C - System Timer Tick (User Routine)
INT 1D - Video Initialization Parameter Table Vector
INT 1E - Disk Initialization Parameter Table Vector
INT 1F - Graphics Display Character Bit Map Table
DOS Interrupt Summary
INT 20 - Program Terminate
INT 21 - DOS Function Dispatcher
INT 21,0 - Program Terminate
INT 21,1 - Keyboard Input with Echo
INT 21,2 - Display Output
INT 21,3 - Wait for Auxiliary Device Input
INT 21,4 - Auxiliary Output
INT 21,5 - Printer Output
INT 21,6 - Direct Console I/O
INT 21,7 - Direct Console Input Without Echo
INT 21,8 - Console Input Without Echo
INT 21,9 - Print String
INT 21,A - Buffered Keyboard Input
INT 21,B - Check Standard Input Status
INT 21,C - Clear Keyboard Buffer and Invoke Keyboard Function
INT 21,D - Disk Reset
INT 21,E - Select Disk
INT 21,F - Open a File Using FCB
INT 21,10 - Close a File Using FCB
INT 21,11 - Search for First Entry Using FCB
INT 21,12 - Search for Next Entry Using FCB
INT 21,13 - Delete File Using FCB
INT 21,14 - Sequential Read Using FCB
INT 21,15 - Sequential Write Using FCB
INT 21,16 - Create a File Using FCB
INT 21,17 - Rename a File Using FCB
INT 21,19 - Get Current Default Drive
INT 21,1A - Set Disk Transfer Address (DTA)
INT 21,1B - Get Allocation Table Information
INT 21,1C - Get Allocation Table Info for Specified Drive
INT 21,1F - Get Pointer to Current Drive Parameter Table (Undocumented)
INT 21,21 - Random Read Using FCB
INT 21,22 - Random Write Using FCB
INT 21,23 - Get File Size Using FCB
INT 21,24 - Set Relative Record Field in FCB
INT 21,25 - Set Interrupt Vector
INT 21,26 - Create New Program Segment Prefix
INT 21,27 - Random Block Read Using FCB
INT 21,28 - Random Block Write Using FCB
INT 21,29 - Parse a Filename for FCB
INT 21,2A - Get Date
INT 21,2B - Set Date
INT 21,2C - Get Time
INT 21,2D - Set Time
INT 21,2E - Set/Reset Verify Switch
INT 21,2F - Get Disk Transfer Address (DTA)
INT 21,30 - Get DOS Version Number
INT 21,31 - Terminate Process and Remain Resident
INT 21,32 - Get Pointer to Drive Parameter Table (Undocumented)
INT 21,33 - Get/Set System Values (Ctl-Break/Boot Drive)
INT 21,34 - Get Address to DOS Critical Flag INDOS
INT 21,35 - Get Interrupt Vector
INT 21,36 - Get Disk Free Space
INT 21,37 - Get/Set Switch Character (Undocumented, DOS 2.
INT 21,38 - Get/Set Country Dependent Information
INT 21,39 - Create Subdirectory (mkdir)
INT 21,3A - Remove Subdirectory (rmdir)
INT 21,3B - Change Current Directory (chdir)
INT 21,3C - Create File Using Handle
INT 21,3D - Open File Using Handle
INT 21,3E - Close File Using Handle
INT 21,3F - Read From File or Device Using Handle
INT 21,40 - Write To File or Device Using Handle
INT 21,41 - Delete File
INT 21,42 - Move File Pointer Using Handle
INT 21,43 - Get/Set File Attributes
INT 21,44 - I/O Control for Devices (IOCTL)
INT 21,44,0 / IOCTL,0 - Get Device Information
INT 21,44,1 / IOCTL,1 - Set Device Information
Device Data Word
INT 21,44,2 / IOCTL,2 - Read From Character Device
INT 21,44,3 / IOCTL,3 - Write to Character Device
INT 21,44,4 / IOCTL,4 - Read from Block Device
INT 21,44,5 / IOCTL,5 - Write to Block Device
INT 21,44,6 / IOCTL,6 - Get Input Status
INT 21,44,7 / IOCTL,7 - Get Output Status
INT 21,44,8 / IOCTL,8 - Device Removable Query
INT 21,44,9 / IOCTL,9 - Device Local or Remote Query
INT 21,44,A / IOCTL,A - Handle Local or Remote Query
INT 21,44,B / IOCTL,B - Set Sharing Retry Count
INT 21,44,C / IOCTL,C - Generic I/O for Handles
INT 21,44,D / IOCTL,D - Generic I/O for Block Devices
INT 21,44,E / IOCTL,E - Get Logical Drive
INT 21,44,F / IOCTL,F - Set Logical Drive
INT 21,45 - Duplicate File Handle
INT 21,46 - Force Duplicate File Handle
INT 21,47 - Get Current Directory
INT 21,48 - Allocate Memory
INT 21,49 - Free Allocated Memory
INT 21,4A - Modify Allocated Memory Block (SETBLOCK)
INT 21,4B - EXEC/Load and Execute Program
INT 21,4C - Terminate Process With Return Code
INT 21,4D - Get Return Code of Sub-process
INT 21,4E - Find First Matching File
INT 21,4F - Find Next Matching File
INT 21,50 - Set Current Process ID (Undocumented DOS 2.
INT 21,51 - Get Current Process ID (Undocumented DOS 2.
INT 21,52 - Get Pointer to DOS "INVARS" (Undocumented)
INT 21,53 - Generate Drive Parameter Table (Undocumented)
INT 21,54 - Get Verify Setting
INT 21,55 - Create New PSP (Undocumented)
INT 21,56 - Rename File
INT 21,57 - Get/Set File Date and Time Using Handle
INT 21,58 - Get/Set Memory Allocation Strategy (Undocumented, DOS 3.
INT 21,59 - Get Extended Error Information (DOS 3.
INT 21,5A - Create Temporary File (DOS 3.
INT 21,5B - Create File (DOS 3.
INT 21,5C - Lock/Unlock File Access (DOS 3.
INT 21,5D - Critical Error Information (Undocumented, DOS 3.
INT 21,5E AL=0 Get Machine Name (DOS 3.
INT 21,5E AL=01 Set Machine Name (DOS 3.
INT 21,5E AL=02 Set Printer Setup (DOS 3.
INT 21,5E AL=03 Get Printer Setup (DOS 3.
INT 21,5E AL=04 Set Printer Mode (DOS 3.
INT 21,5E AL=05 Get Printer Mode (DOS 3.
INT 21,5F AL=00 Get Redirection Mode (DOS 3.
INT 21,5F AL=01 Set Redirection Mode (DOS 3.
INT 21,5F AL=02 Get Redirection List Entry (DOS 3.
INT 21,5F AL=03 Redirect Device (DOS 3.
INT 21,5F AL=04 Cancel Device Redirection (DOS 3.
INT 21,5F AL=05 Get Redirection List Extended Entry (DOS 4.
INT 21,5F AL=06 Get Redirection List (DOS 4.
INT 21,60 - Get Fully Qualified File Name (Undocumented 3.
INT 21,62 - Get PSP address (DOS 3.
INT 21,63 - Get Lead Byte Table (MSDOS 2.
INT 21,63 - Get Lead Byte Table (Asian DOS 3.
INT 21,64 - Set Device Driver Look Ahead (Undocumented)
INT 21,65 - Get Extended Country Information (DOS 3.
INT 21,66 - Get/Set Global Code Page (DOS 3.
INT 21,67 - Set Handle Count (DOS 3.
INT 21,68 - Flush Buffer Using Handle
INT 21,69 - Get/Set Disk Serial Number (Undocumented DOS 4+)
INT 21,6C - Extended Open/Create (DOS 4.
INT 21,F8 - Set OEM Int 21 Handler (functions F9-FF, Undocumented)
INT 22 - Program Terminate
INT 23 - Control-Break Exit Address
INT 24 - Critical Error Handler
INT 25 - Absolute Disk Read
Control Block Format (DOS 4.
INT 26 - Absolute Disk Write
Control Block Format (DOS 4.
INT 27 - Terminate and Stay Resident
INT 28 - DOS Idle Loop / Scheduler (Undocumented)
INT 29 - DOS Fast Character I/O (Undocumented 2.
INT 2A - DOS Network Critical Section and NETBIOS
INT 2A,0 - Network Installation Query
INT 2A,1 - Execute NETBIOS Request With No Error Retry
INT 2A,3 - Check if Direct I/O Allowed
INT 2A,4 - Execute NETBIOS Request
INT 2A,5 - Get Network Resource Information
INT 2A,6 - Network Print Stream Control
INT 2A,80 - Begin DOS Critical Section
INT 2A,81 - End DOS Critical Section
INT 2A,82 - End DOS Critical Sections 0 thru 7
INT 2A,84 - Keyboard Busy Loop
INT 2A,87 - Critical Section
INT 2E - Execute Command Using Base Level Command Interpreter (Undocumented DOS 2.
INT 2F - DOS Multiplex Interrupt
INT 2F,0 - DOS Multiplex Interrupt - Get Installed State
INT 2F,1 - Multiplex Interrupt - Submit file
INT 2F,2 - Multiplex Interrupt - Cancel file
INT 2F,3 - Multiplex Interrupt - Cancel all files
INT 2F,4 - Multiplex Interrupt - Pause / return status
INT 2F,5 - Multiplex Interrupt - End of Status
INT 2F,6 - PRINT.
INT 2F,8 - DRIVER.
INT 2F,2E - Setup Error Code Translation Tables (undoc.
INT 2F,80 - PRINT.
INT 33 - Mouse Function Calls
Mouse functions can be broken down into the following classes:
INT 33,0 - Mouse Reset/Get Mouse Installed Flag
INT 33,1 - Show Mouse Cursor
INT 33,2 - Hide Mouse Cursor
INT 33,3 - Get Mouse Position and Button Status
INT 33,4 - Set Mouse Cursor Position
INT 33,5 - Get Mouse Button Press Information
INT 33,6 - Get Mouse Button Release Information
INT 33,7 - Set Mouse Horizontal Min/Max Position
INT 33,8 - Set Mouse Vertical Min/Max Position
INT 33,9 - Set Mouse Graphics Cursor
INT 33,A - Set Mouse Text Cursor
INT 33,B - Read Mouse Motion Counters
INT 33,C - Set Mouse User Defined Subroutine and Input Mask
INT 33,D - Mouse Light Pen Emulation On
INT 33,E - Mouse Light Pen Emulation Off
INT 33,F - Set Mouse Mickey Pixel Ratio
INT 33,10 - Mouse Conditional OFF
INT 33,13 - Set Mouse Double Speed Threshold
INT 33,14 - Swap Interrupt Subroutines
INT 33,15 - Get Mouse Driver State and Memory Requirements
INT 33,16 - Save Mouse Driver State
INT 33,17 - Restore Mouse Driver State
INT 33,18 - Set alternate subroutine call mask and address
INT 33,19 - Get User Alternate Interrupt Address
INT 33,1A - Set Mouse Sensitivity
INT 33,1B - Get Mouse Sensitivity
INT 33,1C - Set Mouse Interrupt Rate (InPort only)
INT 33,1D - Set Mouse CRT Page
INT 33,1E - Get Mouse CRT Page
INT 33,1F - Disable Mouse Driver
INT 33,20 - Enable Mouse Driver
INT 33,21 - Reset Mouse Software
INT 33,22 - Set Language for Messages
INT 33,23 - Get Language Number
INT 33,24 - Get Driver Version, Mouse Type & IRQ Number
INT 4A - RTC Alarm Handler Vector
INT 67 - Expanded Memory Specification
INT 67,40 - Get EMM Status (LIM EMS 3.
INT 67,41 - Get Page Frame Base Address (LIM EMS 3.
INT 67,42 - Get Page Counts (LIM EMS 3.
INT 67,43 - Get Handle and Allocate Pages (LIM EMS 3.
INT 67,44 - Map Logical Page Into Physical Page Window (LIM EMS)
INT 67,45 - Release Handle and Memory Pages (LIM EMS)
INT 67,46 - Get EMM Version (LIM EMS)
INT 67,47 - Save Page Map Context (LIM EMS 3.
INT 67,48 - Restore Page Map Context (LIM EMS 3.
INT 67,49 - Get I/O Port Addresses (LIM EMS ¾ 3.
INT 67,4A - Get Logical to Physical Page Mapping (LIM EMS ¾ 3.
INT 67,4B - Get Handle Count (LIM EMS)
INT 67,4C - Get Page Count for Handle
INT 67,4D - Get Page Count for All Handles (LIM EMS)
INT 67,4E - Get/Set Page Map Context (LIM EMS 3.
INT 67,4F - Get/Set Partial Page Map (LIM EMS 4.
INT 67,50 - Map/Unmap Multiple Handle Pages (LIM EMS 4.
INT 67,51 - Reallocate Pages (LIM EMS 4.
INT 67,52 - Get/Set Handle Attributes
INT 67,53 Get/Set Handle Name
INT 67,54 - Get Handle Directory (LIM EMS 4.
INT 67,55 - Alter Page Map and Jump (LIM EMS 4.
INT 67,56 - Alter Page Map and Call (LIM EMS 4.
INT 67,57 - Move/Exchange Memory Region (LIM EMS 4.
INT 67,58 - Get Mappable Physical Address Array (LIM EMS 4.
INT 67,59 - Get Expanded Memory Hardware Information (LIM EMS 4.
INT 67,5A - Allocate Standard/Raw Pages (LIM EMS 4.
INT 67,5B - Alternate Map Register Set (LIM EMS 4.
INT 67,5C - Prepare Expanded Memory for Warm Boot (LIM EMS 4.
INT 67,5D - Enable/Disable OS Functions (LIM EMS 4.
INT 67,60 - LIM EMS Get Physical Window Array
INT 70 - Real Time Clock Interrupt (XT 286,AT,PS/2)
Subscribe to:
Posts (Atom)