CS 200 Computer Systems Programming I
| Credit Hours: | 4 |
| Course Coordinator: | Su-Hui Chiang |
| Course Description: | Introduction to computer systems from a software perspective. Systems programming using C and assembly language. Basic computer organization. Representation of data. Machine instruction sets and assembly programming, relationship between C code and assembly code, C pointers and structures and their machine-level representation. Linking and loading. Program debugging. Prerequisite: CS 162. |
| Prerequisites: | Two quarters of introductory programming. |
| Goals: | Introduce computer systems from a software perspective. Teach
C and assembly language programming and reading skills.
Teach basic systems programming skills and tools. Show how
to measure and improve program performance based on an
understanding of key aspects of machine architecture.
Upon the successful completion of this course students will be able to:
- Explain the basic hardware organization of a computer, including the
roles of CPU, ALU, registers, buses, memory, caches, and controllers.
- Explain the basic phases of program compilation and execution.
- Explain the basic facilities provided by an operating system, including
processes, virtual memory, and files.
- Do arithmetic in hexadecimal, decimal, octal, and binary notation,
and convert among these notations.
- Explain how signed and unsigned integers are represented and manually
simulate arithmetic operations on these representations.
- Explain how floating point numbers are represented and manually simulate
arithmetic operations on these representations.
- Explain how characters are represented.
- Describe what is meant by a machine architecture.
- Describe the basic architecture for the IA32 family (or similar machine),
including the arithmetic/logic instructions, registers, memory model and
addressing, and control instructions.
- Read and understand the architecture manual for a new machine.
- Explain in detail how stack-based subroutine call and return work at
machine level.
- Describe the assembly language corresponding to C language features,
including arithmetic, control flow, arrays, pointers, structures, and function
calls.
- Explain the linking process under Linux (or similar O/S), including
the role and format of object and executable files, relocation, and shared
libraries.
- Write, compile, debug, and execute C programs involving terminal I/O,
command-line arguments, data and function pointers, structures, unions, arrays,
and jump tables.
- Write, assemble, debug and execute simple assembly language routines.
- Read and understand assembler code generated by a compiler.
- Debug C and assembler programs using gdb (or similar debugger).
- Combine C and assembler code into a single executable.
- Use a makefile to organize development of programs with multiple source
files.
|
| Textbooks: | Computer Systems: A Programmer's Perspective, Bryant and O'Hallaron, Prentice
Hall, 2002.
The C Programming Language, 2nd ed., Kernighan and Ritchie, Prentice Hall, 1998. |
| References: | None. |
| Major Topics: | Basic Machine Organization
Representation of Information
Machine-level Programming in C and assembler
Complex data structures and their representation
Linking and Loading
Systems programming tools |
| Laboratory Exercises: | Bit-level manipulation in C code (2 weeks)
Machine code (2 weeks)
Reverse engineering (2 weeks)
Pointer mainpulation in C code (2 weeks)
Debugging (2 weeks) |
| CAC Category Credits |
Core | | Advanced |
| Data Structures |
1.0 | |
| Algorithms |
| |
| Software Design |
| |
| Computer Architecture |
1.5 | |
| Programming Languages |
1.0 | |
| Oral and Written Communications: | None. |
| Social and Ethical Issues: | None. |
| Theoretical Content: | Encoding of information in binary form (1 week) |
| Problem Analysis: | Lab and homework problems in programming, reverse engineering, and debugging. |
| Solution Design: | Lab and homework problems in programming. |
|