Worksheets221 - Quiz11 jumps
Total questions: 12
Worksheet time: 9mins
For any two integers n or n, n produces?
n
inverted n
2s comp n
unknown
The TEST instruction:
always alters the destination operand.
sets the CPU flags exactly as the AND instruction
never alters the destination operand
The NOT instruction inverts each bit in a destination operand.
ture
false
1. The JL instruction jumps if the (unsigned) first operand is less than the (unsigned) second operand.
true
false
1. The JB instruction jumps if the (unsigned) first operand is less than the (unsigned) second operand.
true
false
1. The JZ instruction jumps is the same as JE.
true
false
1. The JA instruction jumps is the same as JNBE.
true
false
1. The JA instruction jumps is the same as JG.
true
false
What would be the value of EBX if al was '5' (al='5') and we ran the following snipe of code
mov ebx, 0
cmp al,'0'
jb ID1
cmp al,'9'
ja ID1
mov ebx, 1
ID1:
1
0
5
'5'
What would be the value of EBX if AL was 'a' (al='a') and we ran the following snipe of code
mov ebx, 0
cmp al,'0'
jb ID1
cmp al,'9'
ja ID1
mov ebx, 1
ID1:
1
0
a
'a'
What would be the value of EBX if we ran the following snipe of code:
mov ebx, 0
mov ecx, 7
TOP:
add ebx, 3
dec ecx
cmp ecx, 0
jg TOP
n/a - infinite loop
0
3
21
What would be in EAX after running the following code
mov eax, 0
mov edx, sample
mov esi, 0
mov ecx, ArraySize
L1:
cmp esi, ecx
jl L2 ; if esi < ecx goto L2 else exit
jmp L5
L2:
cmp array[esi*4], edx
jg L3 ; if array[esi] > sample goto L3
jmp L4
L3:
add eax,array[esi*4] ; add to sum
L4:
inc esi ; inc and do again
jmp L1
L5:
mov sum,eax
mshow eax, dn
60
0
30
50
