Computing.Net > Forums > Disk Operating System > who knows how to do these ?

who knows how to do these ?

Reply to Message Icon

Original Message
Name: kobe
Date: September 9, 2001 at 23:21:04 Pacific
Subject: who knows how to do these ?
Comment:

hi, I am misunderstanded in the following 2 question, which is using ''Debug" program in Assembly Langauge.
do you know how to solve it?
thank you!

#1 Dumping Memory Variables
Use the E (Enter) command in Debug to initialize the byte at location 200 with the value 36h. Then assemble a short program that moves the byte at location 200 to the DL register. Next, move the contents of DL to memory location 201. When you are finished, use the D (Dump) command to look at locations 200 and 201, and verify that both locations contain 36h.

#2 Adding 8-bit Values
Using Debug, place the values 10h, 20h, and 30h in memory at location 200h. Next, at location 100h assemble statements that calculate the sum of the three number located at 200h and place it in the DL register (the sum should be 60h). Run and trace the program.


Report Offensive Message For Removal


Response Number 1
Name: DoOMsdAY
Date: September 10, 2001 at 03:46:34 Pacific
Reply: (edit)

This sounds very much like homework and looks like it's in debug.com. So I will point you in the right direction (hopefully), but expect no true answers. While you're in debug, type ? [Enter] and it'll list the syntax of each command. Thus you can plug in what you're looking to do, and also A is the command used to assemble - add assembly commands into memory. Beyond that, so far as I am concerned, you are on your own (unless you are looking for very minimal things, not the whole question you were assigned).


Report Offensive Follow Up For Removal

Response Number 2
Name: dEAtH DwArf
Date: September 10, 2001 at 12:05:19 Pacific
Reply: (edit)

-e 200 36
-a 100
XXXX:0100 mov dl,[0200]
XXXX:0103 mov [0201],dl
XXXX:0106
-d 200 l 2

*********************************************

-e 200 10 20 30
-a 100
XXXX:0100 xor dl,dl
XXXX:0101 mov cx,3
XXXX:0104 mov bx,0200
XXXX:0107 add dl, byte ptr [bx]
XXXX:010x inc 203
XXXX:010x loop 0107
XXXX:01xx int 20
XXXX:01xx
-rip
:0100
-t c
-r

I don't have debug handy right now, note some of the offsets I came up with guesstimation are probably wrong, and deliberately left for you to figure; but the instructions should all work as supposed given the correct operands.


Report Offensive Follow Up For Removal

Response Number 3
Name: dEAtH DwArf
Date: September 10, 2001 at 12:12:59 Pacific
Reply: (edit)

I know the line

inc 203

should read

inc bx

in adding 8-bit values,
but i was thinking of something entirely different and have a lot on my mind.
I don't even recall if debug allows for register indirect addressing but why do all of the work?


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: who knows how to do these ?

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge