dir seeking

This commit is contained in:
rumbledethumps
2025-10-15 14:12:12 -07:00
parent e6c138dc03
commit f744f0b8a0
7 changed files with 35 additions and 14 deletions

View File

@@ -1,5 +1,4 @@
#include <rp6502.h>
#include <fcntl.h>
int __fastcall__ f_closedir (int dirdes)
{

View File

@@ -1,5 +1,4 @@
#include <rp6502.h>
#include <unistd.h>
long __fastcall__ f_lseek (long offset, int whence, int fildes)
{

View File

@@ -1,8 +1,6 @@
#include <rp6502.h>
#include <errno.h>
#include <string.h>
int __fastcall__ f_readdir (f_stat_t *dirent, int dirdes)
int __fastcall__ f_readdir (f_stat_t* dirent, int dirdes)
{
int i, ax;
ria_set_ax (dirdes);

View File

@@ -0,0 +1,7 @@
#include <rp6502.h>
int __fastcall__ f_rewinddir (int dirdes)
{
ria_set_ax (dirdes);
return ria_call_int (RIA_OP_REWINDDIR);
}

View File

@@ -0,0 +1,8 @@
#include <rp6502.h>
int __fastcall__ f_seekdir (long offs, int dirdes)
{
ria_set_ax (dirdes);
ria_push_long (offs);
return ria_call_int (RIA_OP_SEEKDIR);
}

View File

@@ -0,0 +1,7 @@
#include <rp6502.h>
long __fastcall__ f_telldir (int dirdes)
{
ria_set_ax (dirdes);
return ria_call_long (RIA_OP_TELLDIR);
}