| Programmering - Assembler
- INT - INT 21 : DOS functions | Character I/O | |
| 00: Terminate Program 01: Read Keyboard with Echo 02: Display Character 03: Auxiliary Input 04: Auxiliary Output 05: Print Character 06: Direct Console I/O 07: Direct Console Input 08: Read Keyboard without Echo 09: Display String 0A: Buffered Keyboard Input 0B: Check Keyboard Status 0C: Flush Buffer, Read Keyboard 0D: Reset Drive 0E: Set Default Drive 0F: Open File with FCB 10: Close File with FCB 11: Find First File with FCB 12: Find Next File with FCB 13: Delete File with FCB 14: Sequential Read 15: Sequential Write 16: Create File with FCB 17: Rename File with FCB 19: Get Default Drive 1A: Set Disk Transfer Address (DTA) 1B: Get Default Drive Data 1C: Get Drive Data 1F: Get Default DPB 21: Random Read 22: Random Write 23: Get File Size 24: Set Random Record Number 25: Set Interrupt Vector 26: Create New PSP 27: Random Block Read 28: Random Block Write 29: Parse Filename 2A: Get Date 2B: Set Date 2C: Get Time 2D: Set Time 2E: Set/Reset Verify Flag 2F: Get Disk Transfer Address 30: Get Version Number |
31: Keep Program 32: Get DPB 3300: Get Ctrl-C Check Flag 3301: Set Ctrl-C Check Flag 3305: Get Startup Drive 3306: Get MS-DOS Version 34: Get InDOS Flag Address 35: Get Interrupt Vector 36: Get Disk Free Space 38: Get/Set Country Information 39: Create Directory 3A: Remove Directory 3B: Change Current Directory 3C: Create File with Handle 3D: Open File with Handle 3E: Close File with Handle 3F: Read File or Device 40: Write File or Device 41: Delete File 42: Move File Pointer 4300: Get File Attributes 4301: Set File Attributes 4400: Get Device Data 4401: Set Device Data 4402: Receive CD Control Data 4403: Send CD Control Data 4404: Receive BD Control Data 4405: Send BD Control Data 4406: Check Device Input Status 4407: Check Device Output Status 4408: Check Removeable Media 4409: Is Device Remote 440A: Is File or Device Remote 440B: Set Sharing Retry Count 440C: IOCTL for Char. Devices 440D: IOCTL for Block Devices 440E: Get Logical Drive Map 440F: Set Logical Drive Map 4410: Query IOCTL Handle 4411: Query IOCTL Device 45: Duplicate File Handle 46: Force Duplicate File Handle 47: Get Current Directory 48: Allocate Memory 49: Free Allocated Memory |
4A: Set Memory Block Size 4B00: Load and Execute Program 4B01: Load Program 4B03: Load Overlay 4B05: Set Execution State 4C: Terminate 4D: Get Child-Program Return Value 4E: Find First File 4F: Find Next File 50: Set PSP Address 51: Get PSP Address 54: Get Verify State 56: Rename File 5700: Get File Date and Time 5701: Set File Date and Time 5800: Get Allocation Strategy 5801: Set Allocation Strategy 5802: Get Upper-Memory Link 5803: Set Upper-Memory Link 59: Get Extended Error 5A: Create Temporary File 5B: Create New File 5C: Lock/Unlock File 5D0A: Set Extended Error 5E00: Get Machine Name 5E02: Set Printer Setup 5E03: Get Printer Setup 5F02: Get Assign-List Entry 5F03: Make Network Connection 5F04: Delete Network Connection 6501: Get Extended Country Information 6502: Get Uppercase Table 6504: Get Filename Uppercase Table 6505: Get Filename Character Table 6506: Get Collate Sequence Table 6507: Get Double-Byte Character Set 6520: Convert Character 6521: Convert String 6522: Convert AsciiZ String 6601: Get Global Code Page 6602: Set Global Code Page 67: Set Maximum Handle Count 68: Commit File 6C: Extended Open/Create |
|
|
|
|
|
|
;load registers mov ah,function int 21h |
AH = 19 |
AL = DriveNumber (0 = A, 1 = B, 2 = C, ...) |
AH = 25h AL = int no. DS:DX = new vector |
push ds ;preserve DS mov dx,offset Handler push cs pop ds mov al,9 mov ah,25h int 21h pop ds |
mov dx,seg INT60Handler mov ds,dx mov dx,offset INT60Handler mov al,60h mov ah,25h int 21h |
AH = 2Ah |
AL = WeekDay (0 = sunday, 1 = monday, .., 6 = saturday) CX = Year (1980..2099) DH = Month (1 = january, .., 12 = december) DL = Day (1..31) |
AH = 2Ch |
CH = Hour (0..23) CL = Minutes (0..59) DH = Seconds (0..59) DL = 100th of a second (0..99) |
AH = 47h DL = Drive (0=default, 1=A, 2=B, 3=C, ..) DS:SI -> buffer (>=64 bytes) |
CF = 0: no error, path in buffer
CF = 1: AX = error code:
000F : ERROR_INVALID_DRIVE
|
AH = 4Ch AL = 'errornr' (used by ERRORLEVEL) |
| MOV AX,4C00h INT 21h |