Jump to content

Reusable RAM writer: Difference between revisions

m
Text replacement - "(\bld(?:|i|l|d|h) (?:.+, ?)?)\((.+)\)" to "$1[$2]"
>Torchickens
m (Text replacement - "(\bld(?:|i|l|d|h) (?:.+, ?)?)\((.+)\)" to "$1[$2]")
 
Line 41:
inc b - useless code
 
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)
Line 51:
inc b - useless code
 
ld ([hli)],a - means we put 'a' in D323, and then increase the hl value to D324
 
inc hl - hl value= D325
 
ld ([hli)],a - means we will load a (0) into D325 (item 4 quantity), and increase hl to D326
 
inc hl - hl value = D327
 
ld ([hli)],a - means we put 'a' in D327 (item 5 quantity)
 
ret - ends the code.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.