Versions Compared

Key

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

...

:RAM.nFile device in slot n, 0=internal, -=virtual (all RAM available). Read and write.
:INP.0Standard input device, usually the keyboard, but can be redirected. Read only.
:OUT.0Standard output device, usually the screen, but can be redirected. Write only.
:SCR.0 The screen. Write only.
:COM.0The serial port. Read and write.
:PRT.0The printer. Data sent to this device is processed by the printer filter whose settings are defined by the PrinterEd application. Write only.
:NUL.0This device does nothing, but can be useful when you want to send something nowhere, or get nothing from anywhere. Data sent is thrown away, reading returns an End of File message. Read and Write.
:ROM.nAssociated with application in slot n, 0=internal. This device can be read using the DOR routines described later, but cannot be used as a conventional device. :ROM.0 device is not available when OZ is running in slot 1 (in effect overriding slot 0 applications).
:APP.-Virtual slot associated with application installed in RAM (OZ 4.5 and newer).


Streams and Filters

A stream is simply a communication channel associated with a handle. Various system calls can take input or send output to a stream. For example the system routine to convert binary to ASCII decimal numbers can direct its output to the standard output stream rather than store the result in a buffer in memory and then output the contents of that buffer as a string. A filter is a general way of performing simple transformations on character sequences. Text can be sent to a filter and then pulled out again, having been processed according to the set of transformations associated with the filter. Some system routines take a filter as their input, requiring the application to have already sent text to the filter, and others as output, requiring the filter to be read after the routine is complete. 
 

...