FB;
} void doADD (byte page) {. AOP = address (page, A [2]);. ROP = (byte) (R1 + R2);. write (); (R1 + R2 );
} void doADC (byte page) {. AOP = address (page, A [2]); (R1 + R2);. ROP = (byte) (R1 + R2 + RF & 0x04) ;. write ();
} void doSUB (byte page) {. AOP = address (page, A [2]);. ROP = (byte) (R1-R2);. write (); (R1-R2 );
} void doSBB (byte page) {. AOP = address (page, A [2]); (R1-R2);. ROP = (byte) (R1-R2-RF & 0x04) ;. write ();
} void doMUL (byte page) {. AOP = address (page, A [2]);. ROP = (byte) (R1 * R2);. write (); (R1 * R2 );
} void doDIV (byte page) {. AOP = address (page, A [2]);. ROP = (byte) (R1/R2);. write (); (R1/R2 );
} void doMOD (byte page) {. AOP = address (page, A [2]);. ROP = (byte) (R1% R2);. write (); (R1% R2 );
} void doABS (byte page) {. AOP = address (page, A [2]);. ROP = (byte) ((R1 | 0xfe) & 0x7f);. write () ; (java.lang. Math.abs (R1));
} void doAND (byte page) {. AOP = address (page, A [2]);. ROP = (byte) (R1 & R2);. write (); (R1 & R2 );
} void doOR (byte page) {. AOP = address (page, A [2]);. ROP = (byte) (R1 | R2);. write (); (R1 | R2 );
} void doXOR (byte page) {. AOP = address (page, A [2]);. ROP = (byte) (R1 ^ R2);. write (); (R1 ^ R2 );
} void doNOT (byte page) {. AOP = address (page, A [2]);. ROP = (byte) (~ R1 | 0x01);. write (); (~ R1 );
} void doMOVS (byte page) {. AOP = address (page, A [2]);. ROP = R1;. write ();
} void doCMPS () {(R1-R2);
}
} java.io. *; java.lang. *; java.lang. Byte. *; Java.lang. String. *; Class UU {short SCHAK = 0; byte [] RK = new byte [2]; RAM ram = new RAM (); ALU alu = new ALU (); boolean isRunning = true; out; void steps () throws IOException {
// FileWriter out = new FileWriter («Result.txt», true); = new PrintWriter («Result.txt»); name = null; j = 0; page = 0; {ram . AOP = SCHAK;. read (); [0] = (byte) (ram.ROP); = (byte) (RK [0] & 0x07); ((RK [0] & 0xff)>> ;> 3) {0x00: 0x01: 0x02: {name = «MOVA» + ((RK [0]>>> 3) +1) + »»;. AOP = (short) (SCHAK +1 );. read (); f = ram.ROP; [1] = ram.ROP; + = Integer.toHexString (RK [1]);. A [RK [0]>>> 3] = RK [1];. memChange = false; + = 2;;} 0x04: {= «ADD» + »« + Integer.toHexString (page);. AOP = alu.address (page, alu.A [0]); . read ();. R1 = ram.ROP;. AOP = alu.address (page, alu.A [1]);. read ();. R2 = ram.ROP;. doADD (page); + = 1 ;. memChange = true;;} 0x05: {= «ADC» + »« + Integer.toHexString (page);. AOP = alu.address (page, alu.A [0]);. read ();. R1 = ram.ROP;. AOP = alu.address (page, alu.A [1]);. read ();. R2 = ram.ROP;. doADC (page); + +;. memChange = true;;} 0x06: {= «SUB» + »« + Inte...