Documente Academic
Documente Profesional
Documente Cultură
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
sbb bh, 0
mov bh, 3
12. CL
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
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)
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
?.data
loop1:
repne scasb
je increment
jmp output
increment:
inc characterCount
jmp loop1
output:
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
12. CX
True
CF=1
INT 21h
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.
(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)
(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
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 instruction copies the address of the file? // LEA DX, FNAME
3.
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
NEG AL
//47h
6.
/indirect
7.
MOV DL, 2
DIV DL
SHR AL,1
8.
CLD
ROR AL, 2
//06Eh
9.
CLD
ROL AL,5
//01110011
10.
//Direct
11.
CLD
RCL AL,7
//0A7h
12.
MOV AX,11001100b
XOR AX 0CH
13.
MOV AL,CH
//Register
14.
//JNO
15.
MOV AL,5
MOV CL,2
MUL CL
//MOV AL,5
SHL AL 1
16.
17.
18.
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.
//9***
21.
MOV BX, AX
CMP ZX,BX
JB Z
MOV BX, AX
CMP AX,BX
JNLE Z
23.
CLD
BTS AL, 6
//DFh
//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
//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
//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
2. dw 32 dup(0)
3. sss ends
5. n dw 123,0abh,0acedh,0badeh
6. dss ends
8. assume ds:dss,cs:css,ss:sss
14. x: inc di
16. loop x
17. inc di
conventional EXE
given 123-0abh-0acedh+0badeh conventional com file
2. assume ds:dss,cs:css,ss:sss
5. sub ax,0abh
8. mov ax,4c00h
9. int 21h
.model small
.stack
.data
db "$"
symbol db "$"
string_len dw ?
.code
mov ds, ax
mov es, ax
;displays Enter a string:
mov ah, 9
int 21h
;--------------------------
mov cx, si
read:
mov ah, 1
int 21h
cmp al, 13
je done
mov [si], al
inc si
jmp read
done:
mov [si], al
mov ax, si
sub ax, cx
mov string_len, ax
;;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
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
Push dx
Inc cx
NOTE:
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
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
-a215
Copy of
GIven the following, answer the question that followis.
-a215
Write is the addressing mode if the instruction is valid. Ex. Register [ans]
Register Indirect
-a215
073F:0215 DIV CL
-a215
073F:0215 MOV Cl,[204] Write the address of destination if the destination will contain CEh after
execution? [1]
-a215
Write the content of al after execution if the question is valid, else write COE119
-a215
Write is the addressing mode if the instruction is valid. Ex. Register [ans]
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
-a215
Write the address of source if the addressing mode is register relative. Else write COE119
-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
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
ADD AL, BL
CMOVNO AL,CL
AL=[1]
MOV AH,4
SHL AH,2
3-CMOV.png
CL = [1]
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]
[7]
mov al,bh
[8]
mul bh
[9]
[10]
add al,ah
[11]
[12]
CLC
STI
CMOVC BL,AL
BL= [1]
← 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...
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
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
else x=2;
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...
In unsigned multiplication of a byte in DATA1 with a byte in AL, the product will be placed in
register(s)
AX
ADD BX,0B1h
In unsigned multiplication of CX with a byte in AL, the product is placed in both AX and DX registers.
FALSE
In calculating the target address to jump to, a displacement is added to the contents of the register
___.
PC
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...
Rewrite the instruction ADD Data1, Data2 to make it a valid instruction. Assuming it is of a byte size.
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
← OK
Which instruction aside from DIV will divide a given value? IDIV
Which instruction aside from MUL will multiply a given value? IMUL
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
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
False
Red, Green, Blue electron beams are required to generate any color on a video display
False
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?
For monochrome monitors "00000111" would give the normal screen mode where background is
white and the foreground is black.
False
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
INT 10h service function 09h in AL writes a character and attribute at the current position.
False
Each position on the video display hold ASCII code for a single character.
False
Question
True
Question
What MS-DOS I/O Services does the program execute?
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
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.
ei re
rme ao
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"
← 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_...
This group of instructions allows the programmer to choose where the processor fetches its next
instruction from.
PROGRAM TRANSFER
Question
DAA BCD Addition
Question
Subtract BX from CX SUB CX,BX
Subtract the data stored 10 words after the location addressed by SI from DX SUB DX,[SI+10]
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
In unsigned multiplication of CX with a byte in AL, the product is placed in both AX and DX registers.
FALSE
SEGMENTS
______ contains many new pseudocodes to help the assembler generate the correct machine code
for the object file.
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
MOV BL,25H
MOV CL,4
ROR BL,CL
BL = [1] , CF = [2]
52 0
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_...
DEC DX
JNZ label
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
Write an instruction that will Set the ZF without any arithmetic operations.
[1]
[2]
[3]
← 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
It is an addressing that allows data to be addressed at the memory location pointed by other a base
or index register
Register Indirect
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
Given the following, what is the content of the destination after executing
the instruction
CLD
MOV AL,10111001b
ROR AL, 2
06Eh
Given the following code, what is the output after executing the
instructions
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.
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
Given the following, what is the content of the destination after executing
the instruction:
CLD
MOV AL, 09Fh
BTS AL, 6
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
Given the following what is the content of the register after executing the
instruction
MOV AX, 11001100b
AX=00C0
XOR AX, 0CH
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
In unsigned multiplication of AX with BX, the product will be bplaced in register(s) AX & DX
In unsigned multiplication of a byte in DATA1 with a byte in AL, the product will be placed in
register(s)
AX
Give the packed BCD [1] and packed BCD [2] for decimal 15
0001 0101 0000 0001 0000 0101
In unsigned multiplication of CX with a byte in AL, the product is placed in both AX and DX registers.
False
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 DI from SI
Subtract the data stored 10 words after the location addressed by SI from DX
The ADD instruction that has the syntax "ADD destination, source" replaces the
__________ operand with the sum of the two operands
destination
Rewrite the instruction ADD Data1, Data2 to make it a valid instruction. Assuming it is of a byte size.
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
ADD BX,0B1h
If a conditional jump is not taken, the instruction in the specified label will be executed.
False
Question
DAA
DAS
AAS
AAA
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 _________
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
The most significant bit of the CGA attribute byte refers to [1] and bit 03 is for [2]
BIT 7 BLINKING BIT 3 INTENSITY
INT ___ function calls reside in ROM BIOS, whereas INT ___ function calls provided by OS
PATH_NAME DB 'C:\PROGRAMS\TEST.DAT'
The following code is an attempt to call INT 33H function 2. Is it correct? [1]
The file is [1] when function 3CH is used to create a file and file already exists.
truncated to zero length
INT 33H function AX=3, how can a left button press be detected?
BX=1
FILE_HNDL DB ?
True or False. FCB and file handles can be used interchangeably with the same DOS 21H function
calls?
← 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
PATH_NAME DB 'C:\PROGRAMS\TEST.DAT'
FILE_HNDL DB ?
True or False. FCB and file handles can be used interchangeably with the same DOS 21H function
calls?
INT 33H function AX=3, how can a left button press be detected?
BX=1
The most significant bit of the CGA attribute byte refers to [1] and bit 03 is for [2]
BIT 7 BLINKING BIT 3 INTENSITY
When program terminates before closing the output files, the data from [1] will be lost
Which of the following is the reason why original video mode must be saved and retrieved prior
changing it for the mouse?
The file is [1] when function 3CH is used to create a file and file already exists.
truncated to zero length
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
Given the following what is the content of the register after executing the
instruction
MOV AX, 11001100b
AX=00C0
XOR AX, 0CH
Given the following, what is the content of the destination after executing
the instruction
CLD
AX=47
MOV AL,10111001b
NEG AL
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
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
Given the following, what is the content of the destination after executing
the instruction:
CLD
MOV AL, 09Fh
BTC AL, 6
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
Given the following, what is the content of the destination after executing
the instruction
CLD
MOV AL,10111001b
ROR AL, 2
06Eh
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
It is an addressing that allows data to be addressed at the memory location pointed by other a base
or index register
Register Indirect
Rewrite the instruction ADD Data1, Data2 to make it a valid instruction. Assuming it is of a byte
size.
In unsigned multiplication of a byte in DATA1 with a byte in AL, the product will be placed in
register(s)
AX
Question
Subtract the data stored 10 words after the location addressed by SI from DX SUB DX,[SI+10]
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
In unsigned multiplication of AX with BX, the product will be bplaced in register(s) AX & DX
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 _________
In unsigned multiplication of CX with a byte in AL, the product is placed in both AX and DX registers.
False
The ADC instruction that has the syntax "ADC destination, source" replaces the ______ operand
wiith the sum of _____. destination
source, destination & CF
AND
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
ADD BX,0B1h
← 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
A.
AL
B.
AH
C.
AX
D.
EAX
-AX
-xor dx,dx
-NONE
-LODSB
Which of the following can convert an ASCII lowercase value to Hexadecimal value?
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 )
CheckUpper:
jl Exit
jg CheckLower
jmp CheckEnd
-JB
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]
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?
-TRUE