RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

OS_GBPB 10

Programmer's Reference Manuals
» Part 15 – SWI Calls
» OS
» OS_GBPB
» OS_GBPB 10

OS_ GBPB 10

(SWI &0C)
Entry
R0 10
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

Use

The purpose of this call is to read entries and file information from a specified directory, and return data in a buffer.

Notes

The correct code structure to call this SWI is:


repeat
{
call OS_GBPB 10
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 – Filer_Action assumes that it increases by one for each entry read and comes horribly unstuck.

See also

  • OS_GBPB
  • OS_GBPB 10 Buffer
Created on November 28, 2009 19:55:52 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: OS_GBPB, OS_GBPB 10 Buffer

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys