-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsecondpass.h
More file actions
25 lines (21 loc) · 1.04 KB
/
Copy pathsecondpass.h
File metadata and controls
25 lines (21 loc) · 1.04 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
#ifndef SECONDPASS_H
#define SECONDPASS_H
#include "binaryfunctions.h"
#include "defs.h"
#include "filefunctions.h"
#include "labelsfunctions.h"
#include "errors.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
/*Main second pass function.
The second pass handles filling the label addresses, the .entry and .extern labels, and the building of the output files.*/
int second_pass(char *filename, BinaryNode *code_image, BinaryNode *data_image, Label *label_list, int ICF, int DCF, int is_error);
/*A function to fill missing addresses of labels in the command operands.
Based on a given line, finds if there is a label to fill, searches for the address, and fills it in the binary code.*/
int fill_missing_label_info(BinaryNode *code_image, Label *label_list, char *line, int line_number, ExternLabel *extern_list, ErrorObject *error);
/*Aligns all of the binary lines to fit 24 bits.
Applys a mask to insure every bit after the 23'rd bit is off*/
int align_memory_to_bits(BinaryNode *code_image, BinaryNode *data_image);
#endif