Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

221 - Quiz11 jumps

Total questions: 12

Worksheet time: 9mins

Name
Class
Date
1.

For any two integers n or n, n produces?

a)

n

b)

inverted n

c)

2s comp n

d)

unknown

2.

The TEST instruction:

a)

always alters the destination operand.

b)

sets the CPU flags exactly as the AND instruction

c)

never alters the destination operand

3.

The NOT instruction inverts each bit in a destination operand.

a)

ture

b)

false

4.

1. The JL instruction jumps if the (unsigned) first operand is less than the (unsigned) second operand.

a)

true

b)

false

5.

1. The JB instruction jumps if the (unsigned) first operand is less than the (unsigned) second operand.

a)

true

b)

false

6.

1. The JZ instruction jumps is the same as JE.

a)

true

b)

false

7.

1. The JA instruction jumps is the same as JNBE.

a)

true

b)

false

8.

1. The JA instruction jumps is the same as JG.

a)

true

b)

false

9.

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:

a)

1

b)

0

c)

5

d)

'5'

10.

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:

a)

1

b)

0

c)

a

d)

'a'

11.

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

a)

n/a - infinite loop

b)

0

c)

3

d)

21

12.

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

a)

60

b)

0

c)

30

d)

50