Increase a score counter at address score_counter
and return. Don't worry about a carry overflow.
Code
ld a,(score_counter) ;get current score
inc a ;increase it
ld (score_counter),a ;put it back
ret ;return
Error
You can use hl just like any other register. By
just loading the address of the score counter into hl,
you can modify it from there without having to put it back
into memory. You save three bytes.
Fixed Code
ld hl,score_counter ;address of counter
inc (hl) ;increase it
ret ;return