While I review your code in src/memory.rs, one thing makes me confused.
There are two functions named as get_halfword and set_halfword.
Literally, they are used to get half of a WORD length data from a specific memory address,
or setting half of a WORD length data.
In fact, they are designed as 16-bit version getter and setter for memory.
ARM64 and x86 family of CPU defined a WORD as 16 bits(2 bytes).
Back to time of Intel 8080 and Zilog 80, a WORD stands for 8 bits.
I have not found any LR35902 specifications, indicating that a WORD is 32 bits.
So I wonder if a correctly expressed version of those function names should be get_word(for widely used x86 and ARM standard) or get_dword(for 8080 and Z80 standard), the same for setter.
While I review your code in
src/memory.rs
, one thing makes me confused. There are two functions named asget_halfword
andset_halfword
. Literally, they are used to get half of a WORD length data from a specific memory address, or setting half of a WORD length data. In fact, they are designed as 16-bit version getter and setter for memory.ARM64 and x86 family of CPU defined a WORD as 16 bits(2 bytes). Back to time of Intel 8080 and Zilog 80, a WORD stands for 8 bits. I have not found any LR35902 specifications, indicating that a WORD is 32 bits.
So I wonder if a correctly expressed version of those function names should be
get_word
(for widely used x86 and ARM standard) orget_dword
(for 8080 and Z80 standard), the same for setter.Thanks for your hard work.