-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfinCode.h
More file actions
30 lines (23 loc) · 746 Bytes
/
finCode.h
File metadata and controls
30 lines (23 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef fincode_h
#define fincode_h
#include "medCode.h"
#define MAXDATA 1024
typedef struct data
{
char name[32];
int location;
}DATA;
static InterCodes* codeHead;
static int argCount = 0;
static int totalSize = 0;
static int dataNum = 0;
static DATA dataFlow[MAXDATA];
int daraLoc(char* name);
void dataAdd(char* name, int size);
void regAlloc(FILE *target_file, char* name, int num);
void dataADDs(InterCodes* pHead, InterCodes* pTail);
void instruction(FILE *target_file, InterCodes* pHead, InterCodes* pTail);
/* Convert the intermediate codes to final instructions */
void instructions(FILE *target_file, InterCodes* pHead, InterCodes* pTail);
void finCode(FILE *target_file, InterCodes* pCode);
#endif