Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1-the value of the register AL after the following code runs is: mov AL,9Eh or A

ID: 3690667 • Letter: 1

Question

1-the value of the register AL after the following code runs is:

mov AL,9Eh

or AL , AL

a.9Eh

b.E9h

c. 00h

d. FFH

2- The value of the register BL after the following code runs is:

a. 00h

b. 01h

c. 08h

d.none of the above.

3- the value of the register CH after the following code runs is:

mov CH, 72h

XOR CH,19h

a. 10h

b. 7Bh

C. 8Dh

d. 6Bh

4- will the following instruction clear the high 8 bits of ax?

AND AX, 00ABh

a. yes

b. no

5- Which instruction preserves - doesn't change - all the bits in BX

a. AND BX, FFh

b. OR BX,FFFFh

c. XOR BX, 0000h

d. XOR BX, FFFFh

6- Will the following code jump to label L1?

MOV AX, 0A90Ah

CMP AX, 1126h

JL L1

a. yes

b. no

7- Will the following code jump to label L2?

MOV AX, -30

MOV BX, -50

CMP BX, AX

JNBE L2

a. yes

b. no

8- Will the following code jump to label L3?

MOV AX, -26h

CMP AX, 26h

JAE L3

a.yes

b.no

9- what does the following code do? - Assuming that AX and BX hold unsigned numbers, and VAL is mem 16-

MOV VAL, BX

CMP AX, BX

JBE NEXT

MOV VAL, AX

NEXT:

a. stores the smaller of AX and BX into VAL

b. stores the larger of AX and BX into VAL

c. stores the value of AX in VAL

d. none of the above

11- the instruction AND AX, 0h will change the content of AX to 0h

a. true

b. false

12- implement the following pseudocode in assembly language:

if eax<= edx then

x=1

else

x=2

13- implement the following pseudocode in assembly language:

if (ebx > val2) or (ebx <=val1) then

x=1

else

x=2

Explanation / Answer

1) a

2) Code not given

3) d

4) a

5) c

6) a

7) b

8) a

9) b

11) a

12) CMP EAX, EDX

JG NEXT

MOV X,1

JMP L2

NEXT: MOV X,2

L2:

13) CMP EBX, VAL2

JLE L1

CMP EBX, VAL1

JG L1

MOV X,1

JMP L2

L1: MOV X,2

L2: