48 lines
738 B
C
48 lines
738 B
C
|
#ifndef ASM_ASM_CONST_H
|
||
|
#define ASM_ASM_CONST_H
|
||
|
|
||
|
#include "../emu/cpu_const.h"
|
||
|
#include <stdbool.h>
|
||
|
|
||
|
typedef struct
|
||
|
{
|
||
|
char label[64];
|
||
|
char instruction[4];
|
||
|
char arg1[64];
|
||
|
char arg2[64];
|
||
|
} AsmInstruction;
|
||
|
|
||
|
typedef struct
|
||
|
{
|
||
|
uint16_t length;
|
||
|
AsmInstruction *instruction;
|
||
|
} AsmInstructionArray;
|
||
|
|
||
|
typedef struct
|
||
|
{
|
||
|
CpuInstructions instruction;
|
||
|
ArgumentInfo arg1Info;
|
||
|
ArgumentInfo arg2Info;
|
||
|
uint16_t arg1;
|
||
|
uint16_t arg2;
|
||
|
} BinaryInstruction;
|
||
|
|
||
|
typedef struct
|
||
|
{
|
||
|
uint16_t length;
|
||
|
BinaryInstruction *instructions;
|
||
|
} BinaryInstructionArray;
|
||
|
|
||
|
typedef struct
|
||
|
{
|
||
|
char label[64];
|
||
|
uint16_t location;
|
||
|
} AsmLabel;
|
||
|
|
||
|
typedef struct
|
||
|
{
|
||
|
uint16_t length;
|
||
|
AsmLabel *labels;
|
||
|
} AsmLabelArray;
|
||
|
|
||
|
#endif
|