Device 8 Example

Top  Previous  Next

OpenO(8);               \Start writing at the beginning of buffer

RlOut(8, X);            \Write the number to the buffer

OpenI(8);               \Start reading at the beginning of buffer

loop    begin

      Ch:= ChIn(8);               \Read character from buffer

      if Ch = ^. then Ch:= ^,;    \Change decimal point

      if Ch = $1A then quit;      \Quit if EOF character

      ChOut(0, Ch);               \Display the character

      end;

 

OpenO(8) and OpenI(8) reset their respective output and input pointers to the start of the buffer.