What will be the hexadecimal value in the register ax (32-bit) after executing the following instructions ? mov al, 15 mov ah, 15 xor al, al mov cl, 3 shr ax, cl Codes :
01E0 h
Decimal 15 is 0F h, al is the low byte of ax and ah is the high byte.
mov al, 15; mov ah, 15 \(\Rightarrow ax = 0F0F\,h\)
xor al, al clears the low byte \(\Rightarrow ax = 0F00\,h = 0000\,1111\,0000\,0000_{2}\)
shr ax, 3 shifts right by 3 bits \(\Rightarrow 0000\,0001\,1110\,0000_{2} = 01E0\,h\)
Check: \(0F00\,h = 3840\) and \(3840 / 8 = 480 = 01E0\,h\).
Hence, 01E0 h.
The advantage of _______ is that it can reference memory without paying the price of having a full memory address in the instruction.
Which of the following are not data manipulation instructions?
A. Call
B. Loud
C. And
D. Increment
E. Shift
Choose the correct answer from the options given below:
The _____ addressing mode is similar to register indirect addressing mode, except that an offset is added to the contents of the register. The offset and register are specified in the instruction.
Match the following :
| Addressing Mode | Location of operand | ||
|---|---|---|---|
| a. | Implied | i. | Registers which are in CPU |
| b. | Immediate | ii. | Register specifies the address of the operand. |
| c. | Register | iii. | Specified in the register |
| d. | Register Indirect | iv. | Specified implicitly in the definition of instruction |
Codes :
Consider the following program fragment in assembly language:
mov ax, 0h
mov cx, 0A h
doloop:
dec ax
loop doloop
What is the value of ax and cx registers after the completion of the doloop?
The following language uses mnemonic OP codes