課程簡介與程式編寫環境
組合語言
982版
敎科書介紹
• Intel-base computers
– KIP R. IRVINE, Assembly Language for INTEL- based Computers, 5th Edition, Pearson.
• 王國華、白能勝、曾鴻祥編譯,組合語言,第五版,
全華圖書印行,書號:培生05976。ISBN 978-986-15- 4610-0。
• ARM series processor
– Peter Knaggs and Stephen Welsh, ARM: Assembly Language Programming, School of Design,
Engineering & Computing, August 31, 2004
敎科書介紹(續)
• Features of Assembly Language for INTEL- based Computers, 5
thEdition:
– Intel IA-32組合語言 – IA-32架構介紹
– 組語的基礎 – 巨集
– 高階語言介面
敎科書介紹
• ARM: Assembly Language Programming
– 電子書
– Assembler – Architecture – Instruction Set – Addressing mode – Program
– Data Movement – Subroutine
– …
教學目標
• 資工系教學目標
–培養具有增進或改善數位生活之各式系統設計與 實作能力的科技人才。
•數位生活系統
–嵌入式系統
•撰寫程式
•組合語言課程教學目標
–學習組合語言的程式設計的基本技巧,並認識 IA-32和ARM組合語言。使學生具備入門的技術,
能夠看懂與編寫IA-32與ARM組合語言程式。
評分方式
• 期中考25%
• 期末考40%(整學期授課範圍)
• 平常分數35%
– 上課態度:基本分:70 (50%)
• 全勤:+5
• 課堂練習:完成+1/每次
• 未被扣分:+5
• 缺課(未事先請假):-2/每節
• 遲到/早退:-1/每次
• 上課吵鬧:-1/每次
• 不聽勸告: -1/每次
• 上課玩電動:-10/每次
• 上課時做與課堂無關事項:-2/每次
• 不帶課本: -1/每次
• 缺考: -10/每次
– 小考/作業:(50%)
程式發展環境
• 整合發展環境
– 將編輯器、組譯器、連結器、除錯器等整合在一 起的人機介面程式。
– 例:
• Visual Studio .Net 2005
• Visual C++ 2005 Express
• Visual C++ 2008 Express
發展環境建構
• 組譯程式安裝
– Ref: http://kipirvine.com/asm/gettingStarted/index.htm#Required
– If you are using Visual Studio 2005 Professional or Team Suite, these products already contain the Microsoft Assembler 8.0.
• Step 1: Install Visual C++ 2005 Express Edition
• Step 2: Download and Install the Microsoft Assembler
• Step 3: Installing the Book's Example Programs
• Step 4: Building a Sample Assembly Language Program
• Step 5: Running the Sample Program in Debug Mode
發展環境建構
• 函式庫與範例程式下載
– 進入網站: www.asmirvine.com
– 點入超連結:Link Libraries and Example Programs
– 下載: IrvineExamples.exe (a self-extracting archive file)
• 透過超連結:
– Complete set of example programs and link libraries
• After the file has been saved,
• 函式庫安裝
– 執行 IrvineExamples.exe
• Double-click on the self-extracting archive file to extract its contents.
• The programs are normally installed in the c:\Irvine folder, but you have the option of changing the location.
發展環境建構
• Installing the Book's Example Programs
– get the latest copy of the book's link libraries and example programs.
• The examples are stored in a self-
extracting archive file that automatically extracts to the c:\Irvine folder.
• Unless you have some objection to using that location, do not alter the path.
– (Lab managers: you can designate c:\Irvine directory as read-only.)
– If you plan to change the installation location, read our instructions relating to changing
project properties.
Irvine’s Examples
• The folllowing files will be copied into the c:\Irvine directory:
Filename Description
• GraphWin.inc Include file for writing Windows applications
• Irvine16.inc Include file used with the Irvine16 link library (16-bit applications)
• Irvine16.lib 16-bit link function library used with this book
• Irvine32.inc Include file used with the Irvine32 link library (32-bit applications)
• Link16.exe 16-bit linker
• Irvine32.lib 32-bit link function library used with this book
• Macros.inc Include file containing macros (explained in Chapter 10)
• SmallWin.inc Small-sized include file, used by Irvine32.inc
• User32.lib Link library with Windows functions.
• make16.bat Batch file for building 16-bit applications
• VirtualKeys.inc Keyboard code definitions file, used by Irvine32.inc