From 5e6a1c3434b96ea16485b160c25732df3b00b2b8 Mon Sep 17 00:00:00 2001 From: Ian C Date: Thu, 12 May 2016 15:28:32 +0100 Subject: Started on SPC700 Also: * Added offset to import command. Realised fairly useless, but may as well keep it. * Added setting of address space size to state for PC. --- src/libout.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libout.c') diff --git a/src/libout.c b/src/libout.c index f9ca74f..000b7a9 100644 --- a/src/libout.c +++ b/src/libout.c @@ -117,7 +117,7 @@ int LibOutput(const char *filename, const char *filename_bank, } -int LibLoad(const char *filename, LibLoadOption opt, +int LibLoad(const char *filename, LibLoadOption opt, int offset, char *error, size_t error_size) { char magic[CASM_LIBRARY_MAGIC_LEN + 1] = {0}; @@ -163,7 +163,7 @@ int LibLoad(const char *filename, LibLoadOption opt, fread(buff, 1, len, fp); - SetPC(min); + SetPC((min + offset)); p = buff; if (opt != LibLoadLabels) @@ -180,7 +180,7 @@ int LibLoad(const char *filename, LibLoadOption opt, if (opt != LibLoadMemory) { - LabelReadBlob(fp); + LabelReadBlob(fp, offset); } fclose(fp); -- cgit v1.2.3