From 7c24e9a9b02b04dcaf9507acb94091ea70a2c02d Mon Sep 17 00:00:00 2001 From: Xavi Del Campo Date: Fri, 31 Jan 2020 10:32:23 +0100 Subject: Imported pristine psxsdk-20190410 from official repo --- tools/spasm/codegen.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tools/spasm/codegen.h (limited to 'tools/spasm/codegen.h') diff --git a/tools/spasm/codegen.h b/tools/spasm/codegen.h new file mode 100644 index 0000000..e9e0ab7 --- /dev/null +++ b/tools/spasm/codegen.h @@ -0,0 +1,33 @@ +#ifndef _SPASM_CODEGEN_H +#define _SPASM_CODEGEN_H + +typedef struct +{ + char name[128]; + unsigned int pc; + unsigned int pass; +}asm_label; + +extern asm_label *labels; + +extern volatile unsigned int curPc; +extern int curPass; +extern unsigned int numLabels; +extern unsigned int startAddress; +extern unsigned int copn; +extern int first_instruction; +extern int org_found; +extern void (*INSFUNC)(void); + +void codegen_init(void); +void add_label(char *label, unsigned int pc); +void add_label_equ(char *label, unsigned int pc); +unsigned int find_label(char *label); +void find_label_reset(); +int find_label_ok(); +int label_was_not_found_once(char *name); +void add_not_found_label(char *name); +//void resolve_labels(); + + +#endif -- cgit v1.2.3