Presentation is loading. Please wait.

Presentation is loading. Please wait.

ITEC 352 Lecture 16 ISA(7). Review Exam / Questions? Conditional codes, how important are they? How important are comments in assembly? What are the benefits.

Similar presentations


Presentation on theme: "ITEC 352 Lecture 16 ISA(7). Review Exam / Questions? Conditional codes, how important are they? How important are comments in assembly? What are the benefits."— Presentation transcript:

1 ITEC 352 Lecture 16 ISA(7)

2 Review Exam / Questions? Conditional codes, how important are they? How important are comments in assembly? What are the benefits / downsides of each approach to writing the software? Why are the memory locations offset by 4?

3 ISA(7) Conditionals ba –Always branch bne –Brach when Z is not 0 be –Branch when Z is 0 bg /bge ble –Branch when not (Z or (N xor V)) bpos / bneg –Branch when negative bit is on or off bv(c/s) –Overflow bit cleared or set How would you use these conditionals? Can use halt. To stop a program

4 ISA(7) Jumping call –Goto a specific label in the program (memory where label is must be within 30 bits of the call statement) –Saves location of where call is in %r15 jmpl –Goto a specific address and store the location of the jmpl in %r15

5 ISA(7) Questions What is the difference between branching / looping and calling / jumping? Why are there two methods? What are the advantages / disadvantages of each method? What higher level programming features map to these features?

6 ISA(7) Shifty Shift right (srl) –Shift a register by a certain # of bits and store the result in another register (0s are padded) –srl 10, %r1 Shift left (sll) –Instead of the right, go left Why is shifting bits important?

7 ISA(7) Conversio n How do you write an if in assembly? How do you write a while loop in assembly? How do you write a for loop in assembly? How do you implement an array in assembly?

8 ISA(7) Summary More assembly commands Conversion between Java / Assembly


Download ppt "ITEC 352 Lecture 16 ISA(7). Review Exam / Questions? Conditional codes, how important are they? How important are comments in assembly? What are the benefits."

Similar presentations


Ads by Google