From 25738474b655bbff8c31b12634d7377520420baf Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 28 Aug 2006 01:32:34 +0000 Subject: Added labels to Z80 disassembler --- z80.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'z80.h') diff --git a/z80.h b/z80.h index 05557f4..3b3220e 100644 --- a/z80.h +++ b/z80.h @@ -146,6 +146,17 @@ typedef enum } Z80FlagRegister; +/* Disassembly label -- only useful if ENABLE_DISASSEMBLER is set. + Labels are stored as an array, where a NULL in the label field marks + the end of the list. +*/ +typedef struct +{ + Z80Word address; + const char *label; +} Z80Label; + + /* ---------------------------------------- INTERFACES */ @@ -214,6 +225,11 @@ void Z80GetState(Z80 *cpu, Z80State *state); void Z80SetState(Z80 *cpu, const Z80State *state); +/* Set address to label mappings for the disassembler +*/ +void Z80SetLabels(Z80Label labels[]); + + /* Simple disassembly. addr is updated on exit. */ const char *Z80Disassemble(Z80 *cpu, Z80Word *addr); -- cgit v1.2.3