Versions Compared

Key

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

Register parameters

Code Block
languagenone
titleRST 20H, DEFW DEFB $45
 IN:
     BC = number of bytes to move (0 = indicates no data)
     IX = handle of file (or device)
     DE = 0, move data from memory, starting at (HL), to the file
     HL = 0, move data from the file to memory, starting at (DE)

OUT, if call (perhaps partially) successful:
     Fc = 0
     BC = number of bytes not 'moved'
     DE(in) = 0, HL points to next byte to read
     HL(in) = 0, DE points to next byte to write

OUT, if call failed:
     Fc = 1
     A = error code:
          RC_EOF ($09), end of file reached at some stage
          RC_HAND ($08), bad handle supplied in IX
          RC_RP ($13), device is read-protected, eg. :OUT.0
          RC_ESC ($01), escape, if device :COM.0, :PRT.0, or :INP.0
          RC_SUSP ($69), suspension if device is :COM.0, :PRT.0 or :INP.0
          RC_DRAW ($66), redraw screen, if device is :INP.0
          RC_QUIT ($67), kill request, if device is :INP.0

Registers changed after return:
     ......../IXIY same
     AFBCDEHL/.... different

...