Casio_asm/common/sourceFile.h

39 lines
657 B
C

#ifndef SOURCE_FILE_H
#define SOURCE_FILE_H
#include "types.h"
typedef struct BIG source_file_t {
int magic;
int version;
int hash;
int entryPoint;
int mappings;
} source_file_t;
typedef struct BIG mapping_t {
unsigned int offset;
int length;
char type;
char access;
} mapping_t;
#define SOURCE_VERSION 1
#define MAGIC 0x12345678
#define MAPPING_TYPE_rom 0
#define MAPPING_TYPE_ram 1
#define MAPPING_TYPE_stack 2
#define MAPPING_TYPE_file 3
#define MAPPING_TYPE_file_raw 4
#define MAPPING_TYPE_vram 5
#define MAPPING_ACCESS_r 4
#define MAPPING_ACCESS_w 2
#define MAPPING_ACCESS_x 1
#define HEADER_LENGTH 20
#define MAPPING_LENGTH 10
#endif