Difference between revisions of "CSC231 Schedule 2010"

From dftwiki3
Jump to: navigation, search
(Created page with ' =Weekly Schedule= {| style="width:100%" border="1" |- style="background:#ffdead;" |'''Week''' || '''Topics''' || '''Reading''' |-valign="top" |width="15%"| Week 1 <br /> 9/05…')
 
 
(184 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
--[[User:Thiebaut|D. Thiebaut]] 08:28, 6 January 2011 (EST)
 +
----
 +
 +
<br />
 +
<center>
 +
[[CSC231 | Back to Main Page]] | [http://cs.smith.edu/classwiki/index.php/CSC231_Page_(2010)  Class Wiki]
 +
</center>
 +
 +
----
 +
__TOC__
  
 
=Weekly Schedule=
 
=Weekly Schedule=
Line 6: Line 16:
 
|'''Week''' || '''Topics''' || '''Reading'''  
 
|'''Week''' || '''Topics''' || '''Reading'''  
 
|-valign="top"
 
|-valign="top"
 
+
|width="15%"| Week 1 <br /> 9/08
|width="15%"| Week 1 <br /> 9/05
 
 
|width="60%"|
 
|width="60%"|
* [[CSC231_First_Program | first program]]
+
;Wed 9/8
* assembling programs
+
* Introduction
* first look at Pentium processor. [http://www.intel.com/pressroom/archive/photos/p4_photos.htm?iid=ipp_850echpst+relate_pr& Photos].
+
* Syllabus
* Outputing text in assembly
+
* The PC
* memory map of a program
+
** What's inside?
* [[CSC231_skeleton_program | skeleton program]]
+
** The main players
* [[media:CSC231_Bare_and_Skeleton_version.pdf | Bare versus Skeleton versions]]
+
* [[CSC231 FirstProg.asm | First program]] in assembly
* A [[CSC231_Hello_World_on_Mac | hello-world program]] for the Mac OSX. More info on Mac OS X system calls can be found [http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/x86-system-calls.html here ][[CSC231 Final Exam 12/08|.]]  
+
** structure
 
+
** presentation
 +
** documentation
 +
;Fri 9/10
 +
* [[CSC231_skeleton_program | Skeleton program]]
 +
* "Hello world!" in assembly: [[CSC231 Hello World! | program]]
 +
* Introduction to wikimedia
 +
** [http://en.wikipedia.org/wiki/Wikipedia:Cheatsheet Wikipedia Cheat-Sheet]
 +
**  [http://www.mediawiki.org/wiki/Help:Formatting Formatting text]
 +
** [http://www.mediawiki.org/wiki/Help:Images Inserting images]
 +
** [http://www.mediawiki.org/wiki/Links Creating links]
 +
* [[CSC231 Hello World on Mac | Hello world!]] for the Mac
 
----
 
----
 +
* [[CSC231 PC-demolition Lab | PC Demolition Lab]] <--- report due next Friday, 9/17/10
  
* '''Mini lab''': [[CSC231_Lab_1 | Lab #1 ]]
+
|
|| Chapter 1 in the [http://cs.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html Art of Assembly].
+
* Chapter 1 in the [http://cs.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html Art of Assembly].
Also Chapter 3, Sections 0 to 3.1.2.
+
* Also Chapter 3, Sections 0 to 3.1.2.
Sections 1.3.1, 1.3.2, 1.3.3, 1.3.4, and 1.3.5 in Carter's [http://cs.smith.edu/~thiebaut/classes/231_0405/doc/pcasm-book.pdf PC Assembly Language].  
+
* Sections 1.3.1, 1.3.2, 1.3.3, 1.3.4, and 1.3.5 in Carter's [http://cs.smith.edu/~thiebaut/classes/231_0405/doc/pcasm-book.pdf PC Assembly Language].  
  
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
| Week 2 <br /> 9/08
+
| Week 2 <br /> 9/13
 
||  
 
||  
* First introduction to the Pentium processorRegisters, ALU, Control Unit, Busses, Memory
+
; '''Monday 9/13'''
* [[CSC231_Exercises_Binary_Hexadecimal | Exercises]] on binary, decimal, hexadecimal system
+
* Mini Lab
* [http://www.willamette.edu/~gorr/classes/cs130/lectures/BinaryConversion/convert.html Bin/Dec/Hex converter]
+
* Assembling with the -l option to generate a listing
* [[CSC231_listing_file | Listing file]] with assembly and opcodes
+
* [[media:CSC231_StepByStepInstruction.pdf | Step by Step]] execution of instructions
+
      nasm -f elf -F stabs -l helloworld.S helloworld.asm
* [[CSC231_ReverseEngineering.lst | Exercise]] on reverse engineering.  [[CSC231_ReverseEngineeringSol.asm | Solution]]
+
   
* The '''mov''' instruction.  Syntax.  Operands
+
* The memory contains numbers only
* Units of storage: nybble, byte, word, double-word
+
* [http://en.wikipedia.org/wiki/Introduction_to_Boolean_algebra Boolean Algebra]
* The '''add''' instruction.
+
* Binary system
* Using the '''ddd''' debugger
+
* logic expressions
 
+
; '''Wednesday 9/15'''
 +
* Digital Electronics Lab in FH143
 +
; '''Friday 9/17'''
 +
* Digital Electronics Lab in FH143
 
----
 
----
 
+
* [[CSC231 Lab 1 | Mini Lab #1]]
* [[CSC231_Homework_1 | Homework #1]] and [[CSC231_Homework_1_Solution | Solution ]]
+
* [[CSC231 Lab 2 (Digital Electronics) | Lab #2 ]] (Wednesday)
* [[CSC231_Lab_2 | Lab #2]]
+
* [[CSC231 Lab 3 (Digital Electronics) | Lab #3 ]] (Friday)
 +
* [[CSC231 Homework 1 2010 | Homework #1 ]] and [[CSC231 Homework 1 Solutions 2010 | Solution Programs]]
 
||  
 
||  
*[http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH03/CH03-1.html Basic computer organization], Sections 3.0, 3.1, 3.3.1
+
*
*[http://webster.cs.ucr.edu/AoA/Linux/HTML/DataRepresentation.html#998846  Review of data representation]
 
*[http://webster.cs.ucr.edu/AoA/Linux/HTML/DataRepresentation2.html#998917 Bits, nybbles, bytes]
 
*[http://webster.cs.ucr.edu/AoA/Linux/HTML/DataRepresentation3.html#1012324 The hex system]
 
 
 
 
|- valign="top"
 
|- valign="top"
| Week 3 <br /> 9/15
+
| Week 3 <br /> 9/20
 
||
 
||
* Review of last lab
+
[[Image:Pentium.gif|right|100px]]
** [[CSC231_Add5.asm | add5.asm]]
+
[[Image:MultiCore.jpg|right|100px]]
** [[CSC231_ComputeFib7.asm | computeFib7.asm]]
+
;Monday 9/20
* new instructions
+
* Three-bit adder. Review
** add, sub, inc, dec, loop
+
* A word on Verilog and FPGAs [http://www.asic-world.com/verilog/gate1.html#Examples Examples]
** [[CSC231_Loop_Exercises | Exercises]]
+
* Architecture of the Pentium (simplified)
* Binary adders, [http://en.wikipedia.org/wiki/Boolean_algebra_(introduction) Boolean Algebra], and the ALU
+
;Wednesday 9/22
* Signed and unsigned numbers
+
* [[CSC231 ReverseEngineering.lst | Reverse engineering a listing]], and [[CSC231 ReverseEngineeringSol.asm|solution]].
 +
* [http://www.asciitable.com/ ASCII Table]
 +
;Friday 9/24
 +
* Comments on lab reports
 +
* Once again: ''Everything in memory is a number!''
 +
* Review the [[CSC231 ReverseEngineering.lst | reverse engineering]] example
 +
* [[CSC231 Exercises Binary Hexadecimal | Exercises on Binary/Hexadecimal]] (do on your own!)
 +
* The '''mov''' instruction (covered [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH04/CH04-3.html#HEADING3-79 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
 +
 
 
----
 
----
  
* [[CSC231_Homework_2 | Homework #2]] and its [[CSC231_Homework_2_Solution | Solution]]
+
* [[CSC231 Homework 2 2010 | Homework #2 ]] and [[CSC231 Homwork 2 Solution 2010| solution]]
* [[CSC231_Lab_3 | Lab #3]]
 
 
||  
 
||  
Signed and unsigned numbers are covered in
+
* [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH03/CH03-1.html Basic Computer Organization],  Sections 3.0, 3.1, 3.3.1
[http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH01/CH01-2.html#HEADING2-96 Sections 1.7 and 1.8] and
+
* [http://webster.cs.ucr.edu/AoA/Linux/HTML/DataRepresentation.html#998846 Review Data Representation]
[http://maven.smith.edu/~thiebaut/classes/231_0607/doc/pcasm-book.pdf Chap. 2]
+
* [http://webster.cs.ucr.edu/AoA/Linux/HTML/DataRepresentation2.html#998917 Bits, Nibbles, Bytes]
[http://en.wikipedia.org/wiki/Boolean_algebra_(introduction) Boolean Algebra]
+
* [http://webster.cs.ucr.edu/AoA/Linux/HTML/DataRepresentation3.html#1012324 The Hexadecimal System]
 
+
* [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH04/CH04-3.html#HEADING3-79 The MOV instruction]
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
| Week 4 <br /> 9/22
+
| Week 4 <br /> 9/27
 
||
 
||
* A [[CSC231_OverFlow_C_Program | C program]] that overflows
+
[[Image:FibonacciPigeons.jpg|200px|right]]
* A [[CSC231_OverFlow_Python_Program | Python program]] that overflows (or does it?)
+
; Monday 9/27
* How do we represent signed numbers?
+
* The MOV Instruction
* What formats are available?
+
*[[CSC231 Exercises with Mov, Arithmetic and Logic Instructions| Exercises with the MOV instruction]]
** Signed magnitude
+
; Wednesday 9/29
** 1's complement
+
* <font color="green">MOUNTAIN DAY!</font>
** 2's complement
+
; Friday 10/1
* Why the binary adder dictates what we choose
+
* Arithmetic instructions: '''ADD''', '''SUB''', '''INC''', '''DEC'''
* [[CSC231_Mystery_C_Program_with_signed_numbers | Mystery C Program]]
+
* Logic instructions: '''AND''', '''OR''', '''NOT''', '''XOR'''
*[http://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html Hex/Bin/Decimal converter]
+
* using DDD to debug programs
*   <font color="purple">'''Project starts!'''</font> (on Friday)
+
* <font color="magenta">'''Lab 4''', Part 1</font>
 +
 
 
----
 
----
* [[CSC231_Homework_3 | Homework #3]] and its [[CSC231_Homework_3_Solution | Solution]]
+
*[[CSC231 Lab 4: Debugger | Lab 4]]: Using the debugger
* [[CSC231_Lab_4 | Lab #4]]
+
*[[CSC231 Homework 3 2010 | Homework #3]] and [[CSC231 Homework 3 Solutions 2010 | Solution]]
 
||  
 
||  
*The signed and unsigned representations of numbers are covered in [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH01/CH01-2.html#HEADING2-96 Sections 1.7 and 1.8] of The Art of Assembly, and in [http://maven.smith.edu/~thiebaut/classes/231_0607/doc/pcasm-book.pdf Chapter 2] of Carter's PC Assembly Language.
+
*  
 
 
*[http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH04/CH04-2.html#HEADING2-1 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. 
 
  
 
|- valign="top"
 
|- valign="top"
| Week 5 <br /> 9/29
+
| Week 5 <br /> 10/04
 
||
 
||
* Arduino hardware info
+
; Monday 10/4
* Addressing modes
+
*[[CSC231 Exercises with Mov, Arithmetic and Logic Instructions#Arithmetic_Instructions| Exercises with arithmetic instructions]]
** inherent
+
* <font color="magenta">'''Lab 4''', Part 2</font>
** register
+
; Wednesday 10/6
** immediate
+
* Representing negative numbers, Signed Magnitude, 1's complement, 2's complement.
** direct
+
* [[CSC231 Exercises on Signed Numbers | Exercises]]
** indirect/based/indexed
+
; Friday 10/8
** indirect with displacement
+
* [[CSC231 Powers of 2 | A Table of powers of 2]]: this will be useful for the exercises of the day...
** base-indexed
+
* [[CSC231 C++ Program and infinite loops| C++ program looping forever]]...
** base-indexed with displacement
+
* [[CSC231 Python program and infinite loops | Python program looping forever]]...
* [http://www.asciitable.com/ Ascii Table]
+
* [[CSC231 Mystery C Program with signed numbers | Problem of the day]]...
* [[CSC231_Addressing_Mode_Exercises | Exercises on addressing modes]]
 
* '''SHR''' and '''ADC''' instructions.
 
* [http://cs.smith.edu/~thiebaut/classes/231/bmp/ BMP] processing programs and picture files.
 
 
----
 
----
* [[CSC231_Homework_4 | Homework #4]] and its [[CSC231_Homework_4_Solution | solution ]]
+
* [[CSC231 Lab 4: Debugger | Lab 4]]: Using the debugger
* [[CSC231_Lab_5 | Lab #5]] (NOT!  Mountain Day!)
+
* [[CSC231 Homework 4 2010 | Homework #4]] and [[CSC231 Homework 4 Solutions -- 2010| Solution]]
 
||  
 
||  
Read/continue reading on ''Addressing Modes''
+
* Signed and unsigned numbers are covered in  [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH01/CH01-2.html#HEADING2-96 Sections 1.7 and 1.8] and  [http://maven.smith.edu/~thiebaut/classes/231_0607/doc/pcasm-book.pdf Chap. 2]
 +
* [http://en.wikipedia.org/wiki/Boolean_algebra_(introduction) Boolean Algebra]
 +
 
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
| Week 6<br /> 10/06
+
| Week 6<br /> 10/11
 
||
 
||
* '''Monday''': Burton B17: [[CSC231_Lab_5 | Lab #5]]  
+
<tanbox>
* '''Wednesday''': Bass 102
+
;Monday
** -----------
+
: '''Fall Break'''  
** Exploring the [http://arduino.cc/en/uploads/Main/Arduino-Diecimila-schematic.pdf schematics] of the Arduino
+
</tanbox>
** Recipes of [http://www.seattlerobotics.org/encoder/mar97/basics.html simple circuits]
+
;Wednesday 10/13
** -----------
+
* Review 2's complement
** More logic instructions AND, OR, NOT, XOR, SHL, SHR.
+
* An [[CSC231 C++ Assembly Code| example]] illlustrating what compiler code looks like.
** [http://heim.ifi.uio.no/~stanisls/helppc/idx_assembler.html HelpPC] resource
+
* Logic Design: Building a "subtractor" with an adder, using only AND, OR, NOT and XOR gates.
* '''Friday'''
+
* Mul/Div
** Burton B17: <font color="purple">'''Project early proposal (5min)'''</font>
+
* 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?
 +
* [http://en.wikipedia.org/wiki/X86_instruction_listings Pentium Instruction Set]
 +
* Cool videos for a rainy afternoon
 +
**[[Image:googleVideos.png | 100px ]] [http://video.google.com/videoplay?docid=-7758421725489622662&ei=hQK5Sb3TG5K-rwK4k53oAg&q=guido+rossun&hl=en Introduction to Python] by Guido van Rossun, from Google Videos.  The first 15 minutes are fine.  You can skip the rest!
 +
**[http://video.google.com/videoplay?docid=9023849479319414382&hl=en Intro to Python] (The first 5 minutes are good).
 +
** [[Image:GuidoVanRossun.jpg | 100px ]] More videos of [http://video.google.com/videosearch?q=guido+rossun&hl=en&emb=0# Guido van Rossun], the creator of Python.
 +
* The main addressing modes:
 +
**inherent
 +
**register
 +
**immediate
 +
**direct
 +
**indirect/based/indexed
 +
**indirect with displacement
 +
**base-indexed
 +
**base-indexed with displacement
 +
* [[CSC231_Addressing_Mode_Exercises | Exercises on Addressing Modes]]
 +
* [http://www.asciitable.com/ Ascii Table]
 +
 
 +
----
 +
* No homework assignment this week.  Prepare for midterm!
 
||  
 
||  
* Read the [http://www.tinker.it/en/uploads/v3_arduino_small.pdf Arduino "Low-Tech Manual"]: great reading for the project.
+
*The signed and unsigned representations of numbers are covered in [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH01/CH01-2.html#HEADING2-96 Sections 1.7 and 1.8] of The Art of Assembly, and in [http://maven.smith.edu/~thiebaut/classes/231_0607/doc/pcasm-book.pdf Chapter 2] of Carter's PC Assembly Language.
* Chapters 2, 3, 7, and 8 of [http://www.parallax.com/dl/docs/books/edu/wamv2_1.pdf What's a MicroController?]
+
* [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH04/CH04-2.html#HEADING2-1 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.
 
 
  
 
|- valign="top"
 
|- valign="top"
| Week 7 <br /> 10/13
+
| Week 7 <br /> 10/18
 
||  
 
||  
* Fall Break--No class on Monday
+
<bluebox>
* '''Wednesday''': Continuation of [[CSC231_Lab_5 | Lab #5]]
+
; '''Monday 10/18''': In class <font color="magenta">Midterm Exam</font>
'''Friday ''': <font color="red">'''in-class Midterm Exam'''</font>.  [[CSC231_Midterm_Preparation| Midterm Prep]]
+
: [[CSC231_Midterm_Preparation | Sample Questions]] to get ready...
* <!--'''Friday 10/17''': Soldering lab in McC basement (Greg Young, Eric Jensen)<br /> -->
+
</bluebox>
 +
; '''Wednesday 10/20''':
 +
* The '''Loop''' instruction
 +
* [[CSC231 Loop Exercises | Exercises]] on loops
 +
* Review of addressing modes
 +
* Return to the [[CSC231_Addressing_Mode_Exercises | exercises on '''addressing modes''']], but now use loops
 +
; '''Friday 10/22''':
 +
* <font color="magenta">'''Lab 5'''</font>
 +
* Loops and Addressing Modes
 
----
 
----
* [[CSC231_Homework_5 | Homework #5]]  
+
* [[CSC231 Homework 5 2010 | Homework #5]] and [[CSC231 Homework 5 Solutions 2010 | Solution Programs]]
* [[CSC231_Lab_5 | Lab #5]]  
+
* [[CSC231 Lab 5 2010 | Lab 5]]
||  
+
||
 +
* [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH06/CH06-5.html#HEADING5-294 The Loop instruction]
 +
* [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH06/CH06-1.html#HEADING1-160 The Push and Pop instructions]
 +
 
  
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
| Week 8 <br /> 10/20
+
| Week 8 <br /> 10/25
 
||
 
||
* '''Monday''' (Bass):  
+
<videoflash>zC5KFnSUPNo</videoflash>
** Functions, Call &amp; Ret instructions.
+
;Monday 10/25
** Push/Pop, Pushad/Popad instructions
+
* The '''shift instructions''': SHR, SHL, logical and arithmetic variants.
** [[CSC231_Exercises_On_Functions | Exercises on Functions]]
+
* Sound waves, a bit of physics
* '''Friday''' (Burton): <font color="purple">'''Project final proposal (10 min)'''</font>
+
* The format of wav sound files
 +
* A demo program: [[CSC231 readWaveFile.asm | readWaveFile.asm]]
 +
;Wednesday 10/27
 +
* Using a [[CSC231 Makefile for Lab 5 | Makefile]] for Lab 5
 +
* Challenge of the day: clip 8-bit samples by forcing overflow to 0xff...
 +
* Examples with wav files:
 +
* <font color="magenta">'''Lab 6'''</font>
 +
;Friday 10/29
 +
* Continue with <font color="magenta">'''Lab 6'''</font>
 
----
 
----
* [[CSC231 Homework 6 | Homework #6]] and its [[CSC231 Homework 6 Solution | solution]]
+
* [[CSC231 Lab 6 2010 | Lab 6]]
 +
* [[CSC231 Homework 6 2010 | Homework 6]] and [[CSC231 Homework 6 Solution 2010 | Solution Program]]
  
 
||  
 
||  
* [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH06/CH06-1.html#HEADING1-160 Push and Pop]
+
* [https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ The Wav File Format]
* [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH06/CH06-5.html#HEADING5-98 Call and Ret]
+
* The '''shifts instructions''' are covered in [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH06/CH06-3.html#HEADING3-42 Chapter 6] of the [http://maven.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html Art of Assembly] reference.
 
|- valign="top"
 
|- valign="top"
| Week 9 <br /> 10/27
+
| Week 9 <br /> 11/01
 
||
 
||
* '''Monday''':
+
;Monday 11/01
** [[CSC231 Flags Settings Examples | A program that compares]] operands and shows flag values
+
* Functions
** Conditional jumps
+
** Using the stack
** [[CSC231 Exercises with conditional jumps | Exercises on conditional jumps]][[CSC231 Exercises with conditinal jumps Solutions |.]]
+
** Passing parameters
 
+
*** by value
* '''Wednesday''':
+
*** by reference
** Project feedback, questions.
+
*** functions returning values
** [[CSC231 Exercises with conditional jumps | Continuation of exercises on conditional jumps]] and their [[CSC231 Exercises with conditinal jumps Solutions | (solution)]]
+
* [[CSC231 Exercises On Functions | Exercises on Functions]]
* '''Friday''': Lab in Burton: communication between PC and Arduino
+
;Wednesday 11/03
 +
* Review of functions: passing parameters through registers
 +
** push/pop
 +
** organization (example program: [[CSC231 maze.asm | maze.asm]])
 +
** examples involving copying buffers
 +
;Friday 11/05
 +
* Passing parameters through the stack
 +
* [[CSC231 Lab 7 2010 |<font color="magenta">''' Lab 7'''</font>]]
 
----
 
----
* [[CSC231 Homework 7 | Homework #7]]
+
* [[CSC231 Homework 7 2010 | Homework 7]] and [[CSC231 Homework 7 Solution 2010 | Solution Program]]
* [[CSC231 Lab 6 | Lab #6]]
+
* [[CSC231 Lab 7 2010 | Lab 7]] and [[CSC220 Lab 7 Solutions 2010| Solution Programs]]
  
 
||  
 
||  
* The [http://www.handyboard.com/techdocs/hbmanual.pdf Handy Board Technical Reference] (pdf).  Check Section 5 out: it contains very good information on connecting and using various sensors for the projects!
+
* [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH06/CH06-5.html#HEADING5-98 The Call and Ret Instructions]
* [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH06/CH06-5.html#HEADING5-226 Conditional Jumps]
+
* Functions and the topics associated with passing parameters are covered in Carter's Manual on Assembly Language, in [http://maven.smith.edu/~thiebaut/classes/231_0405/doc/pcasm-book.pdf Chapter 4], titled ''Subprograms''.
  
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
| Week 10 <br /> 11/03
+
| Week 10 <br /> 11/08
 
||
 
||
* '''Monday'''
+
;Monday 11/08
** [http://webster.cs.ucr.edu/Page_Linux/LinuxSysCalls.pdf Linux system calls]
+
* We continue with [[CSC231 Lab 7 2010 |<font color="magenta">''' Lab 7'''</font>]]
** [[Media:CSC231_File_IO_In_Assembly.pdf |  File I/O in Assembly]] (pdf)
+
;Wednesday 11/10
*** [[CSC231 createFile.asm | createFile.asm ]]
+
* [[CSC231 No-no! and Be-Careful! situations | No No, don't do that!]]
*** [[CSC231 readFile.asm | readFile.asm ]]
+
* Int-returning function
*** [[CSC231 readWriteTextFile.asm | readWriteTextFile.asm]]
+
* Declaring temporary variables in functions
** Functions and Passing parameters
+
* Passing by reference
*** [[CSC231 SumProc1.asm| sumproc1.asm]]
+
;Friday 11/12
*** [[CSC231 SumProc2.asm| sumproc2.asm]]
+
* Review
*** [[CSC231 SumProc3.asm| sumproc3.asm]]
+
** [[CSC231 SumProc1.asm |sumProc1.asm]]: Pass through registers
*** [[CSC231 SumProc4.asm| sumproc4.asm]]
+
** [[CSC231 SumProc2.asm |sumProc2.asm]]: Pass by value
*** [[CSC231 SumProc5.asm| sumproc5.asm]]
+
** [[CSC231 SumProc3.asm |sumProc3.asm]]: Int returning function
 +
** [[CSC231 SumProc4.asm |sumProc4.asm]]: Pass by reference
 +
** [[CSC231 SumProc5.asm |sumProc5.asm]]: <font color="magenta">'''Local variables'''</font>
 +
* Introduction to  [[CSC231 Homework 8 2010 | Homework 8]]
 +
* Top-Down design (again!)
 +
 
 
----
 
----
* [[CSC231 Homework 8 | Homework #8]] and its [[CSC231 Homework 8 Solution | solution]].  A modified version of [[CSC231 Modified Arduino-serial.c| arduino-serial.c]] for testing the homework program.
+
* [[CSC231 Lab 7 2010 | Lab 7]]
 +
* [[CSC231 Homework 8 2010 | Homework 8]] and [[CSC231 Homework 8 Solution Program 2010 | solution program]]
  
* [[CSC231 Lab 7 | Lab #7]]
 
 
||  
 
||  
* [http://webster.cs.ucr.edu/Page_Linux/LinuxSysCalls.pdf Linux System Calls]. Section 1.1 shows the equivalence between registers and parameters. Section 3.3 explains how to interpret the parameters used by a system call.  Appendix A lists all the system calls and the parameters.   
+
* the preprocessor directive '''%define''' is fully explained [http://www.tortall.net/projects/yasm/manual/html/nasm-preprocessor.html#nasm-macro-define here].
 +
* The [http://faydoc.tripod.com/cpu/pushad.htm PUSHAD] instruction  
 +
 
 
|- valign="top"
 
|- valign="top"
| Week 11 <br /> 11/10
+
| Week 11 <br /> 11/15
 
||
 
||
* '''Monday'''
+
; Monday 11/15
** File I/O
+
* Compare instruction and [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH06/CH06-1.html#HEADING1-27 flag bits]
*** [[CSC231 createFileProc.asm| createFile.asm]] (with functions)
+
* A [[CSC231 Flags Settings Examples | Program]] using compare instruction and showing flag settings
*** [[CSC231 readFileProc.asm | readFile.asm]] (with functions)
+
* [[CSC231 Exercises with conditional jumps | Exsercises]] with conditional jumps
*** [[CSC231 createBinaryFile.asm | createBinaryFile.asm]]: creates a binary file.  Look at it with <tt>od -t x1 data.bin</tt>, or <tt>od -t x4 data.bin</tt>.
+
; Wednesday 11/17
** Macros
+
* Continuation of  [[CSC231 Exercises with conditional jumps | Exsercises]] on conditional jumps
* '''Wednesday''': Lab in Burton
+
; Friday 11/19
** [http://www.youtube.com/watch?v=1ZjdiRxr0OM How to solder wires]
+
* Functions + tests = '''Recursion'''
** [http://www.youtube.com/watch?v=6QznAAwL8rI How to solder wires], from Popular Mechanics
+
* [[CSC220 Factorial.asm | factorial.asm]]
** [http://www.youtube.com/watch?v=krxTfZCFptk How to maintain your soldering iron clean]
+
----
** [http://www.youtube.com/watch?v=d-j98tkAbh8 How to heat shrink] wires
+
* No homework assignment this week!
  
* '''Friday''': no class (work on your project!!!)
 
----
 
* [[CSC231 Homework 9 | Homework #9]] and its [[CSC231 Homework 9 Solution | solution]].
 
 
||  
 
||  
* [http://www.tortall.net/projects/yasm/manual/html/nasm-multi-line-macros.html Nasm Macros]
+
* [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH06/CH06-1.html#HEADING1-27 The Flag Bits]
* new Linux commands:  
+
* [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH06/CH06-5.html#HEADING5-226 Conditional Jumps]
** od (octal-dump)
+
* [[CSC231 Pentium Instructions and Flags | What instructions modify flags]]
** hexdump
+
 
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
| Week 12 <br /> 11/17
+
| Week 12 <br /> 11/22
 
||
 
||
* '''Monday'''
+
; Monday
** '''Recursion''' and '''reentrancy'''.  Reentrant programs must not modify global variables!
+
* Continuation of Coverage of Recursion
** ''Recursion rule'': '''1)''' stopping condition, '''2)''' recurse on a smaller problem than one given.
+
* <!--videoflash>5X8cM2JiqzI</videoflash-->
** [[CSC231_factorial.asm | factorial.asm]]
+
* Video: History of Computers
* '''Wednesday'''
+
<tanbox>
** Two programs related to the current hw assignment: [[CSC231 driver2.c|driver2.c]], and [[CSC231 writeIntegerAtIndex.asm|writeIntegerAtIndex.asm]]
+
<!--[[Image:dancingCalving.gif | right]]-->
** Lab in Burton: Make it work!  Develop the hardware/software pairs: each hardware sensor should have an assembly language routine that either knows how to read from it, or to write to it.
+
[[Image:turkeyCarcass.jpg | 200px | right]]
 
+
; Wednesday: '''Thanksgiving Break'''
* '''Friday''': Presentation of working hardware
+
; Friday: '''Thanksgiving Break'''
 +
</tanbox>
 
----
 
----
* [[CSC231 Homework 10 | Homework #10]] and its [[CSC231 Homework 10 Solution| Solution]]
+
*
 
||  
 
||  
*the [http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH05/CH05-1.html#HEADING1-4 LEA] instruction: an more powerful alternative to '''mov''' when loading up a vector.
+
*
* [http://cs.smith.edu/~thiebaut/classes/231_0405/doc/pcasm-book.pdf Section 2.1.3] of Carter's Assembly Manual on the MUL instruction (and IMUL).
+
 
  
 
|- valign="top"
 
|- valign="top"
| Week 13 <br /> 11/24
+
| Week 13 <br /> 11/29
 
||
 
||
[[Image:turkey.gif | right]]
+
; Monday 11/29
* '''Monday''':
+
* More on Recursion: Multiplication
** Presentation of working projects (carry over from Friday)
+
* [[CSC231 Recursive Multiplication | Recursive Multiplication Algorithm]]
** Current homework ([[CSC231 binarySearch.py | binary search]])
+
; Wednesday 12/1
** recursion
+
* [[CSC231 FindLargestOfArray.asm | Searching a 1-dimensional array for the largest/smallest element]]
** simulating communication with an Arduino stamp
+
* Sketching binary-search on an array
* '''Wednesday''': <font color="orange">Thanksgiving break</font>
+
* A demo: comparison of interpreted versus compiled languages: [[CSC231: N-Queens Problem: interpreted vs compiled|The N-Queens test]]
* '''Friday''': <font color="orange">Thanksgiving break</font>
+
; Friday 12/3
 +
* Discussion: [http://en.wikipedia.org/wiki/Compiler_optimization compiler optimizations]
 +
* [http://en.wikibooks.org/wiki/Microprocessor_Design/Pipelined_Processors Pipelines]
 +
** <center>[[Image:CSC231_pipeline1.png|200px]]</center>
 +
** <center>[[Image:CSC231_pipeline2.png|400px]]</center>
 +
** <center>[[Image:CSC231_PentiumDie2.gif|400px]]</center>
 +
** <center>[[Image:CSC231_PentiumDie6core.jpg|400px]]</center>
 +
 
 +
----
 +
* [[CSC231 Homework 9 2010 | Homework #9]]  and [[CSC231 Homework 9 Solution 2010 | Solution Program]]
 
||
 
||
* Section 4.8 of [http://cs.smith.edu/~thiebaut/classes/231_0405/doc/pcasm-book.pdf Carter's Assembly Manual] on recursion
+
* [http://en.wikipedia.org/wiki/Compiler_optimization Compiler optimization] on wikipedia.
* [http://docs.hp.com/en/B3921-90010/gettimeofday.2.html get time of day function]
+
* [http://cs.smith.edu/~thiebaut/classes/231_0405/doc/pcasm-book.pdf Section 4.8] of Carter's Assembly Manual on recursion.
* [http://en.wikipedia.org/wiki/Binary_search all about binary search]...
+
* [http://en.wikibooks.org/wiki/Microprocessor_Design/Pipelined_Processors Pentium pipelining]
* [http://wiki.answers.com/Q/Assembly_language_program_to_do_binary_search A good example] of how '''not''' to document a program...
+
* A very good description of the Pentium 4 Architecture at [http://www.hardwaresecrets.com/article/235 www.hardwaresecrets.com]
 +
* Some parameters for virtual memory (taken from [http://www.cp.eng.chula.ac.th/~piak/teaching/ca/vm.htm www.cp.eng.chula.ac.th]):
 +
**Typical range of parameters for virtual memory
 +
**
 +
<center>
 +
{|
 +
|block (page) size &nbsp;&nbsp;&nbsp;&nbsp;       
 +
|512-8192 bytes
 +
|-
 +
|hit time                         
 +
|1-10 clock cycles
 +
|-
 +
|miss penalty                 
 +
|100,000-600,000 clocks
 +
|-
 +
|(access time)               
 +
| (100,000-500,000 clocks)
 +
|-
 +
|(transfer time)               
 +
| (10,000-100,000 clocks)
 +
|-
 +
|miss rate                         
 +
|0.00001% - 0.001%
 +
|-
 +
|main memory size         
 +
|4 MB - 2048 MB
 +
|}
 +
</center>
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
| Week 14 <br /> 12/01
+
| Week 14 <br /> 12/06
 
||
 
||
* '''Monday''':
+
; Monday 12/06
** Hardware Interrupts (simplified)
+
* Continue with pipelines
** Sharing interrupts
+
* Virtual Memory
** Interrupting the processor
+
; Wednesday 12/08
** Processor response to an interrupt and stack usage
+
* Cache Memory
* '''Wednesday'''
+
* Average Access Time
** [[CSC231_How_to_play_a_wav_file_in_C | Playing wav files]]
+
* Back to compiler optimization
** Interrupts:
+
**Pipeline-related
** Priority encoder
+
***Delayed branches
*** Some [[CSC231 Hard-Disk Arduino Project: some numbers | numbers]] related to Hard-disk project
+
***Instruction reordering
*** Average response time
+
**Cache-oriented
*** Alternatives to interrupts: polling
+
***use of registers instead of memory ([http://ee.hawaii.edu/~tep/EE160/Book/chap14/subsection2.1.1.2.html register variables])
*** Arduino Interrupt-related functions
+
* A [[CSC231 generateRandomNumbers.asm| program]] to generate random numbers
**** [http://arduino.cc/en/Reference/AttachInterrupt AttachInterrupt] function
+
; Friday 12/10
**** [http://www.arduino.cc/en/Reference/Millis Millis] function
+
* 2-D arrays
**** [http://arduino.cc/en/Reference/Delay Delay] function
+
* Floating Point Numbers
**** [http://arduino.cc/en/Reference/DelayMicroseconds DelayMicroseconds] function
+
** Fixed-point format
**** An [[CSC231 Arduino Interrupt Program Example | Interrupt Program]].  [http://www.arduino.cc/en/Reference/Volatile Volatile] variables.
 
* '''Friday'''
 
** [[CSC231 GetLocalTime.asm| Getting the local time]] in assembly
 
 
** [http://maven.smith.edu/~thiebaut/classes/231/floatingpoint.html Floating-Point Converter] applet.
 
** [http://maven.smith.edu/~thiebaut/classes/231/floatingpoint.html Floating-Point Converter] applet.
 
----
 
----
*[[CSC231 Homework 11 | Homework 11]]
+
* [[CSC231 Homework 10 2010 | (''Optional'') Homework #10]] and [[CSC231 Homework 10 Solution 2010| solution program]]
*[[CSC231 Lab 8 | Lab #8]]
 
 
||  
 
||  
* [http://blogs.msdn.com/adioltean/archive/2004/12/21/329321.aspx Article] on number of interrupts, context swaps, read/write operations per second in a typical Windows machine.
+
* [http://webster.cs.ucr.edu/AoA/Windows/HTML/Arraysa2.html 2D Arrays]
* [http://www.scs.carleton.ca/~sivarama/asm_book/asm2ed_slides/slides/al2ed_chapter14.ppt PPT Presentation] on interrupts from Carleton.
+
* [http://steve.hollasch.net/cgindex/coding/ieeefloat.html A good introduction to Floating Point Numbers], nicely presented. Similary, a [http://www.cs.princeton.edu/introcs/91float/ page] from Princeton's Intro to CS on floating points.
* [http://www.xml.com/ldd/chapter/book/ch09.html Chapter 9] of O'Reilly's ''Linux Device Drivers''.  Good for general overview.  Don't worry about the details.
+
* [http://en.wikipedia.org/wiki/Floating_point General description] of the floating-point notation on Wikipedia. 
<br />
 
<br />
 
* [http://en.wikipedia.org/wiki/Floating_point General description] of the floating-point notation
 
 
* [http://www.python.org/doc/2.5.2/tut/node16.html A very good description of the limitations] of floating-point numbers in Python: Read it!
 
* [http://www.python.org/doc/2.5.2/tut/node16.html A very good description of the limitations] of floating-point numbers in Python: Read it!
 
* Also, not to be missed: [http://www.lahey.com/float.htm  The perils of floating-point]
 
* Also, not to be missed: [http://www.lahey.com/float.htm  The perils of floating-point]
 
* [http://www.programmers-corner.com/tutorial/31?PHPSESSID=4bbf1f2b76df390e1bad01a9f8462854 Floating Point in Assembly]: some high level stuff!
 
* [http://www.programmers-corner.com/tutorial/31?PHPSESSID=4bbf1f2b76df390e1bad01a9f8462854 Floating Point in Assembly]: some high level stuff!
 +
*
 +
 +
 +
 
|- valign="top"
 
|- valign="top"
| Week 15 <br /> 12/08
+
| Week 15 <br /> 12/13
 
||
 
||
* '''Monday''': Floating-point numbers
+
[[Image:CSC231RangeOfFloats.jpg |200px|right|link=http://jasss.soc.surrey.ac.uk/9/4/4.html]]
* '''Wednesday''': Last Class
+
; '''Monday''' ''<font color="magenta">Last Class</font>''
** Hardware presentation by Le
+
* IEEE Floating-Point Representation
** Floating-Point Format
+
** Exponent: 4 special cases: zero, denormalized numbers, infinity, NaN
 +
** [http://maven.smith.edu/~thiebaut/classes/231/floatingpoint.html Floating-Point Converter] applet.
 +
** Range of IEEE Floats
 +
** Compare range of floats to ints.  Ask [http://www.wolframalpha.com/input/?i=10^32+inches Wolfram Alpha] what is 10^32 inches!
 +
** Adding two floats
 +
** Examples of Floating-Point operations in Assembly
 
*** [[CSC231 Float1.asm | float1.asm]]: printing a float in assembly
 
*** [[CSC231 Float1.asm | float1.asm]]: printing a float in assembly
 
*** [[CSC231 Float2.asm | float2.asm]]: transforms an int into a float
 
*** [[CSC231 Float2.asm | float2.asm]]: transforms an int into a float
 
*** [[CSC231 Float3.asm | float3.asm]]: computes  a = 10.5; b = 5.5; y = 3 * ( a - b ) + PI in assembly.  
 
*** [[CSC231 Float3.asm | float3.asm]]: computes  a = 10.5; b = 5.5; y = 3 * ( a - b ) + PI in assembly.  
** [[CSC231 generateRandomNumbers.asm | generateRandomNumbers.asm]]
+
<br />
<!--** [[CSC231 maze.asm | maze.asm]]: recursive visit of a maze-->
+
<br />
** [[CSC231 Ansi Sequences | Ansi sequences]]
+
<br />
** [[CSC231 Final Exam 12/08| Optional Take-Home Exam]]
+
<br />
*  <font color="#00CC66">'''Thursday''': Pre-examination begins</font>
+
 
 +
----
 +
* [[CSC231_Lab_8 2010 | A Lab on Floating-Point Numbers] to explore on your own!
 +
* [[CSC231 Final Exam 2010 | Final Exam]] --> due date = ''12:00 p.m. on Monday December 20, 2010''
 
||  
 
||  
 +
* [http://www.cs.umd.edu/class/spring2003/cmsc311/Notes/BinMath/addFloat.html Notes on adding floating-point numbers]
 +
  
|- style="background:#eeeeff" valign="top"
 
| Week 16 <br /> 12/15
 
||
 
*  <font color="#00CC66">'''Monday''': Pre-examination ends</font> (DT away)
 
* <font color="purple">'''Tuesday''': Exam Period</font>
 
*  <font color="purple">'''Wednesday''': Exam Period</font> '''12:00p.m.--2:00p.m. Project Presentation in B17'''
 
*  <font color="purple">'''Thursday''': Exam Period</font>
 
*  <font color="purple">'''Friday''': Exam Period (last day of the semester)</font>
 
||
 
  
  
Line 324: Line 439:
 
|}
 
|}
  
=List of Programs=
+
* [[media:helpnotes.pdf | Help Notes]]
 +
 
 +
=List of Selected Programs=
 
== Assembly==
 
== Assembly==
* [[CSC231 Add5.asm  | Add5.asm]]
 
* [[CSC231 ComputeFib7.asm  | ComputeFib7.asm]]
 
* [[CSC231 FibOverflowByte.asm | FibOverflowByte.asm]]
 
* [[CSC231 FibOverflowDWord.asm | FibOverflowDWord.asm]]
 
* [[CSC231 FibOverflowWorde.asm | FibOverflowWord.asm]]
 
* [[CSC231 FileIO2.inc | fileio2.inc]]
 
* [[CSC231 First Program  | First Program]]
 
* [[CSC231 Float1.asm | float1.asm]]: printing a float in assembly
 
* [[CSC231 Float2.asm | float2.asm]]: transforms an int into a float
 
* [[CSC231 Float3.asm | float3.asm]]: computes  a = 10.5; b = 5.5; y = 3 * ( a - b ) + PI in assembly.
 
* [[CSC231 GetLocalTime.asm  | GetLocalTime.asm]]
 
* [[CSC231 GetTimeOfDay.asm  | GetTimeOfDay.asm]]
 
* [[CSC231 Hello World on Mac | hello world on a Mac!]]
 
* [[CSC231 ReverseEngineering.lst  | ReverseEngineering.lst]]
 
* [[CSC231 ReverseEngineeringSol.asm  | ReverseEngineeringSol.asm]]
 
* [[CSC231 SumProc1.asm  | SumProc1.asm]]
 
* [[CSC231 SumProc2.asm  | SumProc2.asm]]
 
* [[CSC231 SumProc3.asm  | SumProc3.asm]]
 
* [[CSC231 SumProc4.asm  | SumProc4.asm]]
 
* [[CSC231 SumProc5.asm  | SumProc5.asm]]
 
* [[CSC231 asm io.asm |asm_io.asm ]]
 
* [[CSC231 asm io.inc| asm_io.inc]]
 
* [[CSC231 createBinaryFile.asm  | createBinaryFile.asm]]
 
* [[CSC231 createFile.asm | createFile.asm ]]
 
* [[CSC231 createFileProc.asm  | createFileProc.asm]]
 
* [[CSC231 factorial.asm  | factorial.asm]]
 
* [[CSC231 fileio2.inc  | fileio2.inc]]
 
* [[CSC231 generateRandomNumbers.asm | generateRandomNumbers.asm]]
 
* [[CSC231 ledON.asm | ledOn.asm ]]
 
* [[CSC231 makeUpper.asm  | makeUpper.asm]]
 
* [[CSC231 makegreyBmp.asm | makegreyBmp.asm ]]
 
<!--* [[CSC231 maze.asm | maze.asm]]: a recursive program visiting a maze-->
 
* [[CSC231 mytools2.inc | mytools2.inc ]]
 
* [[CSC231 readFile.asm  | readFile.asm]]
 
* [[CSC231 readFileProc.asm  | readFileProc.asm]]
 
* [[CSC231 readWriteTextFile.asm  | readWriteTextFile.asm]]
 
* [[CSC231 skel.asm  | skel.asm]]
 
* [[CSC231 skelBmp.asm | skelBmp.asm]]
 
* [[CSC231 writeIntegerAtIndex.asm  | writeIntegerAtIndex.asm]]
 
  
==Aduino pde==
+
* [[:Category:Asm | Assembly Programs]]
* [[CSC231 arduino loop new.pde  | arduino loop new.pde]]
+
 
* [[CSC231 Serial Hello World.pde  | World.pde]]
+
=Miscellaneous Information=
* [[CSC231 Serial Red Blink.pde  | Blink.pde]]
+
 
* [[CSC231 Serial_Hello_World.pde | serial_hello_world.pde]]
+
* [[CSC231 Pentium Instructions| List of Pentium Instructions]] with Op-Codes
* [[CSC231 Arduino Interrupt Program Example  | Arduino interrupt Example]]
+
* [http://en.wikipedia.org/wiki/X86_instruction_listings Pentium Instruction Set]
 +
* [https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ The Wav File Format]
 +
 
 +
* [http://tango.csc.smith.edu/classwiki/index.php?title=CSC231_Things_to_Remember_when_Writing_Assembly_Programs Things to remember] when working on homework assignments...
 +
 
 +
==Linux Related==
 +
* [http://bluemaster.iu.hio.no/edu/dark/lin-asm/syscalls.html System Calls]
 +
<br />
 +
 
 +
<br />
  
==C==
+
<br />
* [[CSC231 driver.c | driver.c ]]
 
* [[CSC231 driver2.c  | driver2.c]]
 
* [[CSC231 Mystery C Program Solution  | Mystery C Program Solution]]
 
* [[CSC231 Mystery C Program with signed numbers  | Mystery C Program with signednumbers]]
 
* [[CSC231 OverFlow C Program  | Overflow C Program]]
 
* [[CSC231 Arduino-serial.c  | Arduino-serial.c]]
 
* [[CSC231 arduino-serial.c  | arduino-serial.c]]
 
* [[CSC231 How to play a wav file in C | playWav.c]]
 
  
==Python==
+
<br />
* [[CSC231 binarySearch.py  | binarySearch.py]]
 
* [[CSC231 dumpScore.py | dumpScores.py]]
 
* [[ CSC231 OverFlow Python Program  | Overflow Python Program]]
 
  
=Miscellaneous Information=
+
<br />
 +
 
 +
<br />
  
* [http://tango.csc.smith.edu/classwiki/index.php?title=CSC231_Things_to_Remember_when_Writing_Assembly_Programs Things to remember] when working on homework assignments...
+
<br />
 +
[[Category:CSC231]][[Category:Asm]]

Latest revision as of 20:43, 3 November 2014

--D. Thiebaut 08:28, 6 January 2011 (EST)



Back to Main Page | Class Wiki


Weekly Schedule

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
Pentium.gif
MultiCore.jpg
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
FibonacciPigeons.jpg
Monday 9/27
Wednesday 9/29
  • MOUNTAIN DAY!
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
Monday
Fall Break
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
Monday 10/18
In class Midterm Exam
Sample Questions to get ready...
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
  • Continue with Lab 6

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
Friday 11/05
  • Passing parameters through the stack
  • Lab 7

Week 10
11/08
Monday 11/08
Wednesday 11/10
Friday 11/12

  • the preprocessor directive %define is fully explained here.
  • The PUSHAD instruction
Week 11
11/15
Monday 11/15
Wednesday 11/17
Friday 11/19

  • No homework assignment this week!
Week 12
11/22
Monday
  • Continuation of Coverage of Recursion
  • Video: History of Computers
TurkeyCarcass.jpg
Wednesday
Thanksgiving Break
Friday
Thanksgiving Break


Week 13
11/29
Monday 11/29
Wednesday 12/1
Friday 12/3

block (page) size      512-8192 bytes
hit time 1-10 clock cycles
miss penalty 100,000-600,000 clocks
(access time) (100,000-500,000 clocks)
(transfer time) (10,000-100,000 clocks)
miss rate 0.00001% - 0.001%
main memory size 4 MB - 2048 MB
Week 14
12/06
Monday 12/06
  • Continue with pipelines
  • Virtual Memory
Wednesday 12/08
  • Cache Memory
  • Average Access Time
  • Back to compiler optimization
    • Pipeline-related
      • Delayed branches
      • Instruction reordering
    • Cache-oriented
  • A program to generate random numbers
Friday 12/10


Week 15
12/13
CSC231RangeOfFloats.jpg
Monday Last Class
  • IEEE Floating-Point Representation
    • Exponent: 4 special cases: zero, denormalized numbers, infinity, NaN
    • Floating-Point Converter applet.
    • Range of IEEE Floats
    • Compare range of floats to ints. Ask Wolfram Alpha what is 10^32 inches!
    • Adding two floats
    • Examples of Floating-Point operations in Assembly






  • [[CSC231_Lab_8 2010 | A Lab on Floating-Point Numbers] to explore on your own!
  • Final Exam --> due date = 12:00 p.m. on Monday December 20, 2010



List of Selected Programs

Assembly

Miscellaneous Information

Linux Related