From 9ccba5e624319becd9a85822e60b15b6355f19cd Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Mon, 4 May 2020 12:57:36 -0400 Subject: Made all address decoding, and memory reads/writes be done with a union, in order to make it more readable. --- opcode.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'opcode.h') diff --git a/opcode.h b/opcode.h index 81bffa4..b9d1817 100644 --- a/opcode.h +++ b/opcode.h @@ -203,6 +203,13 @@ uint8_t *addr; /* Address Space. */ +union reg { + uint8_t u8[8]; + uint16_t u16[4]; + uint32_t u32[2]; + uint64_t u64; +}; + struct sux { uint64_t ps; /* The processor status register. */ uint64_t a[8], b[8], y[8], x[8]; /* Registers A, B, X, and Y. */ -- cgit v1.2.3-13-gbd6f