h6. [[OS SWI Calls]] h6(. » [[OS_GBPB]] h6((. » OS_GBPB 9 h2. OS_ GBPB 9 h5. (SWI &0C) |_<^{width:4em}. Entry | | |<^. R0 |<^. 9 | |<^. 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)| |_<^{width:4em}. Exit | | |<^. R0 |<^. Preserved | |<^. R1 |<^. Preserved | |<^. R2 |<^. Preserved | |<^. R3 |<^. Number of objects read | |<^. R4 |<^. Where to continue, or -1 for no more | |\2<^. C flag clear if R3 = 0, else set| h4. Use The purpose of this call is to read entries from a specified directory, and return a buffer filled with a list of null-terminated strings consisting of the matched names. h4. Notes This SWI reads filename entries from the specified directory, returning a group of 0-terminated strings in the buffer. The correct code structure to call this SWI is: <pre> repeat { call OS_GBPB 9 if (R3 <> 0) { process buffer } } until (R4 = -1) </pre> as it is legal to return R3 = 0 before the end of the directory. Also, do *not* assume anything about the value in R4. h4. See also * [[OS_GBPB]] h5. Other languages documentation [[OS_GBPB 9 (français)|Français]]