|DOS_WRITE||0115||Write bytes from memory into a file|
Write bytes from memory into a file, advancing the file pointer in the process.
|B||File number 0…15|
|C||Page number for addresses 0xC000…0xFFFF|
|DE||Number of bytes to write. 0 means 64K|
|HL||Address of where to read the bytes from|
- If OK:
- Carry true
- A corrupt
- DE corrupt
- Carry false
- A = Error code
- DE = Number of bytes remaining unwritten
- BC HL IX corrupt, all other registers preserved.
The value of C is only used when HL is within the upper 16K of memory (0xC000…0xFFFF). If HL is in this range then C is the RAM bank to use. For most purposes C should be set to 0 which is the default RAM bank mapped to that region.