{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ICS233_Lecture9 Slides

ICS233_Lecture9 Slides - Computer Architecture Assembly...

This preview shows pages 1–4. Sign up to view the full content.

1 Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 1 MIPS MIPS PROCESSOR PROCESSOR INSTRUCTION SET INSTRUCTION SET ICS 233 ICS 233 Computer Architecture & Computer Architecture & Assembly Language Assembly Language Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 2 ICS 233 ICS 233 Computer Architecture & Computer Architecture & Assembly Language Assembly Language Lecture 9 Lecture 9

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 3 Lecture Outline ± Translating IF Statement ± Translating WHILE loop Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 4 Translating an IF Statement Consider the following IF statement: if (a == b) c = d + e; else c = d – e; Assume that a, b, c, d, e are in \$s0, \$s1, \$s2, \$s3, \$s4 respectively How to translate the above IF statement? bne \$s0, \$s1, else addu \$s2, \$s3, \$s4 j exit else: subu \$s2, \$s3, \$s4 exit: . . .
3 Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 5 Compound Expression with AND • Programming languages use short-circuit evaluation • If first expression is false , second expression is skipped if ((\$s1 > 0) & (\$s2 # One Possible Implementation . .. bgtz

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 6

ICS233_Lecture9 Slides - Computer Architecture Assembly...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online