WIDENER UNIVERSITY
College of Arts and Sciences
Science Division
CSCI 264
Assembly Language Programming
Spring 2014

Instructor: Neveln                                                                                   Office: Freedom 312
e-mail: neveln@cs.widener.edu                                                                 Office Hrs: MWF 1-2, Th 1:30-2:00

Goal: The main goal of the course is to use a particular assembly language as a vehicle for the understanding of a particular computer architecture and its relation to the operating system. x86 assembler is the language studied.

Assemblers: The assemblers used are EDLINAS and NASM. EDLINAS has been re-written in Python. Like any new program it has bugs. This semester there is a dollar-a-bug policy in effect. Any student who is the first to report a bug will be given a dollar. To qualify, the bug must be reproducible. Features of the processor which are simply not implemented in the simulator, do not qualify as bugs.

Books: The main text for the course is Linux Assembly Language Programming by the instructor. There are additional books I recommend for those interested. One is ISA System Architecture by Tom Shanley & Don Anderson, published by Addison Wesley. This is a very well- written book with excellent diagrams and no wasted words. A book which details fairly completely from a programmer's point of view the internal operations of the x86 processors is 80x86 Architecture & Programming, Volume II by Rakesh Agarwal. A recent, exhaustive book is x86 Instruction Set Architecture also by Tom Shanley.

Programs: Programs are assigned regularly. Programs assigned as homework exercises are not collected or graded. Programs assigned in lab must be demonstrated there.

Supervised Labs: On each Thursday there will be a supervised lab. Lab write-ups, worth 10 points, are due the day following the lab, unless they involve an out-of-lab programming assignment. Some of the labs involve programming in the C language. This language will be reviewed early in the semester.

Grading: The grade for the course will be based on the point total from the labs, the tests, and the final exam. There will be a 100 point test given approximately every two weeks. The final exam will be 200 points. The scale used will be 90-100 A, 80-90 B, etc.

Topics:

  1. Background and Overview: Linux, the Gnu Compiler, Assembly Language and Edlinas.
  2. Positional Numeration Systems: Binary, Hex and Two's Complement.
  3. Logic Circuits and Computation: Combinational and Sequential Circuits, x86 Processor History Overview.
  4. Assembly Language Overview: Arithmetic, I/O, Branching and Looping statements, Comparisons with signed and unsigned integers.
  5. Memory: Use of memory operations using the edlinas simulator. Also: data definition using EQU, DB, etc., memory referencing and labels.
  6. The Stack: Subprograms, Parameter Passing, Calling C from Assembler, Calling Assembler from C and Recursion.
  7. Machine Language Overview: Hand assembly of simple programs, the ModRM byte, object code files.
  8. Linux User Programs: Writing Assembly language programs using edlinas which can be linked using gcc and run in Linux. Also: executable files, data, text and BSS segments, and ELF format.
  9. Bit Manipulations: Bit Testing and Setting, Shift Instructions.
  10. Interrupt Processing: Hardware interrupts, IRQs, ISA system architecture, software interrupts, and privilege levels.
  11. DOS Programs: Real Mode Segments, Fixed Memory Areas, BIOS and DOS interrupts.