Showing changes from revision #2 to #3:
Added | Removed | Changed
Entry | |
---|---|
R0 | 11 |
R1 | Pointer to directory name |
R2 | Pointer to buffer |
R3 | Number of objects to read |
R4 | Where to start, 0 for first time |
R5 | Length of buffer |
R6 | Wildcarded name to match (if 0 “*” is used) |
Exit | |
---|---|
R0 | Preserved |
R1 | Preserved |
R2 | Buffer |
R3 | Number of objects read |
R4 | Where to continue, or -1 for no more |
C flag clear if R3 = 0, else set |
The purpose of this call is to read entries and file information from a specified directory, and return data in a buffer (extended version).
The correct code structure to call this SWI is:
repeat
{
call OS_GBPB 11
if (R3 <> 0)
{
process buffer
}
} until (R4 = -1)
as it is legal to return R3 = 0 before the end of the directory. Also, do not assume anything about the value in R4.