kjt_read_from_file
Created by: phil, Last modification: Thu 18 of Aug, 2011 (19:09 UTC)
Name:
kjt_read_from_file
Action:
forces a file to be loaded to a particular address - kjt_find_file MUST be called first!
Input Registers :
HL = Load address.
B = Bank of load address.
Output Registers :
If Zero Flag is set, operation completed OK
Else:
If A = $00, B = hardware device error flags.
If A <> $00, see error code table
Notes:
kjt_read_from_file
Action:
forces a file to be loaded to a particular address - kjt_find_file MUST be called first!
Input Registers :
HL = Load address.
B = Bank of load address.
Output Registers :
If Zero Flag is set, operation completed OK
Else:
If A = $00, B = hardware device error flags.
If A <> $00, see error code table
Notes:
- The file pointer is automatically incremented by the number of bytes transferred - therefore it is not necessary call "kjt_set_file_pointer" each time if a chunks of a file are required sequentially.
- Attempting to read beyond the end of a file will return an error.
- The load length must be set for each read (and load address set appropriately each call).
- From FLOS v548 onwards, a full seek is only performed if the File Pointer is manually changed. During sequential loads, no other disk operations or code which alters the sector buffer should be called (Note: This includes the serial routines).