James_Parsons wrote:
say I have memory location $FF how do I write $00(basically clear it) or $E4(something random) into this location
Put the value you want to write to it into a processor register, then store it, something like:
Code:
LDA #$E4
STA $FF
In many if not most cases, the value you want to store is the result of an operation that just took place, so it's already in the processor register, so you just do the one store instruction.
You could use X or Y also (so the "LD" and "ST" above are followed by X or Y instead of A), if A is not available, or if you already have the desired value in X or Y. With the 65
c02, if you want to clear that location, you can do it without using any processor registers, using STZ (STore a Zero), like:
Code:
STZ $FF