Week
Topics
Reading
Week 1 9/08
Wed 9/8
Introduction
Syllabus
The PC
What's inside?
The main players
First program in assembly
structure
presentation
documentation
Fri 9/10
Week 2 9/13
Monday 9/13
Mini Lab
Assembling with the -l option to generate a listing
nasm -f elf -F stabs -l helloworld.S helloworld.asm
The memory contains numbers only
Boolean Algebra
Binary system
logic expressions
Wednesday 9/15
Digital Electronics Lab in FH143
Friday 9/17
Digital Electronics Lab in FH143
Week 3 9/20
Monday 9/20
Three-bit adder. Review
A word on Verilog and FPGAs Examples
Architecture of the Pentium (simplified)
Wednesday 9/22
Friday 9/24
Comments on lab reports
Once again: Everything in memory is a number!
Review the reverse engineering example
Exercises on Binary/Hexadecimal (do on your own!)
The mov instruction (covered here ).
Introduction to the 32-bit registers: EAX, EBX, ECX, EDX
Introduction to the 16-bit registers: AX, BX, CX, DX
Introduction to the 8-bit registers: AL, AH, BL, BH, CL, CH, DL, DH
Week 4 9/27
Monday 9/27
Wednesday 9/29
Friday 10/1
Arithmetic instructions: ADD , SUB , INC , DEC
Logic instructions: AND , OR , NOT , XOR
using DDD to debug programs
Lab 4 , Part 1
Week 5 10/04
Monday 10/4
Wednesday 10/6
Representing negative numbers, Signed Magnitude, 1's complement, 2's complement.
Exercises
Friday 10/8
Week 6 10/11
Wednesday 10/13
Review 2's complement
An example illlustrating what compiler code looks like.
Logic Design: Building a "subtractor" with an adder, using only AND, OR, NOT and XOR gates.
Mul/Div
Exercise: Teller Machine
Friday 10/15
Addressing Modes
Question of the day : What is an instruction set? Is there a best way to define an instruction set?
Pentium Instruction Set
Cool videos for a rainy afternoon
The main addressing modes:
inherent
register
immediate
direct
indirect/based/indexed
indirect with displacement
base-indexed
base-indexed with displacement
Exercises on Addressing Modes
Ascii Table
No homework assignment this week. Prepare for midterm!
The signed and unsigned representations of numbers are covered in Sections 1.7 and 1.8 of The Art of Assembly, and in Chapter 2 of Carter's PC Assembly Language.
Addressing modes are covered in Chapter 4 of The Art of Assembly. We won't cover "Displacement Only Addressing" modes (Section 4.6.2.1). Mentally replace 16-bit registers by 32-bit registers when reading this section.
Week 7 10/18
Wednesday 10/20
Friday 10/22
Lab 5
Loops and Addressing Modes
Week 8 10/25
Monday 10/25
The shift instructions : SHR, SHL, logical and arithmetic variants.
Sound waves, a bit of physics
The format of wav sound files
A demo program: readWaveFile.asm
Wednesday 10/27
Using a Makefile for Lab 5
Challenge of the day: clip 8-bit samples by forcing overflow to 0xff...
Examples with wav files:
Lab 6
Friday 10/29
Week 9 11/01
Monday 11/01
Functions
Using the stack
Passing parameters
by value
by reference
functions returning values
Exercises on Functions
Wednesday 11/03
Review of functions: passing parameters through registers
push/pop
organization (example program: maze.asm )
examples involving copying buffers
Functions and the topics associated with passing parameters are covered in Carter's Manual on Assembly Language, in Chapter 4 , titled Subprograms .
Week 10 11/08
Week 11 11/15
Week 12 11/22
Wednesday: Thanksgiving Break
Friday: Thanksgiving Break
Week 13 11/29
Week 14 12/06
Week 15 12/13