Showing changes from revision #3 to #4:
Added | Removed | Changed
Entry | |
---|---|
R0 | 8 |
R2 | Buffer address |
R3 | Number of object names to read from directory |
R4 | Offset of first item to be read in directory, or 0 to start |
Exit | |
---|---|
R0 | Preserved |
R2 | Preserved |
R3 | Number of objects asked for but not read |
R4 | Next offset into directory |
C flag clear if R3 = 0, else set |
The purpose of this call is to read entries from the current directory on the temporary filing system.
File names are returned in the area of memory specified in R2. The format of the returned data is:
Size | Description |
---|---|
1 byte | Length of first object name |
As specified | First object name in ASCII |
… repeated as specified in R3 |
On exit R4 contains the value which should be used on the next call. There is no guarantee that the number of objects you asked for will be read. This is because of the external constraints some filing systems may impose. To ensure reading all the entries you want to, this call should be repeated until R4 = -1.
This call is only provided for backward compatibility, and should not be used in any new software. This is because the length of the buffer is not communicated, so a buffer overflow could easily occur if the folder contains filenames which are longer than your code expects. Instead of using this SWI, you can use OS_GBPB 9 with a directory string of “@”.