CAOFINALQUIZ Flashcards
Which interrupt service is used to create a subdirectory?
a) INT 21H / 3CH
b) INT 21H / 39H
c) INT 21H / 3AH
d) INT 21H / 56H
INT 21H / 39H
Which of the following is a requirement for deleting a subdirectory using INT 21H / 3AH?
a) The subdirectory must not contain any files.
b) The subdirectory must be hidden.
c) The subdirectory must be read-only.
d) The subdirectory must have a volume label.
he subdirectory must not contain any files.
What is the purpose of INT 21H / 56H?
a) To rename files or directories.
b) To create a new file.
c) To open a file.
d) To delete a file.
To rename files or directories.
Which file attribute indicates a file is a “hidden file”?
a) 0
b) 1
c) 3
d) 5
1
What does the CX register represent when using the INT 21H / 3CH service?
a) File handle
b) File attribute
c) Error status
d) Directory path
File attribute
Which attribute is represented by bit 4 in a file attribute?
a) Archive file
b) Read-only file
c) Subdirectory
d) Volume label
Subdirectory
Which interrupt service is used to change a file’s attributes?
a) INT 21H / 43H
b) INT 21H / 3DH
c) INT 21H / 41H
d) INT 21H / 39H
INT 21H / 43H
What access mode value allows both reading and writing to a file?
a) 0
b) 1
c) 2
d) 3
2
Which interrupt service opens a file?
a) INT 21H / 3DH
b) INT 21H / 3EH
c) INT 21H / 5BH
d) INT 21H / 41H
INT 21H / 3DH
What is required to close a file using INT 21H / 3EH?
a) File path
b) File attribute
c) File handle
d) Directory path
File handle
Which directive is used to define the beginning of a procedure in assembly language?
a) PROC
b) ENDP
c) CALL
d) LOOP
PROC
What is the purpose of the CALL instruction in assembly language?
a) To end a procedure
b) To define a loop
c) To execute a procedure
d) To define a stack
To execute a procedure
What register is decremented in a loop instruction?
a) AX
b) CX
c) DX
d) BX
CX
Which stack instruction places data onto the stack segment?
a) POP
b) PUSH
c) LOOP
d) CALL
PUSH
Which stack instruction retrieves data from the stack?
a) POP
b) PUSH
c) LOOP
d) CALL
POP
How many times does the loop execute if CX = 10?
a) 0
b) 10
c) 11
d) Unlimited
10
What happens to CX when the LOOP instruction executes?
a) It is incremented.
b) It is reset to 0.
c) It is decremented.
d) It remains unchanged.
It is decremented.
In the sample program, what is the value pushed onto the stack using the instruction PUSH AX?
a) The value of the AX register.
b) The value of the BX register.
c) The value of the CX register.
d) The value of the DX register.
he value of the AX register.
What is the purpose of the RET instruction in a procedure?
a) To return control to the calling program.
b) To define the end of the program.
c) To increment the CX register.
d) To loop back to the start of a procedure.
To return control to the calling program.
Which register is used to point to a string in memory for INT 21H services?
a) BX
b) CX
c) DX
d) AX
DX
What is the purpose of INT 21H / 39H?
a) To create a file in the current directory
b) To create a subdirectory
c) To delete a file from a directory
d) To rename a file or directory
To create a subdirectory
What does the INT 21H / 3AH service do?
a) Renames a directory
b) Deletes a subdirectory
c) Retrieves file attributes
d) Changes the current directory
Deletes a subdirectory
What is the function of INT 21H / 56H?
a) To delete a file
b) To open a file
c) To rename a file or directory
d) To create a file
To rename a file or directory
Which file attribute allows only viewing but not editing the file?
a) Hidden file
b) Archive file
c) Read-only
d) System file
Read-only
What does the CX register specify when creating a file using INT 21H / 3CH?
a) The file size
b) The file attributes
c) The file’s content
d) The file handle
The file attributes
What is an ASCIIZ string?
a) A string terminated by a null character (00H)
b) A string containing only ASCII characters
c) A string with a predefined length
d) A string that uses wildcards
A string terminated by a null character (00H)
What does INT 21H / 41H accomplish?
a) Creates a file
b) Deletes a file
c) Retrieves file attributes
d) Changes file permissions
Deletes a file
What is the function of INT 21H / 3BH?
a) Creates a subdirectory
b) Changes the current directory
c) Deletes a subdirectory
d) Renames a file
Changes the current directory
Which of the following modes of accessing files allows both reading and writing?
a) Mode 0
b) Mode 1
c) Mode 2
d) Mode 3
Mode 2
What is the role of INT 21H / 3EH?
a) To close a file
b) To open a file
c) To create a subdirectory
d) To rename a file
To close a file
What directive defines the beginning of a procedure in assembly language?
a) ENDP
b) CALL
c) PROC
d) RET
PROC
What is the purpose of the ENDP directive in assembly language?
a) To end a loop
b) To end a procedure
c) To push a value onto the stack
d) To return from a procedure
To end a procedure
What is the primary purpose of the PUSH instruction?
a) To end a procedure
b) To decrement the CX register
c) To place data onto the stack
d) To retrieve data from the stack
To place data onto the stack
What happens to the CX register during a LOOP instruction?
a) It is reset to 0
b) It is incremented by 1
c) It is decremented by 1
d) It is unchanged
It is decremented by 1
Which INT 21H function is used to create a file only if it does not already exist?
a) 3CH
b) 5BH
c) 3AH
d) 39H
5BH
What attribute must be excluded when deleting a file using INT 21H / 41H?
a) Hidden
b) Read-only
c) Archive
d) System
Read-only
What is required to change a directory using INT 21H / 3BH?
a) File handle in BX
b) ASCIIZ string in DS:DX
c) Mode value in AL
d) CX register set to 0
ASCIIZ string in DS:DX
What error will occur if an attempt is made to delete a non-empty directory using INT 21H / 3AH?
a) Directory not found
b) Access denied
c) Directory not empty
d) Invalid file handle
Directory not empty
Which INT 21H service is responsible for retrieving or modifying a file’s attributes?
a) 3CH
b) 39H
c) 43H
d) 56H
43H
What is the difference between INT 21H / 3CH and INT 21H / 5BH?
a) 3CH can overwrite existing files, while 5BH cannot
b) 3CH is used for directories, while 5BH is for files
c) 5BH requires a file handle, while 3CH does not
d) 5BH supports wildcards, while 3CH does not
3CH can overwrite existing files, while 5BH cannot
What does the CX register signify when creating a file using INT 21H / 3CH?
a) File handle
b) File attributes
c) Directory path length
d) File size
File attributes
Which file attribute indicates that the file is used by the operating system?
a) Hidden file
b) Archive file
c) System file
d) Subdirectory
System file
What attribute is used to mark files that have been modified and need backup?
a) Archive file
b) Read-only file
c) Hidden file
d) Volume label
Archive file
Which bit in the file attribute byte signifies a subdirectory?
a) Bit 0
b) Bit 3
c) Bit 4
d) Bit 5
Bit 4
What is the purpose of the RET instruction in assembly?
a) Returns control from a procedure
b) Jumps to a label
c) Calls another procedure
d) Ends a program
Returns control from a procedure
Which directive specifies the starting point of an assembly language program?
a) ORG
b) PROC
c) END
d) START
ORG
What is the significance of the directive .MODEL SMALL?
a) Sets the stack size to small
b) Specifies that code and data fit within a single 64KB segment each
c) Limits the program to 16-bit registers
d) Enables small memory allocation
Specifies that code and data fit within a single 64KB segment each
What does the directive .CODE indicate in assembly?
a) Start of a procedure
b) Start of the code segment
c) Declaration of variables
d) End of a program
Start of the code segment
What happens if a POP instruction is executed on an empty stack?
a) Data corruption
b) Overflow error
c) Underflow error
d) No effect
Underflow error
Which register is modified when data is pushed onto the stack?
a) CX
b) SP
c) DX
d) AX
SP
What is the default behavior of the stack when data is pushed?
a) It increments SP
b) It decrements SP
c) It stores data at the top of the stack and leaves SP unchanged
d) It swaps SP and BP
It decrements SP
How does the PUSH AX instruction differ from PUSH DX?
a) PUSH AX requires a 32-bit processor
b) PUSH AX stores the value of AX, while PUSH DX stores the value of DX
c) PUSH AX can only be used with memory, not registers
d) PUSH AX uses a different segment than PUSH DX
PUSH AX stores the value of AX, while PUSH DX stores the value of DX
Which register controls the number of iterations in a LOOP instruction?
a) SP
b) DX
c) CX
d) BX
CX
What happens when the CX register reaches zero in a LOOP instruction?
a) The loop restarts
b) The program exits
c) The loop terminates
d) An error occurs
The loop terminates
What is the purpose of the LOOP label instruction?
a) Executes the labeled code only once
b) Transfers control unconditionally to a label
c) Repeats the code at the label until CX = 0
d) Decrements AX and jumps to a label
Repeats the code at the label until CX = 0