Suppose a program contains the data segment definitions
val DWORD ? results BYTE 11 DUP(?), 0
and the code segment contains
dtoa results, val
Now, assuming that val contains FFFFFFE3, what bytes will be placed in memory at results by the dtoa macro?
(Your answer should be in hex and should be the proper size)
Answer :- The name "dota" stands for double to
ASCII.
Input to the macro is a signed integer number. Output is the
decimal equivalent of input.
If number is a negative then a minus sign is added before the
number.
The destination is always 11-byte storage location, in data
segment.
If resulting number is shorter than 11 byte then rest bytes will be
left blank.
Syntax :- dtoa destination, source
We have input as 0xFFFFFFE3. Since it is a negative number the
result will have one minus sign(-) before the number, in
result.
Thus result = -FFFFFFE3. (writing in hex as said in question. In
actual it will be in decimal with minus sign and three preceeding
spaces.)
Note :- The number is a negative number since its MSB is 1.
Get Answers For Free
Most questions answered within 1 hours.