Question: please translate it Translate the following program into hexadecimal form, and put it in a file named prog2 with the same format as the file
please translate it


Translate the following program into hexadecimal form, and put it in a file named prog2 with the same format as the file prog. Run the simulator by [python3] sim.py [-d] prog2 Write down the final result stored in P. What does the program do? 4 LD L: PO, R4 LD P1, R1 LD P2, R2 LD P3, R3 ADD R4, R2, R4 SUB R3, R1, R3 BNZ L R4, P HLT .WORD O .WORD 1 .WORD 5 .WORD 4 .WORD ST PO: P1: P2: P3: P: Instruction Format Arithmetic/Logic Instruction The instruction format of the machine (except LOAD, STORE and BRANCH): Source Source Destination Opcode Operand 1 Operand 2 Operand The instructions can be categorized into the following types: Arithmetic Operations ADD R1, R2, R3 ; R3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
