ITEC 352 Lecture 14 ISA(6). Review Questions? Beginning / End Memory locations Variable / Memory syntax PSR Loops / Branches.

Slides:



Advertisements
Similar presentations
Cosc 2150: Computer Organization
Advertisements

ITEC 352 Lecture 13 ISA(4).
1 Lecture 3: MIPS Instruction Set Today’s topic:  More MIPS instructions  Procedure call/return Reminder: Assignment 1 is on the class web-page (due.
CENG 311 Decisions in C/Assembly Language
Goal: Write Programs in Assembly
4.
Lecture 5: MIPS Instruction Set
MIPS assembly. Review  Lat lecture, we learnt  addi,  and, andi, or, ori, xor, xori, nor,  beq, j, bne  An array is stored sequentially in the memory.
Branches Two branch instructions:
ITEC 352 Lecture 14 ISA(5). Review Questions? Exam 1 next Friday Assembly –Assembler –Basic structure –Registers –Memory.
1 ECE462/562 ISA and Datapath Review Ali Akoglu. 2 Instruction Set Architecture A very important abstraction –interface between hardware and low-level.
Deeper Assembly: Addressing, Conditions, Branching, and Loops
ECE 15B Computer Organization Spring 2010 Dmitri Strukov Lecture 5: Data Transfer Instructions / Control Flow Instructions Partially adapted from Computer.
Systems Architecture Lecture 5: MIPS Instruction Set
1 Today’s lecture  Last lecture we started talking about control flow in MIPS (branches)  Finish up control-flow (branches) in MIPS —if/then —loops —case/switch.
ITEC 352 Lecture 17 Functions in Assembly. Functions + Assembly Review Questions? Branching Call / Jump Reminder exam on Friday, project due next Friday.
Lecture 4: Loads, Logic, Loops. Review Memory is byte-addressable, but lw and sw access one word at a time. These instructions transfer the contents of.
1 Lecture 2: MIPS Instruction Set Today’s topic:  MIPS instructions Reminder: sign up for the mailing list cs3810 Reminder: set up your CADE accounts.
Lecture 5 Sept 14 Goals: Chapter 2 continued MIPS assembly language instruction formats translating c into MIPS - examples.
CPSC355 Week 3 Hoang Dang. Week 3 Assignment 1 Do/while loop Assignment 2 Binary Bitwise operation.
Lecture 5: Procedures. Function call book-keeping in C main() { int i,j,k,m;... i = mult(j,k);... m = mult(i,i);... } /* really dumb mult function */
More decisions and logic (1) Fall 2010 Lecture 4: Loads, Logic, Loops.
9/29: Lecture Topics Memory –Addressing (naming) –Address space sizing Data transfer instructions –load/store on arrays on arrays with variable indices.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
IT253: Computer Organization Lecture 5: Assembly Language and an Introduction to MIPS Tonga Institute of Higher Education.
Making Decision – Microprocessor
1 Branches and Procedure Calls Lecture 14 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
11/02/2009CA&O Lecture 03 by Engr. Umbreen Sabir Computer Architecture & Organization Instructions: Language of Computer Engr. Umbreen Sabir Computer Engineering.
Chapter 10 The Assembly Process. What Assemblers Do Translates assembly language into machine code. Assigns addresses to all symbolic labels (variables.
Lecture 4: MIPS Instruction Set
IFT 201: Unit 1 Lecture 1.3: Processor Architecture-3
A summary of TOY. 4 Main Components Data Processor Control Processor Memory Input/Output Device.
Richard P. Paul, SPARC Architecture, Assembly Language Programming, and C Chapter 4 –Binary Arithmetic These are lecture notes to accompany the book SPARC.
MIPS coding. Review Shifting – Shift Left Logical (sll) – Shift Right Logical (srl) – Moves all of the bits to the left/right and fills in gap with 0’s.
CHAPTER 6 Instruction Set Architecture 12/7/
Chapter 2 Decision-Making Instructions (Instructions: Language of the Computer Part V)
Computer Architecture CSE 3322 Lecture 3 Assignment: 2.4.1, 2.4.4, 2.6.1, , Due 2/3/09 Read 2.8.
Computer Organization CS224 Fall 2012 Lessons 7 and 8.
EET 4250 Instruction Representation & Formats Acknowledgements: Some slides and lecture notes for this course adapted from Prof. Mary Jane Penn.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
SPARC Programming Model 24 “window” registers 8 global registers Control registers –Multiply step –PSR (status flags, etc.) –Trap Base register –Window.
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.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
CS2100 Computer Organisation
MIPS Coding Continued.
Lecture 4: MIPS Instruction Set
Computer Architecture & Operations I
Conditional Branches What distinguishes a computer from a simple calculator is its ability to make decisions Decisions are made using the if statement,
Assembly Programming using MIPS R3000 CPU
Instructions for Making Decisions
Lecture 4: MIPS Instruction Set
ARM Control Structures
MISP Assembly.
CS 235 Computer Organization & Assembly Language
Logical and Decision Operations
Computer Architecture & Operations I
MIPS coding.
MIPS Functions.
MIPS Functions.
3.
COMS 361 Computer Organization
ARM Control Structures
Assembly Programming using MIPS R3000 CPU
MIPS Assembly.
Flow of Control -- Conditional branch instructions
MIPS assembly.
9/27: Lecture Topics Memory Data transfer instructions
Instruction Set Architecture
MIPS Functions.
MIPS instructions.
Presentation transcript:

ITEC 352 Lecture 14 ISA(6)

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

ISA(6) 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?

ISA(6) 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?

ISA(6) 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

ISA(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?

ISA(6) Summary Assembly instructions / simple program