You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
STOP
When reading through gbz80(7)'s documentation, I noticed it says STOP was 2 bytes long, when the instruction itself is only 1, not located in CB and doesn't take useful arguments. People on Discord pointed me to this chart (which BTW misses a "Yes" label at the very bottom). I suggest the documentation say something like this:
"Because the CPU might take the next byte as either a useless argument to the STOP instruction or as a new opcode, rgbds will always add an implicit NOP for safety. Visit Pan Docs for more information."
Some other suggestions:
Legend:
Exclamation mark is only used once, and that's in the legend. There's no need to explain symbols that are never used.
u3 should say that it always refers to bit indizes, and if 0 refers to the least or most significant bit.
Remove pointless anchors, e.g. any of these that aren't a heading. By using most browsers' default style of <abbr> HTML tag, one would expect the anchors to have a hint or point to the legend (or something like that), when in fact it's just a useless link. The legend of the 8-bit instructions looks really odd as B, D, E and L are underlined, but A, C, and H are not.
CPL should mention that the operation is also known as "bitwise NOT". I do programming for 20 years (though in high-level languages) and this was the first time I ever saw this operation being called the complement.
It could say that LD r8,r8 doesn't do anything at all if both arguments are the same. I thought that there must be a use if these exist, but LD [HL], [HL] does not - but there's no use, except for BGB using LD B, B for breakpoints and LD D, D for debug.
Several commands that work with a constant (literal, value, immediate data) could state that more efficient shortcuts exist if that value is 0, e.g. LD A, 0 could be written as XOR A, and CP 0 could be written as AND A or OR A, although flags are different. I acknowledge that this document is probably the wrong place for notes like that. If so, is there a location for community notes and advice on individual instructions?
The text was updated successfully, but these errors were encountered:
STOP
When reading through
gbz80(7)
's documentation, I noticed it saysSTOP
was 2 bytes long, when the instruction itself is only 1, not located in CB and doesn't take useful arguments. People on Discord pointed me to this chart (which BTW misses a "Yes" label at the very bottom). I suggest the documentation say something like this:"Because the CPU might take the next byte as either a useless argument to the
STOP
instruction or as a new opcode,rgbds
will always add an implicit NOP for safety. Visit Pan Docs for more information."Some other suggestions:
<abbr>
HTML tag, one would expect the anchors to have a hint or point to the legend (or something like that), when in fact it's just a useless link. The legend of the 8-bit instructions looks really odd as B, D, E and L are underlined, but A, C, and H are not.LD r8,r8
doesn't do anything at all if both arguments are the same. I thought that there must be a use if these exist, butLD [HL], [HL]
does not - but there's no use, except for BGB usingLD B, B
for breakpoints andLD D, D
for debug.LD A, 0
could be written asXOR A
, andCP 0
could be written asAND A
orOR A
, although flags are different. I acknowledge that this document is probably the wrong place for notes like that. If so, is there a location for community notes and advice on individual instructions?The text was updated successfully, but these errors were encountered: