Skip to content

SIO Command $F7 Open Directory

Oscar Fowler edited this page Jul 25, 2020 · 8 revisions

Open Directory ($F7)

Description

Opens directory for reading, resets directory pointer to beginning of directory. Subsequently, calls to Read Directory can be called to get directory entries, and calls to Close Directory can be used to close the handle to the directory.

The DAUX1/2 bytes specify an offset to start reading directory from, so that you can e.g. re-set for pagination.

Parameters

DCB Value
DDEVIC $70
DUNIT $01
DCOMND $F7
DSTATS $80
DBUF Pointer to 256 bytes containing directory path, NUL terminated.
DTIMLO $0F
DBYT 256
DAUX1 0
DAUX2 0

Examples

CC65

unsigned char path[256]="/"; unsigned short offset=0;

// Open Dir
OS.dcb.ddevic=0x70;
OS.dcb.dunit=1;
OS.dcb.dcomnd=0xF7;
OS.dcb.dstats=0x80;
OS.dcb.dbuf=&path;
OS.dcb.dtimlo=0x0F;
OS.dcb.dbyt=256;
OS.dcb.daux=offset;
siov();

See Also

  • Read Directory
  • Close Directory

Clone this wiki locally