Fall 2012 Introduction to Computer Organization and Assembly Language Programming

= Course Description = An introduction to an assembly language and its implementation in hardware. Topics include the binary and hexadecimal numbering systems, the fetch-execute cycle, the components of the central processing unit, floating point processing, memory, the assembler, and the linker. Programming exercises are developed in the assembly language of a commonly available processor.

= Logging into stono.cs.cofc.edu = You must download an ssh program, such as Putty. Mac users already have a terminal. Using either Putty or ssh, you must log into stono.cs.cofc.edu using the following information:

The username convention on stono is: firstname.lastname and your passwords are temporarily set to the last 6-digits of their SID. The system will require them to change their passwords on the first login.

Mac users: Run terminal and type in ssh firstname.lastname@stono.cs.cofc.edu

Windows users: Open Putty and connect to stono.cs.cofc.edu

From there you will need to know the basics of the terminal and become proficient in at least one editor. I suggest people use nano to start. It is very basic, but it is much easier to learn than vi or emacs.

= Facebook Group = https://www.facebook.com/groups/474314739254868/

= Syllabus = [[Media:CSCI_250_Syllabus_Fall_2012.pdf|Download PDF version here]]

= Department of Computer Science = [[Media:Computer_Science_Guide.pdf|Guide to the Computer Science Department]]

= LC-3 Simulator = Windows

Unsupported Mac Version

LC3 Windows Guide

= Tentative Course Schedule =

Lecture Videos
Browse here

Week 1 (Aug 22 - 24)
Introduction, representing data

[[Media:CSCI_250_01_Introduction_Fall_2012.pptx|01 Introduction.pptx]]

[[Media:CSCI_250_02_Representations_Fall_2012.pptx|02 Representations.pptx]]

Read Patt, Ch. 1 - 2

If you would like to play around with C, you will need a login to stono.cs.cofc.edu and a basic understanding of the linux command line. These are things you will pick up during this class.

Week 2 (Aug 27 - 31)
Digital logic

[[Media:CSCI_250_03_Digital_Logic_Fall_2012.pptx|03 Digital Logic.pptx]]

Read Patt, Ch 3 - 4

Aug 27 - Last day to drop/add full semester class

Week 3 (Sept 3 - 7)
[[Media:04 Von Neumann.pptx|the Von Neumann model]]

[[Media:05 LC3.pptx|The LC-3 machine & simulator]]

Read Patt, Ch 5

Lab #1 assigned

Week 4 (Sept 10 - 14)
[[Media:06 Assembly.pptx|LC-3 Assembly Language]]

Read Patt, Ch 6 - 7

Lab #1 Due on Sept 16

[[Media:Fall_2012_CSCI_250_Lab_2.pdf|Lab #2 Assigned]] Get your bit bomb here!

Week 5 (Sept 17 - 21)
[[Media:07 Programming.pptx|Programming]]

In class lab time

6.4	.ORIG x3000

; Initialization ; Zero out R0	AND R0, R0, #0

;;;;;;;;;;;;;;;;;;;;       ; R3 <- R1 - R2        ;;;;;;;;;;;;;;;;;;;; ; R4 <- two's complement of R2	NOT R4, R2 	ADD R4, R4, #1 ; R3 <- R1 - R2 translates to R3 <- R1 + R4	ADD R3, R1, R4

; Jump to a location that stores 1 in register R0	BRp R1GRT ; Jump to location that stores -1 in register R0	BRn R2GRT JMP END

R1GRT	ADD R0, R0, #1 JMP END

R2GRT	ADD R0, R0, #-1

END	HALT

.END

Read Patt, Ch 5 - 6

[[Media:Fall_2012_CSCI_250_Quiz_1.pdf|Quiz #1]]

[[Media:Fall_2012_CSCI_250_Quiz_1_Solution.pdf|Quiz #1 Solution]]

Week 6 (Sept 24 - 28)
Low level I/O

[[Media:Fall_2012_CSCI_250_08_IO.pptx|IO.pptx]]

Read Patt, Ch 8

Lab #2 Due on Wednesday

[[Media:Fall_2012_CSCI_250.pdf|Lab #3 Assigned]]

Week 7 (Oct 1 - 5)
[[Media:09 Subroutines and Traps.pptx|Traps and Subroutines]]

Read Pat, Ch 9

Week 8 (Oct 8 - 12)
Midterm

[[Media:Fall_2012_CSCI_250_Practice_Midterm.pdf|Practice Midterm]]

Week 9 (Oct 15 - 19)
[[Media:10 C Language.pptx|Introduction to C programming]]

Read Patt, Ch 11 - 13

[[Media:Lab 4.pdf|Lab #4 Assigned]]

Oct 15 - Fall break

Week 10 (Oct 22 - 26)
Continue C

Read Patt, Chp 10 - 11

Lab #3 due Monday, Oct 22nd

Week 11 (Oct 29 - Nov 2)
Continue C

Read Patt, Chp 14, 17

.ORIG x3000 LD R0, VALUE LD R1, MASK1 LD R2, OFFSET

JSR SHIFTR JSR SHIFTR JSR SHIFTR JSR SHIFTR

; Print to the screen AND R0, R0, R1 ; Isolate the last charater ADD R0, R0, R2	OUT

HALT

SHIFTR	AND R3, R3, #0 ; cnt = 0 TOP	ADD R0, R0, #-2 BRn BOTTOM ADD R3, R3, #1 BOTTOM	ADD R0, R0, #0 BRp TOP ADD R0, R3, #0 ; Move cnt into R0, which is the shifted result RET
 * Shift right 1 bit (divide by 2)
 * Shift right 1 bit (divide by 2)

VALUE	.FILL	x4293 MASK1	.FILL	x000F OFFSET	.FILL	#48

.END

Week 12 (Nov 5 - 9)
[[Media:11 Stack and Interrupts.pptx|Interrupts]]

Nov 6 - Election day (no classes)

Lab #4 Due

[[Media:Fall_2012_CSCI_250_Lab_5.pdf|Lab #5 Assigned]]

Week 13 (Nov 12 - 16)
[[Media: 12 Functions and Recursion.pptx|Functions and Recursion]]

Week 14 (Nov 19 - 23)
[[Media:Fall_2012_CSCI_250_Quiz_2.pdf|Quiz #2 on Monday]]

Lab #5 Due

Week 15 (Nov 26 - 30)
[[Media:13 Memory and Cache.pptx|Memory and cache]]

Week 16 - 17
Final Exam [[Media:Fall_2012_CSCI_250_Cache_Worksheet_Solutions.pdf|Cache Worksheet with Solutions]]

[[Media:Fall_2012_CSCI_250_Practice_Final.pdf|Sample Final]]

[[Media:Fall_2012_CSCI_250_Sample_Final_Questions.pdf|More sample exam questions]]

[[Media:Fall_2012_CSCI_250_Sample_Final_Questions_Solutions.pdf|Some solutions to sample exam questions]]

Dec 4 - Reading day

Section 01 - Final Exam on December 10 from 8 - 11 AM