To under 6502 assembly language, the terms are necessary to understand.
Address
Address is the numeric reference to a specific memory location. 6502 is a 8-bit cpu, therefore, every memory location contains 8 bits. Address is recorded as hex number. it starts from 0x0000 to 0xFFFF in 6502. So we can calculate that the memory size of 6502 is 64KB.
Addressing Mode
Addressing Mode is a method used to find the data(operands) for an instruction. In 6502, we need 16 bit to save a pointer. So when accessing a pointer, e.g. 0x1234 saved at 0x0010 and 0x0011, when we access the pointer, we need to access 0x0010 – lda $10. The operand of this operation looks like indirect, but it actually is zero-page. The reason the data is saved in 00 page(0x00??). For the statement that does not have an operand but it is dealing with data, usually the operands of those statements are Accumulator – Register A. For example: asl
Assembly Language
Assembly Language is a language that can directly control machine but still human readable. Assembly language will directly translated to machine code with out any other process.
Bitwise Operation
Usually, bitwise operation means shifting right and left. Shifting left means multiple the number in register by 2, shift right usually means divide the number in register by 2. Bitwise does not do any logic operation, so it is very fast. Also, if we need to access a 1-bit data, we need to use bitwise operation. For example: we want to know what is the first bit at 0x1000, we need to get the 8 bits data, and shift right 7 times. in this case, we get the first bit at 0x1000
Register
Register is a fast internal storage location for data with in a CPU. In 6502, we use 3 registers: A, X, Y. A is accumulator, x and y are general registers. CPU can directly control registers. When need to process data in memory, CPU takes the data from the memory to register, then put it back. Register is much faster than memory, so it using registers effectively is very important for optimizing software.
Stack
Stack is a region of memory used for first-in, last-out data storage. The stack is in memory, not inside of the CPU. In 6502, the stack located at 01 page. Stacks start from high address, therefore, the stack from 0x0100 to 0x01FF
Program Counter
Program Counter is a pointer to currently-executing code. When a operation executed, the program counter increases. Therefore, it always points at next statements. When program counter points at address which the content in the address is 00, program ends.
Status Register
Status Register is a collection of status and mode flags. CPU needs to save some status, for example, there is a overflow after an add operation, in this case, we need a place to store status like this. In 6502, it is (bit 7)NV-BDIZC(bit 0). It represents
N: Negative flag, set true if the result of an operation is negative.
V: Overflow flag, when an arithmetic operation resulted in a result of greater than FF or less than 00, V set
-: Not Used
B: this is set when encountered interrupt.
D: This is decimal mode status flag. Use binary coded decimal to do add or subtract operation
I: This is Interrupt enable or disable flag. Disable not available if it is set
Z: Zero flag. This is set when a operation resulted in 0; cleared when a operation resulted a non-zero value.
C: Carry flag. This is set when borrow is required; cleared when borrow is not required. most used flag in 6502 processor.
Disassembly
Translate machine language to human readable language – assembly language.
Word Size
Word Size is a description of the allocation of storage within memory