📄 opcodecjne.java
字号:
/** * Projet de langage JAVA IFITEP 3 2005 - Simulateur 8051 * <p> * D閒inition de l'instruction CJNE. * Cf.: * - documentation technique 8051 * - Ouvrage "Microcontroleur 8051 et 8052", edition Dunod * * @author Matthieu SIMON * @version 1.0 du 14/06/05 */public class OpcodeCJNE extends Opcode { public void execute(CORE_CPU8051 cpu) throws OpcodeException { int dest, octet; if((dest = decodeAddressingMode(cpu.getCurrentLine().getOperand(1))) == Integer.MAX_VALUE) throw new OpcodeException(this, "Bad Addressing Mode"); if((octet = decodeAddressingMode(cpu.getCurrentLine().getOperand(2))) == Integer.MAX_VALUE) throw new OpcodeException(this, "Bad Addressing Mode"); if(CORE_CPU8051.internalDataMem[dest] != CORE_CPU8051.internalDataMem[octet]) relativeJump(cpu.getCurrentLine().getOperand(3), cpu); CORE_CPU8051.internalDataMem[CORE_CPU8051.PSW] = ((CORE_CPU8051.internalDataMem[dest] < CORE_CPU8051.internalDataMem[octet]) ? CORE_CPU8051.internalDataMem[CORE_CPU8051.PSW] | 0x80 : CORE_CPU8051.internalDataMem[CORE_CPU8051.PSW] & ~ 0x80 ) &0xFF; cpu.incCyclesCount(2); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -