Assembly
Computer Organization and Assembly Languages, Fall 2007

History of Intel CPUs*

1978 8086 16-bit processor, up to 1MB RAM, available in 5,6,8 and 10 MHz, 29K transistors.
1979 8088 chosen for the first IBM PC.
1982 80286 up to 16MB RAM, up to 20 MHz, 134K transistors, virtual memory and protected mode.
1985 80386 32-bit processor, up to 4GB RAM, up to 33 MHz, 275K transistors, instruction pipelining.
1989 80486 1.2M transistors, integrated FPU, 8KB on-chip cache.
1993 Pentium up to 200MHz, two 8K caches.
1995 Pentium Pro RISC chip, more stages in pipeline, on-board L2 cache.
1997 Pentium II MMX instruction, dynamic execution, up to 450MHz.
1999 Pentium III SSE instruction, up to 1+GHz.
2000 Pentium IV Hyper pipeline, Rapid execution engine, Execution trace cache, 3.8+GHz.
2005 Pentium D Dual core.
* adapted from A CPU History.

Course overview

This course is about computer organization and assembly languages. You might wonder why learning assembly languages. After all, who will write assembly programs these days. Actually, people still write assembly for faster codes (compiler is not as smart as men yet), smaller codes (for devices with limited amount of memory such as mobile devices) and specific architectures (in which there are not even compilers, for example, early GPUs). With these in mind, other than the fundamentals about assembly programming, this course emphasizes on code optimization techniques on writing fast and small codes. This course is divided into three parts:
  • TOY. we will teach a virtual machine called TOY, developed by Princeton. This is a machine with ancient designs. However, modern computers evolve from such simple designs and share the same princeples with TOY. By learning TOY, you will understand why computers work in the way they work. In addition, you will have you first bite of assembly programming using our own home-brewed TOY assembler and emulator.
  • ARM. ARM processors is a widely used processor for its power saving capability. It has been used in Gameboy Advance, iPod, mobile phones, iPhone and many other devices. It is a RISC machine as its name suggests. Thus, its instruction set is of a moderate size and its architecture is simple. You will develop your first real assembly program for ARMs. In addition, we will teach architecture and programming for Gameboy Advance (GBA). GBA is a good platform to learn low-level programming as your program has to control everythings itself. In addition, there is nothing with more fun than seeing your programming running on such a lovely console.
  • Intel. For the third part, we will move to Intel x86 assembly programming. Such processors are widely available on your desktop. In addition to the fundamental programming for x86, we will also cover advanced topics such as float-point programming and SIMD programming.

Meeting time: 2:20am-5:20pm every Monday
Classroom: CSIE Room 102
Instructor: Yung-Yu Chuang
Teaching assistants: Ken-Yi Li , Chang-yen Hsieh
TA Office hours: 13:30-15:30 Wednesday Room 106
                          14:00-16:00 Thursday Room 106

Mailing list: Subscribe via this website.
Textbook:
Assembly Language for Intel-Based Computers, 5th Edition, Kip R. Irvine.


References:
Computer Systems: A Programmer's Perspective
The Art of Assembly Language
Michael Abrash's Graphics Programming Black Book, chap 1-22


Grading:
  • 4 assignments (50%)
  • class participation (5%)
  • midterm exam (15%)
  • final project (30%)

Syllabus (topics we might cover):
  • Combinational circuits
  • Sequential circuits
  • TOY architecture
  • TOY programming
  • Assembly language fundamentals
  • ARM architecture
  • ARM programming
  • Gameboy advance architecture
  • Gameboy advance programming
  • IA-32 Processor Architecture
  • Data Transfers, Addressing,and Arithmetic
  • Procedures
  • Conditional Processing
  • Integer Arithmetic
  • Strings and Arrays
  • Structures and Macros
  • High-Level Language Interface
  • SIMD
  • Real Arithmetic
  • Code Optimization