Hey guys. I know the answer, but can you help me with understanding a step by step process of how to get the answer! #1
.data myPtrCheck BYTE 12h, 34h, 56h, 78h, 90h, ABh, CDh, EFh
.code
...
mov eax, DWORD PTR [myPtrCheck+2] EAX contains what value, in hexadecimal? answer is AB907856h
#2 Suppose that you are given the following partial data segment:
.data myPtrCheck BYTE 12h, 34h, 56h, 78h, 90h, ABh, CDh, EFh
.code
... mov eax, DWORD PTR myPtrCheck EAX contains what value, in hexadecimal? answer = 7863412h
first, you need to know about the little endian structure of memory.
if the memory is of little endian structure and suppose you want to store a word data like 1234h, where h is for hexadecimal. Now you know that memory is divided into byte and the word contain 2 bytes. So after storing the 1234h into memory, the memory will look like:
| ............................... |
| 34 |
| 12 |
| .............................. |
remember that 34h is the LSB byte of the word and 12h is the is the MSB byte of the word. Hence in little endian memory. The system store the bytes in memory from LSB byte towards MSB byte.
Similarly for a double word data eg. 12345678h, storing this will make the memory look like:
| ............... |
| 78 |
| 56 |
| 34 |
| 12 |
| .................. |
Also remember that, while reading the memory, the computer treat the first byte as LSB byte, second byte of memory as one byte left from LSB, third byte as 2 byte left from LSB and so on.....
So, in your case,
the memory is:
| ............... |
| 12 |
| 34 |
| 56 |
| 78 |
| 90 |
| AB |
| CD |
| EF |
| ............. |
Now myPtrCheck+2 is pointing to memory location where the content is 56. So it the first byte of the double word we will read.
read the first byte as LSB : 56
read second byte as left to LSB: 7856
read third byte as left to second 2nd left to LSB: 907856
read fourth byte as MSB : AB907856h
I hope you understand the concept of little endian memory. (storing the content of register or loading the content to register begins with LSB ).
Now it is easy to get the result for next one:
| ............... |
| 12 |
| 34 |
| 56 |
| 78 |
| 90 |
| AB |
| CD |
| EF |
| ............. |
mov eax, DWORD PTR myPtrCheck
myPtrCheck points to memory location at 12. begin from this byte.
12
3412
563412
78563412h
Hey guys. I know the answer, but can you help me with understanding a step by...
Assembly
Please answer the following above, compile and single step through
the program, writing down the value of the destination for each
instruction.
1. Using Visual Studio on the system, create a project using the code given below unsigned char short int int gArray 0x09, 0xFA, 0x5A, 0x18, 0x48, 0xAC, 0xD4, 0x71 ; cAr rays 1 [ ] = { 0:09, 0xfa, Ox5A, Ox18, 0x48, OxAC, OxD4, 0x71 }; gArray! [ ] = { Ox09, OxFA, Ox5A, Ox18, 0x48, OxAC,...
Assembly MASM x86 Write a complete program that sorts dword unsigned integer array in descending order. Assume that the user doesn’t enter more than 40 integers. You MUST use the template and follow all the directions there. You can’t add any more procedures to the template. The procedures can’t use any global variables (variables that are inside .data segment). The caller of any procedures sends its argument through the stack. Inside any procedures, if you need to use a register,...
Hey guys I need help understanding what's going on in the
following for reactions. Any detail you can provide to help me
understand them better would be much appreciated. Here are some
specific questions I have about them. Top left: I
want to know what those reagents are actually doing, like each one
of them what's their purpose in the reaction (including the heat,
the H2NNH2, the KOH and also the long one at the bottom)? Why does
the ketone...
Assembly language. You can see the question in blue box.
Loop Instruction Problem 4: Write and run a program and answer the questions in the box. .data temp dword? First, build and run the program .code - Trace ECX value mov eax,0 ECX=? mov ecx, 10 ; outer loop counter - EAX =? L1: Second: If we removed mov ecx, temp mov eax, 3 What will happen? mov temp.ecx mov ecx,5 ; inner loop counter - build and run the...
Hey guys can you help me on this please?
Question 1 Point Charges Q I , Q2, and Q3 are arranged in an equilateral triangle where side length is d cm (d=1, 3, and 8 in three different cases) and the charge # is - 10 nC, charge #2 is - 10 nC, and charge #3 is +10 nC. Please calculate the forces generated on each charge. (Give both magnitude and direction of force. )
Hey guys. I am new to coding. And I need your help in answering this problem for me. You have to answer this problem using only C++ programming language. Thanks. "Write a program that asks the user for an integer value, num. The program calculates the total number of factors of num. For example, if the user enters 12, the program should print out 6 (1,2,3,4,6,12)."
Hey guys! This is some homework I found from last year to
help me prepare for our upcoming test.
Can yall help?
3-(20 points) We discussed a public key cryptographic system in class which allows two people who did not meet to exchange messages secretely. But the first step, obtaining each other's public key is at risk. For example, l can hispublish my public key on a billboard on highway 72 and say t it is the key of Kay...
Hey guys, I am having a lot of trouble with my homework. Could
you please help? I thumbs up anyone who gives a thorough
explanation and shows the work! I really need to understand these
concepts!
Thank you guys!
1) The Ka for HCN is 4.9 ~ 10-10. What is the value of Kb for CN-? 2) Using the data in the table for 0.10 M aqueous species at 25 °C, which conjugate base below is the weakest base? Explain...
I would just like to know how these are done! If you guys can show me a formula or an example as to how these types of reactions are done that would be great! Thanks! a)Alkylation of an Ester b)Acid Catalyzed Hydrolysis of of an Amine
Hey
guys please give me the answers quickly I need it so quick I will
give you a good rate thank you
11. For the reaction, 2 SO2(g) + O2(g) - 2 SO3(g), at 450.0 K the equilibrium constant, Kc, has a value of 4.62. A system was charged to give these initial concentrations: (SO3) = 0.0254 M, [O2) = 0.00855 M. (SO2) = 0.500 M. In which direction will it go? a. to the right b. to the left...