MANUAL FOR RAMFS (6502 ROM image) This file describes the ROM image RAMFS which drives the byte wide RAM board connected via a 24 bit latched address bus to the 1MHz port. The image requires at least one 16k bank of sideways RAM or to be put onto a ROM to work. The manual and software are (C)1998 SPROW INSTRUCTIONS- At any command line prompt, eg. the BASIC command prompt '>' type ON A MASTER: *SRLOAD RAMFS 8000 *INSERT where may be 7, 6, 5, 4 ON A MACHINE WITH SWRAM: *LOAD RAMFS 8000 and press CTRL-BREAK to initialise. The image will then be installed into the chosen socket where it will wait until selected as the current filing system. To do this, you can Type *RAM Press R-BREAK Issue a sideways ROM service call with FS id 23 Inclusion of '-RAM-' in the filename (only on Master series) One page (256 bytes) of memory is claimed as private workspace above OSHWM in the BBC, or in the hidden RAM on a Master. This contains pointers etc... that RAMFS uses, and must not be tampered with. Note that a hard or power on reset has the effect of 'formatting' the disc and all information will be lost, this is also the only time the presence and size of the disc is evaluated. Looking at performance, a BASIC programme using BGETs/BPUTs/OSGbPb the following performance increases over DFS 1.20 were observed: Multiple 411 byte OSGbPb reads x4.05 faster Multiple 10 byte BGet sequences x1.32 faster Random setting of PTR then OSGbPb x1.72 faster Plus of course there is no overhead for waiting to spin the disc up to speed. PROPERTIES- Filenames can be up to 10 letters long, with a 1 letter directory name. There can be upto 127 files in the catalogue. The media title can be up to 16 letters long. The drive number must always be zero, where drive numbers are required. By default file access is set to local RW access on creation. The filing system id is 23 for RAMFS. As the disc is solid state and not removable, the 'cycle number' does not increment with each write to the RAM disc, instead it is a 'number of files currently open' status byte, taking the value 0-3. Upto 3 files may be open at once for any mixture of input, output, random access. The SPOOL/EXEC files are not held open over a filing system change. SUPPORTED OS CALLS- OSFile A=0 (save a section of memory) if this call fails due to lack of disc space and the given already existed, the result will be the deletion of A=1 (write cat info) A=2 (write load address for file) A=3 (write exec address for file) A=4 (write attributes for file) A=5 (read cat info) A=6 (delete a file) A=7 (create an empty file) A=255 (load named file, using stored/given address) OSArgs Y=0 A=0 (read fs id) Y=0 A=1 (read address of *RUN parameters) Y=0 A=255 (update all files to media) Y=handle A=0 (read sequential pointer) Y=handle A=1 (write sequential pointer) Y=handle A=2 (read file length) Y=handle A=255 (update this file to media) OSBGet Y=handle, byte returned in A is valid only if C=0 OSBPut Y=handle, A=byte to write OSGbPb A=1/2 (put bytes to media) A=3/4 (get bytes from media) A=5 (read media title and boot option) A=6 (read device name and current dir) A=7 (read device name and current lib) A=8 (read names from current dir) OSFind A=0 (close file, or files) A=&40 (openin an existing file) A=&80 (openout a file, deleting the old if it already exists) A=&C0 (openup an existing file) OSFSControl A=0 (set option) X=0, Y=0 (reset default OPTions) X=1, Y=0/1 (turn off/on extended messages) X=4, Y=0/1/2/3 (set boot option) A=1 (test for EOF) A=2/3/4 (run the given file) A=5 (produce catalogue) A=6 (shut down filing system) A=7 (return handle range) A=8 (command about to be executed) A=9 (do a *EX) A=10 (do a *INFO) ADDITIONAL OS COMMANDS- DIR :drive.directory (set current directory) LIB :drive.directory (set current library) TITLE (set media title) DRIVE (set drive number) CLOSE (close all files) DELETE (delete a single file) RENAME (rename the given file) EX (examine a dir - only on Master series) CREATE (create an empty file - only on Master series) INFO (show info on the given file) WIPE (delete files, prompting for confirmation for each) DESTROY (delete files, prompting for confirmation of the batch) ACCESS (set a file's attributes) ENABLE (skip warnings before 'dangerous' commands) EXIT MESSAGES- "Escape" - the user aborted something waiting for his input "Outside file" - an attempt was made to assign PTR for a read only file beyond the end of the file "Access violation" - the file selected does not have attributes set which allow the operation to go ahead, for example trying to OPENOUT a filename which already exists and is read only "Cat full" - no free slots could be found in the disc catalogue, despite there probably being space on the disc for the data itself "Can't extend" - files must be in one contiguous block on the disc, and the file is now too big for its allocated slot "Too many open" - only 3 files may be open at once "Read only" - the file involved has only been opened for reading "Open" - the file involved is already open "Locked" - the selected file is locked against changes "Exists" - an attempt to rename a file to one that exists was made "Disc full" - there is no free space left "Bad option" - only OPT0, OPT1, OPT4 are allowed "Bad name" - the name given contained forbidden characters or was too long "Bad drive" - a drive number other than zero was used "Bad dir" - directories must be 1 valid letter long maximum "Bad attribute" - the attribute supplied to *ACCESS was invalid "Not found" - the requested file was not present on the disc "Channel" - a call was made with a handle which is either illegal or has already been closed "Bad command" - an attempt was made to *RUN a file which does not exist KNOWN PROBLEMS/FUTURE ENHANCEMENTS- OSFind could allow files to be opened multiple times if the other times are OPENIN mode. No known problems. HISTORY- V1.09 Replaced uppercase function with shorter equivalent, changed OSFSCV A=1 to use common handle checker. Files run on a coprocessor are now entered correctly. V1.10 The internal star commands, such as *WIPE, now obey the file attributes when processing files. The attributes are now displayed after the filename in the disc catalogue. Opening files via OSFind now checks file attributes first if the file to open already exists. V1.15 Some internal workspace constants removed. Added OSFile A=7 (*CREATE). Fix bug where *INFO output would show incorrect file length when a file was open. V1.17 Change from 'Not found' to 'Bad command' when *RUN fails to find the corresponding file. Improved speed of RAM detection code at startup. Although calculated internally as 32 bit, only a 16 bit address was being written back to the block for GBPB A=1,2,3,4 and A=8. V1.18 OSFile A=7 returns A=1 on successful creation. V1.20 Fix for -RAM-extrinsic (eg. *-RAM-ENABLE) giving 'Bad command' due to MOS only offering the command via FSCV when a temporary FS is specified rather than service call 4.