Initial version

This commit is contained in:
Yorick Barbanneau 2021-10-11 22:27:00 +02:00
commit 6f405265a5
102 changed files with 14486 additions and 0 deletions

28
code/bin/noff.h Normal file
View file

@ -0,0 +1,28 @@
/* noff.h
* Data structures defining the Nachos Object Code Format
*
* Basically, we only know about three types of segments:
* code (read-only), initialized data, and unitialized data
*/
#ifndef _NOFF_H
#define _NOFF_H
#define NOFFMAGIC 0xbadfad /* magic number denoting Nachos
* object code file
*/
typedef struct segment {
int virtualAddr; /* location of segment in virt addr space */
int inFileAddr; /* location of segment in this file */
int size; /* size of segment */
} Segment;
typedef struct noffHeader {
int noffMagic; /* should be NOFFMAGIC */
Segment code; /* executable code segment */
Segment initData; /* initialized data segment */
Segment uninitData; /* uninitialized data segment --
* should be zero'ed before use
*/
} NoffHeader;
#endif /* _NOFF_H */