Quote:move_and_draw_player:
ld a,(player_x)
add a,b
ld (player_x),a
ld b,a
ld a,(player_y)
add a,c
ld (player_y),a
call draw_player_sprite ; Assumes routine takes b,a as args
ret
You can cut off this "ret" instruction from this routine and "jmp draw_player_sprite" instead of calling it. You spend 1 byte less and some good 10 cycles less than your usual. (Experience from programming for MSX computers and Sega Master System)
Some guy up there said about how hard is programming for SNES with only 128KB RAM. He would go nuts if he gets to know that NES and SMS had only about 4KB RAM and could address only up to 64KB RAM/ROM (SNES could address up to 4Mbits if I am not mistaken) and had to rely heavily on mapped memory (with some games having more than 16 pages on SMS at least).