By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,483 Members | 1,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,483 IT Pros & Developers. It's quick & easy.

Address Register?

P: n/a
I have just new to degugger.
It shows the data registers and address registers.
Data registers contatin the data values for the different variables.
But what the address registers holds?
Does address register A1 holds the address for the Data register D1?
what is the exact relationship between the data register and address
register?

Please Help

Kumar

Jul 12 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
ku********@gmail.com wrote:
I have just new to degugger.
Debuggers are off-topic.
It shows the data registers and address registers.
Sure.
Data registers contatin the data values for the different variables.
OK.
But what the address registers holds?
An address? Just a wild guess.
Does address register A1 holds the address for the Data register D1?
No, probably some other address.
what is the exact relationship between the data register and address
register?
This is a question that cannot be answered in terms of C++ language.
Please find a better newsgroup to ask your hardware-specific questions.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jul 12 '06 #2

P: n/a

<ku********@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
>I have just new to degugger.
It shows the data registers and address registers.
Data registers contatin the data values for the different variables.
But what the address registers holds?
Does address register A1 holds the address for the Data register D1?
what is the exact relationship between the data register and address
register?
Registers and other hardware-related information are completely hardware and
operating-system specific, and thus off-topic in this newsgroup, which
discusses C++ language issues.

You might want to get a book on general desktop computer architecture, if
you're curious. Or one specific to your system.

[Off-Topic info follows]

In general, an address register contains an address in memory where data is
being read from or written to.

So, you may have an assignment statement in your C++ code, which has been
compiled into some form of memory write statement in machine code, and the
destination address of that machine code statement could get stored in an
address register. When the op-code is executed, the data gets written to
that address in memory.

But given that you're in a debugger, a displayed address register may show
an address that was already written to, or one about to be written to, or
nothing of particular interest to you at that moment. It's really all
dependent on the architecture of your system and the way your IDE displays
data.

-Howard
Jul 12 '06 #3

P: n/a
<ku********@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
>I have just new to degugger.
It shows the data registers and address registers.
Data registers contatin the data values for the different variables.
But what the address registers holds?
Does address register A1 holds the address for the Data register D1?
what is the exact relationship between the data register and address
register?
An address register will hold the value of the memory location of the
instruction to be executed, or where the Stack address, or the data address.
They are pointer values usually. The last time I studied registers was back
in the 80286 days, however, so the terminology may have changed.
Jul 12 '06 #4

P: n/a
ku********@gmail.com schrieb:
I have just new to degugger.
It shows the data registers and address registers.
Data registers contatin the data values for the different variables.
But what the address registers holds?
Does address register A1 holds the address for the Data register D1?
what is the exact relationship between the data register and address
register?
There is no A1 or D1. There are no address registers. At least not on my
system. And not in the C++ language.
So ask in a newsgroup for your platform.

--
Thomas
Jul 12 '06 #5

P: n/a

ku********@gmail.com wrote:
I have just new to degugger.
It shows the data registers and address registers.
Data registers contatin the data values for the different variables.
But what the address registers holds?
Does address register A1 holds the address for the Data register D1?
what is the exact relationship between the data register and address
register?
Looks like 680x0 assembly.

In that case, there should be 8 address registers and 8 data registers.
On this specific architecture, there are two sets of registers, and
operations operate on either set (or both sets), depending on the type
of operation.
That is : An assembly instruction which mentions the register number
(with only 3 bits) will implicitly (depending on its opcode) refer to
either Dx or Ax.

This system permits to have 16 registers and refer to registers with
only 3 bits, and thus have a more compact binary code.

Operations such as addition, multiplication, bitwise operators, etc.
use D0 to D7 (Data registers) as register operands, while A0 to A7 are
used as memory operands.

You can't understand the real meaning of these register values if you
don't learn this assembly language.
With Internet you can find a lot of tutorial or references about the
68000 assembly language.

Jul 12 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.