* SMS2 - Memory block
*
* This file - SMS6_in - contains the memory block table definitions
*
          nolist

sbt_stat  equ    $00  (byte)        drive id / status byte - see below
sbt_phys  equ    $01  (byte)        physical sector on drive
sbt_prio  equ    $01  (byte)        block priority
sbt_phyg  equ    $02  (word)        physical group on drive
sbt_sect  equ    $02  (word)        sector number (microdrive*2)
*
sbt_filn  equ    $04  (word)        file number (microdrive)   } logical
sbt_blok  equ    $06  (word)        block number (microdrive)  } location
sbt_end   equ    $08
*
* the most significant 4 bits of the status byte contain the pointer
* to the physical device block sys_fsdd, the least significant are the
* status codes:
*
sbt.unav  equ    %00000000          block is unavailable to file system
sbt.mpty  equ    %00000001          block is empty
*
sbt.read  equ    %00001001          block required to be read from microdrive
*
sbt.true  equ    %00000011          block is a true representation of file
sbt.veri  equ    %00001011          block is awaiting verify
sbt.writ  equ    %00000111          block is updated
*
*         status code masks
*
sbt.driv  equ    %11110001+$ffffff00     mask of pointer to drive
sbt.drvv  equ    %11110011+$ffffff00     mask of drive valid bits
sbt.stat  equ    %00001111          mask of status bits
bt.actn   equ    %00001100          check for read or write request
bt.inuse  equ    %00001110          check if a file block in use
*
*         bits of status codes
*
sbt..fsb  equ    0                  1 if a file block
sbt..vld  equ    1                  1 if contents may be accessed
sbt..wrq  equ    2                  1 if block required to be written
sbt..rrq  equ    3                  1 if block required to be read / verified

          list
