1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-19 12:32:08 +00:00
C02/vars.h

49 lines
1.8 KiB
C
Raw Normal View History

/*************************************
* C02 Variable Management Routines *
*************************************/
/* Variable Table */
char varnam[MAXVAR+1][VARLEN+1]; //Variable Name Table
2018-01-28 18:38:17 +00:00
char varmod[MAXVAR+1]; //Variable Modifier
char vartyp[MAXVAR+1]; //Variable Type
char varsiz[MAXVAR+1][4]; //Variable Array
int varcnt; //Number of Variables in Table
char vrname[MAXVAR+1]; //Variable Name
2017-06-27 00:16:23 +00:00
int vrwrtn; //Variables Written Flag
2017-05-01 01:17:50 +00:00
/*
int varidx; //Index into Variable Table
int vrtype; //Variable Type
*/
enum vtypes {VTVOID, VTCHAR}; //Variable Types
char datvar[DATASPC+1]; //Variable Data Storage
char datlen[MAXVAR+1]; //Variable Data Length
char dattyp[MAXVAR+1]; //Variable Data Type
2017-06-27 00:16:23 +00:00
char dattmp[256]; //Variable Temporary Data
int dtype; //Data Type
int dlen; //Length of Variable Data
int dsize; //Total Data Length
2017-06-27 00:16:23 +00:00
enum dtypes {DTBYTE, DTSTR, DTARRY}; //Variable Data Types
2018-01-28 18:38:17 +00:00
enum mtypes {MTNONE, MTALGN, MTZP}; //Variable Modifier Types
int symdef(char *name); //Is Variable defined (TRUE or FALSE)
2017-06-27 00:16:23 +00:00
int zpaddr; //Current Zero-Page Address
char fncnam[VARLEN+1]; //Function Name
char prmtra[VARLEN+1]; //Function Parameter A
char prmtrx[VARLEN+1]; //Function Parameter X
char prmtry[VARLEN+1]; //Function Parameter Y
int prmcnt; //Number of Parameters
2017-06-27 00:16:23 +00:00
void chksym(int alwreg, char *name); //Error if Variable not defined
void prsdts(); //Parse Data String
void setdat(); //Set Variable Data
2018-01-28 18:38:17 +00:00
void setvar(int m, int t); //Set Variable Name and Size
2017-06-27 00:16:23 +00:00
void pdecl(int m, int t); //Parse Variable Declaration
void vartbl(); //Create Variable Table