This wiki is being migrated to

User Tools

Site Tools


Z88 LIBRARY (z88.h)

Version all
Header {z88dk}/include/z88.h
Source {z88dk}/libsrc/z88
Include #include <z88.h>
Linking -lz88
Compile n/a
Supported Z88
Comments n/a

The z88 library contains functions specific to the Z88 Operating System and a minimal set of file operating routines that don't require the stdio stack.

Operating System

int readmail(char *type, char *info, int length);
int sendmail(char *type, char *info, int length);
void nameapp(char *);
int savescr(void);
int restscr(int);
int freescr(int);
pid_t getpid(void);
int exec_cli(char *cli);

DOR Manupulation

int opendor(char *filename);
void readdor(int dor, char type, char len, void *buf);
void closedor(int dor);
void writedor(int dor, char type, char len, void *buf);
void deletedor(int dor);
int sondor(int dor, char *minor_type);
int brotherdor(int dor, char *minor_type;

Wildcard Handling

typedef struct wildcard_st {
        void    *endptr;
        u8_t    segments;
        u8_t    length;
        u8_t    dortype;
} wildcard_t;
#define WILD_SCANDIR 1
#define WILD_PARENTS 2
wild_t  wcopen(far char *wildcard, int mode);
int wcnext(wild_t handle, void *buf, sisze_t len, wildcard_t *wild);
int wcclose(wild_t handle);

Filename Handling

char  *fnexpand(far char *filename, char *buf, size_t buflen);
#define PRS_EXTN 1
#define PRS_FILE 2
#define PRS_XDIR 4
#define PRS_CDIR 8
#define PRS_PDIR 16
#define PRS_WDIR 32
#define PRS_DEV  64
#define PRS_WILD 128
int parseseg(far char *segment, far char **buf);
int parsefile(far char *segment, wildcard_t *wildcard);
char *stripdev(char *explicitname);
char *strippath(char *explicitname);


#define INT_TICK        1
#define INT_SEC         2
#define INT_MIN         4
#define INT_UART        8
extern int RegisterInt(void (*fn)(), char type , char tick);
extern int DeRegisterInt(void);
bool_t   QueryPackage(char which, char major, char minor);


void openpopup(int wid, int tlx, int tly, int width, int height, char *name);
void openwindow(int wid, int tlx, int tly, int width, int height);
void opentitled(int wid, int tlx, int tly, int width, int height, char *name);

File IO

When compiling if FDSTDIO is defined, then a version of the stdio library is used that operates directly on a file handle. Many of the routines return non-standard values and may not behave in a standard way.

library/z88.txt · Last modified: 2017/03/25 09:16 (external edit)