DerekChiou_EE306_Spring2009_Lecture11

DerekChiou_EE306_Spring2009_Lecture11 - and a number of...

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

View Full Document Right Arrow Icon
© Derek Chiou Lecture 11: Programming (2) and Debugging Prof. Derek Chiou University of Texas at Austin
Background image of page 1

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

View Full DocumentRight Arrow Icon
2/25/2009 © Derek Chiou : EE306: Lecture 11 Recap LC-3 FSM Problem Solving (or, How to Program) Outline Continue with Programming Intro to Debugging 2
Background image of page 2
Greatest Common Divisor (1) GCD(a, b): If (b == 0) then a Else GCD(b, a mod b) 2/25/2009 © Derek Chiou : EE306: Lecture 11 3 b<-B == 0? a<-A Output a t = a mod b a <- b b <- a Is there a problem???
Background image of page 3

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

View Full DocumentRight Arrow Icon
Greatest Common Divisor GCD(a, b): If (b == 0) then a Else GCD(b, a mod b) 2/25/2009 © Derek Chiou : EE306: Lecture 11 4 b<-B == 0? a<-A Output a t = a mod b b<-t a<-b
Background image of page 4
A MOD B function 2/25/2009 © Derek Chiou : EE306: Lecture 11 5 t <- t - B > 0 t <- A == 0 t <- t + B
Background image of page 5

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

View Full DocumentRight Arrow Icon
A MOD B function (improved) 2/25/2009 © Derek Chiou : EE306: Lecture 11 6 t <- t - B t <- A t <- t + B
Background image of page 6
Combined 2/25/2009 © Derek Chiou : EE306: Lecture 11 7 b<-B == 0? a<-A Output a b<-t a<-b t <- t - B t <- A t <- t + B
Background image of page 7

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

View Full DocumentRight Arrow Icon
Search For A Value in Memory Given a 16b value, a base address in memory,
Background image of page 8
Background image of page 9

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

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

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

View Full DocumentRight Arrow Icon
Background image of page 12
Background image of page 13

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

View Full DocumentRight Arrow Icon
Background image of page 14
Background image of page 15
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: and a number of elements in memory, return the address of that value 2/25/2009 Derek Chiou : EE306: Lecture 11 8 10 35 2-5 5 17 3044 1 0x100 0x101 0x102 0x103 0x104 0x105 0x106 0x107 17 2/25/2009 Derek Chiou : EE306: Lecture 11 9 Sorting Given a base address and a number of elements in memory, sort them in-place 2/25/2009 Derek Chiou : EE306: Lecture 11 10 10 35 2-5 5 17 3044 1 0x100 0x101 0x102 0x103 0x104 0x105 0x106 0x107 2/25/2009 Derek Chiou : EE306: Lecture 11 11 Improved Search Given a sorted list, can we improve our search? 2/25/2009 Derek Chiou : EE306: Lecture 11 12 10 35 2-5 5 17 3044 1 0x100 0x101 0x102 0x103 0x104 0x105 0x106 0x107 Translate to Code? 2/25/2009 Derek Chiou : EE306: Lecture 11 13 Basic Constructs of Structured Programming 2/25/2009 Derek Chiou : EE306: Lecture 11 14 Debugging 2/25/2009 Derek Chiou : EE306: Lecture 11 15...
View Full Document

This note was uploaded on 02/24/2011 for the course EE 306 taught by Professor Ambler during the Spring '07 term at University of Texas at Austin.

Page1 / 15

DerekChiou_EE306_Spring2009_Lecture11 - and a number of...

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

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