200 likes | 355 Views
CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment. ZONG Wen Department of Computer Science and Engineering The Chinese University of Hong Kong wzong@cse.cuhk.edu.hk. Main topic:. 1, Introduction to Tools 2, A “Hello world” Demo 3, A “Move-Add” Demo. Introduction to Tools.
E N D
CSCI 2510 Tutorial 2Setting up Assembly Programming Environment ZONG Wen Department of Computer Science and Engineering The Chinese University of Hong Kongwzong@cse.cuhk.edu.hk
Main topic: 1, Introduction to Tools 2, A “Hello world” Demo 3, A “Move-Add” Demo
Introduction to Tools • Visual C++ 2008 Express download link: go.microsoft.com/?linkid=7729279
Introduction to Tools • Win32 Console Application
Introduction to Tools • Check Empty project, click Finish
Introduction to Tools • Click Next >
Introduction to Tools • Menu “Project”->”Custom Build Rules” • Check “Microsoft Macro Assembler”
Introduction to Tools • Menu “Project”->”Add New Item” .asm extension
A “Hello world” Demo • Menu “Project” -> “Properties”
A “Hello world” Demo • Copy the following code
A “Hello world” Demo • Menu “Build” -> “Build Solution”, or F7 • Menu “Debug” -> “Start Debugging”, or F5
A “Hello world” Demo • F10 Step Over
A “Hello world” Demo • Menu Debug -> Windows -> Disassembly • Alt + 8
A “Hello world” Demo • Right click msgbox.asm, click Properties • Excluded From Build -> Yes
A “Move-Add” Demo • Copy the following code
A “Move-Add” Demo • Right click Source Files -> Add -> New Item
A “Move-Add” Demo • Press F10 to debug • Registers window
Related links • Course homepage & source code (lib): • http://www.cse.cuhk.edu.hk/~stmak/csci2510/Welcome.html
Review: 1, Introduction to Tools (VC2008) 2, “Hello world” Demo 3, “Move-Add” Demo