CSCI11D-I Prelim lab #1 Assembly Language by using Debug Program
description
Transcript of 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
2
Typical Uses of General-Purpose Registers
3
x86 Registers
44
Open Dos Window
Start> All Programs> Accessories> Command Prompt
Dos prompt
55
Load Debug
• Debug <enter>
Debug prompt
66
Quit from Debug
• Q <enter>
Dos prompt
77
View Content of Registers
• R <enter>
88
Modify content of the registers
• R AX <enter>• After the (: ) input the new value then <enter>
The old value
The new value
99
The registers value represented in hexadecimal system (4 digits)
DEBUG will pad it with zeros
Error because of the 5th digit
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
1111
Trace the previous programAddress of the Next
step
T=<starting address> no. of instruction
1212
int 20
1313
Execute only part of the program
G= <starting address> <break point>