-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimplementLine.h
More file actions
26 lines (21 loc) · 1.19 KB
/
implementLine.h
File metadata and controls
26 lines (21 loc) · 1.19 KB
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
#ifndef IMPLEMENT_LINE
#define IMPLEMENT_LINE
#include "symbolList.h"
#include "lineInfo.h"
/*the function gets a lineInfo struct containing information from one line of input code and
pointers to data strutures:
1. a symbol table that hold labels referencing to lines of instruction.
2. a symbol table that hold labels referencing to lines of directives.
3. second pass table - hold the addresses of all the empty lines in the instruction table that will
be filled during the second pass and their matching label.
4. a list of all the extern label names.
5.a list of all the entry label names.
6.An array that holds the address in memory and its matching binary code for all the instructions.
7.An array that holds the address in memory and its matching binary code for all the directives.
8.the current line number.
and fill the relevant data
the function fill those data structures with the information from the line info and update the instruction/directives
counters */
void implementLine(lineInfo line, label **instrSymbolTableLast, label **directiveSymbolTableLast,
label **secondPassTable, label **externName, label **entryTable, short instructionMap[][2],short directiveMap[][2],int lineNum);
#endif