CSC235 - Visual Studio Tutorial

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Getting started with MPLAB Launch MPLAB Set Toolbar as in the next slide by clicking the leftmost icon Open a new Source file by choosing [FILE][NEW] Type.
Code Composer Department of Electrical and Computer Engineering
Slide 1CPU Emulator Tutorial This program is part of the software suite that accompanies the book The Digital Core, by Noam Nisan and Shimon Schocken 2003,
COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
Lab6 – Debug Assembly Language Lab
HTML tags Skills: adding HTML tags, text editor IT concepts: plain text, computer components – storage versus memory, separation of content and format.
E.1 Eclipse. e.2 Installing Eclipse Download the eclipse.installation.exe from the course web site to your computer and execute it. Keep the destination.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
Course Introduction and Getting Started with C 1 USF - COP C for Engineers Summer 2008.
Memory & Storage Architecture Seoul National University Computer Architecture “ Bomb Lab Hints” 2nd semester, 2014 Modified version : The original.
Chapter 2 Software Tools and Assembly Language Syntax.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
Chapter 3 Elements of Assembly Language. 3.1 Assembly Language Statements.
ZONG Wen Department of Computer Science and Engineering The Chinese University of Hong Kong
Debugging in Java. Common Bugs Compilation or syntactical errors are the first that you will encounter and the easiest to debug They are usually the result.
Active-HDL Interfaces Debugging C Code Course 10.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Debugging Visual Basic.NET Programs ► ► Use debugging tools ► ► Set breakpoints and correct mistakes. ► ► Use a Watch and Local window to examine variables.
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
It works! PPInfoScreen Server is now running and will display your deployed presentations Some instructions will follow…
Open project in Microsoft Visual Studio → build program in “Release” mode.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Creating HEX files for the 6502 Using the ADX-65 Cross Assembler.
1 Working with MS SQL Server Beginning ASP.NET in C# and VB Chapter 12.
we are going to write our Assembly language program as sample ex01.asm. So that we can attempt our assigment.
Netbeans QuickStart. Creating a project File->New Project –For now you want General->Java Application –Then fill in the project details.
Programming and Debugging with the Dragon and JTAG Many thanks to Dr. James Hawthorne for evaluating the Dragon system and providing the core content for.
1 Using an Integrated Development Environment. Integrated Development Environments An Integrated Development Environment, or IDE, permits you to edit,
Objectives Create a folder in Google Drive.
Programming and Debugging with the Dragon and JTAG
Tutorial 2 IDE of Keil for the ARM 7 board(2)
How to change the LOGO on PecStarWeb V3.6
Computer Science 210 Computer Organization
Eclipse Navigation & Usage.
Computer Programming I
Malware Incident Response  Dynamic Analysis - 2
Microprocessor Lab CSL1543 0:0:2
CS 301 Fall 2001 – Chapter 3 Slides by Prof. Hartman, following “IBM PC Assembly Language Programming” by Peter Abel 9/17/2018.
Using Visual Studio with C#
Computer Architecture “Bomb Lab Hints”
Computer Science 210 Computer Organization
CSC235 - Visual Studio Getting Started.
Debugging with Eclipse
CIS 470 Mobile App Development
Computer Programming Machine and Assembly.
1. Open Visual Studio 2008.
MARIE: An Introduction to a Simple Computer
Getting Started: Developing Code with Cloud9
Introduction Installation of MASM Installation of TextPad
CPU Emulator Tutorial This program is part of the software suite
ECE 3567 Microcontroller Lab
Debugging Visual Basic Programs
Microprocessor and Assembly Language
CIS 470 Mobile App Development
Using screens and adding two numbers - addda.cbl
DAT2343 LMC Simulator Usage © Alan T. Pinck / Algonquin College; 2003.
Scripts In Matlab.
Step 1 Click on the link of the Course “Empowering Self” shared with you on . Once done, you will see this page. We are also putting it here:
CSCE 206 Lab Structured Programming in C
Review of Previous Lesson
GUI Programming in Visual Studio .NET
Debugging with Eclipse
CIS 694/EEC 693 Android Sensor Programming
ECE 3567 Microcontrollers Lab
Presentation transcript:

CSC235 - Visual Studio Tutorial Running and Debugging MASM Assembly Language Programs

First Example Copy the AddVariables folder from the shared drive to your computer S:\ComputerScience\Carelli\CSC235\Examples\VisualStudio\AddVariables Navigate into your new ‘AddVariables’ directory and double click on the file Project235.sln This will open the project in Visual Studio

Note: if you don’t see code as shown in this window, double-click on the .asm file here

Running AddVariables To run the program, click on “Local Windows Debugger” (circled on the previous slide) This will produce an output window as below: Registers are output from the Irvine routine DumpRegs WaitMsg causes the program to pause as shown Note the value stored in EAX

Setting Breakpoints A program can be halted at any point in its execution, allowing a user to view register and memory values This is done by setting a breakpoint Simply click in the margin next to a command you want to halt on Once a breakpoint is set, begin execution as before The program will pause when it reaches that point see the next slide…

2 1: set the breakpoint 1 3 2: start the run (Local Windows Debugger) 3: execution pauses at the selected command Note: changes to Continue 1 2 3

Debug Mode You are now in Debug Mode You have some choices: you can add another breakpoint … then, click on continue (see last slide) program proceeds to next break point Or.. single step though the code progress one command at a time (next slide)

1: click here to single-step 2: program executes one instruction and advances to the next 1 2

Monitoring Registers While in Debug Mode, you can view changes to Registers Debug->Windows->Registers This will open a window for viewing the registers (next slide) NOTE: you MUST do this while you are in Debugging mode!!!!

1: Registers Window 2: Changes to Register values appear in red after every instruction Note: right click in the Registers Window and check Flags to view flag settings

Monitoring Memory While in Debug Mode, you can view changes to Memory values Debug->Windows->Memory This will open a new tab for viewing memory locations (next slide) You can open up to 4 tabs NOTE: you MUST do this while you are in Debugging mode!!!!

New tab for viewing memory locations Click on it to get to memory view (next slide)

To view a memory location Type in & and the label for the memory location (&finalVal) Memory address of that location is displayed The contents of that location will be displayed as bytes value of finalVal is 300000h Note how it takes up 4 bytes and is in Little Endian order!

Do it yourself Try setting a breakpoint as shown, then step through the program Watch the registers get updated in the Registers Window as each command executes Set up and go to the Memory tab and see the value of finalVal get updated note the Little Endian storage!