OS_Fwm, File write miscellaneous

Register parameters

     A = reason code
          FA_PTR ($01)   sequential pointer
          FA_EXT ($02)   extent (size) of file
		  FA_EOF ($03) 	 goto end of file
		  FA_RWD ($04)   rewind to beginning of file
     HL = pointer to a 4 byte (32bit) vector (only for FA_PTR and FA_EXT)
          (contains value to be written, low byte first)
     IX = file handle (previously obtained using GN_Opf)

OUT, if call successful:
     Fc = 0
OUT, if call failed:
     Fc = 1
     A = error code:
          RC_HAND ($08), bad handle
          RC_BAD ($04), bad reason code

Registers changed after return:
     ..BCDEHL/IXIY same
     AF....../.... different 


FA_EOF and FA_RWD apply to OZ5 and newer. They allow to set quickly file pointer to the top or bottom of the specified file. 

Related calls

GN_Cl, close file
GN_Del, delete a file from memory
GN_Opf, open file/resource (wildcard search)
GN_Ren, rename file
OS_Cl, internal close (OZ usage)
OS_Del, file delete (internal OZ usage)
OS_Frm, file read miscellaneous
OS_Gb, get byte from file (or device)
OS_Gbt, get byte from file (or device) with timeout
OS_Mv, move bytes between stream and memory
OS_Op, internal open (OZ usage)
OS_Pb, write byte to file, device
OS_Pbt, write byte to file, device with timeout
OS_Ren, file rename (internal OZ usage)

web analytics