projects
/
zilutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added ability to define multiple functions (without parameters) and
[zilutils.git]
/
zilasm
/
header.cpp
diff --git
a/zilasm/header.cpp
b/zilasm/header.cpp
index 863c65e2b3e25d4b4e84074212068f42846087a7..c643eeb87d2ebd347a2af75dbc0b1be315d4a5c8 100644
(file)
--- a/
zilasm/header.cpp
+++ b/
zilasm/header.cpp
@@
-1,7
+1,7
@@
/*
* header.c -- part of ZilUtils/ZilAsm
*
/*
* header.c -- part of ZilUtils/ZilAsm
*
- * Copyright (C) 2016, 2019 Jason Self <j@jxself.org>
+ * Copyright (C) 2016, 2019
, 2020
Jason Self <j@jxself.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@
-25,22
+25,22
@@
#include "header.h"
#include "header.h"
-Program_header_struct
P
rogram_header;
+Program_header_struct
p
rogram_header;
const unsigned MAX_HEADER_LEN = 40;
void
program_header_reset (unsigned zversion)
{
const unsigned MAX_HEADER_LEN = 40;
void
program_header_reset (unsigned zversion)
{
- bzero (&
Program_header, sizeof (P
rogram_header));
-
P
rogram_header.version = zversion;
+ bzero (&
program_header, sizeof (p
rogram_header));
+
p
rogram_header.version = zversion;
}
ZMemblock *
program_header_build (void)
{
ZMemblock *zmb = zmem_init (MAX_HEADER_LEN);
}
ZMemblock *
program_header_build (void)
{
ZMemblock *zmb = zmem_init (MAX_HEADER_LEN);
- zmem_putbyte (zmb,
P
rogram_header.version);
+ zmem_putbyte (zmb,
p
rogram_header.version);
/* TODO */
return zmb;
}
/* TODO */
return zmb;
}
@@
-61,7
+61,9
@@
outputToFile (Program_header_struct * pHeader, FILE * file)
h.startPC = swapBytes (h.startPC);
h.h_file_size = swapBytes (h.h_file_size);
h.startPC = swapBytes (h.startPC);
h.h_file_size = swapBytes (h.h_file_size);
- h.H_STRINGS_OFFSET = swapBytes (h.H_STRINGS_OFFSET);
+ h.H_STRINGS_OFFSET = swapBytes(h.H_STRINGS_OFFSET);
+
+ h.H_FUNCTIONS_OFFSET = swapBytes(h.H_FUNCTIONS_OFFSET);
int size = sizeof (Program_header_struct);
fwrite (&h, sizeof (Program_header_struct), 1, file);
int size = sizeof (Program_header_struct);
fwrite (&h, sizeof (Program_header_struct), 1, file);