Question: Assembly language programming. 1. Write a data directive to create a 32-bit unsigned integer initialized with the value 1234h. 2. If EAX has the value
Assembly language programming.


1. Write a data directive to create a 32-bit unsigned integer initialized with the value 1234h. 2. If EAX has the value 291 (decimal) and EBX has the value 171 (decimal), what will the register window display for these two registers (as it would show in Visual Studio): EAX: EBX: what values do they contain after this instruction: mov EBX, EAX EAX: EBX: 3. If varX is defined as shown below, write an instruction to set EAX to varX. varX WORD 256 Note: the size difference 4. Describe two important rules when using the MOV instruction. 5. If EAX = 1234ABCF and you execute the following instruction mov AH 18. What will be contained in EAX as a result? Describe your answer. 6. Given EAX with the value 10 and var1 DWORD 37, write an instruction or instruc- tions that will swap their values. 7. Write the data declaration for an array of 5 bytes initialized with each element initialized with the value 1016. 8. Write a count controlled loop that will compute Rval = 1 - 2 - 3 - ... - N. N should be a WORD specified in the data section (make sure to include N and Rval in this section). Your loop should iterate N times and store the final value in Rval. You may use Visual Studio for this but no other resource. Verify your answer with a conversion you compute on your own and show that it matches what was stored in Rval. 1. Write a data directive to create a 32-bit unsigned integer initialized with the value 1234h. 2. If EAX has the value 291 (decimal) and EBX has the value 171 (decimal), what will the register window display for these two registers (as it would show in Visual Studio): EAX: EBX: what values do they contain after this instruction: mov EBX, EAX EAX: EBX: 3. If varX is defined as shown below, write an instruction to set EAX to varX. varX WORD 256 Note: the size difference 4. Describe two important rules when using the MOV instruction. 5. If EAX = 1234ABCF and you execute the following instruction mov AH 18. What will be contained in EAX as a result? Describe your answer. 6. Given EAX with the value 10 and var1 DWORD 37, write an instruction or instruc- tions that will swap their values. 7. Write the data declaration for an array of 5 bytes initialized with each element initialized with the value 1016. 8. Write a count controlled loop that will compute Rval = 1 - 2 - 3 - ... - N. N should be a WORD specified in the data section (make sure to include N and Rval in this section). Your loop should iterate N times and store the final value in Rval. You may use Visual Studio for this but no other resource. Verify your answer with a conversion you compute on your own and show that it matches what was stored in Rval
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
