Question

Suppose a program contains the data segment definitions val DWORD ? results BYTE 11 DUP(?), 0...

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)

Homework Answers

Answer #1

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.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
The following data segment starts at memory address 2300h (hexadecimal) .data printString BYTE "Assembly is fun",0...
The following data segment starts at memory address 2300h (hexadecimal) .data printString BYTE "Assembly is fun",0 moreBytes BYTE 48 DUP(0) dateIssued DWORD ? dueDate DWORD ? elapsedTime WORD ? What is the hexadecimal address of dueDate? 2310h 2344h 2340h 2368h Please explain the answer, I thought the answer was 2368h
A) Is the code below secure? Explain your rationale. ExitProcess PROTO .data firstval qword 20002000h secondval...
A) Is the code below secure? Explain your rationale. ExitProcess PROTO .data firstval qword 20002000h secondval qword 11111111h thirdval qword 22222222h sum qword 0 .code main proc      mov rax,firstval                         add rax,secondval             add    rax,thirdval      mov    sum,rax      mov    ecx,0      invoke ExitProcess main endp end main b) Transmitted messages often include a parity bit, whose value is combined with a data byte to produce an even number of 1 bits. Suppose a message byte in the AL...
(C++ program) Use the code segment below to answer the two questions that follow. … int...
(C++ program) Use the code segment below to answer the two questions that follow. … int size = 0; cout << “Enter size: “; cin >> size; int sizeCode = size / 10; if (sizeCode == 0)    cout << “extra small”; else if(sizeCode == 1 )    cout << “small”; else if (sizeCode == 2)    cout << “medium”; else if (sizeCode == 3)    cout << “large”; else    cout << “extra large”; //end if … What would...
#Linked Lists and Classes #C++ Hi, please use singly linked list method to do this question....
#Linked Lists and Classes #C++ Hi, please use singly linked list method to do this question. Thank you! Here’s the contents of a file called example.cpp: // example.cpp #include "LinkedList.h" #include <iostream> #include <string> using namespace std; int main() { cout << "Please enter some words (ctrl-d to stop):\n"; LinkedList lst; int count = 0; string s; while (cin >> s) { count++; lst.add(remove_non_letters(s)); } // while cout << "\n" << count << " total words read in\n"; cout <<...
1. The memory units that follow are specified by the number of words times the number...
1. The memory units that follow are specified by the number of words times the number of bits per word. How many address lines and input/output data lines are needed in each case? (a) 8K X 16 (b) 2G X 8 (c) 16M X 32 (d) 256K X 64 2. Give the number of bytes stored in each memory unit in question 1. 3. Word number 563 decimal in the memory shown in Fig. 7.3 (see Mano-Ch7.pdf) contains the binary...
You will write a program that loops until the user selects 0 to exit. In the...
You will write a program that loops until the user selects 0 to exit. In the loop the user interactively selects a menu choice to compress or decompress a file. There are three menu options: Option 0: allows the user to exit the program. Option 1: allows the user to compress the specified input file and store the result in an output file. Option 2: allows the user to decompress the specified input file and store the result in an...
SQL A manufacturing company’s data warehouse contains the following tables. Region region_id (p) region_name super_region_id (f)...
SQL A manufacturing company’s data warehouse contains the following tables. Region region_id (p) region_name super_region_id (f) 101 North America 102 USA 101 103 Canada 101 104 USA-Northeast 102 105 USA-Southeast 102 106 USA-West 102 107 Mexico 101 Note: (p) = "primary key" and (f) = "foreign key". They are not part of the column names. Product product_id (p) product_name 1256 Gear - Large 4437 Gear - Small 5567 Crankshaft 7684 Sprocket Sales_Totals product_id (p)(f) region_id (p)(f) year (p) month (p)...
Code Example 8-1 1. int count = 1; 2. int item_total = 0; 3. int item...
Code Example 8-1 1. int count = 1; 2. int item_total = 0; 3. int item = 0; 4. while (count < 4) { 5.      cout << "Enter item cost: "; 6.      cin >> item; 7.      item_total += item; 8.      ++count; 9. } 10. int average_cost = round(item_total / count); 11. cout << "Total cost: " << item_total << "\nAverage cost: " << average_cost; (Refer to Code Example 8-1.) If the user enters 5, 10, and 15 at the prompts, the output is: Total...
*Answer all questions using R-Script* Question 1 Using the built in CO2 data frame, which contains...
*Answer all questions using R-Script* Question 1 Using the built in CO2 data frame, which contains data from an experiment on the cold tolerance of Echinochloa crus-galli; find the following. a) Assign the uptake column in the dataframe to an object called "x" b) Calculate the range of x c) Calculate the 28th percentile of x d) Calculate the sample median of x e) Calculate the sample mean of x and assign it to an object called "xbar" f) Calculate...