Reusable RAM writer: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
>Torchickens |
m (Text replacement - "(\bld(?:|i|l|d|h) (?:.+, ?)?)\((.+)\)" to "$1[$2]") |
||
Line 41: | Line 41: | ||
inc b - useless code |
inc b - useless code |
||
ld |
ld [hl],a - load a into the address (e.g. D059) |
||
ld h, D3 - we load the address byte 1 as D3 (item quantities are in the D3XX region) |
ld h, D3 - we load the address byte 1 as D3 (item quantities are in the D3XX region) |
||
Line 51: | Line 51: | ||
inc b - useless code |
inc b - useless code |
||
ld |
ld [hli],a - means we put 'a' in D323, and then increase the hl value to D324 |
||
inc hl - hl value= D325 |
inc hl - hl value= D325 |
||
ld |
ld [hli],a - means we will load a (0) into D325 (item 4 quantity), and increase hl to D326 |
||
inc hl - hl value = D327 |
inc hl - hl value = D327 |
||
ld |
ld [hli],a - means we put 'a' in D327 (item 5 quantity) |
||
ret - ends the code. |
ret - ends the code. |