Create a variable that is a BYTE with the value 67. What is the value shown in memory? Show work verifying the value that is set
1. Create a variable that is a BYTE with the value 67. What is the value shown in memory? Show work verifying the value that is set.
2. Create a variable that uses 8-bits and correctly stores the value -83. Show what the memory contains and work verifying the result.
3. Create an unsigned 16-bit number that stores the value 13330 (decimal). Show what the memory contains and work verifying the result.
4. Create a signed 16-bit number and store the value -32 (decimal). Show what the memory contains and work verifying the result.
5. Create a variable to hold the value 12345678h (unsigned). (a) Move that variable's value to the EAX register. (b) Set the AH register to 12. (c) Set the AL register to the value 34. Show the values of the EAX register before and after each parts (a)-(c). Verify that data is being moved as expected and describe it.
6. Write a program using signed 8-bit variables that computes finalVal = 2*X + 3*Y – Z. X, Y, and Z should be variables that are created in your .data section. Additionally, start with X = 1; Y should be set to five times the value of X. Z should be two times the value of X. Only X should be set in the data section; Y and Z should start uninitialized and then set in the main procedure as described. Create the program in assembly to compute finalVal. Does the value that is computed make sense (show work). In separate runs of the program double your value of X continuing to set the values for X, Y, and Z such that Y = 5X and Z = 2X until the value stored in finalVal no longer make sense. What are the values of X, Y, and Z before and after the result stored is correct. Show the contents in memory and describe why the value in finalVal no longer makes sense.
TITLE Add and Subtract, Version 2 (AddSub2.asm) ; 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 ? .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
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
