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

Last change on this file since 59 was 50, checked in by Tomi Tilli, 14 years ago

Changes to Assembly Library:
Removed Memory_ExchangeSSBPwithESDI since it obviously corrupted stack.
CGA detection is now only done once when initializing Display Context.
Moved File Library defines to File.inc.

File size: 2.0 KB
Line 
1; File name : DosFunctions.inc
2; Project name : AssemblyLibrary
3; Created date : 1.9.2010
4; Last update : 8.10.2010
5; Author : Tomi Tilli
6; Description : Defines for MS-DOS functions.
7%ifndef DOS_FUNCTIONS_INC
8%define DOS_FUNCTIONS_INC
9
10; DOS interrupts
11DOS_INTERRUPT_21h EQU 21h
12DOS_CRITICAL_ERROR_HANDLER_24h EQU 24h
13
14; DOS file functions
15SELECT_DEFAULT_DRIVE EQU 0Eh
16GET_CURRENT_DEFAULT_DRIVE EQU 19h
17SET_INTERRUPT_VECTOR EQU 25h
18GET_DISK_TRANSFER_AREA_ADDRESS EQU 2Fh
19GET_DOS_DRIVE_PARAMETER_BLOCK_FOR_SPECIFIC_DRIVE EQU 32h
20SET_CURRENT_DIRECTORY EQU 3Bh
21OPEN_EXISTING_FILE EQU 3Dh
22CLOSE_FILE EQU 3Eh
23READ_FROM_FILE_OR_DEVICE EQU 3Fh
24WRITE_TO_FILE_OR_DEVICE EQU 40h
25SET_CURRENT_FILE_POSITION EQU 42h
26GET_CURRENT_DIRECTORY EQU 47h
27FIND_FIRST_MATCHING_FILE EQU 4Eh
28FIND_NEXT_MATCHING_FILE EQU 4Fh
29
30; DOS errors
31ERR_DOS_DRIVE_NOT_READY EQU 15h
32
33
34
35; DOS Program Segment Prefix (PSP, first 256 (100h) bytes on top of program)
36struc PSP
37 .int20hInstruction resb 2
38 .wSizeOfMemoryInParagraphs resb 2
39 .reservedAt4h resb 1
40 .callToDosFunctionDispatcher resb 5
41 .fpInt22hTerminate resb 4
42 .fpInt23hCtrlC resb 4
43 .fpInt24hCriticalError resb 4
44 .reservedAt16h resb 22
45 .wEnvironmentSegment resb 2
46 .reservedAt2Eh resb 34
47 .int21hAndRetfInstructions resb 3
48 .reservedAt53h resb 9
49 .FCB1 resb 16
50 .FCB2 resb 20
51 .DiskTransferArea:
52 .bCommandLineLength resb 1
53 .szCommandLine resb 127
54endstruc
55
56
57; DOS DTA (Disk Transfer Area)
58struc DTA
59 ; Undocumented fields
60 .reservedAt0h resb 21
61 ; Documented fields
62 .bFileAttributes resb 1 ; 15h, Attribute of matching file
63 .wFileTime resb 2 ; 16h, File time
64 .wFileDate resb 2 ; 18h, File date
65 .dwFileSize resb 4 ; 1Ah, File size in bytes
66 .szFile resb 13 ; 1Eh, ASCIZ filename + extension
67endstruc
68
69
70%endif ; DOS_FUNCTIONS_INC
Note: See TracBrowser for help on using the repository browser.