Sunteți pe pagina 1din 84

TRUE

FALSE
FALSE

AX
TRUE
CF=1
B. INT 21H
A
B
C
D

FALSE
C
F
D
E

TRUE
BUFFER

PATH_NAME DB
'C:\PROGRAMS\TEST.DAT',0
FALSE

FILE_HNDL DW ?
??

A
B
C
D
QUIZ 1
Question Answer
1. CLC 1 or 0
STI
CMOVC BL,AL
BL=[1]
2. MOV AL, ‘3’ 0
SUB AL, 32h
CMOVE CL, ‘R’
CL=[1]
3. 0201

4.

5.

6. 1. UP
2. NZ
3. NC
4. EI
5. NA
6. NV
7. PL
8. PO

(tama lahat to)


7. xor ah, ah
mov al, 30
mov bl, 5
div bl
mov value, al
mov bh, 4

sbb bh, 0

mov bh, 3

mov ah, [di]


mov [di], al

8. What is the value of BH after the following?


SUB BH,BH
STC
RCR BH,1
STC
RCR BH,1
BH=
9. If a conditional jump is not taken, the instruction in the specific label will
be executed.
10. Base Relative Plus Index

11. Based Index or Register Relative

REGISTER INDIRECT ADDRESSING


Sabi dito:
http://www.ic.unicamp.br/~celio/mc404s2-
03/addr_modes/intel_addr.html

12. CL

13. Something (tama to)

14. XCHG AX, CX


15. MOV AL, 0FEh CB or 1 or CD
MOV BL, 0CDh
ADD AL, BL
CMOVNO AL, CL
AL=[1]
16. What is the equivalent arithmetic operation of add ah, 12 or SAL
MOV AH,4
SHL AH,2

QUIZ 2
Question Answer
1. Use operands 4FCAH and C237H to perform AND 4202 (wala daw H ata, king ina)
2. SUB CX, BX
SUB DH, OEEH
SUB SI, DI
SUB EBP, 3322H
SUB CH, [SI]
SUB DX, [SI+10]
SUB FROG, AL

(tama to lahat)

3. Use operands 4FCAH and C237H to perform XOR 8DFD (wala daw H ata, king ina)
4. ANDing a word operand with FFFH will result in what value for the word 000 (tama to)
operand? To set all bits of an operand to 0, it should be ANDed with
5. DAA – BCD Addition
DAS – BCD Subtraction
AAS – ASCII Subtraction
AAA – ASCII Addition

(tama lahat)

6. C++ to Assembly:
CMP BX, CX
JLE LABEL1
CMP DX, AX
JE COND1
JMP COND2

LABEL1: CMP BX, DX


JNE COND1
JMP COND 2

COND1: MOV X, 1
JMP EXIT

COND2: MOV X, 2
JMP EXIT
7.

8. If control is transferred outside the current code segment, is it NEAR or FAR (tama to)
FAR?
9. The CMP instruction works by performing a (n) ______ operation on the subtraction (tama to)
operands and setting the flags accordingly.
10. Use operands 4FCAH and C237H to perform OR CFFF (wala daw H ata, king ina)
11. What are the values of DX and CF after the following? DX = D11F or DX = D1 1F (not sure)
MOV DX, 3FA2H CF = 0107 or CF = 00 07 (not sure)
MOV CL, 7
ROL DX, CL
DX = ______, CF = _________
12. Which instruction aside from DIV will divide a given value Shr (tama to)
13. Give the packed BCD and unpacked BCD for decimal 15 Packed BCD – 0001 0101 (tama to)
Unpacked BCD – 0000 0001 0000 0101
(tama to)
14. If CF=1, AL=95, and BL=4F prior to the execution of “SBB AL, BL”, 16 (tama to)
what will be the contents of AL after subtraction in base 10?
15. SHORT, NEAR, FAR (tama to)

16. AL, AH (tama to parehas)

17. In unsigned multiplication of AX with BX, the product will be bplaced in AX and BX (tama to)
register(s)
18. The instruction “LOOP ADD_LOOP” is equivalent to what two DEC CX & JNZ ADD_LOOP (sagot sa
instructions? https://www.studyblue.com/#flashcard/vie
w/4126329)
19. The ADD instruction that has the syntax “ADD destination, source” Destination (tama to)
replaces the ____ operand with the sum of two operands.
20. What is the value of BX after the following FFE1H (sagot ko pero mali ako sa exam)
MOV BX, 0FFFH
MOV CL, 5
CLC
RCL BX, CL
BX = [1]

21. Which instruction will implement LOOP aside from std repne label (sagot ko pero mali ako sa
DEC DX exam)
JNZ label
JNE label (sagot ni GINO at not sure)

22. ADD data_1, data_2 is illegal because of no of operands. True or False True (not sure pero sabi ni GINO)
answer
23. To set all bits of an operand to 1, it could be ORed with 0 (tama to)
24. The ADC instruction that has the syntax "ADC destination, source" destination, source + destination + CF
replaces the ____ operand wiith the sum of ___ (sagot sa
https://www.studyblue.com/#flashcard/vie
w/4126329) (sagot ko pero mali ako sa
exam)
25. In unsigned division of a doubleword in DX AX by a word in CX, the [1] AX
quotient will be placed in and the remainder in [2] DX

(tama parehas)
26. Which instruction will convert packed BCD to unpacked BCD rcr (not sure)
27. Write the instruction and the answer based on CPU process (2's) on 0011 1110 (tama to)
subtracting 05H from 43H in binary with format XXXX XXXX
28. In calculating the target address to jump to, a displacement is added to the PC (tama to)
contents of the register _____
29. Given the following False (tama to)
MOV BX, 04Fh
ADD BX, 0B1h
The execution results in ZF=1
30. Which instruction aside form MUL will multiply a given value? IMUL (galing to sa kabilang gc, not sure
kung tama)
31. The CMP instruction alters the contents of its operands False (galing to sa kabilang gc, not sure
kung tama)
32. Develop a short sequence of instructions that adds AX,BX,CX,DX and
SP and save the sum in Dl
33. What is the value of BL and CF after the following BL = 52, CF = 1
MOV BL, 25H
MOV CL, 4 (tama to parehas)
ROR BL, CL
BL=[1], CF=[2]
34. 1. True
2. False
3. 9
4. mov ax, A
5. True

(6 tama ko, di ko lam ano ung tama)

35. .model small

?.data

msg1 db "Enter a string: $"


msg2 db "Enter a character to check: $"
msg3 db "There are $"
bufferSize db 51
inputLength db 0

userInput db 51 dup (0)


characterCount db ?
characterCheck db ?
.code

mov ax, @data


mov ds, ax
mov es, ax

mov ah, 09h


lea dx, msg1
int 21h

mov ah, 09h

lea dx, msg2


int 21h

mov ah, 01h


int 21h

lea di, userInput


mov cx, [inputLength]
cld

loop1:

repne scasb
je increment
jmp output
increment:

inc characterCount
jmp loop1

output:

mov ah, 09h


lea dx, msg3
int 21h
mov ah, 02h
mov dl, al
int 21h
mov ah, 4ch
int 21h

QUIZ 3
Question Answer
1. When the computer is booted in MS-DOS, the default mode is 3. False (sagot ko pero mali ako dito)
2. Bits 4 to 7 for the Background sets the colors in the video attribute byte. False (Tama to)
3. Red, Green, Blue electron beams are required to generate any color on a True (sagot ko pero mali ako dito)
video display
4. INT10h function 2h sets the cursor position on the screen. >True rin sagot ko pero mali ako eh.
TRUE DAPAT YAN EH KUPAL
TALAGA NI MA’AM

> bale False sagot


5. The row and column values can be loaded in register BX False (tama to)
6. The DOS interrupt and service function used for keyboard input without False (tama to)
echo is INT 21h and 07H respectively.
7. Each position on the video display hold ASCII code for a single character. True (sagot ko pero mali ako dito)
8. For monochrome monitors "00000111" would give the normal screen I fuckin don’t know the answer
mode where background is white and the foreground is black.
9. INT 10h service function 09h in AL writes a character and attribute at the True (sagot ko pero mali ako dito)
current position.
10. INT 10h and AH=00h gets the current video mode False (tama to)
11. File
attributes
“myfile.txt”
File handle

(sagot ko pero mali lahat)

(Eto ung sagot)

12. CX
True
CF=1
INT 21h

(3 out 4 ung tama ko dito)

13. False
MOV AH, 3CH
MOV CL, 1
LEA DX, FNAME

(Tama to lahat)

14. INT 10h service function 7h scrolls a rectangular window downward True (tama to)
15. Code a macro that will take as parameter the special functions( Function Key macro pressedKey, message
keys, ctrl, alt, tab,etc) and the string associated to the key pressed. loop1:
Example if a CTRL key is pressed, user will be prompted with " You just cmp pressedKey, 1ch
pressed and CTRL key" je enterPressed
cmp pressedKey, 47h
je homePressed
cmp pressedKey, 4fh
je endPressed
cmp pressedKey, 49h
je pgUpPressed
cmp pressedKey, 53h
je delPressed
jmp loop1
enterPressed:
mov ah, 09h
lea dx, message
int 21h
jmp exit
homePressed:
mov ah, 09h
lea dx, message
int 21h
jmp exit
endPressed:
mov ah, 09h
lea dx, message
int 21h
jmp exit
pgUpPressed:
mov ah, 09h
lea dx, message
int 21h
jmp exit
delPressed:
mov ah, 09h
lea dx, message
int 21h
exit:
mov ah, 4ch
int 21h
endm
16.

FINAL EXAMINATION (LAST TERM)


Question Answer
1. Which of the following is/are an invalid addressing?
2. Which of the following is/are an Immediate addressing?
3. It is an addressing that allows data to be addressed at the memory location BASE INDEXED ADDRESSING
pointed by other a base or index register -ata
4. What is the equivalent of the following: MOV AL, 5
MOV AL, 5 SHL AL, 1
MOV CL, 2
MUL CL (tama parehas)
5. Given the following, what is the content of the destination after executing 06Eh (tama to)
the instruction
CLD
MOV AL,10111001b
ROR AL, 2
6. The time is&now (tama to)
7. Given the following, what is the content of the destination after executing DFh (tama to)
the instruction:
CLD
MOV AL, 09Fh
BTS AL, 6
8. Given the following, what is the content of the destination after executing 47 (not sure)
the instruction
CLD
MOV AL,10111001b
NEG AL
9. Given the following what is the content of the register after executing the AX=000Ch (tama to)
instruction
MOV AX, 11001100b
XOR AX, 0CH
10. Given the following, what is the content of the of the CF register after 00000001 (tama to)
executing the instruction. Assuming all the status are cleared.
CLC
MOV AL, 09Fh
RCR, 3
11. Given the following , what is the content of the destination after executing NONE OF THE ABOVE (tama to)
the instructions
MOV AX, 0FEEDh
AND AX, 0FOODh
12. In unsigned multiplication of AX with BX, the product will be bplaced in AX and BX (tama to)
register(s)
13. The ADC instruction that has the syntax "ADC destination, source" destination, source + destination + CF
replaces the ______ operand wiith the sum of _____. (sagot sa
https://www.studyblue.com/#flashcard/vie
w/4126329) (sagot ko pero mali ako sa
exam)
14. In unsigned division of a doubleword in DX AX by a word in CX, the [1] AX
quotient will be placed in [1] and the remainder in [2] [2] DX

(tama parehas)
15. In unsigned division of a word in AX by a word in DATA1, the quotient
will be placed in [1] and the remainder in [2]
16. GIven: MOV BL,04Fh False (galing to sa kabilang gc, not sure
ADD BL, 0B1H kung tama)
The execution part results in ZF=0. True or False
17. In unsigned multiplication of a byte in DATA1 with a byte in AL, the AX (tama to)
product will be placed in register(s)
18. Give the packed BCD [1] and packed BCD [2] for decimal 15 Packed BCD – 0001 0101 (tama to)
Unpacked BCD – 0000 0001 0000 0101
(tama to)
19. In unsigned multiplication of CX with a byte in AL, the product is placed
in both AX and DX registers.
20. Select a SUB instruction that will SUB CX, BX
SUB DH, OEEH
Question SUB SI, DI
Subtract BX from CX SUB EBP, 3322H
subtract 0EEH from DH SUB CH, [SI]
Subtract DI from SI SUB DX, [SI+10]
Subtract 3322H from EBP SUB FROG, AL
Subtract the data addressed by SI from CH
Subtract the data stored 10 words after the location addressed by SI from (tama to lahat)
DX
Subtract AL from memory location FROG
21. The ADD instruction that has the syntax "ADD destination, source" Destination (tama to)
replaces the __________ operand with the sum of the two operands
22. Rewrite the instruction ADD Data1, Data2 to make it a valid instruction.
Assuming it is of a byte size
23. Give the packed BCD [1] and packed BCD [2] for decimal 99 Packed BCD – 1001 1001 (tama to)
Unpacked BCD – 0000 1001 0000 1001
(tama to)
24. IF CF=1, AL=95, and BL=4F prior to the execution of "SBB AL, BL", 16 (tama to)
what will be the contents of AL after subtraction in base 10?
25. A (n) [1] jump is within -128 to 127 bytes of the current IP. A (n) [2] [1] SHORT
jump is within the current code segment, whereas a (n) [3] jump is outside [2] LONG
the current code segment. [3] FAR

(tama lahat)
26. Given the following False (tama to)
MOV BX, 04Fh
ADD BX,0B1h
The execution results in ZF=1.
27. If a conditional jump is not taken, the instruction in the specified label True or false ata to pero sagot nila amir
will be executed. dito is
false
28. Match the following instruction mnemonic with its function DAA – BCD Addition
DAS – BCD Subtraction
Question AAS – ASCII Subtraction
DAA AAA – ASCII Addition
DAS
AAS (tama lahat)
AAA
29. In unsigned division of a word in AX by a byte in DATA2, the quotient
will be placed in [1] and the remainder [2]
30. ANDing a word operand with FFFH will result in what value for the word 000 (tama to)
operand? To set all bits of an operand to 0, it should be ANDed with
31. To get the current cursor position, interrupt [1] and function [2] is used. [1] 10H
[2] 03H

(tama parehas)
32. For monochrome monitors "00000111" would give the normal screen [1] black
mode where background is [1] and the foreground is [2] and [3] [2] blinking
[3] light gray

(tama lahat)
33. The most significant bit of the CGA attribute byte refers to [1] and bit 03 [1] bit position
is for [2] [2]selects front

(tama parehas)
34. INT ___ function calls reside in ROM BIOS, whereas INT ___ function [1] 10H
calls provided by OS [2] 21H

(tama parehas)
35. What is wrong with the following ASCIIZ string?
PATH_NAME DB 'C:\PROGRAMS\TEST.DAT'
36. The clear screen function uses interrupt [1] and function [2]
37. The following code is an attempt to call INT 33H function 2. Is it correct? MOV AX, 2
[1] If not, correct only the instruction that makes it wrong.
MOV AH,2
INT 33H
38. if IRGB = 0000 [1] , IRGB = [2] RED IRGB = 1110 [3] [1] Black
[2] FF00
[3] Gray

(not sure)
39. The row and column values can be loaded in Register [1] when interrupt [1] DX
[2] is used [2]10H
(not sure)
40. The file is [1] when function 3CH is used to create a file and file already
exists.
41. INT 33H function AX=3, how can a left button press be detected?
42. What is wrong with the following file handle? FILE_HNDL DW ? (tama to)
FILE_HNDL DB ?
43. True or False. FCB and file handles can be used interchangeably with the TRUE (not sure)
same DOS 21H function calls?
44. Given the following, what is the content of the destination after executing 0A7h (tama to)
the instruction
CLD
MOV AL, 09Fh
RCL AL, 7
45. What is the equivalent instruction of the following CLD
.data MOV CL, 16
N db “The time is gold” LEA SI, N
.code MOV AL, ‘O’
main: REPE SCASB
mov ax, @data
MOV DS, Ax (tama to lahat)
MOV ES, AX
X: MOV CL, 0Fh
LEA SI, N
MOV AL, ‘O’
CMP AL, byteptr[SI]
JE X
end main
46. What is the equivalent instruction of JNA JBE (tama to)
47. Which of the following is the equivalent instruction of X:
X: MOV CX, 3 XOR CH, CH
INC SI MOV CL, 3
LOOP INC SI
DEC CX
JNZ X

(tama to)
48. Which of the following is the equivalent instruction of MOV AX, 0FH
MOV AX, 0Fh MOV BX, AX
MOV BX, AX CMP AX, BX
CMP AX, BX JNLE Z
JB Z
(tama to)
49. What is the complement instruction of JO? JNO (tama to)
50. Given the following, what is the content of the registers after executing AX=0CCFFh
the instructions BX=00FFh
MOV AH, 11001100b
MOV AL, 00110011b (tama to)
OR AX, BX
51. Given the following code, what is the content of AL after executing the 01110011 (tama to)
instruction?
CLC
MOV AL, 100110110b
ROL AL, 5
52. The following are string instructions that use the accumulator except CMPS (tama to)
53. JG is equivalent to JNLE (tama to)
54. What sis the equivalent jump instruction of JNP JPO (tama to)
55. Which of the following is the equivalent of the given instruction MOV AL, 080H
MOV AL, 128 SHR AL, 1
MOV DL, 2
DIV DL (tama parehas)
56. HHHHHHHHHHHH (tama to)

57. xof nword kmiuq ehT

(tama to)

58. Given the following code, what is the value of CX when the scan &
compare produces its first match?

59. Which function of INT 33H is used to detect the presence of a mouse in a [1] 0
PC? [1] [2] AX
In which register do we expect to get that information? [2] [3] BX
In which register do we find the number of buttons in the mouse? [3]
(tama lahat)
60. INT 33H function AX=3, how can a left button press be detected?
61. True or False. The mouse coordinate is the same as video mode
62. When program terminates before closing the output files, the data from
[1] will be lost
63. Give the addressing mode of source: MOV BX, 5678H Immediate (not sure)

A. Indirect
B. Base Relative Plus Index
C. Register
D. Register Relative
E. Base Plus Index
F. Immediate
G.Direct
Given the following, what is the content of the destination after executing AL = 33h (not sure)
the instruction:
.data
n1 db 10,20,30,40,50
n2 db '875432'
.code
lea bx,n1
mov si,4
mov al, [bx+3]
xchg al, n2[si]

no answer
al = 0B7h
AL = 33h
Given the following, what is the content of the destination after executing 0FFh (0BFh talaga tama)
the instruction:
.data
n1 db 10,20,30,40,50
n2 db '875432'
.code
lea bx,n1
mov si,4
mov al, [bx+3]
not al

no answer
0B0h
0FFh
0B7h
Give the addressing mode of destination: MOV [BP][SI]+12, AX Base Relative Plus Index (not sure)

A. Direct
B. Base Relative Plus Index
C. Base Plus Index
D. Register
E. Register Relative
F. Immediate
G. Indirect
Give the addressing mode of destination: MOV [BP+6], AL

A. Direct
B. Base Relative Plus Index
C. Base Plus Index
D. Register
E. Register Relative
F. Immediate
G. Indirect
Give the addressing mode of source: MOV BL,[SI]+10 Register Relative (not sure)

A. Direct
B. Base Relative Plus Index
C. Base Plus Index
D. Register
E. Register Relative
F. Immediate
G. Indirect
Give the addressing mode of source: MOV AH,[BX+SI+50] Base Relative Plus Index (not sure)

A. Direct
B. Base Relative Plus Index
C. Base Plus Index
D. Register
E. Register Relative
F. Immediate
G. Indirect

Q4
1 The following code is an attempt to call INT 33H function 2, MOV AX,2
is it correct? If not, correct only the instruction that makes it
wrong. MOV AH, 2; INT 33H
2 Which function of INT 33H is used to detect the presence of AX=0
a mouse in a PC?
3 In which register do we expect to get that information? AX
4 In which register do we find the number of buttons in the BX
mouse?
5 What is wrong with the following file handle? FILE_HNDL DB FILE_HNDL DW ?
?
6 The mouse coordinate is the same as video mode True
7 Which register contains the number of bytes read? AX
8 MOV AH, 3FH handles read function True
9 In which case the program control jumps to subroutine? CF=1
10 Which MSDOS I/O services completes the file read? INT 21H
11. What MS-DOS I/O services does the program execute? File
12 What does CX contain? Attributes
13. What does DS:SI contains? Segment/offset of filename
14 What does ax contains after in21h execution? File handle
15 MOV ES, AX can be used instead of MOV DS,AX False
16 Which instruction is the open file function of the INT21h? MOV AH, 3CH
17 Which line indicates a read-only attribute? MOV CL,1
18 Which instruction copies the address of the file? LEA DX, FNAME
19 INT 10h service function 7h scrolls a rectangular window True
20 INT 10h service function 09h in AL writes a character and False
attribute at the current position
21 For monochrome monitors “00000111” would give the False
normal screen mode where background is white and the
foreground is black
22 Red, Green, Blue electron beams are required to generate False
any color on a video display
23 The row and column values can be loaded in register BX False
24 Bits 4 to 7 for the background sets the colors in the video False
attribute byte
25 INT10h function 2h sets the cursor position on the screen False
26 INT10h and AH=00h gets the current video mode. True
27 When the computer is booted in MS-DOS, the default mode True
is 3
28 Each positon on the video display hold ASCII code for a False
single character
29 The DOS interrupt and service function used for keyboard True
input without echo is INT 21h and 07H respectively

Q2
1 CO2, CO3 Arrange the assembly language codes to match the given C++ 1. .data
code snippet x db ?
Byte x,y,z; 2. Y db ?
z+=y/(5-z)%2 3. Z db ?
4. .code
mov al,5
5. Sub al,z
6. Mov bl,2
7. Div bl
8. Mov al,y
9. Div ah
10. Add z,al

Q3
1 WORD, DOUBLEWORD, AND QUADWORD data are stored in reverse
byte order (in memory)
2 Changing the code InHex db 3, ?, 4 dup($) to InHex db 5, ?, 6 dup($) will
make the program ace
3 The equivalent of jg is jl
4 Does the “?” mark in the line “InHex db 3,?,4 dup($): represent the size?
5 Given the code below and the content of AL=70h, will the program exits?
Cmp al, ‘a’
Jl exit
Cmp al, ‘Y’
Jg Exit
Sub al,57h
6 Red, Green, Blue electron beams are required to generate any color on a
video display
7 Each position on the video display hold ASCII code for a single character
8 INT10h function 2h sets the cursor positon on the screen
9 INT 10h service function 09h in AL writes a character and attribute at the
current positon
10 Int 10h service function 7h scrolls a rectangular window downward
11 Which line should be fixed to place the place the content of the lower
nibble to the higher nibble
12 Whats wrong with these part of the program.(debug)
Xor dx,dx
Div base
Add dl,’0’
Push AX
Inc cx
Cmp ax,bx
Jg Loop1
Add al,’0’
Stosb
13 What can you replace the jl function with?
CheckUpper:
Cmp al, ‘A’
Jl Exit
Cmp al, ‘F’
Jg CheckLower
Sub al,37h
Jmp CheckEnd

14 The size of the destination and source operand is selected with the STOSB
mnemonic ______ (byte read from register AL), STOSW(word from AX),
or STOSD(doubleword from EAX).
15 Write an aseembly language
16 1.Given the code which line to edit to allow entering of string at run time?

2.Given the string mapuauniversity and AL=u, what will be the content of
cx on the first match?

3.Based on the given in NO.3 what will be the content of SI if the last
match is compared

4.what will be the value of DI if line 22 is RE ONE SCASB if the first


match is found

17 Which flag would be affected during LODSB instruction Direction flag


18 What is invalid among the choices
19 Which of the following clears the value of the data register Xor dx,dx
20 What is the value of the register ax?
Xor dx,dx
Add dl, ‘0’
Push dx
Inc cx
Pop ax
21 Which of the following can convert an ASCII lowercase value to
hexadecimal value?
22 When it comes to checking the lower case letters, what must be subtracted
with AL?
1.

What MS-DOS I/O Services does the program execute? // FILE

What does CX contain? //atributes

What does DS SI contains?// segment/offset of filename

What does ax contains after int 21h execution?// file handle

2.

MOV ES, AX canbe used instead of MOV DS, AX True or False // False

Which instruction is the open file function of the IN 21h // MOV AH,3CH

Which line indicates a read-only attribute? // MOV CL,1

Which instruction copies the address of the file? // LEA DX, FNAME

3.

What register contains the number of bytes read? // CX

MOV AH, 3FH handles read function. True or False // True

In which case the program control jumps to subroutine //CF=1

Which MS-DOS -//Int 21h

4.

It is an addressing that allows data to be addressed at the memory location pointed by other a base or
index register

// Register Indirect

5.

CLD

MOV AL, 10111001b

NEG AL

//47h

6.

Given the addressing mode of the destination: MOV[DI],BX

/indirect
7.

MOV AL, 128

MOV DL, 2

DIV DL

// MOV AL, 080H

SHR AL,1

8.

CLD

MOV AL, 1011001b

ROR AL, 2

//06Eh

9.

CLD

MOV AL, 100110110b

ROL AL,5

//01110011

10.

Given the addressing mode; MOV CX,[3000]

//Direct

11.

CLD

MOV AL, 09Fh

RCL AL,7
//0A7h

12.

MOV AX,11001100b

XOR AX 0CH

//None of the above

13.

MOV AL,CH

//Register

14.

What is the complement instruction of JO?

//JNO

15.

MOV AL,5

MOV CL,2

MUL CL

//MOV AL,5

SHL AL 1

16.

Which of is are an invalid addressing?

// ADD DATA, [BX]

- MUL 01ABH, [CX]

17.

What is the equivalent instruction of JNA?


//JBE

18.

What is the equivalent of the following:

MOV AL, 5

MOV CL, 2

MUL CL

//MOV AL,5

SHL AL, 1

19.

.data

n1 db 10,20,30,40,50

n2 db '8765432'

.code

lea bx,ni

mov si,4

mov al [bx+3]

not al

// 0FFh

20.

The time&is&now$ code

//9***

21.

MOV AX, 0FEEDh

AND AX, 0FOODh

//none of the above


22.

MOV AX, 0Fh

MOV BX, AX

CMP ZX,BX

JB Z

// MOV AX, 0FH

MOV BX, AX

CMP AX,BX

JNLE Z

23.

CLD

MOV AL, 09Fh

BTS AL, 6

//DFh

24.When the computer is booted in MS-DOS, the default mode is 3.

//T

25.Each position on the video display hold ASCII code for a single character.

//F

26. Red green blue electron beams are required to generate any color on a video display

//F

27.Bits 4 to 7 for the background sets the colors in the video attribute byre

//F

28. int 10h function 2h sets the cursor position on the screen

//F

29.int 10h ah=00h gets the current video mode

//T
30. Int 10h service function 7h scrolls rectangular window downward

//T

31. int10h service function 09h in AL writes a character and attribute at the current position

//F

32. For monochrome monitors "00000111" would give the normal screen mode where backgroundis
white and foreground is black

//F

33.the row and column values can be loaded in register BX

//F

34. The dos interrupts and service function used for keyboard input without..

//F
1. .data
gain db 10,13,’Again?$’
ch db ?
num db ?
.code
mov ax, @data
mov ds,ax
2. Asdasdas
3. Jne b
4. Cmp num, 5
5. Aaaaaaaaaaaaaaaaaaaaa
6. a
7. lea dx, gain
8. Mov ah,9
int21h
9. Mov ah,1
10. Int21h
11. Mov ch, al
12. Inc num
13. Cmp ch,’a’
14. Je a
15. X,
16. Mov ah,4ch
int21h
17. D
18. Jne x
19. Dec num
20. Jmp x

Byte x,y,z

Z+-=y/(5-z)%2

1. .data
x db?
2. Y db ?
3. Z db ?
4. .code
mov al, 5
5. Sub al, z
6. Mov bl, 2
7. Div bl
8. Mov al,y
9. Div ah
10. Ad z,al
Quiz 1

Q1 given 123-0abh-0acedh+0badeh conventional ALP

1. sss segment para 'stack'

2. dw 32 dup(0)

3. sss ends

4. dss segment para 'data'

5. n dw 123,0abh,0acedh,0badeh

6. dss ends

7. css segment para 'code'

8. assume ds:dss,cs:css,ss:sss

9. main proc far

10. lea bx,n

11. mov di,0

12. mov cx,2

13. mov ax,[bx+di]

14. x: inc di

15. sub ax,[bx+di]

16. loop x

17. inc di

18. add ax,[bx+di]

19. mov ax,4c00h

20. int 21h

21. main endp

22. css ends

23. end main

conventional EXE
given 123-0abh-0acedh+0badeh conventional com file

1. css segment para ‘code’

2. assume ds:dss,cs:css,ss:sss

3. main proc far

4. mov ax, 123

5. sub ax,0abh

6. sub ax, 0acedh

7. add ax, 0badeh

8. mov ax,4c00h

9. int 21h

10. main endp

11. css ends

12. end main

.model small

.stack

.data

msg1 db "Enter a string: $"

string db 80 dup (" ")

db "$"

symbol db "$"

string_len dw ?

.code

main proc far

mov ax, @data

mov ds, ax

mov es, ax
;displays Enter a string:

mov ah, 9

lea dx, msg1

int 21h

;--------------------------

lea si, string ;load string into SI

;;read string get info from keyboard

mov cx, si

read:

mov ah, 1

int 21h

cmp al, 13

je done

mov [si], al

inc si

jmp read

done:

mov al, "$"

mov [si], al

mov ax, si

sub ax, cx

mov string_len, ax

lea si, string


mov bx, string_len

;;display string

push ax

push bx

push cx

push dx

push si

mov cx, bx

jcxz endDisplay

cld

mov ah, 2

lodsb

mov dl, al

int 21h

push si

add si, 3

lodsb

mov dl, al

int 21h

pop si

push si

add si, 7

lodsb

mov dl, al
int 21h

pop si

mov dl, 9

int 21h

lodsb

mov dl, al

int 21h

push si

add si, 3

lodsb

mov dl, al

int 21h

pop si

mov dl, 10

int 21h

mov dl, 9

int 21h

lodsb

mov dl, al

int 21h

push si

add si, 3

lodsb

mov dl, al

int 21h
pop si

mov dl, 13

int 21h

lodsb

mov dl, al

int 21h

push si

add si, 3

lodsb

mov dl, al

int 21h

pop si

endDisplay:

pop si

pop dx

pop cx

pop bx

pop ax

mov ah, 4ch

int 21h

main endp

end main
1. LODSB transfers a value from a memory to what register?
AL
2. which of the following clears the value of the data register?
xor dx,dx
3. conditional jump instructions cannot handle the various conditions (==,!=,<,>,<=,>=) that arise
when comparing values
4. what must be subtracted from an upper case ASCII character to convert it to its hexadecimal
equivalent?
37H
5. what is the value of the register ax?

Xor dx,dx

Add dl, ‘0’

Push dx

Inc cx

6. what line of command would set the value of dx to 0


7. moves the byte at address DS:SI into AL
8.
9. does the “$” means you are using a hexadecimal value?
10. WORD, DOUBLEWORD, AND QUADWORD data are stored in reverse byte order (In memory)
11. Does the “?” mark in the line “ InHex db 3, ?, 4 dup(‘$’)” represent the size?
12. The equivalent of jg is jl
FALSE
13. Red, Green, Blue electron beams are required to generate any color on a video display
FALSE
14. INT 10H service function 09H in AL writes a character and attribute at the current position
FALSE
15. INT 10H service function 7H scrolls a rectangular window downward
TRUE
16. INT 10H and AH=00h gets the current video mode
TRUE
17. The row and column values can be loaded in register BX
FALSE
a. Which line should be fixed to place the content of the lower nibble to the higher nibble
18. What can you replace the jl function with?
CheckUpper:
cmp al, ‘A’
jl Exit
cmp al, ‘F’
jg CheckLower
sub al,37h
jmp CheckEnd
19. What is wrong with these part of the program
xor dx,dx
div Base
add dl,0
push AX
inc cx
cmp ax,bx
jg Loop1
add al, ‘0’
stosb
20. If the input is true in
cmp al,’F’ jg CheckLower
the input is in ?
21. Changing the code InHex db 3,?,4 dup($) to inHex db 5, ?, 6 dup(‘$’) will make the program ace
22. The direction flag will be affected during the LODSB instruction
FALSE
23. Each position on the video display hold ASCII code for a single character
FALSE
24. Int10h function 2h sets the cursor position on the screen
FALSE
25. The size of the destination and source operands is selected with the mnemonic
STOSB
26. Which flag would be affected during LODSB instruction
DIRECTION FLAG
27. When it comes to checking the lower case letters,what must be subtracted with AL?
1. The following code is an attempt to call INT 33H function 2, is it correct? If not, correct only the
instruction that makes it wrong. MOV AH, 2; INT 33H. MOV AX, 2
2. Which function of INT 33H is used to detect the presence of a mouse in a PC? AX=0
3. In which register do we expect to get that information? AX
4. In which register do we find the number of buttons in the mouse? BX
5. What is wrong with the following FILE_HNDL DB ? DW
6. The mouse coordinate is the same as video mode. True
7. Which register contains the number of bytes read? AX
8. MOV AH, 3FH handles read function. True
9. In which case the program control jumps to subroutine? CF =1
10. Which MSDOS I/O service completes the file read? INT 21H
11. What MS-DOS I/O services does the program execute? File
12. What does CX contain? Attributes
13. What does ds:si contains? Segment/offset of filename
14. What does ax contains after int21h execution? File Handle
15. Mov ed, ax can be used instead of mov ds, ax. FALSE
16. Which instructions is the open file function of the int21h? MOV AH,3CH
17. Which line indicates a read-only attribute? MOV CL, 1
18. Which instruction copies the address of the file? LEA DX, FNAME
19. INT 10H service function 09h in AL writes a character and attribute at the current position?
FALSE
20. For monochrome monitors “00000111” would give the normal screen mode where background
is white and the foreground is black. FALSE
21. The row and column values can be loaded in register BX. FALSE
22. Bits 4 to 7 for the background sets the colors in the video attribute byte. FALSE
23. Int10H function 2h sets the cursor position on the screen. FALSE
24. The dos interrupt and service function used for keyboard input without echo is INT 21h and 07H
respectively. TRUE
12/12/2017 Review Test Submission: COE119 Q1-2Q2017 – COE119_A1_2Q1718

ELISE JACQUE PEREZ


MAPUA Courses Community

H ASSESSMENTS Review Test Submission: COE119 Q1-2Q2017

Review Test Submission: COE119 Q1-2Q2017

User ELISE JACQUE ARTECHE PEREZ


Course COMPUTER SYSTEM ORGANIZATION WITH ASSEMBLY LANGUAGE
Test COE119 Q1-2Q2017
Started 11/9/17 10:26 AM
Submitted 11/9/17 11:57 AM
Status Completed
Attempt Score 51 out of 100 points
Time Elapsed 1 hour, 30 minutes

Question 1 22 out of 26 points

FILL IN THE BLANKS. Supply the content of the memory

NOTE:

Format DS:offset data data

Be careful with numbering. It starts at line 2

2 [2] 0700:0100 00
3 [3] 0700:0101 3C
4 [4] 0700:0102 28
https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2870785_1&course_id=_33654_1&content_id=_422346_1&outco… 1/9
12/12/2017 Review Test Submission: COE119 Q1-2Q2017 – COE119_A1_2Q1718

5 [5] 0700:0103 CE
6 [6] 0700:0104 09 0A
7 [7] 0700:0106 9A 78
8 [8] 0700:0108 2C 01
9 [9] 0700:010A AB 00 23 01
10 [10] 0700:010E 01 32 34 35 36
11 [11] 0700:0113 05
12 [12] 0700:0114 01 01 06 01
13 [13] 0700:0118 45 23 01 00 9A 78 06 00 EF CD 0B 00
14 [14] 0700:0124 50 00 00 00
15 [15] 0700:0128 02 00
16 [16] 0700:012A F9 FF FF FF
17 [17] 0700:012E 13 01
18 [18] 0700:0130 F7
19 [19] 0700:0131 00 00 00 00
20 [20] 0700:0135 5D 35 44 35 44 48
21 [21] 0700:
22 [22] 0700:013B 52 76 50 00 32 68
23 [23] 0700:0141 9E FF FF FF
24 [24] 0700:0145 13 01
25 [25] 0700:0147 00 00 00 00
26 [26] 0700:014B 02 00

Question 2 7 out of 8 points

Given the following trapped debug, supply the missing status flag

Answer here:

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2870785_1&course_id=_33654_1&content_id=_422346_1&outco… 2/9
12/12/2017 Review Test Submission: COE119 Q1-2Q2017 – COE119_A1_2Q1718

Answer here:
1.[1] 2.[2] 3.[3] 4.[4] 5.[5] 6.[6] 7.[7] 8.[8]
EI NA NV NG PE UP NZ CY

Question 3 0 out of 3 points

GIven the following, answer the question that followis.

-a215

073F:0215 MOV AL,[BX+SI+9]

Write the addressing mode if the instruction is valid. [ans]

Base Relative Plus Index

Question 4 0 out of 3 points

Copy of
GIven the following, answer the question that followis.

-a215

073F:0215 MOV AL,[SI]

Write is the addressing mode if the instruction is valid. Ex. Register [ans]

Register Indirect

Question 5 3 out of 3 points

GIven the following, answer the question that followis.

-a215

073F:0215 DIV CL

Write Something if the addressing mode is Register. Ex. Register [ans]


Something
https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2870785_1&course_id=_33654_1&content_id=_422346_1&outco… 3/9
12/12/2017 Review Test Submission: COE119 Q1-2Q2017 – COE119_A1_2Q1718

Question 6 0 out of 3 points

GIven the following, answer the question that followis.

-a215

073F:0215 MOV Cl,[204] Write the address of destination if the destination will contain CEh after
execution? [1]

Question 7 0 out of 3 points

GIven the following, answer the question that followis.

-a215

073F:0215 SBB AL,[BX+DI]

Write the content of al after execution if the question is valid, else write COE119

Question 8 0 out of 3 points

GIven the following, answer the question that followis.

-a215

073F:0215 MOV AL,[SI]

Write is the addressing mode if the instruction is valid. Ex. Register [ans]

Base Relative Plus Index

Question 9 0 out of 3 points

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2870785_1&course_id=_33654_1&content_id=_422346_1&outco… 4/9
12/12/2017 Review Test Submission: COE119 Q1-2Q2017 – COE119_A1_2Q1718

GIven the following, answer the question that followis.

-a215

073F:0215 MOV CL,[BX+1]

Write the address of source if the addressing mode is register relative. Else write COE119

Question 10 3 out of 3 points

GIven the following, answer the question that followis.

-a215

073F:0215 PUSH CX

PUSH AX

POP CX

POP AX

Write the equivalent instruction is the content of the registers change. [ans]

XCHG AX, CX

Question 11 16 out of 20 points

DEBUGGING:

Write the correct answer if the line code contains an error. Otherwise, write "PINK"

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2870785_1&course_id=_33654_1&content_id=_422346_1&outco… 5/9
12/12/2017 Review Test Submission: COE119 Q1-2Q2017 – COE119_A1_2Q1718

LINE no ANSWER
3 [3] PINK
4 [4] PINK
5 [5] PINK
6 [6] PINK
https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2870785_1&course_id=_33654_1&content_id=_422346_1&outco… 6/9
12/12/2017 Review Test Submission: COE119 Q1-2Q2017 – COE119_A1_2Q1718

7 [7] PINK
8 [8] PINK
9 [9] PINK
10 [10] PINK
11 [11] lea ax,n1
12 [12] PINK
13 [13] PINK
14 [14] PINK
15 [15] PINK
16 [16] PINK
17 [17] mov bx,word ptr n1
18 [18] PINK
19 [19] PINK
20 [20] mov ax,4c00h
21 [21] PINK

Question 12 0 out of 3 points

MOV AL, 0FEh

MOV BL, 0CDh

ADD AL, BL

CMOVNO AL,CL

AL=[1]

Question 13 0 out of 3 points

What is the equivalent arithmetic operation of

MOV AH,4

SHL AH,2

Question 14 0 out of 3 points

3-CMOV.png

MOV AL, '3'

SUB AL, 32h

CMOVE CL, 'R'


https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2870785_1&course_id=_33654_1&content_id=_422346_1&outco… 7/9
12/12/2017 Review Test Submission: COE119 Q1-2Q2017 – COE119_A1_2Q1718

CL = [1]

Question 15 0 out of 10 points

Given the following expression, write an assembly language in simplified form using Register
Relative Addressing. Use value for memory location, DI for addressing, AX for final answer

30 / 5 + ( 4 - Carry Flag ) * 3

[1]

[2]

[3]

[4]

[5]

[6]

lea di, value

[7]

mov al,bh

[8]

mul bh

[9]

[10]

add al,ah

[11]

[12]

Question 16 0 out of 3 points

CLC

STI

CMOVC BL,AL

BL= [1]

Tuesday, December 12, 2017 7:42:08 PM PHT

← OK

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2870785_1&course_id=_33654_1&content_id=_422346_1&outco… 8/9
12/12/2017 Review Test Submission: COE119 Q1-2Q2017 – COE119_A1_2Q1718

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2870785_1&course_id=_33654_1&content_id=_422346_1&outco… 9/9
12/12/2017 Review Test Submission: COE119-2Q2017-QUIZ 2 – COE119_A1...

ELISE JACQUE PEREZ


MAPUA Courses Community

H ASSESSMENTS Review Test Submission: COE119-2Q2017-QUIZ 2

Review Test Submission: COE119-2Q2017-QUIZ 2

User ELISE JACQUE ARTECHE PEREZ


Course COMPUTER SYSTEM ORGANIZATION WITH ASSEMBLY LANGUAGE
Test COE119-2Q2017-QUIZ 2
Started 11/27/17 10:38 AM
Submitted 11/27/17 10:38 AM
Status Completed
Attempt Score 58 out of 100 points
Time Elapsed

Question 1 8 out of 10 points

GIven the following code, answer the questions that follow.

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2968562_1&course_id=_33654_1&content_id=_426394_1&outco… 1/4
12/12/2017 Review Test Submission: COE119-2Q2017-QUIZ 2 – COE119_A1...

False [1] 1. The data being addressed will remain the same if line 8 is changed to MOV ES,ax. True or
False

False [2] 2. SHR BH,CL will produce the same output. True or False

9 [3] 3. Which line should be changed if data A is defined as word.

mov ax, A [4] 4. What is the new instruction in Question No.3 if A is defined as word.
True [5] SHL AH,4 will produce the same output. True or False

Question 2 10 out of 10 points

Write an assembly language code that will produce the following:

Question 3 10 out of 10 points

Convert the following C++ codes to assembly language

if (( bx <= cx && bx != dx) || (dx == ax)) x=1;

else x=2;

Question 4 0 out of 5 points

Use operands 4FCAH and C237H to perform OR CFFF

Question 5 5 out of 5 points


0001 0101 0000 0001 0000 0101
Give the packed BCD [1] and packed BCD [2] for decimal 15

1001 1001 0000 1001 0000 1001 for decimal 99

Question 6 0 out of 5 points

To set all bits of an operand to 1, it could be ORed with

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2968562_1&course_id=_33654_1&content_id=_426394_1&outco… 2/4
12/12/2017 Review Test Submission: COE119-2Q2017-QUIZ 2 – COE119_A1...

Question 7 5 out of 5 points

In unsigned multiplication of a byte in DATA1 with a byte in AL, the product will be placed in
register(s)
AX

Question 8 5 out of 5 points

GIven: MOV BL,04Fh

ADD BL, 0B1H

The execution part results in ZF=0. True or False


ZF=1 FALSE

Question 9 5 out of 5 points

Given the following

MOV BX, 04Fh

ADD BX,0B1h

The execution results in ZF=1.


ZF=0 FALSE

Question 10 0 out of 5 points

In unsigned multiplication of CX with a byte in AL, the product is placed in both AX and DX registers.
FALSE

Question 11 0 out of 5 points


3100 0 1
If AX=1001H and DX=20FFH, the sum is [1] and the contents of flag registers CF = [2] , AF= [3], SF
= [4], ZF = [5] and OF = [6]
0 0 0
If DL=0F3H and BH=72H, the difference is 81 and the contents of flag registers CF=0, AF=0,SF=0
ZF=0, and OF=0
Question 12 0 out of 5 points

In calculating the target address to jump to, a displacement is added to the contents of the register
___.
PC

Question 13 5 out of 5 points

The instruction " LOOP ADD_LOOP" is equivalent to what two instructions?


DEC CX & JNZ ADD_LOOP

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2968562_1&course_id=_33654_1&content_id=_426394_1&outco… 3/4
12/12/2017 Review Test Submission: COE119-2Q2017-QUIZ 2 – COE119_A1...

Question 14 0 out of 5 points

Rewrite the instruction ADD Data1, Data2 to make it a valid instruction. Assuming it is of a byte size.

Question 15 5 out of 5 points

Develop a short sequence of instructions that adds AX,BX,CX,DX and SP and save the sum in DI
ADD AX,BX
ADD AX,CX
ADD AX,DX
Question 16 ADD AX,SP
0 out of 5 points
MOV DI,AX
If a conditional jump is not taken, the instruction in the specified label will be executed.

FALSE

Question 17 0 out of 5 points

Use operands 4FCAH and C237H to perform AND

Tuesday, December 12, 2017 7:42:37 PM PHT

← OK

Which instruction aside from DIV will divide a given value? IDIV

Which instruction aside from MUL will multiply a given value? IMUL

ADD data_1, data_2 is illegal because of no of operands. True

The CMP instruction alters the contents of its operands. False

In unsigned division of a word in AX by a byte in DATA2, the quotient will be placed in AL


and the remainder AH

In calculating the target address to jump to, a displacement is added to the contents of the register PC

A(n) short jump is within -128 to 127 bytes of the current IP.
A(n) long jump is within the current code segment,
whereas a(n) far jump is outside the current code segment.
The ADC instruction that has the syntax "ADC destination, source"
replaces the ____ operand wiith the sum of ___. destination, source, destination & CF

In unsigned multiplication of AX with BX, the product is placed in register(s) AX & DX

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2968562_1&course_id=_33654_1&content_id=_426394_1&outco… 4/4
12/12/2017 Review Test Submission: COE119Q4-2Q2017 – COE119_A1_2Q1718

ELISE JACQUE PEREZ


MAPUA Courses Community

H ASSESSMENTS Review Test Submission: COE119Q4-2Q2017

Review Test Submission: COE119Q4-2Q2017

User ELISE JACQUE ARTECHE PEREZ


Course COMPUTER SYSTEM ORGANIZATION WITH ASSEMBLY LANGUAGE
Test COE119Q4-2Q2017
Started 12/7/17 10:32 AM
Submitted 12/7/17 12:00 PM
Status Completed
Attempt Score 47 out of 98 points
Time Elapsed 1 hour, 28 minutes

Question 1 4 out of 4 points

The row and column values can be loaded in register BX

False

Question 2 0 out of 4 points

Red, Green, Blue electron beams are required to generate any color on a video display
False

Question 3 4 out of 4 points

INT 10h service function 7h scrolls a rectangular window downward.


True

Question 4 3 out of 4 points

Given the following codes, answer the following questions

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_3088542_1&course_id=_33654_1&content_id=_432111_1&outco… 1/5
12/12/2017 Review Test Submission: COE119Q4-2Q2017 – COE119_A1_2Q1718

Question
"myfile.txt" What MS-DOS I/O Services does the program execute?

attributes What does CX contain?


segment/offset
of filename? What does DS:SI contains?

file handle What does ax contains after int 21h execution?

Question 5 4 out of 4 points

For monochrome monitors "00000111" would give the normal screen mode where background is
white and the foreground is black.
False

Question 6 0 out of 4 points

INT 10h and AH=00h gets the current video mode.


True

Question 7 4 out of 4 points

Bits 4 to 7 for the Background sets the colors in the video attribute byte.

False

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_3088542_1&course_id=_33654_1&content_id=_432111_1&outco… 2/5
12/12/2017 Review Test Submission: COE119Q4-2Q2017 – COE119_A1_2Q1718

Question 8 0 out of 4 points

INT 10h service function 09h in AL writes a character and attribute at the current position.

False

Question 9 0 out of 4 points

Each position on the video display hold ASCII code for a single character.
False

Question 10 3 out of 4 points

Given the following code, answer the following question.

Question

AX Which register contains the number of bytes read?

TRUE MOV AH, 3FH handles read function. True of False

INT 21H In which case the program control jumps to subroutine?


https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_3088542_1&course_id=_33654_1&content_id=_432111_1&outco… 3/5
12/12/2017 Review Test Submission: COE119Q4-2Q2017 – COE119_A1_2Q1718

CX Which MSDOS I/O Service completes the File read?

Question 11 0 out of 4 points

When the computer is booted in MS-DOS, the default mode is 3.

True

Question 12 0 out of 4 points

INT10h function 2h sets the cursor position on the screen.


False

Question 13 15 out of 20 points

Given the following codes, answer the following questions

Question
What MS-DOS I/O Services does the program execute?

What does CX contain?

What does DS:SI contains?

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_3088542_1&course_id=_33654_1&content_id=_432111_1&outco… 4/5
12/12/2017 Review Test Submission: COE119Q4-2Q2017 – COE119_A1_2Q1718

What does ax contains after int 21h execution?

Question 14 5 out of 15 points

Code a program that will asked the user to enter a string and distribute the characters on the
4 corners of the square 10X40 starting at 0,0 on the tab key pressed.

Enter a string: rosemarie

ei re

rme ao

Question 15 5 out of 15 points

Code a macro that will take as parameter the special functions( Function keys, ctrl, alt, tab,etc) and
the string associated to the key pressed. Example if a ESC key is pressed, user will be prompted
with " You just pressed and ESC key"

Tuesday, December 12, 2017 7:43:00 PM PHT

← OK

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_3088542_1&course_id=_33654_1&content_id=_432111_1&outco… 5/5
12/12/2017 Review Test Submission: COE121q22017-b3-Q2 – COE121_B4_...

ELISE JACQUE PEREZ


MAPUA Courses Community

H ASSESSMENTS Review Test Submission: COE121q22017-b3-Q2

Review Test Submission: COE121q22017-b3-Q2

User ELISE JACQUE ARTECHE PEREZ


Course MICROPROCESSOR SYSTEMS
Test COE121q22017-b3-Q2
Started 12/5/17 3:09 PM
Submitted 12/5/17 4:29 PM
Status Completed
Attempt Score 55 out of 100 points
Time Elapsed 1 hour, 20 minutes

Question 1 5 out of 5 points

Which of the following are Bit Manipulation Instructions


SHL

Question 2 0 out of 5 points

This group of instructions allows the programmer to choose where the processor fetches its next
instruction from.

PROGRAM TRANSFER

Question 3 5 out of 5 points

If control is transferred outside the current code segment, is it NEAR or FAR?


FAR

Question 4 5 out of 5 points

Match the following instruction mnemonic with its function

Question
DAA BCD Addition

DAS BCD Subtraction


https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_3074132_1&course_id=_33659_1&content_id=_431683_1&outco… 1/4
12/12/2017 Review Test Submission: COE121q22017-b3-Q2 – COE121_B4_...

AAS ASCII Subtraction

AAA ASCII Addition

Question 5 0 out of 5 points

To set all bits of an operand to 1, it could be ORed with


0FFFF
FFFF

Question 6 5 out of 5 points

Select a SUB instruction that will

Question
Subtract BX from CX SUB CX,BX

subtract 0EEH from DH SUB DH,0EEH

Subtract DI from SI SUB SI,DI

Subtract 3322H from EBP SUB EBP,3322H

Subtract the data addressed by SI from CH SUB CH,[SI]

Subtract the data stored 10 words after the location addressed by SI from DX SUB DX,[SI+10]

Subtract AL from memory location FROG SUB [FROG],AL

Question 7 5 out of 5 points


3100 0 1
If AX=1001H and DX=20FFH, the sum is [1] and the contents of flag registers CF = [2] , AF= [3], SF
= [4], ZF = [5] and OF = [6]
0 0 0

Question 8 5 out of 5 points

This instruction pushes all registers to the stack.


PUSHA

Question 9 5 out of 5 points

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_3074132_1&course_id=_33659_1&content_id=_431683_1&outco… 2/4
12/12/2017 Review Test Submission: COE121q22017-b3-Q2 – COE121_B4_...

The ADD instruction that has the syntax "ADD destination, source" replaces the
__________ operand with the sum of the two operands
DESTINATION

Question 10 0 out of 5 points

In unsigned multiplication of CX with a byte in AL, the product is placed in both AX and DX registers.
FALSE

Question 11 0 out of 5 points

SEGMENTS
______ contains many new pseudocodes to help the assembler generate the correct machine code
for the object file.

Question 12 5 out of 5 points

This instructions is capable of performing logical, shift and rotate operations. Many common boolean
operations (AND, OR, NOT) are available in the logical instructions.
BIT MANIPULATION INSTRUCTIONS

Question 13 5 out of 5 points

What is the value of BL and CF after the following

MOV BL,25H

MOV CL,4

ROR BL,CL

BL = [1] , CF = [2]
52 0

Question 14 5 out of 5 points


AL
In unsigned division of a word in AX by a byte in DATA2, the quotient will be placed in [1] and the
remainder [2]
AH

Question 15 0 out of 5 points

ANDing a word operand with FFFH will result in what value for the word operand? To set all bits of
an operand to 0, it should be ANDed with _________ 0
https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_3074132_1&course_id=_33659_1&content_id=_431683_1&outco… 3/4
12/12/2017 Review Test Submission: COE121q22017-b3-Q2 – COE121_B4_...

Question 16 0 out of 5 points

Which instructions will implement LOOP aside from

DEC DX

JNZ label

Question 17 5 out of 5 points

IF CF=1, AL=95, and BL=4F prior to the execution of "SBB AL,BL", what will be the contents of AL
after subtraction in base 10?
45

Question 18 0 out of 5 points

In unsigned multiplication of AX with BX, the product will be bplaced in register(s)


AX,DX AX & DX

Question 19 0 out of 10 points

Write an instruction that will Set the ZF without any arithmetic operations.

[1]

[2]

[3]

Tuesday, December 12, 2017 7:31:51 PM PHT

← OK

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_3074132_1&course_id=_33659_1&content_id=_431683_1&outco… 4/4
9/14/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

JhOn PauL JaSpE 1


MAPUA Courses Community

H ASSESSMENTS Review Test Submission: COE119-FE-1q17

Review Test Submission: COE119-FE-1q17

User I Am My Own Superhero JhOn PauL EsCaLoNa JaSpE


Course COMPUTER SYSTEM ORGANIZATION WITH ASSEMBLY LANGUAGE
Test COE119-FE-1q17
Started 9/14/17 12:01 PM
Submitted 9/14/17 1:19 PM
Status Needs Grading
Attempt Score Grade not available.
Time Elapsed 1 hour, 18 minutes

Question 1 0 out of 2 points

Which of the following is/are an invalid addressing?

Question 2 2 out of 2 points

Which of the following is/are an Immediate addressing?

Question 3 0 out of 2 points

It is an addressing that allows data to be addressed at the memory location pointed by other a base
or index register

Register Indirect

Question 4 3 out of 3 points

What is the equivalent of the following:


MOV AL, 5
MOV AL, 5
MOV CL,2 ROR AL, 5

MUL CL

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353694_1&course_id=_31442_1&content_id=_391471_1&retu… 1/10
9/14/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

Question 5 3 out of 3 points

Given the following, what is the content of the destination after executing
the instruction
CLD
MOV AL,10111001b
ROR AL, 2
06Eh

Question 6 3 out of 3 points

Given the following code, what is the output after executing the
instructions

The time is&now

Question 7 3 out of 3 points

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353694_1&course_id=_31442_1&content_id=_391471_1&retu… 2/10
9/14/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

Given the program below, choose from the options the output of the
correct answer.

xof nword kmiuq ehT

Question 8 3 out of 3 points

Given the following code, what is the value of CX when the scan
& compare produces its first match.

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353694_1&course_id=_31442_1&content_id=_391471_1&retu… 3/10
9/14/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

Question 9 3 out of 3 points

Given the following, what is the content of the destination after executing
the instruction:
CLD
MOV AL, 09Fh
BTS AL, 6

Question 10 3 out of 3 points

Given the following, what is the content of the destination after executing
the instruction
CLD

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353694_1&course_id=_31442_1&content_id=_391471_1&retu… 4/10
9/14/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

MOV AL,10111001b
NEG AL
AX=47

Question 11 0 out of 3 points

Given the following what is the content of the register after executing the
instruction
MOV AX, 11001100b
AX=00C0
XOR AX, 0CH

Question 12 0 out of 3 points

Given the following, what is the content of the of the CF register after
executing the instruction. Assuming all the status are cleared.
CLC
MOV AL, 09Fh 00000001
RCR, 3

Question 13 3 out of 3 points

Given the following , what is the content of the destination after


executing the instructions
MOV AX, 0FEEDh None of the above
AND AX, 0FOODh

Question 14 2 out of 2 points

In unsigned multiplication of AX with BX, the product will be bplaced in register(s) AX & DX

Question 15 0 out of 2 points


destination
The ADC instruction that has the syntax "ADC destination, source" replaces the ______ operand
wiith the sum of _____. source, destination & CF
https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353694_1&course_id=_31442_1&content_id=_391471_1&retu… 5/10
9/14/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

Question 16 2 out of 2 points


AX
In unsigned division of a doubleword in DX AX by a word in CX, the quotient will be placed in [1] and
the remainder in [2]
DX

Question 17 2 out of 2 points


AX
In unsigned division of a word in AX by a word in DATA1, the quotient will be placed in [1] and the
remainder in [2]
DX

Question 18 0 out of 2 points

GIven: MOV BL,04Fh

ADD BL, 0B1H

The execution part results in ZF=0. True or False


ZF=1 False

Question 19 2 out of 2 points

In unsigned multiplication of a byte in DATA1 with a byte in AL, the product will be placed in
register(s)
AX

Question 20 0 out of 2 points

Give the packed BCD [1] and packed BCD [2] for decimal 15
0001 0101 0000 0001 0000 0101

Question 21 0 out of 2 points

In unsigned multiplication of CX with a byte in AL, the product is placed in both AX and DX registers.
False

Question 22 2 out of 2 points

Select a SUB instruction that will

Question
Subtract BX from CX

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353694_1&course_id=_31442_1&content_id=_391471_1&retu… 6/10
9/14/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

subtract 0EEH from DH

Subtract DI from SI

Subtract 3322H from EBP

Subtract the data addressed by SI from CH

Subtract the data stored 10 words after the location addressed by SI from DX

Subtract AL from memory location FROG

Question 23 2 out of 2 points

The ADD instruction that has the syntax "ADD destination, source" replaces the
__________ operand with the sum of the two operands
destination

Question 24 0 out of 2 points

Rewrite the instruction ADD Data1, Data2 to make it a valid instruction. Assuming it is of a byte size.

Question 25 0 out of 2 points


1001 1001
Give the packed BCD [1] and packed BCD [2] for decimal 99
0000 1001 0000 1001

Question 26 0 out of 2 points

IF CF=1, AL=95, and BL=4F prior to the execution of "SBB AL,BL", what will be the contents of AL
after subtraction in base 10?
45

Question 27 0 out of 2 points


short long
A(n) [1] jump is within -128 to 127 bytes of the current IP. A(n) [2] jump is within the current code
segment, whereas a(n) [3] jump is outside the current code segment.
far

Question 28 2 out of 2 points

Given the following

MOV BX, 04Fh


https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353694_1&course_id=_31442_1&content_id=_391471_1&retu… 7/10
9/14/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

ADD BX,0B1h

The execution results in ZF=1.


ZF=0 False

Question 29 0 out of 2 points

If a conditional jump is not taken, the instruction in the specified label will be executed.
False

Question 30 2 out of 2 points

Match the following instruction mnemonic with its function

Question
DAA

DAS

AAS

AAA

Question 31 2 out of 2 points


AL
In unsigned division of a word in AX by a byte in DATA2, the quotient will be placed in [1] and the
remainder [2]
AH

Question 32 0 out of 2 points

ANDing a word operand with FFFH will result in what value for the word operand? To set all bits of
an operand to 0, it should be ANDed with _________

Question 33 0 out of 2 points


INT 10H FUNCTION 03H
To get the current cursor position, interrupt [1] and function [2] is used.

Question 34 1.33333 out of 2 points

For monochrome monitors "00000111" would give the normal screen mode where background
is [1] and the foreground is [2] and [3]

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353694_1&course_id=_31442_1&content_id=_391471_1&retu… 8/10
9/14/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

Question 35 2 out of 2 points

The most significant bit of the CGA attribute byte refers to [1] and bit 03 is for [2]
BIT 7 BLINKING BIT 3 INTENSITY

Question 36 Needs Grading

INT ___ function calls reside in ROM BIOS, whereas INT ___ function calls provided by OS

Question 37 Needs Grading

What is wrong with the following ASCIIZ string?

PATH_NAME DB 'C:\PROGRAMS\TEST.DAT'

Question 38 2 out of 2 points


INT 16H FUNCTION 10H
The clear screen function uses interrupt [1] and function [2]

Question 39 0 out of 2 points

The following code is an attempt to call INT 33H function 2. Is it correct? [1]

If not, correct only the instruction that makes it wrong.

MOV AH,2 MOV AX,2


INT 33H
INT 33H

Question 40 1.33333 out of 2 points


0100
if IRGB = 0000 [1] , IRGB = [2] RED IRGB = 1110 [3]
BLACK YELLOW

Question 41 2 out of 2 points


DH, DL INT 10H
The row and column values can be loaded in Register [1] when interrupt [2] is used

Question 42 2 out of 2 points


https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353694_1&course_id=_31442_1&content_id=_391471_1&retu… 9/10
9/14/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

The file is [1] when function 3CH is used to create a file and file already exists.
truncated to zero length

Question 43 0 out of 2 points

INT 33H function AX=3, how can a left button press be detected?
BX=1

Question 44 2 out of 2 points

What is wrong with the following file handle?

FILE_HNDL DB ?

Question 45 2 out of 2 points

True or False. FCB and file handles can be used interchangeably with the same DOS 21H function
calls?

Thursday, September 14, 2017 1:20:41 PM PHT

← OK

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353694_1&course_id=_31442_1&content_id=_391471_1&ret… 10/10
9/28/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

KRISTINE COSCOLLUELA
MAPUA Courses Community

H ASSESSMENTS Review Test Submission: COE119-FE-1q17

Review Test Submission: COE119-FE-1q17

User KRISTINE YACAT COSCOLLUELA


Course COMPUTER SYSTEM ORGANIZATION WITH ASSEMBLY LANGUAGE
Test COE119-FE-1q17
Started 9/14/17 12:01 PM
Submitted 9/14/17 1:27 PM
Status Completed
Attempt Score 62 out of 100 points
Time Elapsed 1 hour, 25 minutes

Question 1 2 out of 2 points

What is wrong with the following ASCIIZ string?

PATH_NAME DB 'C:\PROGRAMS\TEST.DAT'

Question 2 2 out of 2 points

What is wrong with the following file handle?

FILE_HNDL DB ?

Question 3 0 out of 2 points

True or False. FCB and file handles can be used interchangeably with the same DOS 21H function
calls?

Question 4 0 out of 2 points

INT 33H function AX=3, how can a left button press be detected?

BX=1

Question 5 Width: 1536 2 out of 2 points


https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353696_1&course_id=_31442_1&content_id=_391471_1&outcome_id=_2321… 1/9
9/28/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

The most significant bit of the CGA attribute byte refers to [1] and bit 03 is for [2]
BIT 7 BLINKING BIT 3 INTENSITY

Question 6 2 out of 2 points


0100
if IRGB = 0000 [1] , IRGB = [2] RED IRGB = 1110 [3]
BLACK YELLOW

Question 7 0 out of 2 points

When program terminates before closing the output files, the data from [1] will be lost

Question 8 0 out of 2 points

True or False. The mouse coordinate is the same as video mode.


False

Question 9 2 out of 2 points

Which of the following is the reason why original video mode must be saved and retrieved prior
changing it for the mouse?

Question 10 0 out of 2 points

The file is [1] when function 3CH is used to create a file and file already exists.
truncated to zero length

Question 11 2 out of 2 points


INT 10H FUNCTION 03H
To get the current cursor position, interrupt [1] and function [2] is used.

Question 12 1 out of 2 points


DH, DL, CH, CL INT 10H
The row and column values can be loaded in Register [1] when interrupt [2] is used

Question 13 2 out of 2 points

Width:
The clear screen function uses interrupt 1536
[1] and function [2]
https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353696_1&course_id=_31442_1&content_id=_391471_1&outcome_id=_2321… 2/9
9/28/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

Question 14 0 out of 3 points

Given the following what is the content of the register after executing the
instruction
MOV AX, 11001100b
AX=00C0
XOR AX, 0CH

Question 15 3 out of 3 points

What is the equivalent of the following:


MOV AL, 5 MOV AL, 5
ROR AL, 5
MOV CL,2
MUL CL

Question 16 3 out of 3 points

Given the following, what is the content of the destination after executing
the instruction
CLD
AX=47
MOV AL,10111001b
NEG AL

Question 17 3 out of 3 points

Given the following, what is the content of the destination after executing
the instruction:
CLD
MOV AL, 09Fh
BTS AL, 6
Width: 1536
https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353696_1&course_id=_31442_1&content_id=_391471_1&outcome_id=_2321… 3/9
9/28/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

Question 18 3 out of 3 points

Which of the following is the equivalent of the given instruction


MOV AL, 128
MOV AL, 080H
SHR AL, 1
MOV DL, 2
DIV DL

Question 19 0 out of 3 points

Given the following, what is the content of the of the CF register after
executing the instruction. Assuming all the status are cleared.
CLC
MOV AL, 09Fh
RCR, 3 10110111

Question 20 3 out of 3 points

Given the following, what is the content of the destination after executing
the instruction:
CLD
MOV AL, 09Fh
BTC AL, 6

Question 21 0 out of 3 points

Given the following code, what is the value of CX when the scan
& compare produces its first match.

Width: 1536
https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353696_1&course_id=_31442_1&content_id=_391471_1&outcome_id=_2321… 4/9
9/28/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

Question 22 3 out of 3 points

Given the following, what is the content of the destination after executing
the instruction
CLD
MOV AL,10111001b
ROR AL, 2
06Eh

Question 23 3 out of 3 points

Given the following, what is the content of the destination after executing
the instruction:
CLD
Width: 1536
https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353696_1&course_id=_31442_1&content_id=_391471_1&outcome_id=_2321… 5/9
9/28/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

MOV AL, 09Fh


RCL AL, 7
0A7h

Question 24 2 out of 2 points

Which of the following is/are an Immediate addressing?

Question 25 0 out of 2 points

Which of the following is/are an invalid addressing?

Question 26 0 out of 2 points

It is an addressing that allows data to be addressed at the memory location pointed by other a base
or index register
Register Indirect

Question 27 0 out of 2 points

Rewrite the instruction ADD Data1, Data2 to make it a valid instruction. Assuming it is of a byte
size.

Question 28 2 out of 2 points


AX
In unsigned division of a word in AX by a word in DATA1, the quotient will be placed in [1] and the
remainder in [2]
DX

Question 29 2 out of 2 points

In unsigned multiplication of a byte in DATA1 with a byte in AL, the product will be placed in
register(s)
AX

Question 30 2 out of 2 points


destination
The ADD instruction that has the syntax "ADD destination, source" replaces the
__________ operand with the sum of the two operands
Width: 1536
https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353696_1&course_id=_31442_1&content_id=_391471_1&outcome_id=_2321… 6/9
9/28/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

Question 31 2 out of 2 points

Select a SUB instruction that will

Question

Subtract BX from CX SUB CX,BX

subtract 0EEH from DH SUB DH,0EEH

Subtract DI from SI SUB SI,DI

Subtract 3322H from EBP SUB EBP,3322H

Subtract the data addressed by SI from CH SUB CH,[SI]

Subtract the data stored 10 words after the location addressed by SI from DX SUB DX,[SI+10]

Subtract AL from memory location FROG SUB [FROG],AL

Question 32 0 out of 2 points

IF CF=1, AL=95, and BL=4F prior to the execution of "SBB AL,BL", what will be the contents of AL
after subtraction in base 10?
45

Question 33 2 out of 2 points

GIven: MOV BL,04Fh

ADD BL, 0B1H

The execution part results in ZF=0. True or False


ZF=1 False

Question 34 2 out of 2 points

In unsigned multiplication of AX with BX, the product will be bplaced in register(s) AX & DX

Question 35 2 out of 2 points


True
ADD data_1, data_2 is illegal because of no of operands. True or False
Width: 1536
https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353696_1&course_id=_31442_1&content_id=_391471_1&outcome_id=_2321… 7/9
9/28/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

Question 36 2 out of 2 points


3100 0 1
If AX=1001H and DX=20FFH, the sum is [1] and the contents of flag registers CF = [2] , AF= [3], SF
= [4], ZF = [5] and OF = [6]
0 0 0

Question 37 0 out of 2 points

ANDing a word operand with FFFH will result in what value for the word operand? To set all bits of an
operand to 0, it should be ANDed with _________

Question 38 2 out of 2 points

In unsigned multiplication of CX with a byte in AL, the product is placed in both AX and DX registers.
False

Question 39 0 out of 2 points

The ADC instruction that has the syntax "ADC destination, source" replaces the ______ operand
wiith the sum of _____. destination
source, destination & CF

Question 40 0 out of 2 points


AL
In unsigned division of a word in AX by a byte in DATA2, the quotient will be placed in [1] and the
remainder [2]
AH

Question 41 0 out of 2 points

Logical instruction [1] will convert an ASCII character to BCD

AND

Question 42 2 out of 2 points


short long
A(n) [1] jump is within -128 to 127 bytes of the current IP. A(n) [2] jump is within the current code
segment, whereas a(n) [3] jump is outside the current code segment.
far

Question 43 Width: 1536 2 out of 2 points

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353696_1&course_id=_31442_1&content_id=_391471_1&outcome_id=_2321… 8/9
9/28/2017 Review Test Submission: COE119-FE-1q17 – COE119_B1_1Q1718

If control is transferred outside the current code segment, is it NEAR or FAR?


FAR

Question 44 0 out of 2 points


0000 1001 0000 1001
Give the packed BCD [1] and packed BCD [2] for decimal 99
1001 1001

Question 45 2 out of 2 points

Given the following

MOV BX, 04Fh

ADD BX,0B1h

The execution results in ZF=1.


ZF=0 FALSE
Thursday, September 28, 2017 2:21:55 PM PHT

← OK

https://mapua.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_2353696_1&course_id=_31442_1&content_id=_391471_1&outcome_id=_2321… 9/9
10 pts

1.) 19

2.) 0A

3.) 3C

4.) 34

LODSB transfers a value from a memory to what register?

A.

AL

B.

AH

C.

AX

D.

EAX

-AX

Which of the following clears the value of the data register?

-xor dx,dx

Which flag would be affected during LODSB instruction.

-NONE

moves the BYTE at address DS:SI into AL.

-LODSB
Which of the following can convert an ASCII lowercase value to Hexadecimal value?

sub al,37h ( MALI ITO )

The size of the destination and source operands is selected with the mnemonic: _______________(byte
read from register AL), STOSW (word from AX), or STOSD (doubleword from EAX).

-STOSB

Which line should be fixed to place the place the content of the lower nibble to the higher nibble 01
shl word ptr[di], 2 02 lodsb 03 cmp al, '0' 04 jl Exit 05 cmp al, '9' 06 jg CheckUpper
07 sub al, '0' 08 jmp CheckEnd

-01 ( MALI )

What can you replace the jl function with?

CheckUpper:

cmp al, 'A'

jl Exit

cmp al, 'F'

jg CheckLower

sub al, 37h

jmp CheckEnd

-JB

If the input is true in

cmp al, 'F' jg CheckLower

the input is in_________?

Write a program that (a) clears the screen, and sets the cursor position at row=5 and column = 12

Does the "?" mark in the line " InHex db 3, ?, 4 dup('$') " represent the size?

- False

INT 33H function AX=3, how can a left button press be detected?

-BX=1(MALI)

The following code is an attempt to call INT 33H function 2. Is it correct? [1]

If not, correct only the instruction that makes it wrong

MOV AH,2
INT 33H

-MOV AX,2

Which of the following is the reason why original video mode must be saved and retrieved prior
changing it for the mouse?

NOT to lose the Interrupt Vector Table

To be able to use the INT 10H ( MALI ITO )

NOT to lose cursor when going back to DOS.

-To be able to use

The mouse coordinate

-TRUE

S-ar putea să vă placă și