Unformatted text preview:

Computer Org Lecture 12 Name 1 Write a MARIE assembly language to read two numbers and determine which is smaller HLL read X read Y if X Y then min X else min Y end if output min Lecture 12 Page 1 Computer Org Lecture 12 Name 2 Consider the microoperations of the fetch decode execute machine cycle in the execution of the Simple Program below that calculates RESULT X Y Address 100 101 102 103 104 105 106 Label Assembly Language LOAD X ADD Y STORE RESULT HALT X DEC 35 Y DEC 23 RESULT DEC 0 Machine Language 110416 310516 210616 700016 002316 FFE916 000016 Revised Figure 4 14 a LOAD X 110416 in ML Step Fetch Decode IR 15 12 Get operand Execute Step RTN initial values MAR b PC T0 MBR b M MAR T1 IR b MBR T2 PC b PC 1 T3 T4 MAR b IR 11 0 MBR b M MAR T5 AC b MBR T6 PC 100 100 100 100 101 101 101 101 IR MAR MBR AC 1104 1104 1104 1104 1104 100 100 100 100 104 104 104 1104 1104 1104 1104 0023 0023 0023 Revised Figure 4 14 b ADD Y 310516 in ML Step Step RTN initial values AFTER LOAD 104 MAR b PC Fetch T0 MBR b M MAR T1 IR b MBR T2 PC b PC 1 T3 Decode IR 15 12 T4 MAR b IR 11 0 MBR b M MAR Get operand T5 AC b AC MBR Execute T6 PC IR MAR MBR AC 101 101 101 101 102 102 102 102 1104 1104 1104 3105 3105 3105 3105 3105 104 101 101 101 101 105 105 105 0023 0023 3105 3105 3105 3105 FFE9 FFE9 0023 0023 0023 0023 0023 0023 0023 000C Revised Figure 4 14 c STORE RESULT 210616 in ML Step Fetch Step RTN initial values AFTER LOAD 104 T0 PC IR MAR MBR AC 102 3105 105 FFE9 000C T1 T2 T3 Decode IR 15 12 T4 Execute T5 T6 Get Operand step is not necessary for STORE instructions Lecture 12 Page 2


View Full Document

UNI CS 1410 - Study Guide

Loading Unlocking...
Login

Join to view Study Guide and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study Guide and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?