System Programming

System Programming is a basic course offered within the context of our Computer Science Degree Program. It is a theoretical/practical course focused at machine-level system programming. A set of books and manuals (see Literature bellow) gives technical support to the course, while a set of tools (see laboratory bellow) yields a platform for the practical exercises carried out along the course.

Requisites

The requisite for this course is Digital Systems and it must be attended simultaneously with Computer Architecture I.

Program (72 hours)

Topic Notes Hours
1 - Introduction and Motivation PDF 2
2 - Computer Organization and Programming PDF
2.1 - Data representation
2
2.2 - Boolean algebra
2
2.3 - Basic system components
2
2.4 - Instruction Set Architecture
2
2.5 - Program translation into machine language
2
3 - Assembly Language PDF
3.1 - Assemblers, instructions and directives
4
3.2 - Memory access
6
3.3 - Variables and data structures
4
3.4 - Arithmetic and logical operations
4
3.4 - Flow control
4
3.4 - Procedures
4
4 - System Programming PDF
4.1 - Interweaving system programming languages
4
4.2 - The stack
2
4.3 - Call conventions
4
4.4 - Run-time environments
2
4.5 - System calls
2
4.6 - I/O
4
4.5 - Interrupt handling
4
5 - Debugging PDF 4
6 - Advanced Topics (students' seminars) 6
7 - Discussion 2

Evaluation

Students will have their system programming skills evaluated through class exercises and seminars.

Exercises

  1. Using the SPIM Simulator
  2. Exploring Data Addressing Modes (E1)
  3. The Mechanical Arm Controller (E2)
  4. Exploring Arithmetic and Logical Operations (E3)
  5. Exploring Arithmetic and Logical Operations II (E4)
  6. Exploring Arithmetic and Logical Operations III (E5)
  7. Using the GXEmul
  8. Mixing Assembly on High Level Languages (E6)
  9. Print Context (E7)
  10. Print Stack Frames (E8)
  11. Building Libraries
  12. Interrupt Programming (E9)
  13. I/O: The Led-Switch Application (E10)

Literature

  1. David A. Patterson and John L. Hennessy, Computer Organization and Design: the Hardware and Software Interface, Morgan Kaufmann, 1997.
  2. Jonathan Bartlett, Programming from the Ground Up, Bartlett Publishing, 2003.
  3. John Waldron, Introduction to RISC Assembly Language Programming, Addison Wesley, 1999.
  4. Dominic Sweetman, See MIPS Run, Morgan Kaufmann, 1999.
  5. Randall Hyde, The Art of Assembly Language, No Starch, 2003.
  6. Paul Carter', PC Assembly Tutorial, on-line, 2006.
  7. David E. Simon, An Embedded Software Primer, Addison-Wesley, 1999.
  8. Bradley Kjell, Programmed Introduction to MIPS Assembly Language, on-line, 2006.
  9. Microprocessors' Manuals, User Guides and Data sheets.

Laboratory

Students will have the following platforms available for class exercises:

Links

Editions