aboutsummaryrefslogtreecommitdiff
path: root/lib/inst.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/inst.c')
-rw-r--r--lib/inst.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/inst.c b/lib/inst.c
index 4f013a1..644517e 100644
--- a/lib/inst.c
+++ b/lib/inst.c
@@ -438,7 +438,7 @@ void insts_write_bytecode_file(inst_t *instructions, size_t size, FILE *fp)
void prog_header_write_bytecode(prog_header_t header, darr_t *buffer)
{
- word start = htobe64(header.start_address);
+ word start = word_htobc(header.start_address);
darr_append_bytes(buffer, (byte *)&start, sizeof(start));
}
@@ -447,7 +447,7 @@ void prog_write_bytecode(prog_t *program, darr_t *buffer)
// Write program header
prog_header_write_bytecode(program->header, buffer);
// Write instruction count
- word pcount = htobe64(program->count);
+ word pcount = word_htobc(program->count);
darr_append_bytes(buffer, (byte *)&pcount, sizeof(pcount));
// Write instructions
insts_write_bytecode(program->instructions, program->count, buffer);