13
1 CSCI11D-I Prelim lab #1 Assembly Language by using Debug Program DENSY JOHN V

CSCI11D-I Prelim lab #1 Assembly Language by using Debug Program

  • Upload
    amadis

  • View
    57

  • Download
    0

Embed Size (px)

DESCRIPTION

CSCI11D-I Prelim lab #1 Assembly Language by using Debug Program. DENSY JOHN V. 1. Typical Uses of General-Purpose Registers. x86 Registers. Open Dos Window. Start> All Programs> Accessories> Command Prompt. Dos prompt. 4. Load Debug. Debug . Debug prompt. 5. - PowerPoint PPT Presentation

Citation preview

Page 1: CSCI11D-I  Prelim lab #1 Assembly Language by using Debug Program

11

CSCI11D-I Prelim lab #1

Assembly Language by usingDebug Program

DENSY JOHN V

Page 2: CSCI11D-I  Prelim lab #1 Assembly Language by using Debug Program

2

Typical Uses of General-Purpose Registers

Page 3: CSCI11D-I  Prelim lab #1 Assembly Language by using Debug Program

3

x86 Registers

Page 4: CSCI11D-I  Prelim lab #1 Assembly Language by using Debug Program

44

Open Dos Window

Start> All Programs> Accessories> Command Prompt

Dos prompt

Page 5: CSCI11D-I  Prelim lab #1 Assembly Language by using Debug Program

55

Load Debug

• Debug <enter>

Debug prompt

Page 6: CSCI11D-I  Prelim lab #1 Assembly Language by using Debug Program

66

Quit from Debug

• Q <enter>

Dos prompt

Page 7: CSCI11D-I  Prelim lab #1 Assembly Language by using Debug Program

77

View Content of Registers

• R <enter>

Page 8: CSCI11D-I  Prelim lab #1 Assembly Language by using Debug Program

88

Modify content of the registers

• R AX <enter>• After the (: ) input the new value then <enter>

The old value

The new value

Page 9: CSCI11D-I  Prelim lab #1 Assembly Language by using Debug Program

99

The registers value represented in hexadecimal system (4 digits)

DEBUG will pad it with zeros

Error because of the 5th digit

Page 10: CSCI11D-I  Prelim lab #1 Assembly Language by using Debug Program

1010

Write Assembly programA <starting Address>

Mov <destination> , <source>

add <destination> , <source>

Interrupt command (3) to keep IP register point to the last address in your program (0108)

Go command to execute the program

Page 11: CSCI11D-I  Prelim lab #1 Assembly Language by using Debug Program

1111

Trace the previous programAddress of the Next

step

T=<starting address> no. of instruction

Page 12: CSCI11D-I  Prelim lab #1 Assembly Language by using Debug Program

1212

int 20

Page 13: CSCI11D-I  Prelim lab #1 Assembly Language by using Debug Program

1313

Execute only part of the program

G= <starting address> <break point>