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

Last change on this file since 162 was 85, checked in by aitotat, 13 years ago

Changes to Assembly Library:

  • Some minor adjustments
File size: 2.1 KB
Line 
1; File name     :   DosFunctions.inc
2; Project name  :   AssemblyLibrary
3; Created date  :   1.9.2010
4; Last update   :   3.1.2011
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
13DOS_TSR_MULTIPLEX_INTERRUPT_2Fh                     EQU     2Fh
14
15; DOS drive and file functions
16SELECT_DEFAULT_DRIVE                                EQU     0Eh
17GET_CURRENT_DEFAULT_DRIVE                           EQU     19h
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 functions for TSRs
31SET_INTERRUPT_VECTOR                                EQU     25h
32GET_INTERRUPT_VECTOR                                EQU     35h
33
34; DOS errors
35ERR_DOS_DRIVE_NOT_READY                             EQU     15h
36
37
38
39; DOS Program Segment Prefix (PSP, first 256 (100h) bytes on top of program)
40struc PSP
41    .int20hInstruction              resb    2
42    .wSizeOfMemoryInParagraphs      resb    2
43    .reservedAt4h                   resb    1
44    .callToDosFunctionDispatcher    resb    5
45    .fpInt22hTerminate              resb    4
46    .fpInt23hCtrlC                  resb    4
47    .fpInt24hCriticalError          resb    4
48    .reservedAt16h                  resb    22
49    .wEnvironmentSegment            resb    2
50    .reservedAt2Eh                  resb    34
51    .int21hAndRetfInstructions      resb    3
52    .reservedAt53h                  resb    9
53    .FCB1                           resb    16
54    .FCB2                           resb    20
55    .DiskTransferArea:
56    .bCommandLineLength             resb    1
57    .szCommandLine                  resb    127
58endstruc
59
60
61; DOS DTA (Disk Transfer Area)
62struc DTA
63    ; Undocumented fields
64    .reservedAt0h       resb    21
65    ; Documented fields
66    .bFileAttributes    resb    1   ; 15h, Attribute of matching file
67    .wFileTime          resb    2   ; 16h, File time
68    .wFileDate          resb    2   ; 18h, File date
69    .dwFileSize         resb    4   ; 1Ah, File size in bytes
70    .szFile             resb    13  ; 1Eh, ASCIZ filename + extension
71endstruc
72
73
74%endif ; DOS_FUNCTIONS_INC
Note: See TracBrowser for help on using the repository browser.