1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-16 08:04:37 +00:00
C02/label.h
2017-04-30 21:17:50 -04:00

27 lines
1.2 KiB
C

/******************************************************
* C02 Label Parsing, Generation, and Lookup Routines *
******************************************************/
int inblck; //Multiline Block Flag
char curlbl[LABLEN+1]; //Most recently generated label
char endlbl[LABLEN+1]; //End Label
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
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
enum ltypes {LTIF, LTLOOP, LTEND, LTDO}; //Label Types
int lstlbl(int lbtype); //Find Last Label of Specified Type
void prslbl(); //Parse Label From Code
void newlbl(); //Generate New Block Label
int poplbl(); //Pull Last Label and Emit on Next Line
void setlbl(); //Emit word as Label on Next Line