DOS Interrupts and Functions
Total Page:16
File Type:pdf, Size:1020Kb
Appendix C DOS Interrupts and Functions Function Description Pa~e Number Interrupt 20H Terminate program ......................................... 773 Interrupt 21H functions-arranged by function groups Character input Function Description Page Number OlH Character input with echo (Ver. 1 and up) .................773 03H Auxiliary input (Ver. 1 and up) ............................... 775 06H Direct console I/O (Ver. 1 and up)...........................776 07H Unftltered character input without echo (Ver. 1 and up) ...................................................777 08H Character input without echo (Ver. 1 and up) ............. 778 OAH Buffered input (Ver. 1 and up) ................................. 779 OBH Get input status (Ver. 1 and up) ..............................780 OCH Reset input buffer and then input (Ver. 1 and up) .......780 Character output Function Description Page Number 02H Character output (Ver. 1 and up) .............................774 04H Auxiliary output (Ver. 1 and up) .............................77 5 05H Printer output (Ver. 1 and up) ................................. 776 06H Direct console I/O (Ver. 1 and up)...........................776 09H Output character string (Ver. 1 and up).....................778 Program termination Function Description rue Number OOH Terminate program (Ver. 1 and up)..........................773 3lH Terminate and stay resident (Ver. 2 and up) ...............799 4CH Terminate with return code (Ver. 2 and up) ................ 825 766 Abacus Appendix C: DOS /lIIeTrllpts fIIIII. FlDICtions Subdirectory access Function Description PaKe Number 39H Create subdirectory (Ver. 2 and up) .......................... 804 3AH Delete subdirectory (Ver. 2 and up) ..........................80S 3BH Set current directory (Ver. 2 and up).........................80S 47H Get current directory (Yer. 2 and up) ........................821 RAM control Function Description PaKe Number 48H Allocate memory (Ver. 2 and up) ............................ 821 49H Release memory (Ver. 2 and up) ............................. 822 4AH Modify memory allocation (Yer. 2 and up)................ 822 58H Get allocation strategy (sub-function 0) (Ver.3 and up) ................................................... 830 58H Set allocation strategy (sub-function 1) (Ver. 3 and up) ................................................... 830 Device driver access Function Description Pas;« Number 44H IOC1L: Get device info (sub-function 0) (Ver.2 and up) ....................................................813 44H IOC1L: Set device info (sub-function 1) (Ver. 2 and up) .................................................... 813 44H IOCTL: Read data from charocter device (sub-function 2) (Yer. 2 and up) .............................. 814 44H IOC1L: Send data to character device (sub-function 3) (Ver. 2 and up) .............................. 815 44H IOCTL: Read data from block device (sub-function 4) (Ver. 2 and up) ............................. 816 44H IOC1L: Send data to block device (sub-function 5) (Ver. 2 and up) .............................. 816 44H IOC'TI.: Read input status (sub-function 6) (Ver. 2 and up) ............................. 817 44H IOC1L: Read output status (sub-function 7) (Ver. 2 and up) ..............................817 44H IOC1L: Test for changeable block device (sub-function 8) (Ver. 3 and up) ............................. 818 44H IOC1L: Test for local or remote drive (sub-function 9) (Ver. 3.1 and up) ........................... 818 44H IOC1L: Test for local or remote handle (sub-function 10) (Ver. 3.1 and up)......................... 819 44H IOCTL: Change retry count (sub-function 11) (Ver. 3 and up) ............................ 819 Time and date Function Description Page Number 2AH Get system date (Ver. 1 and up) ..............................796 2BH Set system date (Ver. 1 and up) ............................... 797 2CH Get system time (Ver. 1 and up) ............................. 797 2DH Set system time (Ver. 1 and up) .............................. 797 767 AppendiJe C: DOS Interr"Pts and F/UlCtions PC System Programming DTA Function Description rue Number IAH Set DTA address (Ver. I and up) .............................788 2FH Get DTA address (Ver. 2 and up) .............................798 Search directory Function Description rue Number llH Search for first matching directory FCB (Ver. 1 and up) ................................................... 783 12H Search for next matching directory PCB (Ver. I and up) ................................................... 783 4EH Search for first matching directory PCB (Ver. 2 and up) ................................................... 826 4FH Search for next matching directory handle (Ver. 2 and up) .................................................... 827 File access (FCB) Function Description Pat::e Number OFH Open file (FCB) (Ver. I and up) .............................. 782 10H Close file (FCB) (Ver. I and up) ............................. 782 13H Delete file (PCB) (Ver. I and up) ............................784 14H Sequential read (PCB) (Ver. I and up) ...................... 786 ISH Sequential write (FCB) (Ver. I and up) ..................... 786 16H Create or truncate fIle (PCB) (Ver. I and up) ............. 786 17H Rename file (FCB) (Ver. I and up) .......................... 787 21H Random read (FCB) (Ver. I and up) ......................... 790 22H Random write (FCB) (Ver. 1 and up) .......................791 23H Get file size in records (FCB) (Ver. I and up) ............ 792 24H Set random record number 01er. I and up)................. 792 27H Random block (FCB) (Ver. 1 and up) ....................... 794 28H Random block write (FCB) (Ver. I and up) ............... 795 29H Parse fIlename to PCB (Ver. I and up) ..................... 795 File access (handle) Function Description Pat::e Number 3CH Create or truncate fIle (handle) (Ver. 2 and up) ........... 806 3DH Open file (handle) (Ver. 2 and up) ............................ 807 3EH Close file (handle) (Ver. 2 and up) ........................... 808 3FH Read file or device (handle) (Ver. 2 and up)................ 808 40H Write to file or device (handle) (Ver. 2 and up) ...........809 41H Delete me (handle) (Ver. 2 and up) .......................... 810 42H Move file pointer (handle) (Ver. 2 and up)................. 810 4SH Duplicate handle (Ver. 2 and up) ............................. 820 46H Force duplicate of handle (Ver. 2 and up) .................. 820 5AH Create temporary me (handle) (Ver. 3 and up) ............ 834 56H Rename fIle (handle) (Ver. 2 and up) ........................ 828 768 Abacus Appendix C: DOS lrtlerTupts and FlUlCtiorts Interrupt vectors Function Description Pa&e Number 25H Set interrupt vector (Ver. 1 and up) .......................... 793 35H Get interrupt vector (Vee. 2 and up) .........................801 Disk/hard disk access Function Description Pa&e Number ODH Disk: reset (Vee. 1 and up) ......................................781 OEH Set default disk drive (Ver. 1 and up) ........................ 781 19H Get default disk drive (Ver. 1 and up) .......................788 IBH Get allocation information for default drive (Vee. 1 and up) ....................................................789 ICH Get allocation information fm- specified drive (Ver. 2 and up) ....................................................789 36H Get free disk space (Ver. 2 and up) ........................... 801 PSP access Function Description Pa~ Number 26H Create PSP (Vee. 1 and up) ....................................793 62H Get PSP address (Ver. 3 and up).............................. 839 DOS nag access Function Description Pa~ Number 2EH Set verify flag (Ver. 1 and up) ................................798 33H Get <Ctrl><Break> flag (sub-function 0) ................. 800 33H Set <Ctrl><Break> flag (sub-function I) .................800 54H Get verify flag (Ver. 2 and up) File inrormation access Function Description Page Number 43H Get file attributes (sub-function 0) (Ver. 2 and up) ...... 811 43H Set file attributes (sub-function I) (Ver. 2 and up) ......812 57H Get file date and time (sub-function 0) (Vee. 2 and up). 829 57H Set file date and time (sub-function I) (Vee. 2 and up). 829 Country-specific runctions Function Description Pa~ Number 38H Get country (Vee. 2 and up) .................................... 802 38H Get country (sub-function 0) (Ver. 3 and up) .............802 38H Set country (sub-function I) (Ver. 3 and up) .............. 804 Other rUDctions Function Description Pa~ Number 30H Get MS-DOS version number (Ver. 2 and up) ...........799 4BH Execute program (sub-function 0) (Vee. 2 and up) ....... 823 4BH Execute overlay program (sub-function 3) ................824 4DH Get return code (Ver. 2 and up) ...............................826 59H Get extended err<X' information (Ver. 3 and up) ...........831 769 Appendbc C: DOS Interrupts and Functions PC System Programming Interrupt 22H Terminate address ...........................................841 Interrupt 23H <Ctri><C> handler address ............................841 Interrupt 24H Critical error handler address .........................842 Interrupt 25H Absolute disk read ..........................................843 Interrupt 26H Absolute disk write ........................................844 Interrupt 27H Terminate and stay resident ...........................845 Interrupt 2FH Print spooler Function Description Pge Number OOH Get print spooler install status ................................846 01H Send file to print spooler .......................................846