1、在网上找来的,之前在百度百科比较难找到,传上来吧。6502微处理器 收藏/*6502微处理器是FC(Family Computer 俗称任天堂红白机)使用的微处理器,本文详细的讲解了6502处理器的寄存器组织,寻址方式和指令集。原文是英文,RockCarry做了翻译,在指令集部分,RockCarry觉得翻译实在是没有太多的必要,所以保留了原文。注意:符号SET_ZERO(temp /* This is not valid in decimal mode */if (IF_DECIMAL() if (AC SET_SIGN(temp);SET_OVERFLOW(!(AC src) if (tem
2、p 0x99) temp += 96;SET_CARRY(temp 0x99); else SET_SIGN(temp);SET_OVERFLOW(!(AC src) SET_CARRY(temp 0xff);AC = (BYTE) temp);/* AND */src SET_SIGN(src);SET_ZERO(src);AC = src;/* ASL */SET_CARRY(src src 8) /* Push return address onto the stack. */PUSH(PC SET_BREAK(1); /* Set BFlag before pushing */PUSH
3、(SR);SET_INTERRUPT(1);PC = (LOAD(0xFFFE) | (LOAD(0xFFFF) 8) /* Push return address onto the stack. */PUSH(PC PC = (src);/* LDA */SET_SIGN(src);SET_ZERO(src);AC = (src);/* LDX */SET_SIGN(src);SET_ZERO(src);XR = (src);/* LDY */SET_SIGN(src);SET_ZERO(src);YR = (src);/* LSR */SET_CARRY(src src = 1;SET_S
4、IGN(src);SET_ZERO(src);STORE src in memory or accumulator depending on addressing mode./* NOP */Nothing./* ORA */src |= AC;SET_SIGN(src);SET_ZERO(src);AC = src;/* PHA */src = AC;PUSH(src);/* PHP */src = GET_SR;PUSH(src);/* PLA */src = PULL();SET_SIGN(src); /* Change sign and zero flag accordingly. *
5、/SET_ZERO(src);/* PLP */src = PULL();SET_SR(src);/* ROL */src 0xff);src SET_SIGN(src);SET_ZERO(src);STORE src in memory or accumulator depending on addressing mode./* ROR */if (IF_CARRY() src |= 0x100;SET_CARRY(src src = 1;SET_SIGN(src);SET_ZERO(src);STORE src in memory or accumulator depending on addressing mode.