CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment
description
Transcript of CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment
![Page 1: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/1.jpg)
CSCI 2510 Tutorial 2Setting up Assembly Programming Environment
ZONG Wen
Department of Computer Science and EngineeringThe Chinese University of Hong Kong
![Page 2: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/2.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/3.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/4.jpg)
Win32 Console Application
Introduction to Tools
![Page 5: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/5.jpg)
Check Empty project, click Finish
Introduction to Tools
![Page 6: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/6.jpg)
Click Next >
Introduction to Tools
![Page 7: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/7.jpg)
Menu “Project”->”Custom Build Rules”Check “Microsoft Macro Assembler”
Introduction to Tools
![Page 8: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/8.jpg)
Menu “Project”->”Add New Item”
.asm extension
Introduction to Tools
![Page 9: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/9.jpg)
Menu “Project” -> “Properties”
A “Hello world” Demo
![Page 10: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/10.jpg)
Copy the following code
A “Hello world” Demo
![Page 11: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/11.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/12.jpg)
F10 Step Over
A “Hello world” Demo
![Page 13: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/13.jpg)
Menu Debug -> Windows -> DisassemblyAlt + 8
A “Hello world” Demo
![Page 14: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/14.jpg)
Right click msgbox.asm, click PropertiesExcluded From Build -> Yes
A “Hello world” Demo
![Page 15: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/15.jpg)
Copy the following code
A “Move-Add” Demo
![Page 16: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/16.jpg)
Right click Source Files -> Add -> New Item
A “Move-Add” Demo
![Page 17: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/17.jpg)
Press F10 to debugRegisters window
A “Move-Add” Demo
![Page 18: CSCI 2510 Tutorial 2 Setting up Assembly Programming Environment](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/18.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/19.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062301/56815ac3550346895dc88fcb/html5/thumbnails/20.jpg)
Thank You
( Q & A)