C C BBC Microcomputer emulation package C BBC_FILES.INC - file system structure definitions and includes C C Copyright Peter Coghlan 1998 C C Include files needed for structure definitions Include '($Fabdef)' Include '($Rabdef)' C C Constants C Parameter Max_Files = 5 Parameter BlockSize = 512 C C Structure definitions C C File control block C Structure /BbcFcbDef/ Integer *4 Flags ! Flags - see below. Integer *4 Load ! Bbc Load address. Integer *4 Exec ! Bbc Execution address. Integer *4 Size ! File size in bytes. Integer *4 Attrs ! Bbc file attributes. Record /Fabdef/ Fab Record /Rabdef/ Rab End Structure C C Control block for random access files C Structure /RaFileDef/ Integer Flags Integer Block Integer Ptr Integer Ext Character *512 Buffer End Structure C C Structures to separate and combine bytes from/to words and longwords C Structure /FourBytes/ Union Map Integer *1 Byte0 Integer *1 Byte1 Integer *1 Byte2 Integer *1 Byte3 EndMap Map Integer *4 All EndMap EndUnion EndStructure Structure /TwoBytes/ Integer *1 Byte0 Integer *1 Byte1 End Structure C Flags in BbcFcbDef Parameter Bbc_M_Block = '00000001'X ! Block mode can Parameter Bbc_V_Block = '00000000'X ! be used. Parameter Bbc_M_Acl = '00000002'X ! Acl with BBC file Parameter Bbc_V_Acl = '00000001'X ! attributes present. C Flags in options argument passed to Bbc_Open_File and in Bbc_files Parameter Bbc_M_Read = '00000001'X ! Open file with read Parameter Bbc_V_Read = '00000000'X ! access allowed. Parameter Bbc_M_Write = '00000002'X ! Open file with write Parameter Bbc_V_Write = '00000001'X ! access allowed. C Flag only used in Bbc_Open_File Parameter Bbc_M_New = '00000004'X ! Create new file or Parameter Bbc_V_New = '00000002'X ! new version of file. C Flags only used in Bbc_Files Parameter Bbc_M_InUse = '00000008'X ! Channel in use Parameter Bbc_V_InUse = '00000003'X Parameter Bbc_M_Eof = '00000010'X ! Eof signalled Parameter Bbc_V_Eof = '00000004'X Parameter Bbc_M_Mod = '00000040'X ! Buffer modified but Parameter Bbc_V_Mod = '00000006'X ! not yet written out Parameter Bbc_M_InMem = '00000080'X ! Segment containing Parameter Bbc_V_InMem = '00000007'X ! PTR loaded. C Function requested in Bbc_Files Parameter Bbc_Find = '00000001'X ! Osfind open or close Parameter Bbc_Bget = '00000002'X ! Osbget Parameter Bbc_Bput = '00000003'X ! Osbput Parameter Bbc_Args = '00000004'X ! Osargs Parameter Bbc_GbPb = '00000005'X ! Osgbpb Parameter Bbc_Eof = '00000006'X ! Check EOF