Question: Don't use method such as try, catch, just basic code please import java.io . * ; public class VPCrte { static final int MEMSIZ =
Don't use method such as try, catch, just basic code please import java.io;
public class VPCrte
static final int MEMSIZ ;
static final int HALT ;
static final int ADD ;
static final int SUB ;
static final int MLT ;
static final int DIV ;
static final int ILOAD ;
static final int LOAD ;
static final int STOR ;
static final int READ ;
static final int WRITE ;
static final int BR ;
static final int BZ ;
static final int BN ;
static final int DUMP ;
static int MEMORY new intMEMSIZ;
static int PCREG;
static int IRREG;
static int GPREG;
static boolean debug false;
public static void readToMemoryString fname throws IOException
for each line of "machine code":
if debug
display info about code as it is loaded into memory
copy machine code instruction into memory
public static String padint n int w
determine length of n
calculate number of leading s to pad with
create and return string of leading s and n
public static void dumpMemory
System.out.println;
int c;
System.out.printlnPCREG padPCREG;
System.out.printlnIRREG padIRREG;
System.out.printlnGPREG padGPREG
;
System.out.printlnMEMORY: ;
System.out.println;
for int i; i
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
