Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguous function names in src/memory.rs #5

Closed
DarkKowalski opened this issue Apr 24, 2019 · 1 comment
Closed

Ambiguous function names in src/memory.rs #5

DarkKowalski opened this issue Apr 24, 2019 · 1 comment

Comments

@DarkKowalski
Copy link

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.

Thanks for your hard work.

@mohanson
Copy link
Owner

Thanks for you advices, I will change it in the next update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants