⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rxdosdef.asm

📁 dos source
💻 ASM
📖 第 1 页 / 共 5 页
字号:
_dpbUnit                db ?                            ; logical unit
_dpbBytesPerSector      dw ?
_dpbClusterSizeMask     db ?
_dpbClusterSizeShift    db ?
_dpbFirstFAT            dw ?
_dpbNumCopiesFAT        db ?
_dpbMaxAllocRootDir     dw ?
_dpbFirstDataSector     dw ?
_dpbMaxClusterNumber    dw ?

_dpbSectorsPerFat       dw ?                            ; in DOS ver 5 this became a word
_dpbFirstDirSector      dw ?
_dpbptrDeviceDriver     dd ?
_dpbMediaDescriptor     db ?
_dpbAccessFlag          db ?                            ; -1 if must be rebuilt
_dpbNextDPB             dd ?
_dpbNextFree            dw ?                            ; cluster where to search for next free
_dpbFreeCount           dw ?                            ; number of free clusters remaining
_dpbVolumeId            dd ?                            ; RxDOS extended information

        DPB ends

        ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
        ;  BIOS Parameter Block                                         ;
        ;...............................................................;

        BPB struc

_bpbBytesPerSector      dw ?
_bpbSectorsPerCluster   db ?
_bpbResSectors          dw ?
_bpbNumCopiesFAT        db ?
_bpbMaxAllocRootDir     dw ?
_bpbMaxSectors          dw ?                            ; if zero, see huge sectors
_bpbMediaDescriptor     db ?                            ; device media id
_bpbSectorsPerFat       dw ?
_bpbSectorsPerTrack     dw ?
_bpbHeads               dw ?
_bpbHiddenSectors       dd ?
_bpbHugeSectors         dd ?

        BPB ends

        ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
        ;  Boot Sector Parameter Block                                  ;
        ;...............................................................;

        BOOTSECTOR struc

_bsJump                 db 3 dup(?)
_bsOemName              db 8 dup(?)
_bsBytesPerSector       dw ?                            ; (start of BPB)
_bsSectorsPerCluster    db ?
_bsResSectors           dw ?
_bsNumCopiesFAT         db ?
_bsMaxAllocRootDir      dw ?
_bsMaxSectors           dw ?                            ; if zero, see huge sectors
_bsMediaDescriptor      db ?
_bsSectorsPerFat        dw ?
_bsSectorsPerTrack      dw ?
_bsHeads                dw ?
_bsHiddenSectors        dd ?
_bsHugeSectors          dd ?                            ; (end of BPB)

_bsDriveNumber          db ?
                        db ?
_bsBootSignature        db ?                            ; 29h if extended boot sector
_bsVolumeId             dd ?
_bsVolumeLabel          db 11 dup(?)                    ; not same as DOS Volume Id
_bsFileSystemType       db 8 dup(?)

        BOOTSECTOR ends

        ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
        ;  Partition Table Record                                       ;
        ;...............................................................;

        PARTITION struc

_ptBootable             db ?                            ; 80h = bootable, 00h = nonbootable
_ptBeginHead            db ?                            ; begin head address
_ptBeginSector          db ?                            ; begin sector address
_ptBeginCylinder        db ?                            ; begin cylinder address
_ptFileSystemName       db ?                            ; file system identifier (see below)
_ptEndHead              db ?                            ; end head address
_ptEndSector            db ?                            ; end sector address
_ptEndCylinder          db ?                            ; end cylinder address
_ptStartSector          dd ?                            ; start sector (relative to beg of disk)
_ptSectors              dd ?                            ; number of sectors in partition

        PARTITION ends

;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
;  File System ID Codes
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

FILESYSID_12FAT         equ 01h                         ; 12-bit FAT (max 10 MBytes)
FILESYSID_16FAT         equ 04h                         ; 16-bit FAT (max 32 MBytes)
FILESYSID_EXTENDED      equ 05h                         ; Extended DOS partition
FILESYSID_LARGE16FAT    equ 06h                         ; 16-bit FAT (greater than 32 MBytes)

RxDOS_PARTITIONSIGNATURE equ 0AA55h

        ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
        ;  Device Parameter Block                                       ;
        ;...............................................................;

        DEVPB struc

_dpSpecialFunc          db ?
_dpDevType              db ?                            ; device type
_dpDevAttr              dw ?                            ; device attributes
_dpCylinders            dw ?                            ; number of cylinders
_dpMediaType            db ?                            ; media type

      ; always followed by a BPB

        DEVPB ends

        ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
        ;  Current Directory Entries                                    ;
        ;...............................................................;

        CDS struc

_cdsActualDirectory     db 67 dup (?)                   ; asciz name
_cdsFlags               dw ?
_cdsPtrToDPB            dd ?
_cdsStartClusterDir     dw ?                            ; 
                        dw ?                            ; padding for network record
_cdsNetwParameter       dw ?                            ; padding for network record
_cdsNonSubstOffset      dw ?

                        db ?                            ; compatability byte
_cdsPtrtoIFSDriver      dd ?
                        dw ?                            ; compatability word

        CDS ends

;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;  Redirection for IFS
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

_cdsRedirectIFSPtr      equ _cdsStartClusterDir

;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;  Flags
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

_CDS_NETWORKEDDRIVE     equ 8000h
_CDS_PHYSICALDRIVE      equ 4000h
_CDS_JOINEDDRIVE        equ 2000h
_CDS_SUBSTDRIVE         equ 1000h
_CDS_NONETLISTING       equ 0080h

        ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
        ;  Memory Management Blocks                                     ;
        ;...............................................................;

        MEMBLOCK struc

_memSignature           db ?                            ; always 4D
_memParent              dw ?                            ; seg address of owner
_memAlloc               dw ?                            ; allocated size
_memReserved            db '???'
_memPgmName             db 8 dup (?)                    ; program name or null

        MEMBLOCK ends

_RxDOS_MEMSIGNATURE     equ 4Dh
_RxDOS_ENDSIGNATURE     equ 5Ah
_RxDOS_PARENT_SIGNATURE equ 0008h                       ; mem parent signature
_RxDOS_FREE_MEMBLOCK    equ 0000h                       ; mem block is free
_RxDOS_HIGHMEMBLOCK     equ 0A000h - 1                  ; start mem block for high mem

_MIN_RxDOS_ALLOC_PARAS  equ 2

_MEM_FIRSTFIT_STRATEGY  equ 0003h                       ; masks for allocation test
_MEM_BESTFIT_STRATEGY   equ 0001h
_MEM_LASTFIT_STRATEGY   equ 0002h

_MEM_FIRSTFIT_LOW       equ 0000h                       ; strategy requests
_MEM_BESTFIT_LOW        equ 0001h
_MEM_LASTFIT_LOW        equ 0002h

_MEM_FIRSTFIT_HIGH      equ 0080h
_MEM_BESTFIT_HIGH       equ 0081h
_MEM_LASTFIT_HIGH       equ 0082h

_MEM_FIRSTFIT_HIGHONLY  equ 0040h
_MEM_BESTFIT_HIGHONLY   equ 0041h
_MEM_LASTFIT_HIGHONLY   equ 0042h

        ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
        ;  Buffers (Cache) Block                                        ;
        ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
        ;                                                               ;
        ;  Compatability note:                                          ;
        ;                                                               ;
        ;  This buffer's definition is slightly different from MSDOS    ;
        ;  but appears to function in exactly the same way.             ;
        ;                                                               ;
        ;...............................................................;

        CCB struc

ccbNext                 dw ?                            ; next cache control block 
ccbPrev                 dw ?                            ; prev cache control block 
ccbDrive                db ?                            ; drive
ccbStatus               db ?                            ; status flags
ccbLBN                  dd ?                            ; block number (sector)
ccbNumCopies            db ?                            ; number of FAT copies (*)
ccbSectorOffsets        dw ?                            ; offset between FAT sectors (*)
ccbDPB                  dd ?                            ; pointer to drive parameter block
ccbCount                dw ?                            ; count if remote
ccbSFTIdent             db ?                            ; system sft Handle (*)
ccbData                 db 512 dup ( ? )                ; data
                                                        ; (*) unused by RxDOS

        CCB ends

ccbChecksum             equ ccbSectorOffsets            ; checksum protection

;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;  Flags
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

ccb_isONHOLD            equ 01h                         ; used internally
ccb_isFAT               equ 02h
ccb_isDIR               equ 04h
ccb_isDATA              equ 08h
ccb_isVALID             equ 20h                         ; contains valid data 
ccb_isDIRTY             equ 40h
ccb_isREMOTE            equ 80h

        ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
        ;  Program Segment Prefix (PSP)                                 ;
        ;...............................................................;

        PSP struc

pspInt20                dw ?                            ; Int 20 instruction
pspNextParagraph        dw ?                            ; seg address of next paragraph
                        db ?                            ; not used
pspDispatcher           db   5 dup ( ? )                ; long call to MS-DOS
pspTerminateVect        dd ?                            ; Terminate Vector (Int 22h)
pspControlCVect         dd ?                            ; Control-C Vector (Int 23h)
pspCritErrorVect        dd ?                            ; CritError Vector (Int 24h)
pspParentId             dw ?                            ; PSP seg of parent
pspHandleTable          db  20 dup ( ? )                ; Allocated Handle Table
pspEnvironment          dw ?                            ; seg address of environment block
pspUserStack            dd ?                            ; user stack
pspFileHandleCount      dw ?                            ; handles allocated
pspFileHandlePtr        dd ?                            ; pointer to handle table
pspShareChain           dd ?                            ; Share chain pointer
                        db   4 dup ( ? )                ; unused

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -