Assembly language

Assembly language - MIPS

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Problem Session Problem Session Nan Li Nan Li 2006.11 2006.11
Background image of page 1

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

View Full DocumentRight Arrow Icon
What will we do? Go over each chapter Important Points Some of exercise problems
Background image of page 2
Outline Big Picture Instruction Set – Tell the machine what it should do How can we present those numbers How can we measure the goodness of a machine How to implement the instruction set?
Background image of page 3

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

View Full DocumentRight Arrow Icon
Chapter 1
Background image of page 4
Chapter 2 Three types of Instruction R-type, I-type, J-type Example: MIPS -> High Level Language The last question in the midterm High Level Language -> MIPS 1.The format and meaning 2.Instruction-> Machine code 3.Machine code -> Instruction op rs rt rd shamt funct add $1, $21, $29: 000000 10101 11101 00001 00000 100000
Background image of page 5

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

View Full DocumentRight Arrow Icon
bne $s5, $0, C1 # branch k != 0 add $s0, $s3, $s4 # f = i + j j Exit # break C1: addi $t0, $s5, -1 # $t0 = k - 1 bne $t0, $0, C2 # branch k != 1 add $s0, $s1, $s2 # f = g + h j Exit # break C2: addi $t0, $s5, -2 # $t0 = k - 2 bne $t0, $0, C3 # branch k != 2 sub $s0, $s1, $s2 # f = g - h j Exit # break C3: addi $t0, $s5, -3 # $t0 = k - 3 bne $t0, $0, Exit # branch k != 3 sub $s0, $s3, $s4 # f = i - j Exit: if (k==0) f = i + j; Else if (k==1) f = g + h; It is a branch If else? For, while?
Background image of page 6
Integer Conversion from one base to the other Two’s complement: Positive: Negative: invert and add Calculation How to detect overflow? The highest two bits of
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/11/2010 for the course CSE/EEE CSE/EEE230 taught by Professor Baoxinli during the Fall '08 term at ASU.

Page1 / 24

Assembly language - MIPS

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online