Anonymous user
GB Programming: Difference between revisions
→Register pairs and RAM
>Torchickens No edit summary |
>Torchickens |
||
Line 598:
Because two hex digits mean one byte, $D3, as well as $61, is a byte. Since $D3 and H are leftmost in both cases, ld hl, $D361 is actually a shorter form of ld h, $D3 then ld l, $61.
Let's say the following instruction is ld ($2315), hl. Applying the same logic would mean H's value would be stored at ($2315), and L's would be at ($2316). However, you just lost THE GAME
Stop here, and remember this until it becomes natural to you. Because this "little-endian"ness is very tricky for beginners. It is ''very'' important when working with memory.
Line 606:
Initial values :
{| class="wikitable"
|$C000||$C001||$C002||$C003||$
|-
|$00||$03||$4F||$C0||$DE||$57||$2A||$00||$FF||$01||$23||$34||$56||$78||$9A||$BC
Line 630:
ld ($C00B), hl
</pre>
==Stacks==
|