Interrupt Address Function BIOS Entry ( * = see table ) Vector (Hex) 0 00-03 Divide by Zero Unused (D11 A-81) 1 04-07 Single Step Unused (D11 A-81) 2 08-0B Nonmaskable NMI_INT (A-72) 3 0C-0F Breakpoint Unused (D11 A-81) 4 10-13 Overflow Unused (D11 A-81) 5 14-17 Print Screen PRINT_SCREEN (A-81) 6 18-1B Reserved Unused (D11 A-81) 7 1C-1F Reserved Unused (D11 A-81) 8 20-23 Time of Day TIMER_INT (A-79) 9 24-27 Keyboard KB_INT (A-28) A 28-2B Reserved [ ] Unused (D11 A-81) B 2C-2F Communications [ 8259 ] Unused (D11 A-81) C 30-33 Communications [ ] Unused (D11 A-81) D 34-37 Disk Unused (D11 A-81) E 38-3B Diskette DISK_INT (A-43) F 3C-3F Printer Unused (D11 A-81) 10 * 40-43 Video VIDEO_IO (A-46) 11 * 44-47 Equipment Check EQUIPMENT (A-72) 12 * 48-4B Memory MEMORY_SIZE_DET (A-71) 13 * 4C-4F Diskette/Disk DISKETTE_IO (A-35) 14 * 50-53 Communications RS232_IO (A-22) 15 54-57 Cassette CASSETTE_IO (A-72) 16 * 58-5B Keyboard KEYBOARD_IO (A-24) 17 * 5C-5F Printer PRINTER_IO (A-45) 18 60-63 Resident BASIC F600:0000 19 64-67 Bootstrap BOOT_STRAP (A-20) 1A * 68-6B Time of day TIME_OF_DAY (A-79) 1B 6C-6F Keyboard Break DUMMY_RETURN (A-81) 1C 70-73 Timer Tick DUMMY_RETURN (A-81) 1D 74-77 Video Initialization VIDEO_PARMS (A-48) 1E 78-7B Diskette Parameters DISK_BASE (A-44) 1F 7C-7F Video Graphics Characters 0 20 * 80-83 General program termination 21 84-87 DOS function request 22 88-8B Called program termination address 23 8C-8F Control Break termination address 24 90-93 Critical error handler 25 94-97 Absolute disk read 26 98-9B Absolute disk write 27 9C-9F Terminate but stay resident Interrupt Address Function BIOS Entry Vector (Hex) 0 00-03 Divide by Zero Unused (D11 A-81) 1 04-07 Single Step Unused (D11 A-81) 2 08-0B Nonmaskable NMI_INT (A-72) 3 0C-0F Breakpoint Unused (D11 A-81) 4 10-13 Overflow Unused (D11 A-81) 5 14-17 Print Screen PRINT_SCREEN (A-81) 6 18-1B Reserved Unused (D11 A-81) 7 1C-1F Reserved Unused (D11 A-81) 8 20-23 Time of Day TIMER_INT (A-79) 9 24-27 Keyboard KB_INT (A-28) A 28-2B Reserved [ ] Unused (D11 A-81) B 2C-2F Communications [ 8259 ] Unused (D11 A-81) C 30-33 Communications [ ] Unused (D11 A-81) D 34-37 Disk Unused (D11 A-81) E 38-3B Diskette DISK_INT (A-43) F 3C-3F Printer Unused (D11 A-81) --------------------------------------------------------------------------- | 10 40-43 Video VIDEO_IO (A-46) | |-------------------------------------------------------------------------| | | AH=0 Set Mode | | |---------------------------------------------------------------------| | | | AL=0 40X25 BW (POR Default) | AL=4 320X200 Color | | | | AL=1 40X25 Color | AL=5 320X200 BW | | | | AL=2 80X25 BW | AL=6 640X200 BW | | | | AL=3 80X25 Color | AL=7 80X25 Monochrome Card | | |---------------------------------------------------------------------| | | AH=1 Set Cursor Type | | |---------------------------------------------------------------------| | | | CH= Bits 4-0 = Start Line for Cursor | | | | CL= Bits 4-0 = End Line for Cursor | | |---------------------------------------------------------------------| | | AH=2 Set Cursor Position | | |---------------------------------------------------------------------| | | | DH,DL= Row,Column (0,0 is upper left) | | | | BH= Page Number (Must be 0 for graphics modes) | | |---------------------------------------------------------------------| | | AH=3 Read Cursor Position | | |---------------------------------------------------------------------| | | | BH= Page Number (Must be 0 for graphics modes) | | | | On Exit DH,DL= Row,Column | | | | CH,CL= Cursor Mode Currently Set | | |---------------------------------------------------------------------| | | AH=4 Read Light Pen Position | | |---------------------------------------------------------------------| | | | On Exit AH=0 Light Pen Switch Not Down/Not Triggered | | | | AH=1 Valid Light Pen Value in Registers | | | | DH,DL= Row,Column of Character Light Pen Position | | | | CH= Raster Line (0-199) | | | | BX= Pixel Column (0-319 or 639) | | |---------------------------------------------------------------------| | | AH=5 Select Active Display Page | | |---------------------------------------------------------------------| | | | AL= New Page (0-7 for Modes 0&1, 0-3 for Modes 2&3) | | |---------------------------------------------------------------------| | | AH=6 Scroll Active Page Up | | |---------------------------------------------------------------------| | | | AL= Number of Lines, Input Lines Blanked at Bottom of Window | | | | 0 Means Blank Entire Window | | | | CH,CL= Row,Column of Upper Left Corner of Scroll | | | | DH,DL= Row,Column of Lower Right Corner of Scroll | | | | BH= Attribute to be used on blank line | | |---------------------------------------------------------------------| | | AH=7 Scroll Active Page Down | | |---------------------------------------------------------------------| | | | AL= Number of Lines, Input Lines Blanked at Top of Window | | | | 0 Means Blank Entire Window | | | | CH,CL= Row,Column of Upper Left Corner of Scroll | | | | DH,DL= Row,Column of Lower Right Corner of Scroll | | | | BH= Attribute to be used on blank line | | |---------------------------------------------------------------------| | | AH=8 Read Attribute/Character at Current Position | | |---------------------------------------------------------------------| | | | BH= Display Page (Valid for alpha modes only) | | | | On Exit AL= Character Read | | | | AH= Attribute of Character Read (alpha modes only) | | |---------------------------------------------------------------------| | | AH=9 Write Attribute/Character at Current Position | | |---------------------------------------------------------------------| | | | BH= Display Page (Valid for alpha modes only) | | | | CX= Count of Characters to Write | | | | AL= Character to Write | | | | BL= Attribute of Character (alpha)/Color of Character (graphics) | | | | If Bit 7 = 1 color value is exclusive or'd with current value| | |---------------------------------------------------------------------| | | AH=10 Write Character Only at Current Position | | |---------------------------------------------------------------------| | | | BH= Display Page (Valid for alpha modes only) | | | | CX= Count of Characters to Write | | | | AL= Character to Write | | |---------------------------------------------------------------------| | | AH=11 Set Color Palette | | |---------------------------------------------------------------------| | | | BH= Palette Color ID being set (0 or 1) | | | | BL= Color Value to be used with that Color ID | | | | Color ID = 0 selects background color (0-15) | | | | Color ID = 1 selects palette to be used | | | | Palette = 0: Green(1)/Red(2)/Yellow(3) | | | | Palette = 1: Cyan(1)/Magenta(2)/White(3) | | |---------------------------------------------------------------------| | | AH=12 Write Dot | | |---------------------------------------------------------------------| | | | DX= Row Number | | | | CX= Column Number | | | | AL= Color Value | | | | If Bit 7 = 1 color value is exclusive or'd with current value| | |---------------------------------------------------------------------| | | AH=13 Read Dot | | |---------------------------------------------------------------------| | | | DX= Row Number | | | | CX= Column Number | | | | AL= Returns the Dot Read | | |---------------------------------------------------------------------| | | AH=14 Write Teletype to Active Page | | |---------------------------------------------------------------------| | | | AL= Character to write | | | | BL= Foreground color in graphics mode | | |---------------------------------------------------------------------| | | AH=15 Current Video State | | |---------------------------------------------------------------------| | | | On Exit AL= Mode currently set | | | | AH= Number of character columns on screen | | | | BH= Current active display page | --------------------------------------------------------------------------- 11 44-47 Equipment Check EQUIPMENT (A-72) ----------------------------------------------------------------------- | AX is set to indicate attached I/O | |---------------------------------------------------------------------| | | Bit 15,14= Number of printers attached | | | Bit 13 = Not used | | | Bit 12 = Game I/O attached | | | Bit 11,10,9= Number of RS232 cards attached | | | Bit 8 = Not used | | | Bit 7,6 = Number of diskette drives (only if Bit 0 = 1) | | | 00=1, 01=2, 10=3, 11=4 | | | Bit 5,4= Initial video mode | | | 00= Unused | | | 01= 40X25 BW using color card | | | 10= 80X25 BW using color card | | | 11= 80X25 BW using BW card | | | Bit 3,2= Planar RAM size (00=16K,01=32K,10=48K,11=64K) | | | Bit 1 = Not used | | | Bit 0 = IPL from diskette (there are drives present in system) | ----------------------------------------------------------------------- 12 48-4B Memory MEMORY_SIZE_DET (A-71) ----------------------------------------------------------------------- | AX= Number of contiguous 1K blocks of memory | |---------------------------------------------------------------------| 13 4C-4F Diskette/Disk DISKETTE_IO (A-35) ----------------------------------------------------------------------- | AH=0 Reset the Diskette System | |---------------------------------------------------------------------| | AH=1 Read the Status of the system into AL | |---------------------------------------------------------------------| | AH=2 Read the desired sectors into memory | |---------------------------------------------------------------------| | AH=3 Write the desired sectors from memory | |---------------------------------------------------------------------| | AH=4 Verify the desired sectors | |---------------------------------------------------------------------| | AH=5 Format the desired track | |---------------------------------------------------------------------| | |For Read/Write/Verify/Format | | |------------------------------------------------------------------| | | | Input | | | |---------------------------------------------------------------| | | | | DL= Drive Number (0-3) (value checked) | | | | | DH= Head Number (0-1) | | | | | CH= Track Number (0-39) | | | | | CL= Sector Number (1-8) (not used for format) | | | | | AL= Number of sectors(1-8) (not used for format) | | | | | ES:BX= address of buffer (not required for verify) | | | |---------------------------------------------------------------| | | | Output | | | |---------------------------------------------------------------| | | | | AH= status of operations | | | | |------------------------------------------------------------| | | | | | 80H= attachment failed to respond | | | | | | 40H= seek operation failed | | | | | | 20H= NEC controller has failed | | | | | | 10H= Bad CRC on diskette read | | | | | | 09H= attempt to DMA accross 64K boundary | | | | | | 08H= DMA overrun on operation | | | | | | 04H= requested sector not found | | | | | | 03H= write attempted on write protected diskette | | | | | | 02H= address mark not found | | | | | | 01H= bad command passed to diskette I/O | | | | |------------------------------------------------------------| | | | | CY= 0 successful operation, AH=0 | | | | | CY= 1 Failed operation | ----------------------------------------------------------------------- 14 50-53 Communications RS232_IO (A-22) AH=0 Initialize communications port AL=Parms: 7 6 5 4 3 2 1 0 ------Baud ------ -Parity-- StopBit --WordLength 000 - 110 X0 - none 0 - 1 10 - 7 bits 001 - 150 01 - odd 1 - 2 11 - 8 bits 010 - 300 11 - even 011 - 600 100 - 1200 101 - 2400 110 - 4800 111 - 9600 On Exit, registers set as in AH=3 AH=1 send the character in AL over the commo line On Exit, AH bit 7 = 1 if unable to transmit byte AH=2 receive a character in AL from commo line AH=3 return the commo port status in AX AH contains the line status Bit 7 = time out Bit 6 = trans shift register empty Bit 5 = tran holding register empty Bit 4 = break detect Bit 3 = framing error Bit 2 = parity error Bit 1 = overrun error Bit 0 = data ready AL contains the modem status Bit 7 = received line signal detect Bit 6 = ring indicator Bit 5 = data set ready Bit 4 = clear to send Bit 3 = delta receive line signal detect Bit 2 = trailing edge ring detector Bit 1 = delta data set ready Bit 0 = delta clear to send DX= parameter indicating which RS232 card (0,1) 15 54-57 Cassette CASSETTE_IO (A-72) 16 58-5B Keyboard KEYBOARD_IO (A-24) AH=0 read the next ASCII character struck from the keyboard return the result in AL, scan code in AH AH=1 set the Z flag to indicate if an ASCII character is available to be read ZF=0 code is available AH=2 return the current shift status in AL Bit 7= insert state is active Bit 6= caps lock state has been toggled Bit 5= num lock state has been toggled Bit 4= scroll lock state has been toggled Bit 3= alternate shift key depressed Bit 2= control shift key depressed Bit 1= left shift key depressed Bit 0= right shift key depressed 17 5C-5F Printer PRINTER_IO (A-45) AH=0 print the character in AL On Exit, AH=1 if character could not be printed (time out) AH=1 initialize the printer port AH=2 read the printer status into AH Bit 7= 1=not busy Bit 6= 1=acknowledge Bit 5= 1=out of paper Bit 4= 1=selected Bit 3= 1= I/O error Bit 2,1 unused Bit 0= 1=Time Out DX= Printer to be used (0,1,2) 18 60-63 Resident BASIC F600:0000 19 64-67 Bootstrap BOOT_STRAP (A-20) 1A 68-6B Time of day TIME_OF_DAY (A-79) AH= 0 read the current clock setting On Exit CX= high portion of count DX= low portion of count AL= 0 if timer has not passed 24 hours since last read AH=1 set the current clock CX= high portion of count DX= low portion of count 1B 6C-6F Keyboard Break DUMMY_RETURN (A-81) 1C 70-73 Timer Tick DUMMY_RETURN (A-81) 1D 74-77 Video Initialization VIDEO_PARMS (A-48) 1E 78-7B Diskette Parameters DISK_BASE (A-44) 1F 7C-7F Video Graphics Characters 0 20 80-83 General program termination 21 84-87 DOS function request 22 88-8B Called program termination address 23 8C-8F Control Break termination address 24 90-93 Critical error handler 25 94-97 Absolute disk read 26 98-9B Absolute disk write 27 9C-9F Terminate but stay resident Function Call Summary ( * = not documented ) Number Description 0 Program Terminate 1 Keyboard input. 2 Display output. 3 Auxiliary (Async) input. 4 Auxiliary (Axync) output. 5 Printer output. 6 Direct console I/O. 7 Direct console input without echo. 8 Console input without echo. 9 Print string. A Buffered keyboard input. B Check standard input status. C Clear keyboard buffer and invoke a keyboard function. D Disk reset. E Select disk. F Open file. 10 Close a file 11 Search for the first entry. 12 Search for the next entry. 13 Delete file. 14 Sequential read. 15 Sequential write. 16 Create file. 17 Rename file. 18 *Unused. 19 Current disk. 1A Set disk transfer address. 1B Allocation table information. 1C Allocation table information for specific drive. 1D *Unused. 1E *Unused. 1F *Get the default DOS Parameter Block in DS:BX 20 *Unused. 21 Random read. 22 Random write. 23 File size. 24 Set random record field. 25 Set interrupt vector. 26 Create a new program segment. 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 switch. 2F Get DTA. 30 Get DOS version number. 31 Terminate process and remain resident. 32 *Get the Dos Parameter Block of disk # in DL 33 Ctrl-Break check. 35 Get vector. 36 Get disk free space. 37 *Get switch character 38 Return country dependent information (international). 39 Create a subdirectory. 3A Remove a directory entry. 3B Change the current directory. 3C Create a file. 3D Open a file. 3E Close a file handle. 3F Read from a file or device. 40 Write to a file or device. 41 Delete a file from a specified directory. 42 Move file read/write pointer. 43 Change file mode. 44 I/O control for devices. 45 Duplicate a file handle. 46 Force a duplicate of a handle. 47 Get current directory. 48 Allocate memory. 49 Free allocated memory. 4A Modify allocated memory blocks. 4B Load or execute a program. 4C Terminate a process. 4D Retrieve the return code of a sub-process. 4E Find first matching file. 4F Find next matching file. 50 *Set PSP 51 *Get PSP 52 *???? 53 *Set initial Dos Parameter Block 54 Get verify state. 55 *Duplicate PSP and make the new one active 56 Rename a file. 57 Get/Set a file's date and time. e result in AL, scan code in AH A