Mercurial > repos > blastem
comparison upd78k2_dis.h @ 2717:04007ac9ee3b
Add upd78k2 disassembler
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 16 Jul 2025 07:36:01 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2716:033d8d4308e3 | 2717:04007ac9ee3b |
---|---|
1 #ifndef UPD78K2_DIS_H_ | |
2 #define UPD78K2_DIS_H_ | |
3 #include <stdint.h> | |
4 #include "disasm.h" | |
5 | |
6 enum { | |
7 UPD_REF_NONE, | |
8 UPD_REF_OP, | |
9 UPD_REF_2OP, | |
10 UPD_REF_BRANCH, | |
11 UPD_REF_COND_BRANCH, | |
12 UPD_REF_OP_BRANCH, | |
13 UPD_REF_CALL, | |
14 UPD_REF_CALL_TABLE | |
15 }; | |
16 | |
17 typedef struct { | |
18 uint16_t address; | |
19 uint16_t address2; | |
20 uint8_t ref_type; | |
21 } upd_address_ref; | |
22 | |
23 typedef uint8_t (*upd_fetch_fun)(uint16_t address, void *data); | |
24 | |
25 uint16_t upd78k2_disasm(char *dst, upd_address_ref *ref, uint16_t address, upd_fetch_fun fetch, void *data, disasm_context *context); | |
26 | |
27 | |
28 #endif //UPD78K2_DIS_H_ |