Assembly Language

Course Code:B63002Y

Course Name: Assembly Language

Course properties: Professional course

Credits: 40/2.0

Pre-requisite: Introduction to Computer, Programming

Course Description

Assembly Language is designed for undergraduate students majoring in Computer Science and Technology, and is a major elective course. The undergraduate students who choose Assembly Language are required to master programming language; in this way, they can deepen their understanding of assembly based on C language, which they are relatively familiar with. More important, assembly language is a kind of high-level language represented at the machine level. The implementation of the program and the work progress of computer can be closely linked by mastering the corresponding of these two languages, directly reflecting the inherent characteristics of the assembly language, which means it is the combination that can easily unify “program” and “machine”. Give the differences in microarchitecture through further explanation of the different assembly code, and it can provide pilot knowledge for some follow-up courses, such as Compiler Principles, Operating System, Computer Architecture, as well as an understanding of the role and position of various courses for students from the perspective of the whole system.

The basic requirements for this course are as follows

1. The section of basic principles of computer system

a) Master the basic components and structures of the computer
b) Master the representation of fixed-point data and floating-point data, data conversion and the corresponding operation method

c) Master the common set of X86 instruction set and MIPS set

2. Section of assembly language program design a) Master the program structure and programming specification of assembly language

b) Master the operation of fixed-point data and floating-point data

c) Master the access method to the memory cell

d) Master the conditional processing, procedure call and high-level language interface
e) Master the structure and macro of assembly language

3. The section of C language and assembly language

a) Master the manifestation of C control flow, stack, functions, and recursive in assembly language

b) Master the manifestation of C data structure inassembly language

c) Master writing embedded assembly program

d) Learn the basic method of code optimization

4. The link and load of program

a) Master the memory layout of program

b) Learn the file format of the executable program

c) Learn the link and load of the executable file

Topics and Schedule

1. Introduction of assembly language (2hrs) 

Introducing assembly language plays a key role in the whole computer science;

Assembly language format and the basic knowledge when learning assembly language;

Introduce macro assembler, debugger and other tools.
2. The basic principles of the computer system (8hrs) 

The basic structure of computer;

The representation, data conversion and the corresponding calculation method of fixed-point data and floating point data in computer

The common set of X86 instruction set and MIPS set

3. The design of Assembly language programming (14hrs)

The structure of program and programming specification in assembly language;

Conditional processing, procedure call, high-level language interface;

The data structure and macro of assembly language, increase hardware content, including interrupt, address space, protected mode and so on.
4. C and assembly language (14hrs) 

C program implemented at the assembly level, including the important data structures, as well as control flow, functions, recursion, and compiled in the form of assembly language;

Writing embedded assembly program

The method of code optimization;

Considering two aspects: one is knowledge points and "Principles of Computer Organization" teaching schedule. The other one is considering the teaching priorities of conditional processing, procedure call, high-level language interface, the data structure and macro of assembly language in section 3.

5. The link and load of program (6hrs)

The layout of binary program in memory;

The format of the executable file;

The link and load of the executable file.

Course features

Based on the assembly language course, students can have a deep understanding on Instruction Set Architecture level, have a good command of assembly language programming, know the link and load of binary code, and deeply understand the manifestation and working principle when high-level language is represented in assembly language.

The combination of lectures and live demonstrations will be taken as teaching methods, allowing students to have a visual concept. Combined with the practical background, students are arranged in writing assembly program in order to further train the students’ practical ability, design ability and solving problem ability, which can show the combination of science and teaching of University of Chinese Academy of Sciences.

Kip R Irvine, Assembly Language for X86 Processors,
Tsinghua university press(photoetching)(ISBN 9787302260301)


Wang Shuang, Assembly Language, Tsinghua university press(ISBN:978-7-302-3314-2)

Author:Wang Jian

Date: 2015.8