libamos / libamos.h

Kevin Veroneau 434107e 























































































//-- membank ---------------------------------------------------------------------------------------
#define NUM_MEMBANKS 255

extern char *membank[NUM_MEMBANKS];
extern int banksize[NUM_MEMBANKS];
extern int curbank;

/*----- Error system ---*/
char *error_description;
int error_type;

//--Internal ---------------------------------------------------
extern void init_membank();

//--Base ---------------------------------------------------
extern int reservebank(int bank,int size);
extern int baseimage(int bank,int n);
extern int baseimageCC(int bank,int n);
extern int basescreen(int bank,int n);
extern int basesound(int bank,int n);

extern int freebase(int bank);
extern int freebank(int bank);
extern int copybank(int s,int d);
extern int loadbank(char *filename,int bank);
extern int savebank(char *filename,int bank);

extern int setbank(int bank);
extern int sizebank(int bank);

//--poke ---------------------------------------------------
extern int poke(int bank,int address,unsigned char byte);
extern int doke(int bank,int address,unsigned short byte);
extern int loke(int bank,int address,unsigned int byte);

//--peek ---------------------------------------------------
extern int peek(int bank,int address);
extern int deek(int bank,int address);
extern int leek(int bank,int address);

//--fastcopy ---------------------------------------------------
extern int memcopy(int sbank,int s ,int dbank,int d,int size);
//--------------------------------------------------------------------------------------------------

//- strings ----------------------------------------------------------------------------------------

//STRINGS RUTINES
extern int asc(char *string);
extern char *chr(int v);
extern void format();
extern char *insert(char *source, char *target,int position);
extern int instr(int start,char *find, char *search);
extern char *lcase(char *string);
extern char *left(char *string,int pos);
extern int len(char *string);
extern char *ltrim(char *string);
extern char *mid(char *string,int i,int n);
extern char *replace(char *src,char *rep, int i);
extern char *replacesubstr(int start,char *source,char *replace, char *with);
extern char *reverse(char *string);
extern char *right(char *string,int pos);
extern int rinstr(char *search,char *find,int start);
extern char *rtrim(char *string);
extern char *space(int n);
extern char *str(int v);
extern char *string(int n, char *string);
extern int tally(char *src,char *sub,int start);
extern char *trim( char *string);
extern char *ucase(char *string);
extern int val(char *string);

//--------------------------------------------------------------------------------------------------

//- math -------------------------------------------------------

extern char *bin(int i);
extern char *hex(int i);
extern void randomize(int seed);
extern double rnd(int upper);
extern double round(double n1);
extern int sgn(double  n);
extern double Min( double a, double b );
extern double Max( double a, double b );
extern int bitwiseand(int a, int b);
extern int bitwiseor(int a, int b);
extern int bitwisexor(int a, int b);

//--------------------------------------------------------------------------------------------------
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.