Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Given the number 456789ABh, list out its byte values in little-endian order. Do this by placing that value in a memory location and inspecting

1. Given the number 456789ABh, list out its byte values in little-endian order. Do this by placing that value in a memory location and inspecting the memory location values.

2. Declare an array of 120 uninitialized unsigned doubleword values.

3. Declare an array of bytes and initialize it to the first 5 letters of the alphabet.

4. Declare a 32-bit signed integer variable and initialize it with the smallest possible negative decimal value. In memory, what are the hexadecimal values that are shown.

5. Declare a 32-bit signed integer variable and initialize it with the value 234 (base 10). In memory, what are the hexadecimal values shown?

6. Declare an uninitialized array of 50 signed doublewords nameddArray.

8. Declare an array of 20 unsigned bytes namedbArrayand initialize all elements to zero.

9. Show the order of individual bytes in memory (lowest to highest) for the following doubleword variable: val1 DWORD 87654321h

10. Using the AddTwo program from Section 3.2 as a reference, write a program that calculates the following expression, using registers: A = (A+B) - (C+D). Assign integer values to the EAX, EBX, ECX, and EDX registers. Set memory values that require support for signed and unsigned values. Verify your work by calculating by hand the result. Show how the result you obtained matches the result obtained through your assembly program.

TITLE Add and Subtract, Version 2

; This program adds and subtracts 32-bit integers ; and stores the sum in a variable.

INCLUDE Irvine32.inc

.data val1 dword 10000h val2 dword 40000h val3 dword 20000h finalVal dword ? myval1 SBYTE -51 myval2 SBYTE -66

.code main PROC

mov eax,val1 ; start with 10000h add eax,val2 ; add 40000h sub eax,val3 ; subtract 20000h mov finalVal,eax ; store the result (30000h) call DumpRegs ; display the registers

exit main ENDP END main

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Android 4 Application Development

Authors: Reto Meier

3rd Edition

1118223853, 9781118223857

More Books

Students also viewed these Programming questions

Question

=+a) Is this an experiment or observational study? Explain.

Answered: 1 week ago