|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmce.sim.cpm.FCB
public class FCB
This class rappresent a CP/M FCB (Directory file control block.)
Directory File Control block Space in CP/M is allocated in 128 byte block called record.
Every FCB is 32 byte and have the following layout :
0 1 2 3 4 5 6 7 8 9 A B C D E F UU N0 N1 N2 N3 N4 N5 N6 N7 T0 T1 T2 EX S1 S2 RC A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF UU User 0 - 15 in CP/M 1.4,2.2 0-31 in CP/M 3.0. If the file is deleted this byte is set to 0xE5. N0..N7 File name right filled with spaces. T0..T2 File type right filled with spaces. EX Number of extension 0-31, every extension is 128 record. S1 Reserved. S2 Reserved. RC Number of record used in the last extension. A0..AF Block allocation map 1 if BSM < 256 else each block use 2 2 consecutive byte LSB first.
Turbodos mantain the flag for the file in the high bit of the filename :
N0 - Fifo file attribute T0 - Read only T1 - Global file T2 - Archive
DPB
Field Summary | |
---|---|
static byte |
DELETED
Entry deleted |
static int |
EX
Offset to extension number |
static int |
RC
Offset to record counter |
static int |
SIZE
FCB length |
static int |
USER
Offset to user number |
Constructor Summary | |
---|---|
FCB()
Create a new empty FCB |
Method Summary | |
---|---|
void |
clear()
Clear all the data in the FCB |
void |
clearBlocks()
Clear all the allocation block map |
boolean |
getAttributeArchive()
Return true if the turbodos global attribute is set. |
boolean |
getAttributeFifo()
Return true if the turbodos Fifo is set |
boolean |
getAttributeGlobal()
Return true if the turbodos global attribute is set. |
boolean |
getAttributeReadOnly()
Return true if the turbodos read only is set. |
int |
getBlockByte(int block)
Get one allocation block using 1 byte for block |
int |
getBlockWord(int block)
Get one allocation block using 1 word for block |
void |
getBuffer(byte[] buffer,
int from)
Copy in one buffer the FCB |
byte[] |
getBytes()
Get the space used by the FCB |
int |
getEX()
Get the extension |
java.lang.String |
getFileName()
Get the filename in the FCB |
int |
getRC()
Get record counter |
int |
getUser()
Get the user number |
boolean |
isDeleted()
Return true if this FCB is deleted |
void |
setBlockByte(int block,
int value)
|
void |
setBlockWord(int block,
int value)
|
void |
setBuffer(byte[] buffer,
int from)
Copy the FCB from one buffer |
void |
setDeleted()
Set this FCB as deleted |
void |
setEX(int ex)
Set the extension |
void |
setFileName(java.lang.String name)
Set the filename in the FCB |
void |
setRC(int rc)
Set record counter |
void |
setUser(int user)
Set the user number |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SIZE
public static final byte DELETED
public static final int USER
public static final int EX
public static final int RC
Constructor Detail |
---|
public FCB()
Method Detail |
---|
public void clear()
public void getBuffer(byte[] buffer, int from)
public void setBuffer(byte[] buffer, int from)
public byte[] getBytes()
public int getUser()
public void setUser(int user)
public void setFileName(java.lang.String name)
public java.lang.String getFileName()
public void setDeleted()
public boolean isDeleted()
public int getRC()
public void setRC(int rc)
public int getEX()
public void setEX(int ex)
public int getBlockByte(int block)
public int getBlockWord(int block)
public void setBlockByte(int block, int value)
public void setBlockWord(int block, int value)
public void clearBlocks()
public boolean getAttributeFifo()
public boolean getAttributeReadOnly()
public boolean getAttributeGlobal()
public boolean getAttributeArchive()
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |