summaryrefslogtreecommitdiff
path: root/v4.0/src/DEV/SMARTDRV/DEVSYM.ASM
diff options
context:
space:
mode:
authorGravatar Mark Zbikowski2024-04-25 21:24:10 +0100
committerGravatar Microsoft Open Source2024-04-25 22:32:27 +0000
commit2d04cacc5322951f187bb17e017c12920ac8ebe2 (patch)
tree80ee017efa878dfd5344b44249e6a241f2a7f6e2 /v4.0/src/DEV/SMARTDRV/DEVSYM.ASM
parentMerge pull request #430 from jpbaltazar/typoptbr (diff)
downloadms-dos-main.tar.gz
ms-dos-main.tar.xz
ms-dos-main.zip
MZ is back!HEADmain
Diffstat (limited to 'v4.0/src/DEV/SMARTDRV/DEVSYM.ASM')
-rw-r--r--v4.0/src/DEV/SMARTDRV/DEVSYM.ASM128
1 files changed, 128 insertions, 0 deletions
diff --git a/v4.0/src/DEV/SMARTDRV/DEVSYM.ASM b/v4.0/src/DEV/SMARTDRV/DEVSYM.ASM
new file mode 100644
index 0000000..44a1ab8
--- /dev/null
+++ b/v4.0/src/DEV/SMARTDRV/DEVSYM.ASM
@@ -0,0 +1,128 @@
1BREAK <Device table and SRH definition>
2
3; The device table list has the form:
4SYSDEV STRUC
5SDEVNEXT DD ? ;Pointer to next device header
6SDEVATT DW ? ;Attributes of the device
7SDEVSTRAT DW ? ;Strategy entry point
8SDEVINT DW ? ;Interrupt entry point
9SDEVNAME DB 8 DUP (?) ;Name of device (only first byte used for block)
10SYSDEV ENDS
11
12;
13; Attribute bit masks
14;
15; Character devices:
16;
17; Bit 15 -> must be 1
18; 14 -> 1 if the device understands IOCTL control strings
19; 13 -> 1 if the device supports output-until-busy
20; 12 -> unused
21; 11 -> 1 if the device understands Open/Close
22; 10 -> must be 0
23; 9 -> must be 0
24; 8 -> unused
25; 7 -> unused
26; 6 -> unused
27; 5 -> unused
28; 4 -> 1 if device is recipient of INT 29h
29; 3 -> 1 if device is clock device
30; 2 -> 1 if device is null device
31; 1 -> 1 if device is console output
32; 0 -> 1 if device is console input
33;
34; Block devices:
35;
36; Bit 15 -> must be 0
37; 14 -> 1 if the device understands IOCTL control strings
38; 13 -> 1 if the device determines media by examining the FAT ID byte.
39; This requires the first sector of the fat to *always* reside in
40; the same place.
41; 12 -> unused
42; 11 -> 1 if the device understands Open/Close/removable media
43; 10 -> must be 0
44; 9 -> must be 0
45; 8 -> unused
46; 7 -> unused
47; 6 -> unused
48; 5 -> unused
49; 4 -> unused
50; 3 -> unused
51; 2 -> unused
52; 1 -> unused
53; 0 -> unused
54
55DevTyp EQU 8000H ; Bit 15 - 1 if Char, 0 if block
56CharDev EQU 8000H
57DevIOCtl EQU 4000H ; Bit 14 - CONTROL mode bit
58ISFATBYDEV EQU 2000H ; Bit 13 - Device uses FAT ID bytes,
59 ; comp media.
60OutTilBusy EQU 2000h ; Output until busy is enabled
61ISNET EQU 1000H ; Bit 12 - 1 if a NET device, 0 if
62 ; not. Currently block only.
63DEVOPCL EQU 0800H ; Bit 11 - 1 if this device has
64 ; OPEN,CLOSE and REMOVABLE MEDIA
65 ; entry points, 0 if not
66
67EXTENTBIT EQU 0400H ; Bit 10 - Currently 0 on all devs
68 ; This bit is reserved for future use
69 ; to extend the device header beyond
70 ; its current form.
71
72; NOTE Bit 9 is currently used on IBM systems to indicate "drive is shared".
73; See IOCTL function 9. THIS USE IS NOT DOCUMENTED, it is used by some
74; of the utilities which are supposed to FAIL on shared drives on server
75; machines (FORMAT,CHKDSK,RECOVER,..).
76
77ISSPEC EQU 0010H ;Bit 4 - This device is special
78ISCLOCK EQU 0008H ;Bit 3 - This device is the clock device.
79ISNULL EQU 0004H ;Bit 2 - This device is the null device.
80ISCOUT EQU 0002H ;Bit 1 - This device is the console output.
81ISCIN EQU 0001H ;Bit 0 - This device is the console input.
82
83;Static Request Header
84SRHEAD STRUC
85REQLEN DB ? ;Length in bytes of request block
86REQUNIT DB ? ;Device unit number
87REQFUNC DB ? ;Type of request
88REQSTAT DW ? ;Status Word
89 DB 8 DUP(?) ;Reserved for queue links
90SRHEAD ENDS
91
92;Status word masks
93STERR EQU 8000H ;Bit 15 - Error
94STBUI EQU 0200H ;Bit 9 - Buisy
95STDON EQU 0100H ;Bit 8 - Done
96STECODE EQU 00FFH ;Error code
97
98;Function codes
99DEVINIT EQU 0 ;Initialization
100DINITHL EQU 26 ;Size of init header
101DEVMDCH EQU 1 ;Media check
102DMEDHL EQU 15 ;Size of media check header
103DEVBPB EQU 2 ;Get BPB
104DEVRDIOCTL EQU 3 ;IOCTL read
105DBPBHL EQU 22 ;Size of Get BPB header
106DEVRD EQU 4 ;Read
107DRDWRHL EQU 22 ;Size of RD/WR header
108DEVRDND EQU 5 ;Non destructive read no wait (character devs)
109DRDNDHL EQU 14 ;Size of non destructive read header
110DEVIST EQU 6 ;Input status
111DSTATHL EQU 13 ;Size of status header
112DEVIFL EQU 7 ;Input flush
113DFLSHL EQU 15 ;Size of flush header
114DEVWRT EQU 8 ;Write
115DEVWRTV EQU 9 ;Write with verify
116DEVOST EQU 10 ;Output status
117DEVOFL EQU 11 ;Output flush
118DEVWRIOCTL EQU 12 ;IOCTL write
119DEVOPN EQU 13 ;Device open
120DEVCLS EQU 14 ;Device close
121DOPCLHL EQU 13 ;Size of OPEN/CLOSE header
122DEVRMD EQU 15 ;Removable media
123REMHL EQU 13 ;Size of Removable media header
124
125DevOUT EQU 16 ; output until busy.
126DevOutL EQU DevWrt ; length of output until busy
127
128SUBTTL