Assembly Language and System Programming

[ Course slides ] [ Useful links ]


General information

Instructor name: 黃世強 (Sai-Keung Wong)

Office Hour: Wednesday 9:00 9:50

Office: Room 706

Email: wingo.wong@gmail.com or cswingo@cs.nctu.edu.tw

#ext. 56626

 

Teaching Assistants:

Name <Email>

Room

Office hour

李福順 <soon_482@livemail.tw>

電資大樓 707

曾博彥 <j.richard@livemail.tw>

電資大樓 707

陳煒誠 <s0982586@mail.ncyu.edu.tw>

電資大樓 707

張維哲 <qwertyujm2000@gmail.com>

電資大樓 707

陳凱民<kevin780607.cs96@g2.nctu.edu.tw>

電資大樓 707

喻小詩 <yushihting@hotmail.com>

電資大樓 707

陳佩姍 <lowb_ar33@hotmail.com>

陳愷君 <sddog.cs97@nctu.edu.tw>

 

Course time schedule: Wednesday 10:10 12:00, Friday 15:30 16:20

Venue: EC022


Course Score List (Last updated 2014/04/02)

Program One Score List

Midterm Score

Lab exercises, sign_up 20140312, sign_up 20140314


Final Exam


Midterm

Midterm Template

Hand-on programming test

Date: 16th April 2014

Time: 10:10 12:00, may be extended to 13:00. Please come earlier to set up the computer.

Venues: EC315,  EC316


Project


Lab Exercises:

Date: 12th March; (3CD); Set one instruction; Program Package One

Date: 14th March; (5G); Set two instruction; Program Package Two

Room: EC315,  EC316,  EC324 

 

You should follow the instruction and finish all the exercises.


Programming Assignment One and Report

Instruction [pdf]

Template for computing the sum of 1, 2, 3, , n

 

Due date:

Programming due date: 24th March, 23:00.

Report due date: 26th March.

 

Submission:

1. Source code. Upload it to our ftp server. The asm file MUST be asm01_StudentID_YourName.asm. The name of the folder MUST be asm01_StudentID_YourName. For example, if your ID is 123456789 and name is XYZ, then the folder name is asm01_123456789_XYZ. Make sure that the folder contains the Irvine folder so that we can build your program directly without needing to set file paths.

2. Report. Submit a hard copy report in class. You MUST follow the instruction to write the report.

FTP server information:

IP Address: 140.113.88.101   

username: Assembly2014

password: assembly2014

port : 21


Programming Assignment Two and Report

Instruction [pdf]

Template. A tiny game.

 

Due date:

Programming due date: 8th April, 23:00.

Report due date: 9th April.

 

Submission:

1. Source code. Upload it to our ftp server. The asm file MUST be asm02_StudentID_YourName.asm. The name of the folder MUST be asm02_StudentID_YourName. For example, if your ID is 123456789 and name is XYZ, then the folder name is asm02_123456789_XYZ. Make sure that the folder contains the Irvine folder so that we can build your program directly without needing to set file paths.

2. Report. Submit a hard copy report in class. You MUST follow the instruction to write the report.

FTP server information: will be available soon.


Programming Assignment Three and Report

 

Instruction pdf

Demo

 

Due date:

Programming due date: 24th April, 23:00.

Report due date: 25th April.

 

Submission:

1. Source code. Upload it to our ftp server. The asm file MUST be asm03_StudentID_YourName.asm. The name of the folder MUST be asm03_StudentID_YourName. For example, if your ID is 123456789 and name is XYZ, then the folder name is asm03_123456789_XYZ. Make sure that the folder contains the Irvine folder so that we can build your program directly without needing to set file paths.

2. Report. Submit a hard copy report in class. You MUST follow the instruction to write the report.

FTP server information: will be available soon.

 


 


Marking scheme:

Homework : 15%, (30% penalty per day)

Project : 15%, (30% penalty per day)

Mid-term (on-site programming tests上機考, Assembly ~Ch9): 25%

Final exam (筆試, Assembly + System programming): 35%

Quizzes: 10%,


Course slides : Assembly Language

Software system slides

Chapter 12 and source code

SIC Code doc

 

[Note that some chapters will not be taught.]

Make sure that you have MASM installed on your computer.

Getting start example: source code. (included 16-bit and 32-bit examples)

 

Factorial computation (ppt)

 

Midterm ( ~week 11 )

Topics

Contents

1-2

Assembly Language Fundamentals

3

Data Transfers, Addressing, and Arithmetic

4-5

Procedures

6

Conditional Processing

7

Integer Arithmetic

8

9

Advanced Procedures 

10

strings and Arrays 

11

Structures and Macros 

12

High-level Language Interface 

13

Assemblers [ SIC / XE Code ]

Some exercises for SIC, SIC/XE [NEW, last updated 2012/05]

14

Linking Loaders  

15

Macro Processors 

18

Final

 

Exercises: 01 (robot control), 02 (integer arithmetic), 03 (procedures), 04 (strings and arrays)

 

Floating point unit [ppt]

 

Setup paths (read it to see how to setup paths for your computers)

 

Examples:

1. Dump registers

2. Understand CF and ZF

3. Use EQU and TEXTEQU

4. 16-bit asm

5. Fibonacci numbers

6. Procedures: change cursor coordinates

7. Table-driven example: Draw a character according to its location.

8. Advance Procedures : Create standard procedure calls, pass parameters and declare local variables.

9. Show Sine Wave. Instruction pdf. A project developed by Sai-Keung Wong for NCTU undergraduate students in 2010.

 

Past exams:

1. 2010 Midterm Questions

 

Useful links

http:// www.asmirvine.com (重要資料, 一定要看)

Win32 Assembly

http://www.win32developer.com/asm/windows_tutorial_1.shtm

 

32-bit Assembler is Easy

http://www.codeproject.com/KB/winsdk/assembleriseasy.aspx

 

http://www.winasm.net/forum/index.php?showtopic=807

 

http://www.winasm.net/32bit-assembler-is-easy.html

 

Setup tools in .NET to build your own 16-bit or 32-bit assembly programs.

http://kipirvine.com/asm/4th/ide/vsnet/index.htm

 


last update: 11th Feb. 2014