130 likes | 350 Vues
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 <enter>. Debug prompt. 5.
E N D
CSCI11D-I Prelim lab #1Assembly Language by usingDebug Program DENSY JOHN V 1
Open Dos Window Start> All Programs> Accessories> Command Prompt Dos prompt 4
Load Debug • Debug <enter> Debug prompt 5
Quit from Debug • Q <enter> Dos prompt 6
View Content of Registers • R <enter> 7
Modify content of the registers • R AX <enter> • After the (: ) input the new value then <enter> The old value The new value 8
The registers value represented in hexadecimal system (4 digits) DEBUG will pad it with zeros Error because of the 5th digit 9
Write Assembly program A <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 10
Trace the previous program Address of the Next step T=<starting address> no. of instruction 11
int 20 12
Execute only part of the program G= <starting address> <break point> 13