diff options
| author | 2024-04-25 21:24:10 +0100 | |
|---|---|---|
| committer | 2024-04-25 22:32:27 +0000 | |
| commit | 2d04cacc5322951f187bb17e017c12920ac8ebe2 (patch) | |
| tree | 80ee017efa878dfd5344b44249e6a241f2a7f6e2 /v4.0/src/DEV/SMARTDRV/DEVSYM.ASM | |
| parent | Merge pull request #430 from jpbaltazar/typoptbr (diff) | |
| download | ms-dos-main.tar.gz ms-dos-main.tar.xz ms-dos-main.zip | |
Diffstat (limited to 'v4.0/src/DEV/SMARTDRV/DEVSYM.ASM')
| -rw-r--r-- | v4.0/src/DEV/SMARTDRV/DEVSYM.ASM | 128 |
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 @@ | |||
| 1 | BREAK <Device table and SRH definition> | ||
| 2 | |||
| 3 | ; The device table list has the form: | ||
| 4 | SYSDEV STRUC | ||
| 5 | SDEVNEXT DD ? ;Pointer to next device header | ||
| 6 | SDEVATT DW ? ;Attributes of the device | ||
| 7 | SDEVSTRAT DW ? ;Strategy entry point | ||
| 8 | SDEVINT DW ? ;Interrupt entry point | ||
| 9 | SDEVNAME DB 8 DUP (?) ;Name of device (only first byte used for block) | ||
| 10 | SYSDEV 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 | |||
| 55 | DevTyp EQU 8000H ; Bit 15 - 1 if Char, 0 if block | ||
| 56 | CharDev EQU 8000H | ||
| 57 | DevIOCtl EQU 4000H ; Bit 14 - CONTROL mode bit | ||
| 58 | ISFATBYDEV EQU 2000H ; Bit 13 - Device uses FAT ID bytes, | ||
| 59 | ; comp media. | ||
| 60 | OutTilBusy EQU 2000h ; Output until busy is enabled | ||
| 61 | ISNET EQU 1000H ; Bit 12 - 1 if a NET device, 0 if | ||
| 62 | ; not. Currently block only. | ||
| 63 | DEVOPCL EQU 0800H ; Bit 11 - 1 if this device has | ||
| 64 | ; OPEN,CLOSE and REMOVABLE MEDIA | ||
| 65 | ; entry points, 0 if not | ||
| 66 | |||
| 67 | EXTENTBIT 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 | |||
| 77 | ISSPEC EQU 0010H ;Bit 4 - This device is special | ||
| 78 | ISCLOCK EQU 0008H ;Bit 3 - This device is the clock device. | ||
| 79 | ISNULL EQU 0004H ;Bit 2 - This device is the null device. | ||
| 80 | ISCOUT EQU 0002H ;Bit 1 - This device is the console output. | ||
| 81 | ISCIN EQU 0001H ;Bit 0 - This device is the console input. | ||
| 82 | |||
| 83 | ;Static Request Header | ||
| 84 | SRHEAD STRUC | ||
| 85 | REQLEN DB ? ;Length in bytes of request block | ||
| 86 | REQUNIT DB ? ;Device unit number | ||
| 87 | REQFUNC DB ? ;Type of request | ||
| 88 | REQSTAT DW ? ;Status Word | ||
| 89 | DB 8 DUP(?) ;Reserved for queue links | ||
| 90 | SRHEAD ENDS | ||
| 91 | |||
| 92 | ;Status word masks | ||
| 93 | STERR EQU 8000H ;Bit 15 - Error | ||
| 94 | STBUI EQU 0200H ;Bit 9 - Buisy | ||
| 95 | STDON EQU 0100H ;Bit 8 - Done | ||
| 96 | STECODE EQU 00FFH ;Error code | ||
| 97 | |||
| 98 | ;Function codes | ||
| 99 | DEVINIT EQU 0 ;Initialization | ||
| 100 | DINITHL EQU 26 ;Size of init header | ||
| 101 | DEVMDCH EQU 1 ;Media check | ||
| 102 | DMEDHL EQU 15 ;Size of media check header | ||
| 103 | DEVBPB EQU 2 ;Get BPB | ||
| 104 | DEVRDIOCTL EQU 3 ;IOCTL read | ||
| 105 | DBPBHL EQU 22 ;Size of Get BPB header | ||
| 106 | DEVRD EQU 4 ;Read | ||
| 107 | DRDWRHL EQU 22 ;Size of RD/WR header | ||
| 108 | DEVRDND EQU 5 ;Non destructive read no wait (character devs) | ||
| 109 | DRDNDHL EQU 14 ;Size of non destructive read header | ||
| 110 | DEVIST EQU 6 ;Input status | ||
| 111 | DSTATHL EQU 13 ;Size of status header | ||
| 112 | DEVIFL EQU 7 ;Input flush | ||
| 113 | DFLSHL EQU 15 ;Size of flush header | ||
| 114 | DEVWRT EQU 8 ;Write | ||
| 115 | DEVWRTV EQU 9 ;Write with verify | ||
| 116 | DEVOST EQU 10 ;Output status | ||
| 117 | DEVOFL EQU 11 ;Output flush | ||
| 118 | DEVWRIOCTL EQU 12 ;IOCTL write | ||
| 119 | DEVOPN EQU 13 ;Device open | ||
| 120 | DEVCLS EQU 14 ;Device close | ||
| 121 | DOPCLHL EQU 13 ;Size of OPEN/CLOSE header | ||
| 122 | DEVRMD EQU 15 ;Removable media | ||
| 123 | REMHL EQU 13 ;Size of Removable media header | ||
| 124 | |||
| 125 | DevOUT EQU 16 ; output until busy. | ||
| 126 | DevOutL EQU DevWrt ; length of output until busy | ||
| 127 | |||
| 128 | SUBTTL | ||