(); + +; break;} (byte) 0x1f: {name = В«HALTВ»; isRunning = false; break;}
}
System.out.println (В«виконана командаВ« + name);
out.print (name + »»); (name! = В«HALTВ») {. out.println (В«А1В« + Integer.toHexString (alu.A [0]));. out . println (В«А2В« + Integer.toHexString (alu.A [1]));. out.println (В«А3В« + Integer.toHexString (alu.A [2]));. out.println (В«Р1В« + Integer.toHexString (alu.R1));. out.println (В«Р2В« + Integer.toHexString (alu.R2));. out.println (В«РФВ« + Integer.toHexString (alu.RF));. out.println (В«РKВ« + Integer.toHexString (RK [0]) + »»); (name == В«MOVAВ» + ((RK [0]>>> 3) +1) + »» ) System.out.println (Integer.toHexString (RK [1]));. out.println (В«СЧАКВ« + Integer.toHexString (SCHAK)); (name == В«MOVAВ» + ((RK [0]> ;>> 3) +1) + »») out.print (Integer.toHexString (RK [1])); (ram.memChange) {. out.println (В«Записано мінлива АОП =В« + Integer.toHexString (ram.AOP));. out.println (В«РОП =В« + Integer.toHexString (ram.ROP));. print (Integer.toHexString (ram.AOP) + »»);. print (Integer.toHexString ( ram.ROP) + »»);
}. println (Integer.toHexString (SCHAK));
}. out.println ();. R1 = 0;. R2 = 0; [1] = 0;} {//out.close ();
}
}
} java.io. *; java.lang. *; java.lang. Byte. *; Java.lang. String. *; Class Processor {RAM ram = new RAM (); ALU alu = new ALU (); UU uu = new UU (); byte [] VXfile; out; void input () throws IOException {
// out = new FileWriter (В«Result.txtВ»); d; toRead; in = null; x = 0, i = 0; long m = 0; {in = new RandomAccessFile (В«121.jarВ», В«rВ»); = in.length (); = in.length (); = new byte [(int) m]; (toRead> 0) {= in.readByte (); = 1; [i] = d ; + +;
}
} (Exception e) {System.out.println (e);} {(in == null) {in.close ();}
} j = 0; int k = 0;. SCHAK = alu.address (VXfile [1], VXfile [3]); (i = 0; i
} void out () throws IOException {
// out = new FileWriter («Result.txt», true); = new PrintWriter («Result.txt»); {for (ram.AOP = 0; ram.AOP <2048; ram.AOP + +) ( (ram.AOP +1)% 256! = 0) {ram.read (); System.out.print (ram.ROP + »»);} System.out.println ();. out.println (); ( ram.AOP = 0; ram.AOP <2048; ram.AOP + +) ((ram.AOP +1)% 256! = 0) {ram.read (); out.print (ram.ROP + »»);} out . println ();. println ();} {//out.close ();
}
} void makingNull () {(ram.AOP = 0; ram.AOP <2048; ram.AOP + +)
{ram.ROP = 0;. write ();}. SCHAK = 0;. RK [0] = 0;. RK [1] = 0;. RF = 0;. A [0] = 0; . A [1] = 0;. A [2] = 0;
} void makeAll () throws IOException {(uu.isRunning). steps ();
} void makeOne () throws IOException {(uu.isRunning == true). steps ();...