## I/O control statements

CLOSE

  Closes open files.

  CLOSE 1,3

EOF(`channel`)

  Returns -1 if end of file has been reached

INPUT #`CHANNEL`

  Read from file opened with OPEN.

LINE INPUT #`CHANNEL`

  Allows input of line from open file, including commas. Line is terminated by [ENTER].

LOAD

  Load program file from tape. First file encountered will be loaded, unless program name is specified.

  LOAD
  LOAD "NAME"
  LOAD "NAME",R

LOADM

  Load machine language program from tape. Offset to loading address main be given.

  LOADM
  LOADM"NAME"
  LOADM"NAME",&H6000

MOTORON/MOTOROFF

  Turns tape motor on/off.

OPEN `A`,#`CHANNEL`,`FILENAME`

  Opens a file or device. The argument `A` must be either "I" for input or "O" for output. `CHANNEL` must be between 1 and 16. The `FILENAME` specifies device ("KYBD:" - keyboard, "SCRN:" - screen, "LPRT:" - line printer, "CASS:" - cassette tape) and if relevant, a file name on the device. Device defaults to CASS:.

  OPEN "I", #1, "CASS : FILE.TWO"

PRINT #`CHANNEL`

  Prints content of following list to the specified file.

PRINT #`CHANNEL` USING

  Prints formatted output to the specified file.

SAVE

  Transfer BASIC programs from memory to tape.

  SAVE "prog"
  SAVE "prog",A

SAVEM

  Transfer machine code to tape.

  SAVEM "codefile",&H6200,&H7520,&H6210

SKIPF

  Skips to end of specified program on tape.

  SKIPF
  SKIPF"NAME"