James_Parsons wrote:
My noobiest question yet
say I type this code
Code:
LDA $FFE0
does this act as a pointer to memory location FFE0 or does it use FFE0 as a value that I can write into a memory location
LDA (LoaD Accumulator register) is precisely that-- a load. It does not
store anything in memory-- ever. LDA $FFE0
reads the contents of address $FFE0 directly, and puts it in the accumulator. If you want to read the contents of the memory location
pointed to by what's in $FFE0, that would be an
indirect written LDA ($FFE0). Actually, that addressing mode doesn't exist for the LDA instruction in any of the 65-family processors, but the more typical use would be that the address would be in zero page, so you would do for example LDA ($E0) (which does exist), where $00E0 and $00E1 could be the 16-bit address to any other part of the memory map. ZP is kind of like 256 bytes of processor registers, having special significance, and more flexibility than the rest of the memory map. Indexing would be the next step when you're ready for that.
After the number is in the accumulator, yes, you can of course store it to a location in the memory map-- but that's with a different (STore) instruction, not a LoaD instruction. (I say "a location in the memory map" because it doesn't have to be memory. It could be I/O.)