add directory study
This commit is contained in:
86
study/sabre/os/files/Executables/SYS.txt
Normal file
86
study/sabre/os/files/Executables/SYS.txt
Normal file
@@ -0,0 +1,86 @@
|
||||
===========================================================================
|
||||
From: BRIAN FRASER Refer#: NONE
|
||||
To: MATHIEU BOUCHARD Recvd: NO
|
||||
Subj: .SYS format. Conf: (99) 80xxxProgr
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Main Header:
|
||||
|
||||
00h word - Link to next driver, offset
|
||||
02h word - Link to next driver, segment
|
||||
04h word - Device Attribute
|
||||
06h word - Strategy entry point, offset
|
||||
0ah word - interrupt entry point, offset
|
||||
-- Character device --
|
||||
0ch 8 bytes - Logical Name
|
||||
-- Block device --
|
||||
0ch byte - Number of units
|
||||
|
||||
|
||||
Header Attribute word:
|
||||
bit 15 - 1= Character device; 0= Block device
|
||||
bit 14 - 1= IOCTL read and write supported
|
||||
-- Character device --
|
||||
bit 13 - 1= Output until busy supported
|
||||
-- Block device --
|
||||
bit 13 - 1= Check BIOS to determine media characteristics; 0= Media ID
|
||||
should be used instead
|
||||
bit 12 - should be 0
|
||||
bit 11 - 1= if open/close/removable media supported
|
||||
bit 7-10 - 0
|
||||
bit 6 - 1= if generic IOCTL and get/set logical drive supported
|
||||
bit 5 - 0
|
||||
bit 4 - 1= if CON driver and int 29h fast-output supported
|
||||
bit 3 - 1= if current CLOCK$ device
|
||||
bit 2 - 1= if current NULL device
|
||||
-- Character device --
|
||||
bit 1 - 1= if standard output device (stdout)
|
||||
-- Block device --
|
||||
bit 1 - 1= if 32bit sector addressing supported
|
||||
bit 0 - 1= if current standard input device (stdin)
|
||||
|
||||
|
||||
Strategy Request Header:
|
||||
00h byte - length of request header
|
||||
01h byte - unit number for this request
|
||||
02h byte - request headers command code
|
||||
03h word - drivers return status
|
||||
05h 8 bytes - ? (reserved)
|
||||
|
||||
The rest of the header varies depending on what function is being called.
|
||||
|
||||
I would think it's best to find a book, as I don't really want to type out all
|
||||
the different headers for each function. :)
|
||||
|
||||
This book I am using is Advanced MS-DOS, Second Ed. Provided, it's a little out
|
||||
of date, but alot of the information is still the same. Plus, I got it for 8
|
||||
bucks.. Can't complain for that price! :) Check out the book list.
|
||||
|
||||
|
||||
Heres just a little info on what the above headers are for...
|
||||
|
||||
There are two different kinds of device drivers. Character, and Block.
|
||||
Character devices handle 1 character at a time, while Block devices deal with
|
||||
Blocks of data. Character devices can have a logical name like "MYSYS", which
|
||||
can be used like "CON" or "PRN" etc.. Block devices use units (drives), which
|
||||
are assigned upon install.
|
||||
|
||||
The Main Header is the first few bytes of the SYS file, The link to next driver
|
||||
is to be -1:-1 (or FFFF:FFFF) unless there is more then one driver in this SYS
|
||||
file, then you set this to the next driver in the chain. BUT, the last driver
|
||||
must have FFFF:FFFF as the next driver, or you have big problems! :)
|
||||
|
||||
The Device attribute is fairly strate forward.
|
||||
|
||||
The strategy routine is a routine that is called my DOS with the address of the
|
||||
Request Header. All this routine has to do is save the address in a local
|
||||
memory location.
|
||||
|
||||
The interrupt routine is then called after the strategy routine. The interrupt
|
||||
routine process the request header, and performs the requested function, and
|
||||
returns.
|
||||
|
||||
If you can't find a book.. Maybe I'll type out the return attributes, and the
|
||||
info for each function.
|
||||
|
||||
Brian
|
||||
Reference in New Issue
Block a user