📄 rxdosdef.asm
字号:
; Attribute bits
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ATTR_NORMAL equ 00h
ATTR_READONLY equ 01h
ATTR_HIDDEN equ 02h
ATTR_SYSTEM equ 04h
ATTR_VOLUME equ 08h
ATTR_DIRECTORY equ 10h
ATTR_ARCHIVE equ 20h
ATTR_SETTABLE equ (ATTR_READONLY + ATTR_HIDDEN + ATTR_SYSTEM + ATTR_ARCHIVE)
ATTR_MASK equ 1Fh
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; Special Characters
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DIRENTRY_NEVERUSED equ 00h
SPECIAL_CHAR equ 05h
DIRENTRY_DELETED equ 0E5h
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Find First/ Find Next ;
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
; See Functions ;
; ;
; _FindFirstFile 4Eh ;
; _FindNextFile 4Fh ;
;...............................................................;
FINDENTRY struc
findSrchDrive db ?
findSrchName db '????????' ; name to search
findSrchExtension db '???'
findSrchAttributes db ?
findDirEntry dw ? ; dir entry (;** Not Double !!)
findDirBegCluster dw ? ; dir beg cluster
findDirCurrCluster dw ? ; dir curr cluster
findCCBPointer dw ? ; ccb pointer
findFileAttribute db ?
findFileTime dw ?
findFileDate dw ?
findFileSize dd ?
findFileName db 13 dup (?) ; null terminated name
FINDENTRY ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; File Tables ;
;...............................................................;
FT struc
nextFTPointer dd ?
numberSFTEntries dw ?
FT ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; System File Tables ;
;...............................................................;
SFT struc
sftRefCount dw ?
sftMode dw ?
sftFileAttrib db ?
sftDevInfo dw ? ; device info
sftDCB dd ? ; file DCB address or driver address
sftBegCluster dw ? ; start address of file
sftTime dw ?
sftDate dw ?
sftFileSize dd ? ; file size
sftFilePosition dd ? ; current offset into file
sftRelCluster dw ? ; relative cluster
sftDirSector dd ? ; absolute address of directory entry
sftDirIndex db ? ; used in search next
sftFileName db '????????'
sftFileExtension db '???'
sftShareSftPointer dd ? ; points to other shared file
sftOwnerMachine dw ? ; virtual machine id #
sftOwnerPSP dw ? ; owner process
sftShareRecordPtr dw ? ; share record pointer
sftCurCluster dw ? ; 0000 if never read/ written
sftIFSDriverPtr dd ? ; IFS Driver pointer
sftVolumeId dd ? ; RxDOS extended information
SFT ends
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; Mode
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sftENTRY_ISFCB equ 8000h ; RxDOS specific
sftDENY_NONE equ 0040h
sftDENY_READ equ 0030h
sftDENY_WRITE equ 0020h
sftEXCLUSIVE equ 0010h
sftNET_FCB equ 0070h
sftWRITE equ 0001h
sftREAD equ 0000h
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; sftDevInfo
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sftShared equ 8000h
sftDateset equ 4000h
sftNoInherit equ 1000h
sftIsDevice equ 0080h
sftWritten equ 0040h ; valid only if NOT Device
sftDrivemask equ 003Fh ; valid only if NOT Device
; --- all of the following have meaning when IsDevice is SET ---
sftDeviceIsRemote equ 8000h ; device is remote
sftIoctl equ 4000h ; ioctl also supported
sftPipe equ 2000h ; is pipe
sftNetworkSpooler equ 0800h ; network spooler
sftEof equ 0040h ; these flags valid only IF IsDevice
sftBinary equ 0020h ; 0 means ASCII
sftSpecial equ 0010h
sftIsclock equ 0008h
sftIsnul equ 0004h
sftIsstdout equ 0002h
sftIsstdin equ 0001h
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; File Control Blocks ;
;...............................................................;
FCB struc
fcbDrive db ?
fcbName db '????????'
fcbExtension db '???'
fcbCurrBlockNo dw ?
fcbRecordSize dw ?
fcbFileSize dd ?
fcbDate dw ?
fcbTime dw ?
fcbSFN db ? ; handle to sft system
fcbFlags db ? ; modified flags
fcbDHD dd ? ; device header/DCB
fcbBegClusterNo dw ? ; start of file cluster number
fcbCurrRecNo db ?
fcbRandomRecNo dd ?
FCB ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Extended FCB Header ;
;...............................................................;
ExtendedFCBHdr struc
extSignature db ?
db '?????'
extAttribute db ?
ExtendedFCBHdr ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Disk I/O Structure ;
;...............................................................;
DISKIO struc
diskioStartSector dd ? ; sector number
diskioSectors dw ? ; # sectors
diskioBuffer dd ? ; buffer pointer
DISKIO ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; System Access Control Block ;
;...............................................................;
DISKACCESS struc
diskAcDrive dw ? ;*
diskAcBegCluster dw ? ;* (cluster #)
diskAcFileSize dd ? ;* file size in bytes
diskAcPosition dd ? ;* read request (access position)
diskAcCurCluster dw ? ;* (cluster #)
diskAcCurSector dd ? ; (LSN #)
diskAcOffAtBegCluster dd ? ;* (file offset )
diskAcOffAtBegBuffer dd ? ; (file offset )
diskAcBufferPtr dd ? ; dynamically assigned
diskAcOptions dw ? ; optimize options
diskAcBytesToRead dw ? ; fast read
DISKACCESS ends
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; Options (options contains ccb_ defines in lower byte)
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DISKAC_OPTIMIZEDWRITE equ 8000h
DISKAC_READBUFFER_ASSIGNED equ 4000h
DISKAC_READ_MULTIPLESECTORS equ 2000h
DISKAC_RESULT_READMULTIPLESECTORS equ 1000h
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Directory Access Block ;
;...............................................................;
DIRACCESS struc
fileAcDrive dw ? ; which drive file is located
fileAcCluster dw ? ; which cluster file is located
fileAcDirCluster dw ? ; which dir cluster
fileAcDirSector dd ? ; which dir sector
fileAcDirOffset dw ? ; offset in directory sector
fileAcBufferPtr dd ? ; pointer to directory buffer
fileAcDevicePtr dd ? ; if device, device driver address
fileAcNameOffset dw ? ; offset in Expanded Name
fileAcExpandedName db 128 dup (?)
DIRACCESS ends
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; Flags for file parsing
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FILEIS_FCB equ 0001h ; file passed is an FCB
FILE_NODEVICENAME equ 0002h ; path may not contain a device name
FILEHAS_WILDCHARS equ 0004h ; path may contain wild characters
FILEHAS_NOFILENAME equ 0008h ; path may not contain filename
FILECANNOT_BEDEFINED equ 0010h ; filename must not exist
FILECANNOT_BEDIRECTORY equ 0020h ; filename cannot be directory
FILEMAY_EXIST equ 0040h ; file may exist (cluster not -1 )
FILE_ORDEVICE equ 0000h ; file or device must exist
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Std Character I/O Redirection Table ;
;...............................................................;
STDREDIREC struc
stdDriverName db '????????' ; driver name
stdIOHandle dw ? ; handle assigned, if any
stdDevInfo dw ? ; device assign bits
STDREDIREC ends
stdRedirec_Aux equ 0
stdRedirec_Con equ 1
stdRedirec_Prn equ 2
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Drive Parameter Block ;
;...............................................................;
DPB struc
_dpbDrive db ? ; logical drive
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -