1 / 7

ITEC 352

ITEC 352. Lecture 14 ISA(6). Review. Questions? Beginning / End Memory locations Variable / Memory syntax PSR Loops / Branches. More assembly. What does the program I show you do? How important are comments in assembly?

aysel
Download Presentation

ITEC 352

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ITEC 352 Lecture 14 ISA(6)

  2. Review • Questions? • Beginning / End • Memory locations • Variable / Memory syntax • PSR • Loops / Branches

  3. More assembly • What does the program I show you do? • How important are comments in assembly? • How would we write a JAVA program that would produce similar assembly? • What are the benefits / downsides of each approach to writing the software? • Why are the memory locations offset by 4?

  4. Conditionals How would you use these conditionals? • ba • Always branch • bne • Brach when Z is not 0 • be • Branch when Z is 0 • bg /bgeble • 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

  5. 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

  6. Shifty • Shift right (srl) • Shift a register by a certain % of bits and store the result in another register (0s are padded) • Syntax? • Shift left (sll) • Instead of the right, go left • Why is shifting bits important?

  7. Summary • Assembly instructions / simple program

More Related