mirror of
https://github.com/SEPPDROID/DR-DOS-OpenDOS.git
synced 2025-10-22 16:04:20 +00:00
194 lines
6.1 KiB
Plaintext
194 lines
6.1 KiB
Plaintext
; File : $REQUEST.EQU$
|
|
;
|
|
; Description :
|
|
;
|
|
; Original Author : DIGITAL RESEARCH
|
|
;
|
|
; Last Edited By : $CALDERA$
|
|
;
|
|
;-----------------------------------------------------------------------;
|
|
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
|
;
|
|
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
|
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
|
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
|
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
|
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
|
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
|
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
|
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
|
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
|
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
|
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
|
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
|
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
|
; CIVIL LIABILITY.
|
|
;-----------------------------------------------------------------------;
|
|
;
|
|
; *** Current Edit History ***
|
|
; *** End of Current Edit History ***
|
|
;
|
|
; $Log$
|
|
; ENDLOG
|
|
|
|
|
|
P_DSTRUC struc
|
|
dw ?
|
|
REQUEST dd ?
|
|
P_DMA dd ?
|
|
P_DSTRUC ends
|
|
|
|
P_STRUC struc
|
|
dw ? ; saved BP
|
|
REQUEST_OFF dw ? ; request header offset
|
|
REQUEST_SEG dw ? ; request header segment
|
|
P_DMAOFF dw ? ; transfer offset
|
|
P_DMASEG dw ? ; transfer segment
|
|
P_RETRY db ? ; retry count for disk errors
|
|
P_DIRECT db ? ; 0 if DMA deblocking required
|
|
P_ROSCMD db ? ; 2 = read, 3 = write, 4 = verify
|
|
P_SETTLE db ? ; for fast settle on reads
|
|
P_SECTOR db ? ; sector # (0..BPB_SPT-1)
|
|
P_HEAD db ? ; head # (0..BPB_HEADS-1)
|
|
P_CYL dw ? ; cylinder # (0..1023)
|
|
P_COUNT dw ? ; requested sector count
|
|
P_MCNT dw ? ; physical sector count
|
|
P_STRUC ends
|
|
|
|
|
|
|
|
CMD_INIT equ 0 ; Initialize the Device Driver
|
|
CMD_MEDIA_CHECK equ 1 ; Request Media Check
|
|
CMD_BUILD_BPB equ 2 ; Build Drive BPB
|
|
CMD_INPUT_IOCTL equ 3 ; IOCTL input
|
|
CMD_INPUT equ 4 ; Input
|
|
CMD_INPUT_NOWAIT equ 5 ; Non destructive input no wait
|
|
CMD_INPUT_STATUS equ 6 ; Input status
|
|
CMD_INPUT_FLUSH equ 7 ; Input flush
|
|
CMD_OUTPUT equ 8 ; Output
|
|
CMD_OUTPUT_VERIFY equ 9 ; Output with verify
|
|
CMD_OUTPUT_STATUS equ 10 ; Output status
|
|
CMD_OUTPUT_FLUSH equ 11 ; Output flush
|
|
CMD_OUTPUT_IOCTL equ 12 ; IOCTL output
|
|
CMD_DEVICE_OPEN equ 13 ; Device OPEN
|
|
CMD_DEVICE_CLOSE equ 14 ; Device CLOSE
|
|
CMD_FIXED_MEDIA equ 15 ; Removeable Media Check
|
|
CMD_GENERIC_IOCTL equ 19 ; Generic IOCTL
|
|
CMD_GET_DEVICE equ 23 ; Get the Logical Device
|
|
CMD_SET_DEVICE equ 24 ; Set the Logical Device
|
|
CMD_QUERY_IOCTL equ 25 ; query ioctl support
|
|
|
|
; Generic Request Header Format
|
|
|
|
RH_LEN equ byte ptr 0
|
|
RH_UNIT equ byte ptr 1
|
|
RH_CMD equ byte ptr 2
|
|
RH_STATUS equ word ptr 3
|
|
RHS_DONE equ 0100h
|
|
RHS_BUSY equ 0200h
|
|
RHS_IC equ 0400h ; Interim Character
|
|
RHS_RM equ 0800h
|
|
RHS_ERROR equ 8000h
|
|
|
|
;******
|
|
;* No longer safe to use - some device drivers trample on them....
|
|
;*
|
|
;* RH_STRATEGY equ dword ptr 5 ; Device Strategy Routine
|
|
;* RH_STRATOFF equ word ptr 5 ; Strategy Offset
|
|
;* RH_STRATSEG equ word ptr 7 ; Strategy Segment
|
|
;* RH_INTERRUPT equ dword ptr 9 ; Device Interrupt Routine
|
|
;* RH_INTOFF equ word ptr 9 ; Intterupt Offset
|
|
;* RH_INTSEG equ word ptr 11 ; Interrupt Segment
|
|
;*****
|
|
|
|
; Request header for initialization
|
|
|
|
RH0_NUNITS equ byte ptr 13
|
|
RH0_RESIDENT equ word ptr 14
|
|
RH0_BPBOFF equ word ptr 18
|
|
RH0_BPBSEG equ word ptr 20
|
|
RH0_DRIVE equ byte ptr 22
|
|
RH0_LEN equ 22
|
|
|
|
; Request header for media check
|
|
|
|
RH1_MEDIA equ byte ptr 13 ; BDOS: current media byte
|
|
RH1_RETURN equ byte ptr 14 ; driver: return code (00, 01, FF)
|
|
RH1_VOLID equ dword ptr 15 ; driver: volume label address
|
|
RH1_LEN equ 15
|
|
|
|
; Request header for "build BPB"
|
|
|
|
RH2_MEDIA equ byte ptr 13 ; BDOS or driver?
|
|
RH2_BUFFER equ dword ptr 14 ; BDOS: scratch buffer for driver use
|
|
RH2_BPB equ dword ptr 18 ; same as the following:
|
|
RH2_BPBOFF equ word ptr 18 ; driver: address of new BPB
|
|
RH2_BPBSEG equ word ptr 20
|
|
RH2_LEN equ 24
|
|
|
|
; Request header for input/output
|
|
|
|
RH4_MEDIA equ byte ptr 13 ; BDOS: current media byte
|
|
RH4_RIC equ byte ptr 13 ; BDOS: Return Interim Char flg
|
|
RH4_BUFFER equ dword ptr 14 ; BDOS: disk transfer address
|
|
RH4_BUFOFF equ word ptr 14 ; BDOS: Buffer Offset
|
|
RH4_BUFSEG equ word ptr 16 ; BDOS: Buffer Segment
|
|
RH4_COUNT equ word ptr 18 ; BDOS: sector count
|
|
RH4_SECTOR equ word ptr 20 ; BDOS: starting sector
|
|
RH4_VOLID equ dword ptr 22 ; driver: volume if illegal disk change
|
|
RH4_BIGSECTOR equ dword ptr 26
|
|
RH4_BIGSECTORLO equ word ptr 26
|
|
RH4_BIGSECTORHI equ word ptr 28
|
|
|
|
RH4_LEN equ 30
|
|
|
|
; Request Header for Non-Destructive Input
|
|
|
|
RH5_CHAR equ byte ptr 13 ; Character Read from Device
|
|
RH5_RIC equ byte ptr 13 ; BDOS: Return Interim Char flg
|
|
RH5_LEN equ 14
|
|
|
|
; Request Header for Device Open
|
|
|
|
RH13_LEN equ 13
|
|
|
|
; Request Header for Device Close
|
|
|
|
RH14_LEN equ 13
|
|
|
|
; Request header for generic IOCTL
|
|
|
|
RH19_CATEGORY equ word ptr 13 ; BDOS: major/minor function number
|
|
RH19_MAJOR equ byte ptr 13 ; BDOS: Major Function Number
|
|
RH19_MINOR equ byte ptr 14 ; BDOS: Minor Function Number
|
|
RH19_SI equ word ptr 15 ; BDOS: User SI
|
|
RH19_DI equ word ptr 17 ; BDOS: User DI
|
|
RH19_GENPB equ dword ptr 19 ; BDOS: extra parameters
|
|
RH19_LEN equ 23
|
|
|
|
RQ19_SET equ 40h ; set device parameters
|
|
RQ19_GET equ 60h ; get device parameters
|
|
RQ19_WRITE equ 41h ; write tracks
|
|
RQ19_READ equ 61h ; read tracks
|
|
RQ19_FORMAT equ 42h ; format tracks
|
|
RQ19_VERIFY equ 62h ; verify tracks
|
|
RQ19_SETMEDIA equ 46h ; set media ID
|
|
RQ19_GETMEDIA equ 66h ; get media ID
|
|
|
|
RQ19_PRP_START equ 4Ch ; start of codepage prepare
|
|
RQ19_PRP_END equ 4Dh ; end of codepage prepare
|
|
RQ19_SELECT equ 4Ah ; select code page
|
|
RQ19_QRY_SEL equ 6Ah ; query selected code page
|
|
RQ19_QRY_PRP equ 6Bh ; query prepared code page(s)
|
|
RQ19_DSP_SET equ 5Fh ; set display information
|
|
RQ19_DSP_GET equ 7Fh ; get display information
|
|
|
|
; Request header for get/set drive
|
|
|
|
RH24_CMD equ byte ptr 14 ; BDOS: Command Code
|
|
RH24_STATUS equ word ptr 15 ; BDOS: Status
|
|
RH24_RESVD equ dword ptr 17 ; BDOS: Reserved
|
|
RH24_LEN equ 21
|
|
|
|
RH_SIZE equ 30 ; maximum size of request header
|