1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-29 16:51:10 +00:00
C02/label.h

28 lines
1.3 KiB
C
Raw Normal View History

/******************************************************
* C02 Label Parsing, Generation, and Lookup Routines *
******************************************************/
2017-05-01 01:17:50 +00:00
int inblck; //Multiline Block Flag
char curlbl[LABLEN+1]; //Most recently generated label
char cndlbl[LABLEN+1]; //Label for Conditional Code
2017-05-01 01:17:50 +00:00
char endlbl[LABLEN+1]; //End Label
char forlbl[LABLEN+1]; //For Loop Label
2017-05-01 01:17:50 +00:00
char loplbl[LABLEN+1]; //Skip Increment Label
char skplbl[LABLEN+1]; //Skip Increment Label
char tmplbl[LABLEN+1]; //Temporary Label
char lblnam[MAXLAB+1][LABLEN+1]; //Label Name Table
int lbltyp[MAXLAB+1]; //Label Type
2017-05-01 01:17:50 +00:00
int lblblk[MAXLAB+1]; //Label Ends Program Block
int lblcnt; //Number of Labels in stack
int lblnxt; //Sequence of next label to be generated
char lbltmp[LABLEN+1]; //Label Temporary Storage
2017-06-27 00:16:23 +00:00
enum ltypes {LTNONE, LTIF, LTLOOP, LTEND, LTDO, LTDWHL, LTFUNC}; //Label Types
void prslbl(); //Parse Label From Code
void newlbl(char* lbname); //Generate New Block Label
int poplbl(); //Pull Last Label and Emit on Next Line
void setlbl(); //Emit word as Label on Next Line