MOV R0, 123 //Will move the value 123 into the
register R0
MVN R0, R0 //Will perform a bitwise logical NOT
operation
//on the value
in R0 and places the result into R0.
//The binary
value of 123 is: 0111 1011 and its
//logical NOT
value is: 1000 0100. Its decimal
//equivalent
should have been -124.
How? What is the value of r0 after the following executes? mov r0, 123 mvn r0,...
Assume SP = 0x20001010 before the following instructions are executed: MOV R0, #0 MOV R1, #1 MOV R2, #2 PUSH {R0, R1, R2} After these instructions execute: What is the value of the SP? _________________ What is the value of the following memory locations (place X in the blank if it cannot be calculated): Address 32-bit Data 0x2000101C ____________ 0x20001018 ____________ 0x20001014 ____________ 0x20001010 ____________ 0x2000100C ____________ 0x20001008 ____________ 0x20001004 ____________ 0x20001000 ____________
6. What will be the final value in EDX after this code executes? mov edx, 1 mov eax,7FFFh cmp eax,0FFFF8000h jl L2 mov edx,0 し2: 7. (True/False): The following code will jump to the label named Target. mov eax,-30 cmp eax,-50 ig Target 8. Implement the following pseudocode in assembly language. Use short-circuit evaluation and assume that vall and X are 32-bit variables. if vall >ecx ) AND (ecx> edx) X=1 else X=2;
What will be the value of the parity flag after the following lines execute? Mov al, 3 Add al, 5 What will be the value of the destination operand after each of the following instructions execute? .data var1 SBYTE -1, -2, -3, -4 var2 WORD A000h, B000h, C000h, D000h var3 SWORD -16, -42 var4 DWORD 11, 22, 33, 44 .code mov ax, var2 mov ax, [var2+4] mov ax, var3 mov ax, [var3-2]
4. What will r0 and r1 contain after each of the following instructions? Consider the instructions in sequence. Give your answers in decimal format. mov r0,#1 @ r0 =_____________ mov r1,#0x30 @ r0= _____________ r1= _____________ orr r1,r1,r0 @ r0= _____________ r1= _____________ lsl r1,#0x2 @ r0= _____________ r1= _____________ orr r1,r1,r0 @ r0= _____________ r1= _____________ eor r0,r0,r1 @ r0= _____________ r1= _____________ lsr r1,r0,#3 @ r0= _____________ r1= ______________
3) (5) What value will the carry flag contain after these instructions: a) MOV R1,#3 MOVS R2, R1, LSR #1 b) MOV R1,#2 MOVS R2, R1, LSR #1 4) (5) Will this instruction update the flags in the CPSR? ADD R1, R0, #1 Alo it Why or why not?
2. After initialization a user executes the following instructions: ORGO 0000 MOV A, #30H 0002 PUSH A 0003 LCALL 0500H 0006 .. What are the contents of memory locations 8, 9 and 10 after the LCALL? (A) OSH OOH 30H (B) 30H OOH O5H (C) 30H 06H OOH (D) none of the above 3. If in question #2 a RET instruction is assembled and located at 0500H. The next instruction executed after this RET will be the instruction at memory...
37. What is the binary value of AL after the following instructions have mov al,01101011b stc rcl al,2 38. What is the binary value of AX after the following instructions have executed? mov ax, 0000000010011101b mov bx, 1010101010000000b shld ax, bx,1 39. What is the binary value of AX after the following instructions have executed? mov ax, 0000000010011101b mov bx, 1010101010001011b shrd ax, bx, 2 will be the hexadecimal values of DX and AX after the following instructions have executed?...
After the following code executes, to what will the character string x be equal? #include <iostream> int main() { char x[20] = "Hello World"; char y[20]; __asm { cld; lea EDI, x; mov ecx, 5; mov al,60 rep stosb; nop } }
QUESTION 15 What is the value of the CH register in hexadecimal after the following code executes? MOV ECX,0x11223344
What is the difference between these two instructions? Mov #0xf000, r0 And Call #0xf000 And why is the call instruction useful?