Changes

Jump to: navigation, search

6502

714 bytes added, 17:14, 13 January 2022
Registers
* Stack Pointer (S or SP) - a pointer to the current position in the stack
* Processor Status (P or PS) - a collection of bits (flags) which indicate or control aspects of the processor mode and status:
** C - Carry - Used to indicate a carry or borrow during addition/and subtractionoperations. If set (=1) at the start of an add-with-carry (ADC) operation, an additional 1 will be added to the result; if cleared (=0) at the start of a subtract-with-carry instruction (SBC), an additional 1 will be subtracted from the result. This flag will be set or cleared to indicate if an (unsigned) addition overflowed (result > 255) or the (unsigned) subtraction underflowed (result < 0)** Z - Zero flag - indicates that an operation produced a zero result. Since comparison instructions (CMP, CPX, CPY for comparisions involving the A, X, or Y registers respectively) are actually subtractions, comparing two equal numbers by subtraction will resultin a zero value, setting this flag.
** I - Interrupt disable
** D - Decimal mode - bytes are interpreted as two-digit decimal values instead of 8-bit binary values when doing math
** B - Break - Indicates a software interrupt (BRK instruction) has caused a non-maskable interrupt (NMI), rather than a hardware interrupt has occurredNMI.** V - Overflow - Set when a math operation overflows (result > 127) or underflows (result < -128) a one-byte signed result** S - Negative Sign - set when an operation produces a negative result(bit 7 is set in the result)
== Instruction Set ==

Navigation menu