Menu

(Solved) : Part Required Write C Program Implement Lc 3 Simulator Capable Executing Instruction Ld N Q29526984 . . .

In this part, you are required to write a C program to implement a LC-3 simulator that is capable of executing instruction LD. Name the C program as part2.c. The name of the obj file (the name of the file INCLUDES the .obj suffix) must be given as a command line argument. The number of instructions in the file is NOT lirnnieerd .The state of the simulator consists of the contents of the 8 general purpose registers (i.e. RO to R7), the value of the program counter (i.e. PC), the contents of the instruction register (i.e. IR), and the value of the condition code (i.e. CC) The values in RO to R7, PC and IR should be shown as hexadecimal value. The value of CC is either N, Z or P. Before the simulator starts executing a program, it should first display the initial state of the LC-3 machine. In the initial state, RO to R7 and IR should all be 0; PC should be the starting address of the program to be executed; and CC should be set to Z When displaying the value of RO to R7, PC, IR and CC, a tab character (denoted as t in C) is used to separate the name of the register and the value of the register. .

This is part 1?

https://www.chegg.com/homework-help/questions-and-answers/-q29525315?trackid=VstnbIgn

In this part, you are required to write a C program to implement a LC-3 simulator that is capable of executing instruction “LD”. Name the C program as “part2.c”. The name of the “obj” file (the name of the file INCLUDES the “.obj” suffix) must be given as a command line argument. The number of instructions in the file is NOT lirnnieerd .The state of the simulator consists of the contents of the 8 general purpose registers (i.e. RO to R7), the value of the program counter (i.e. PC), the contents of the instruction register (i.e. IR), and the value of the condition code (i.e. CC) The values in RO to R7, PC and IR should be shown as hexadecimal value. The value of CC is either N, Z or P. Before the simulator starts executing a program, it should first display the initial state of the LC-3 machine. In the initial state, RO to R7 and IR should all be 0; PC should be the starting address of the program to be executed; and CC should be set to Z When displaying the value of RO to R7, PC, IR and CC, a tab character (denoted as “t” in C) is used to separate the name of the register and the value of the register. . Show transcribed image text

Expert Answer


Answer to Part Required Write C Program Implement Lc 3 Simulator Capable Executing Instruction Ld N Q29526984 . . .

OR