For anyone crazy enough to care how.... I was using 2 bytes of ram to set up an indirect jmp instruction to jump to the subroutine I use to update enemies:
LDY #6 ;load the address from the enemy
;definition into the EnemyUpdateFunc LDA (EnemyDef),Y STA EnemyUpdateFunc LDY #7 LDA (EnemyDef),Y STA EnemyUpdateFunc+1 JMP (EnemyUpdateFunc) ;then jump to it
Which means that the 2 bytes for the EnemyUpdateFunc address were only used in this one particular spot. I also found another place where 2 consecutive bytes were only used for a small limited time (temporary variables used to set up the playfield while drawing the health/status header). Combining these 2 to use the same memory knocked TWO WHOLE BYTES off my ram usage. Hooray!
No comments:
Post a Comment