CPS 1 - Spring, 2000 - Ramm 3/10/00 #23
- Announce
- Read Chap 9, Language Translation
- Have a Great Break!
Chapter 8. Machine Architecture
- Another Example
-
number.as
-
sum.as
- Need to handle IF and WHILE situations
- cmp instruction
- jmp, jnb, jb instructions
- Example
-
largest.as
- Tracing (often the only way to understand)
- Loop Example
-
summer.as
- Factorial Example (Iterative)
-
fact.as
- Writing a Program from Scratch
- Handling Lists or Arrays (Self Modifying Code)
- E.g. sum of squares fo input
- quit on zero
- Fancier Architecture
- Need for more registers
- Dealing with tables (arrays)