CS301 Assembly Language Programming

Course
76514
Section
F02
Credits
3 + 0
Prerequisites:
  • CS201
Instructor
Orion Lawlor
Phone
907-474-7678
Office
Chapman 201E
Email
lawlor@alaska.edu
Office Hours
MTWRF
Meeting Time
Room
Chapman 104
Course Website
/courses/cs301/2014-fall/
Required Texts
None

Course Description

Catalog version: Organization of computer registers, I/O, and control. Digital representation of data. Symbolic coding, instructions, addressing modes, program segmentation, linkage, macros, and subroutines. Updated version: Describes how your code executes on real hardware, which is key to debugging, security, and performance. Includes details on both assembly language, such as registers and opcodes, and plain C programming, such as malloc.

Course Outcomes

  • Ability to measure actual performance on a given architecture
  • Ability to optimize the performance of a program

Tentative Schedule

    • NetRun intro, and distinguishing C from C++
    • Machine code, assembly language, and registers
    • Goto, loops and branches in assembly
    • Signed versus unsigned numbers, and comparisons
    • Stack push and pop, and preserved registers
    • Function declarations, and strings
    • C output: printf
    • C memory allocation: malloc, and pointer arithmetic
    • Arrays in assembly
    • Stack manipulation, and "Smashing the stack for fun and profit"
    • Pointers and Pointer Casting in C and Assembly
    • Structures and classes in C and Assembly
    • Methods in C and assembly
    • C Macros and include guards
    • Assembler macros and symbols
    • Inline assembler
    • Static and dynamic linking
    • Course review for midterm exam
    • Midterm exam
    • Performance optimization
    • Bitwise operators (e.g., Google search)
    • Fixed-point arithmetic
    • Project 1 presentations
    • Project 1 presentations (cont'd)
    • Deadline for student- and faculty-initiated withdrawals (W grade appears on academic record)
    • Multi-precision arithmetic
    • Floating-point and roundoff
    • Assembly: SSE floating point
    • C: Bits in a float, NaN, Infinity
    • x86 archeaology: FPU, SSE, AVX, VEX
    • Assembly performance survey
    • ARM (cellphone) Assembly Language
    • ARM registers and parameter passing
    • ARM performance modeling
    • Microcontrollers: Arduino
    • Quantum and adiabatic computation (optional fun lecture)
    • Thanksgiving holiday (no classes, most offices closed)
    • C++ exception handling implementation
    • C signal handling
    • System Calls and interrupts
    • Project 2 presentations
    • Course review for final exam
    • Last day of instruction
    • Final exam: 10:15-12:15pm

Grading Policies

Weight Description
15% Project 1: some code, a writeup, and short presentation on a relevant topic of your choice.
15% Project 2: another project. This can be project 1 continued, or a new direction.
20% Midterm exam
20% Final exam
30% Weekly homeworks, almost completely on NetRun. Clarity and style count!

Grades will be assigned based on the following percentage intervals:

A+
[99%, 100%)

A
[93%, 99%)
A-
[90%, 93%)
B+
[87%, 90%)

B
[83%, 87%)
B-
[80%, 83%)
C+
[77%, 80%)

C
[73%, 77%)
C-
[70%, 73%)
D+
[67%, 70%)

D
[63%, 67%)
D-
[60%, 63%)
F
[0%, 60%)

Policies

Students are expected to be at every class meeting on time, and are responsible for all class content, whether present or not. If absence from class is necessary, in-class work (other than quizzes) and homework may be made up only if the instructor is notified as soon as possible; in particular, absences due to scheduled events must be arranged ahead of time. Academic dishonesty will not be tolerated, and will be dealt with according to UAF procedures. Students in this class must pay the CS lab fee. Payment allows access to the Chapman 103 lab.

UAF academic policies http://www.uaf.edu/catalog/current/academics

CS Department policies http://www.cs.uaf.edu/departmental-policies/

Disabilities Services:

The UAF Office of Disability Services implements the Americans with Disabilities Act (ADA), and ensures that UAF students have equal access to the campus and course materials. I will work with the UAF Office of Disability Services (208 WHITAKER BLDG, 474-5655) to provide reasonable accommodation to students with disabilities.

Updated: