Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Each part of the explicit filename divided by slashes (or backslashes) is called a segment, so the above name consists of three segments which are a device, a directory and a filename respectively. Segments will always come in this order, but there may be several directories in the explicit name. Each segment consists of a name which is up to twelve characters long and an optional extension, separated from the name by a full stop, which may be up to three characters long. All device names are preceeded by a colon. The system provides various calls for breaking down and assembling filenames in terms of segments, such as GN_Esa (read and write specific segments), GN_Fex (produce explicit filename) and GN_Fcm (compress an explicit filename). The open file call, GN_Opf, in the course of its operation produces from the filename supplied an explicit filename which can be returned in full, or in a cut down form, to the user. Other useful filename processing calls are GN_Pfs (parse filename segment) and GN_Prs (parse filename), which not only check for correct syntax, but also return information as to what has been specified in the filename, eg. whether wildcards have been used, or a specific device mentioned. The wildcard facilities are covered later in "Wildcards".

...

File Devices

The above rules apply to the RAM filing system accessed with the :RAM.x device (x stands for the slot number 0-3). Since OZ 4.7, the The EPROM file area ca can be accessed directly by the :EPR.x device. It supports all the file i/o calls except the wildcard handler. However, the :EPR.? and :EPR.* wildcards are implemented. It works both for read and write. For example, files in Pipedream can directly be read and written to the EPROM file area. The EPR device access to the EPROM file area by generating a unique temporary file in :RAM.-. This file is deleted on closure. Notice that repeated file savings on EPROM will waste space by rewriting the whole file each time and marking previous one as deleted.

Suspension

The file transfer calls may be suspended in circumstances. If the stream being used is associated either the serial port or printer then RC_SUSP will be returned if the machine is switched off and on again, or if a battery low interrupt occurs. If escape detection is enabled then <ESC> will cause file transfer to abort and RC_ESC to be returned. A more serious case is where the stream is associated with the keyboard. If this is the situation, pre-emption can occur when reading from the stream and the possible return codes will be RC_SUSP, RC_DRAW and RC_QUIT. 
   

Block Transfer

If a lot of data is to be transferred between memory and a stream then doing the work a byte at a time can be quite a slow process. Each time a byte is transferred with these calls, the operating system must be paged in and various checks and action carried out, all of which generates a considerable overhead. The OS_Mv call reduces this overhead by transferring a large number of bytes between memory and a stream all in one go, and so can operate much more quickly. It can be useful for operations like loading and saving files. 
 

...