aboutsummaryrefslogtreecommitdiff
path: root/src/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/output.c')
-rw-r--r--src/output.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/output.c b/src/output.c
index 3b1809f..ccad6af 100644
--- a/src/output.c
+++ b/src/output.c
@@ -193,16 +193,23 @@ CommandStatus OutputSetOption(int opt, int argc, char *argv[],
int OutputCode(void)
{
- int min = GetMinAddressWritten();
- int max = GetMaxAddressWritten();
- const Byte *mem = AddressSpace();
+ const MemoryBank *bank = MemoryBanks();
+ int min;
+ int max;
+ const Byte *mem;
- if (max == -1)
+ if (!bank)
{
fprintf(stderr, "Skipping output; no written memory to write\n");
return TRUE;
}
+ /* TODO: Fix to pass banks proper
+ */
+ min = bank[0].min_address_used;
+ max = bank[0].max_address_used;
+ mem = bank[0].memory;
+
switch(format)
{
case Raw: