Question: I have some basic assembly language questions ;;;;;;;;;;;;;;; ;;;;; Answer each question below by writing code at the APPROPRIATE places ;;;;; Hint: the appropriate place
I have some basic assembly language questions
;;;;;;;;;;;;;;;
;;;;; Answer each question below by writing code at the APPROPRIATE places
;;;;; Hint: the appropriate place is not always right below the question.
;;;;; Q2: Write the directive to bring in the IO library
;;;;; Q3: Create a constant called BASE and initialize it to 15
;;;;; Q4: Create a constant called TOP and intialize it to 3 times BASE
(from Q3)
;;;;; by using an integer expression constant
;;;;; Q5: Define an array of TOP (which is 45) signed doublewords, use any
array name you like.
;;;;; Initialize:
;;;;; - the 1st element to -25
;;;;; - the 2nd element to the hexadecimal value A24
;;;;; - the 3rd element to the binary value 1010
;;;;; and leave the rest of the array uninitialized. Note that you should
use TOP here.
;;;;; Q6. Define the string "Output = ", use any variable name you like.
;;;;; Q7. Define a prompt that asks the user for a number.
;;;;; Q8. Write code to prompt the user for a number, using the prompt
string that
;;;;; you defined in Q7.
;;;;; Q9. Write code to read in the user input, which you can assume is
always
;;;;; a positive number. Hint: use the correct library call to read
in positive number.
;;;;; Q10. Write code to print "Output is " and then echo to screen the
user input.
;;;;; Q11. Write code to print "Output is " and then print the first
element of the
;;;;; array defined in Q5.
;;;;; Q12. Build, run, and debug your code.
;;;;; Your output should be similar to this (without the commented
explanation):
;;;;; Enter a positive number: 82 ; prompt the user for a number
;;;;; Output is 82 ; echo user
input
;;;;; Output is -25 ; print
first element of array
;;;;; Press any key to continue . . .
;;;;; Q13. At the end of the source file, without using semicolons (;),
add a comment block
;;;;; to show how bigData appears in memory (should be the same 8
hexadecimal values
;;;;; that you saw in assignment 2),
;;;;; and explain why it looks different than the actual value
;;;;; Extra credit (1pt):
;;;;; Write code to print "Output is " and then print the third element of
the array defined in Q5
;;;;; Answer should be: Output is +10
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;
.data
bigData QWORD 2468ace13579bdfh ; same bigData value as last lab
.code
main PROC
main ENDP
END main
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
