Subversion Repositories MB01 Project

Rev

Blame | Last modification | View Log | Download | RSS feed


.IFNDEF         __FAT_INC__
__FAT_INC__     .SET    1

        .LIST on

        .INCLUDE INC\LDT.INC

CLSBUF          .EQU    $100    ; dma buffer of cluster cache
CLSMAXSIZ       .EQU    64      ; max. size of cluster in sector's

;---------------------------------------------------------------------------  
; FAT Working Segment
;--------------------------------------------------------------------------- 

FATSEG          .EQU    $010000
FATBNK          .EQU    .SEG.FATSEG     ; FAT working bank

FS              .SET    FATSEG
FE              .SET    FATSEG + $FFFF
FO              .SET    $018C00

_FATS:  .SECTION ref_only, common, offset FO, range FS FE ;FAT Segment
_FATS_START     .DS     0

_pbr0           .DS     512
_pbr1           .DS     512
_pbr2           .DS     512
_pbr3           .DS     512

_FATS_END       .DS     0
FATSSIZ         .EQU    (_FATS_END - _FATS_START)
.ENDS

;---------------------------------------------------------------------------
; direct page for LDT tables (P0LDT direct page) 
;---------------------------------------------------------------------------

_DPLDT: .SECTION page0, common, ref_only, offset 0      ;LDT D.P.

ldt0            .DS     LDTSIZE
ldt1            .DS     LDTSIZE
ldt2            .DS     LDTSIZE
ldt3            .DS     LDTSIZE
ldt4            .DS     LDTSIZE
ldt5            .DS     LDTSIZE

_DPLDT_END      .DS     0

.ENDS


;---------------------------------------------------------------------------
; FAT var's direct page (P0FAT direct page)
;---------------------------------------------------------------------------

_DPFAT: .SECTION page0, common, ref_only, offset 0      ;FAT D.P.

ldtfg1          .DB             ; logical volume flag's
                                ; <7>: device ready (fdc drive or ata device)
                                ; <6>: if=1->HD/CF else->FD
                                ; <0>: phisycal device number

ldtfg2          .DB             ; <7>: valid volume (fat volume or cbm disk)
                                ; <6>: if=1->FAT else->CBM (FD only)
                                ; <5>: disk format checked
                                ; <1:0>: disk format (fdc only)

ldtroot         .DW             ; lba of root dir
ldtfat1         .DW             ; lba of fat1 table
ldtfat2         .DW             ; lba of fat2 table
ldtcls          .DW             ; lba of first data cluster
ldtmax          .DW             ; max usable cluster + 1
ldtrent         .DW             ; root dir. max. entries
ldtcent         .DW             ; max. entries in dir. cluster
ldteoc          .DW             ; end of cluster chain marker
ldtfree         .DW             ; count of free cluster's
ldtnxt          .DW             ; next free cluster
ldtfsiz         .DW             ; fat table size

ldtcsiz         .DB             ; cluster size (1,2,4,8,16,32,64)
ldtcshf         .DB             ; cluster shift (0,1,2,3,4,5,6)
ldtrsiz         .DB             ; root dir. size (sector's)
ldtmcls         .DB             ; mask for clust. module: 00,01,03,07,0F,1F,3F
ldtcdlp         .DW             ; current working dir list pointer
ldtcdcls        .DW             ; current working dir start cluster
ldtcdlvl        .DB             ; current working dir level count

; ---------------------------

curldt          .DB             ; pointer to current LDT
ldtp            .DS     6       ; LDT's pointer
defdrv          .DB             ; default logical drive
curdrv          .DB             ; current logical drive

lba             .LWORD          ; current lba
wseccnt         .DW             ; sector count

defhsec         .DB             ; default hidden sector's in fdisk
pdrive          .DB             ; phisycal drive number (temp.)

_fattmp         .DS     48

.ENDS

        .LIST off               

.ENDIF