csci 2510 tutorial 2 setting up assembly programming environment

20
CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment ZONG Wen Department of Computer Science and Engineering The Chinese University of Hong Kong [email protected]

Upload: terris

Post on 06-Feb-2016

72 views

Category:

Documents


0 download

DESCRIPTION

CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment. ZONG Wen Department of Computer Science and Engineering The Chinese University of Hong Kong [email protected]. Main topic:. 1, Introduction to Tools 2, A “Hello world” Demo 3, A “Move-Add” Demo. Introduction to Tools. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

CSCI 2510 Tutorial 2Setting up Assembly Programming Environment

ZONG Wen

Department of Computer Science and EngineeringThe Chinese University of Hong Kong

[email protected]

Page 2: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Main topic:

1, Introduction to Tools

2, A “Hello world” Demo

3, A “Move-Add” Demo

Page 3: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Introduction to Tools

Visual C++ 2008 Express

download link: go.microsoft.com/?linkid=7729279

Page 4: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Win32 Console Application

Introduction to Tools

Page 5: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Check Empty project, click Finish

Introduction to Tools

Page 6: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Click Next >

Introduction to Tools

Page 7: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Menu “Project”->”Custom Build Rules”Check “Microsoft Macro Assembler”

Introduction to Tools

Page 8: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Menu “Project”->”Add New Item”

.asm extension

Introduction to Tools

Page 9: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Menu “Project” -> “Properties”

A “Hello world” Demo

Page 10: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Copy the following code

A “Hello world” Demo

Page 11: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Menu “Build” -> “Build Solution”, or F7Menu “Debug” -> “Start Debugging”, or F5

A “Hello world” Demo

Page 12: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

F10 Step Over

A “Hello world” Demo

Page 13: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Menu Debug -> Windows -> DisassemblyAlt + 8

A “Hello world” Demo

Page 14: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Right click msgbox.asm, click PropertiesExcluded From Build -> Yes

A “Hello world” Demo

Page 15: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Copy the following code

A “Move-Add” Demo

Page 16: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Right click Source Files -> Add -> New Item

A “Move-Add” Demo

Page 17: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Press F10 to debugRegisters window

A “Move-Add” Demo

Page 18: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Related links

Course homepage & source code ( lib):http://www.cse.cuhk.edu.hk/~stmak/csci2510/Welcome.html

Page 19: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Review:

1, Introduction to Tools ( VC2008)

2, “Hello world” Demo

3, “Move-Add” Demo

Page 20: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment

Thank You

( Q & A)