Question
Find the initial values the assembler will generate for each the directives given below. Express each result using 2 hex digits for each byte generated.
Find the initial values the assembler will generate for each the directives given below. Express each result using 2 hex digits for each byte generated. Note and skip any errors.
a. byte1 BYTE 10010011B
b. byte2 BYTE 54Q
c. byte3 BYTE 0ADH
d. byte4 BYTE 109
e. byte5 BYTE -67
f. byte6 BYTE 'Z'
g. byte7 BYTE "Twinkle, Twinkle Little Star",0DH,0AH,0
h. byte8 BYTE 151, 152, 153, 154,155, 156, 157, 158
i. byte9 BYTE 5 DUP ("[]")
j. dwrd1 DWORD 1000000H
k. dwrd2 DWORD 1000000B
l. drwrd3 DWORD 1000000Q
n. dwrd5 DWORD 4142
o. qwrd1 QWORD -21
p. qwrd2 QWORD CCCC DDDD EEEE FFFFH
q. Create the Memory Map that results if the data declarations above are considered to be done in the sequence shown. That is, indicate the amounts of storage space used or reserved
j); Before: RDX: FFFF FFFCH
NEG RDX
; After: RDX, EDX, SF, ZF.
3. Use the following data definitions to answer the questions that follow: .Data
Num1 WORD 100
Num2 BYTE 225
Char1 BYTE Y
Num3 DWORD 0
Indicate which of the following instructions are legal or illegal. Explain the reason for each illegal instruction.
a. MOV EAX, EBX
b. MOV EAX, Num2
c. MOV BL, Num1
d. MOV DH, Char1
e. MOV Char1, Num2
f. ADD 75, EAX
g. SUB Char1, A
h. XCHG AL, NUM2
i. XCHG AL, 23
j. INC Num3
4. Write a complete assembly program code that implements the following algorithm (in pseudo-code).
a. Display a greeting to the user.
b. Ask for users Name
c. Ask for users Id
d. Display a customized greeting to user, incorporating Name and Id
e. Ask user for two integers and store in memory
f. Add the two integers and store result in memory
g. Subtract the two integers from each other, store the results in memory
h. Display the original integers and the three computation results to the user
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started