Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to find the functinf ths assembly program

Posted on 2009-05-09
14
Medium Priority
?
316 Views
Last Modified: 2012-05-06
Hi to all , I am attaching a code , the q is what is the function of this code ? I aske the same q bfore but not able to know the answer but I done more study and want to check  my work? also there return that should show but could not include in the pic .
this is my answer The loop takes in turn 99  data values from a block stored in data memory
starting at hexadecimal address 0500, finds their 2s complement and stores
the results in a block of data memory starting at hexadecimal addres 0563

Open in new window

q3.JPG
0
Comment
Question by:hnael
  • 8
  • 6
14 Comments
 
LVL 53

Expert Comment

by:Infinity08
ID: 24343371
I assume this is a follow-up of :

        http://www.experts-exchange.com/Programming/Languages/Assembly/Q_24357856.html


>> this is my answer The loop takes in turn 99  data values from a block stored in data memory
>> starting at hexadecimal address 0500, finds their 2s complement and stores
>> the results in a block of data memory starting at hexadecimal addres 0563

There are 100 values there, not 99.

I'm not sure what you mean by "finding the 2s complement". two's complement is a way to stored signed integer values. Read up on it if you're not familiar with it :

        http://en.wikipedia.org/wiki/Two%27s_complement

You say it stores "the results" - what are these results ?

How did you get to the address 0x0563 ?
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 24343377
In short : it seems you're further off than you were before (in the previous question).

In that question, you analyzed each of the statements, and understood what they did. The only thing that was left to do, was to place it all together, and to see the wood through the trees. That's all.
I suggested using pseudo code to help you understand what was going on. Did you give that a try ?
0
 

Author Comment

by:hnael
ID: 24345912
sorry my friend , your answer will have to make me go back again and think in totallly different direction, could u tel me please how can I use what u mentioed about pseudo code ?thks .
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 53

Expert Comment

by:Infinity08
ID: 24348818
>> could u tel me please how can I use what u mentioed about pseudo code ?thks .

Do you know what pseudo code is ?

    http://en.wikipedia.org/wiki/Pseudocode
0
 

Author Comment

by:hnael
ID: 24348880
yes I know it , we took at uni before long time ago , but thks for the link ......I will see what each instruction is doing again ,and get back asap.
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 24348890
ok. I'll be here :)
0
 

Author Comment

by:hnael
ID: 24349408
Hi , I noticed that no matter what the value in rA is zero so could it be the function that to make sure whats in rA is alawys zero !!!!!!
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 24349511
So, what do you think that line 7 does ?
0
 

Author Comment

by:hnael
ID: 24349537
line seven just jump one instruction whatever the setuation to the instruction that will add 1 to rE SO it jump to the istruction where increment rE BY 1, IS that right .
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 24349829
I was referring to the line marked as 7 in the screenshot you posted :

>> add immediate rA 0001

That modifies rA, doesn't it ? So, rA will not always be 0 ...
0
 

Author Comment

by:hnael
ID: 24349882
that,s correct only if the condition is met  which in this case if the value are -ve then add one to rA . also the program uses whats in rE i.e 0500 and store it in r1 .
0
 
LVL 53

Accepted Solution

by:
Infinity08 earned 1500 total points
ID: 24349887
>> which in this case if the value are -ve then add one to rA .

Right. So, what's the conclusion ? What will rA contain at the end ?
0
 

Author Closing Comment

by:hnael
ID: 31579748
well according to the threads  I should know the answer .
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 24404182
So, did you find the answer then ?
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
In this article, the configuration steps in Zabbix to monitor devices via SNMP will be discussed with some real examples on Cisco Router/Switch, Catalyst Switch, NAS Synology device.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question