View previous topic :: View next topic
|
Author |
Message |
k_rajesh
New User
Joined: 14 May 2010 Posts: 14 Location: hyd
|
|
|
|
Hi,
I am new to ASM. I was dumping Double word.
DWRD DC D'10' -- I see it as 41A0000000000000
DWRD DC D'17' -- I see it as 4211000000000000
I see that THE SECOND BIT INDICATES THE NUMBER OF BITS USED FOR THE DOUBLE WORD.
I do not understand the significance of 4 at the starting. Never used Double word that frequently. So any references to manuals will be very helpful.
Thanks,
Munni. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
This appears to be floating point data -- which you didn't specify in your post. Terminology is critical in IT, where similar terms may mean very different things. "Double word" means that 8 bytes are used -- those 8 bytes could be character data (EBCDIC, ASCII, or some code page), packed decimal, floating point, zoned decimal or even binary. Specifying "double word" without specifying the precise format can waste everybody's time if we're assuming one format is being used and that's not the format you are referencing. For example, hex '97994D' is a three-character hex field. If it is considered a packed decimal number, the value is -97994. If it is considered an EBCDIC character string, the value is pr(. Which is it? That depends upon what the application is looking for.
Assuming you are talking about floating point numbers, the format is:
first bit -- sign (0 postiive, 1 negative)
next 7 bits -- exponent (in excess-64 notation), so 40 (hex 64) means the value is times 10 to the zero power.
next 56 bites -- mantissa with implied decimal point before the first digit.
Hence 4211000000000000 is equivalent to hex 11, or decimal 17 |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
On the flip side, if you define it as an FD'10' as opposed to a D'10', then the value will be X'000000000000000A', which is decimal 10.
You can also define it straight away as X'000000000000000A', but then you may have an alignment issue.
Bill |
|
Back to top |
|
|
k_rajesh
New User
Joined: 14 May 2010 Posts: 14 Location: hyd
|
|
|
|
Hi Frens,
Thanks for the clarification. As I told you I was just dumping each data type and was curious to see the values. I saw these values in the compiler listing. Lo now I see that if I give a D'17' then it will be represented in floating point form. This is good learning.
Thanks for the clarification frens. I will keep in mind the terminology whenever I query from now on.
Thanks,
Munni. |
|
Back to top |
|
|
|