source: xtideuniversalbios/trunk/Assembly_Library/Inc/DosFunctions.inc@ 614

Last change on this file since 614 was 601, checked in by Krister Nordvall, 5 years ago

Changes:

  • Building the BIOS now works again.
  • Added a new IDE device type/transfer mode for use only with XT-IDE rev 2+ (or Chuck(G)-modded rev 1) cards installed in any of the following machines: Olivetti M24, AT&T PC6300, Xerox 6060 and Logabax Persona 1600. This new transfer mode is slightly faster than the regular XT-IDE rev 1 device type and requires that the card is configured for High Speed mode (or, in case of the card being a rev 1 card, has the Chuck(G) mod done). The new device type is called "XTIDE rev 2 (Olivetti M24)" in XTIDECFG.
  • Made some minor improvements to the library code that handles 'Drive Not Ready' errors in XTIDECFG.
  • Optimizations.
File size: 2.7 KB
RevLine 
[41]1; Project name : AssemblyLibrary
2; Description : Defines for MS-DOS functions.
3%ifndef DOS_FUNCTIONS_INC
4%define DOS_FUNCTIONS_INC
5
6; DOS interrupts
7DOS_INTERRUPT_21h EQU 21h
[592]8DOS_CTRL_C_CTRL_BREAK_HANDLER_23h EQU 23h
[41]9DOS_CRITICAL_ERROR_HANDLER_24h EQU 24h
[85]10DOS_TSR_MULTIPLEX_INTERRUPT_2Fh EQU 2Fh
[41]11
[589]12; DOS functions
13WRITE_CHARACTER_TO_STANDARD_OUTPUT EQU 02h ; DOS 1+
14WRITE_STRING_TO_STANDARD_OUTPUT EQU 09h ; DOS 1+
15SELECT_DEFAULT_DRIVE EQU 0Eh ; DOS 1+
16GET_CURRENT_DEFAULT_DRIVE EQU 19h ; DOS 1+
17SET_INTERRUPT_VECTOR EQU 25h ; DOS 1+
18GET_DISK_TRANSFER_AREA_ADDRESS EQU 2Fh ; DOS 2+
19GET_DOS_VERSION EQU 30h ; DOS 2+
20GET_DOS_DRIVE_PARAMETER_BLOCK_FOR_SPECIFIC_DRIVE EQU 32h ; DOS 2+
21GET_INTERRUPT_VECTOR EQU 35h ; DOS 2+
22SET_CURRENT_DIRECTORY EQU 3Bh ; DOS 2+
23CREATE_OR_TRUNCATE_FILE EQU 3Ch ; DOS 2+
24OPEN_EXISTING_FILE EQU 3Dh ; DOS 2+
25CLOSE_FILE EQU 3Eh ; DOS 2+
26READ_FROM_FILE_OR_DEVICE EQU 3Fh ; DOS 2+
27WRITE_TO_FILE_OR_DEVICE EQU 40h ; DOS 2+
28SET_CURRENT_FILE_POSITION EQU 42h ; DOS 2+
29CHECK_IF_BLOCK_DEVICE_REMOTE EQU 4409h ; DOS 3.1+
30GET_CURRENT_DIRECTORY EQU 47h ; DOS 2+
31TERMINATE_WITH_RETURN_CODE EQU 4Ch ; DOS 2+
32FIND_FIRST_MATCHING_FILE EQU 4Eh ; DOS 2+
33FIND_NEXT_MATCHING_FILE EQU 4Fh ; DOS 2+
[592]34GET_EXTENDED_ERROR_INFORMATION EQU 59h ; DOS 3.0+
[41]35
36; DOS errors
[589]37ERR_DOS_FUNCTION_NUMBER_INVALID EQU 01h
[601]38ERR_DOS_PATH_NOT_FOUND EQU 03h
[589]39ERR_DOS_INVALID_DRIVE EQU 0Fh
[601]40ERR_DOS_NO_MORE_FILES EQU 12h
[41]41ERR_DOS_DRIVE_NOT_READY EQU 15h
42
43
44; DOS Program Segment Prefix (PSP, first 256 (100h) bytes on top of program)
45struc PSP
46 .int20hInstruction resb 2
47 .wSizeOfMemoryInParagraphs resb 2
48 .reservedAt4h resb 1
49 .callToDosFunctionDispatcher resb 5
50 .fpInt22hTerminate resb 4
51 .fpInt23hCtrlC resb 4
52 .fpInt24hCriticalError resb 4
53 .reservedAt16h resb 22
54 .wEnvironmentSegment resb 2
55 .reservedAt2Eh resb 34
56 .int21hAndRetfInstructions resb 3
57 .reservedAt53h resb 9
58 .FCB1 resb 16
59 .FCB2 resb 20
60 .DiskTransferArea:
61 .bCommandLineLength resb 1
62 .szCommandLine resb 127
63endstruc
64
65
66; DOS DTA (Disk Transfer Area)
67struc DTA
68 ; Undocumented fields
69 .reservedAt0h resb 21
70 ; Documented fields
71 .bFileAttributes resb 1 ; 15h, Attribute of matching file
72 .wFileTime resb 2 ; 16h, File time
73 .wFileDate resb 2 ; 18h, File date
74 .dwFileSize resb 4 ; 1Ah, File size in bytes
75 .szFile resb 13 ; 1Eh, ASCIZ filename + extension
76endstruc
77
78
79%endif ; DOS_FUNCTIONS_INC
Note: See TracBrowser for help on using the repository browser.