Question
Assignment 3A - A program that adds and subtracts 32-bit numbers After installing the assembler on the computer, enter the following program, save it, assemble
Assignment 3A -
A program that adds and subtracts 32-bit numbers After installing the assembler on the computer, enter the following program, save it, assemble it and run it. Do not forget to add a comment with your name in it. You will hand in a listing (e.g.,addsum.asm) that should include your name
Assignment 3B:
Adding 4 32-Bit Integer Variables The program will contain four 32-bit integer variables and add thesevalues together, saving the result in a variable. The sum should still be in the EAX register when you call the library routine DumpRegs. Have your values initialized in the data segment.
Assignment 3C:
Answer the following questions
Question 1.
a. Declare a 32-bit signed integer variable and initiali
ze it with the smallest possible negative decimal value.
b. Declare an uninitialized array of 100 16-bit unsigned integers.
c. Declare a string variable containing the word DVC repeated 20 times, and terminated with the null char.
Question 2
For the following declarations, assuming that the address of I is 404000h
a.
What are the addresses of J, K, and L?
b.
What is the total number of allocated bytes?
c.
Show the content of the individual bytes allocated in memory in hexadecimal. DATA I SBYTE 1, -1 J SWORD 10FFh, -256 K DWORD 23456hL BYTE 'DVC'
Question 3
Given the following definitions:
.DATA
wval LABEL WORD
barray BYTE 10h, 20h, 30h, 6 DUP (0Ah)
ALIGN 4
warray WORD 5 DUP (1000h)
pressKey EQU
darray DWORD 5 DUP (56789ABh), 7 DUP (12345678h)
dval LABEL DWORD
prompt BYTE pressKey
What will be the value of EAX, AX, and AL after executing each of the following instructions? Assume that the address of barray is 404000h.
a. mov eax, TYPE warray
b. mov eax, LENGTHOF barray
c. mov eax, SIZEOF darray
d. mov eax, OFFSET warray
e. mov eax, OFFSET darray
f. mov eax, OFFSET prompt
g. mov eax, DWORD PTR barray
h. mov al, BYTE PTR darray
i. mov ax, wval
j. mov eax, dval
Assignment 3A - A program that adds and subtracts 32-bit numbers After installing the assembler on the computer, enter the following program, save it, assemble it and run it. Do not forget to add a comment with your name in it You will hand in a listing (e.g., addsum.asm) that should include your name TITLE Add and Subtract (AddSum.asm) This program adds and subtracts 32-bit integers Caterina Pentcheva INCLUDE Irvine32.inc code main PROC eax, 10000h 40000h ; EAX=10000h ; EAX=50000h eax, 20000h EA30000h mov add eax, call exit END main DumpRegs display registers main ENDP Assignment 3B: Adding 4 32-Bit Integer Variables The program will contain four 32-bit integer variables and add these values together, saving the result in a variable. The sum should still be in the EAX register when you call the library routine DumpRegs Have your values initialized in the data segmentStep 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