From e23a3e98bf4afc6bc900a427c20c01feac476d1a Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 14 Mar 2016 16:24:48 +0000 Subject: Initial code for handling of memory banks. --- src/output.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/output.c') 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: -- cgit v1.2.3