-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsegment.h
More file actions
25 lines (21 loc) · 729 Bytes
/
segment.h
File metadata and controls
25 lines (21 loc) · 729 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
/*
* segment.h
*
* Authors: Emiton Alves and Cameron LaFreniere
*
* Description: Interface for segment.c
* */
#ifndef SEGMENT_INCLUDED
#define SEGMENT_INCLUDED
#include "memory.h"
#include "program_loader.h"
#include <stdlib.h>
#include <assert.h>
void storeValue(memSpace memory, uint32_t value, uint32_t seg_ID, uint32_t position);
uint32_t getValue(memSpace memory, uint32_t seg_ID, uint32_t position);
struct segment *getSegment(memSpace memory, uint32_t seg_ID);
int program_load(memSpace memory, uint32_t seg_ID);
uint32_t map_seg(memSpace memory, uint32_t value, uint32_t seg_ID);
void unmap_seg(memSpace memory, uint32_t seg_ID);
void mapProgramSegment(memSpace memory, struct segment *instructionSet);
#endif