| |||
Home > Angel > Angel C library support SWIs > SYS_WRITE (0x05) |
Writes the contents of a buffer to a specified file at the current file position. The file position is specified either:
explicitly, by a SYS_SEEK
implicitly as one byte beyond the previous SYS_READ or SYS_WRITE request.
The file position is at the start of the file when the file is opened, and is lost when the file is closed.
The file operation should be performed as a single action whenever possible. That is, a write of 16KB should not be split into four 4KB chunks unless there is no alternative.
On entry, r1 contains a pointer to a three word data block:
contains a handle for a file previously opened with SYS_OPEN.
points to the memory containing the data to be written.
contains the number of bytes to be written from the buffer to the file.