Ive understood the first part of this lab and have gotten all the answers. i just need help on answers…

Ive understood the first part of this lab and have gotten all the answers. i just need help on answers #21 through #27. Im pretty lost on this….

we are using the “

Brookshear machine simulator”

 

 

 

 

 

Experiment 2 

In this Experiment you will learn about the use of the JUMP instruction. The following 

program contains both conditional instructions and a loop. 

 

memory memory 

address content comment 

F0 20 ;LOAD R0 with 00 

F1 00 

F2 21 ;LOAD R1 with 01 

F3 01 

F4 23 ;LOAD R3 with 03 

F5 03 

F6 B3 ;JUMP to FC if R3 equals R0 

F7 FC 

F8 50 :ADD R0, R1 into R0 

F9 01 

FA B0 ;JUMP to F6 

FB F6 

FC C0 ;HALT 

FD 00 

 

 

Step 1. Either re-start the simulation program, or select C to clear both main memory 

and registers of any previous values. Then select option M to enter the program. 

 

Check that the program has been placed correctly in memory. © Anthony W. Smith, 2014 

CSCI 108: Survey of Computer Science 

 Lab 4: Introduction to machine code lab 

 

 

 

 

Step 2. Select option P, and set the Program Counter to the address of the start of the 

program 

 

 

Step 3. Select option S to execute the program one step at a time. Record the value of 

the PC after each step. (HINT: you should record 13 PC values including FC for the 

HALT instruction.) 

 

19. _________________________________________________________________ 

_________________________________________________________________ 

_________________________________________________________________ 

 

 

Step 4. How many times do we go round the loop? 

 

20. _________________________________________________________________ 

_________________________________________________________________ 

_________________________________________________________________ 

_________________________________________________________________ 

_________________________________________________________________ 

 

 

Step 5. A JUMP instruction is said to be unconditional if a jump will occur every time 

the instruction is executed. 

 

21. the JUMP at address FA is an unconditional jump (T / F) _________________ 

 

 

Step 6. Say I erased the program from memory, then entered it again starting in location 

A0. Two instructions would have to be changed for the program to work. Write down 

the old instruction, the new instruction, and the new comment for each. (Check your 

answers by entering the new program and running it until it terminates.) 

 

 

22. old instruction #1 ___________________________________________________ 

 

23. new instruction #1 __________________________________________________ 

 

24. new comment #1 ___________________________________________________ 

 

 

 

25. old instruction #2 ___________________________________________________ © Anthony W. Smith, 2014 

CSCI 108: Survey of Computer Science 

 Lab 4: Introduction to machine code lab 

 

 

 

26. new instruction #2 __________________________________________________ 

 

27. new comment #2 ___________________________________________________ 

Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount