CAOFINALQUIZ Flashcards

1
Q

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

A

INT 21H / 39H

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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.

A

he subdirectory must not contain any files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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.

A

To rename files or directories.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which file attribute indicates a file is a “hidden file”?

a) 0
b) 1
c) 3
d) 5

A

1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

File attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which attribute is represented by bit 4 in a file attribute?

a) Archive file
b) Read-only file
c) Subdirectory
d) Volume label

A

Subdirectory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

INT 21H / 43H

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What access mode value allows both reading and writing to a file?

a) 0
b) 1
c) 2
d) 3

A

2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which interrupt service opens a file?

a) INT 21H / 3DH
b) INT 21H / 3EH
c) INT 21H / 5BH
d) INT 21H / 41H

A

INT 21H / 3DH

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is required to close a file using INT 21H / 3EH?

a) File path
b) File attribute
c) File handle
d) Directory path

A

File handle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which directive is used to define the beginning of a procedure in assembly language?

a) PROC
b) ENDP
c) CALL
d) LOOP

A

PROC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

To execute a procedure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What register is decremented in a loop instruction?

a) AX
b) CX
c) DX
d) BX

A

CX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which stack instruction places data onto the stack segment?

a) POP
b) PUSH
c) LOOP
d) CALL

A

PUSH

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which stack instruction retrieves data from the stack?

a) POP
b) PUSH
c) LOOP
d) CALL

A

POP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How many times does the loop execute if CX = 10?

a) 0
b) 10
c) 11
d) Unlimited

A

10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

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.

A

It is decremented.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

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.

A

he value of the AX register.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

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.

A

To return control to the calling program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Which register is used to point to a string in memory for INT 21H services?

a) BX
b) CX
c) DX
d) AX

A

DX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

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

A

To create a subdirectory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

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

A

Deletes a subdirectory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

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

A

To rename a file or directory

24
Q

Which file attribute allows only viewing but not editing the file?

a) Hidden file
b) Archive file
c) Read-only
d) System file

A

Read-only

25
Q

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

A

The file attributes

26
Q

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

A string terminated by a null character (00H)

27
Q

What does INT 21H / 41H accomplish?

a) Creates a file
b) Deletes a file
c) Retrieves file attributes
d) Changes file permissions

A

Deletes a file

28
Q

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

A

Changes the current directory

29
Q

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

A

Mode 2

30
Q

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

A

To close a file

31
Q

What directive defines the beginning of a procedure in assembly language?

a) ENDP
b) CALL
c) PROC
d) RET

A

PROC

32
Q

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

A

To end a procedure

33
Q

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

A

To place data onto the stack

34
Q

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

A

It is decremented by 1

35
Q

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

A

5BH

36
Q

What attribute must be excluded when deleting a file using INT 21H / 41H?

a) Hidden
b) Read-only
c) Archive
d) System

A

Read-only

37
Q

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

A

ASCIIZ string in DS:DX

38
Q

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

A

Directory not empty

39
Q

Which INT 21H service is responsible for retrieving or modifying a file’s attributes?

a) 3CH
b) 39H
c) 43H
d) 56H

A

43H

40
Q

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

A

3CH can overwrite existing files, while 5BH cannot

41
Q

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

A

File attributes

42
Q

Which file attribute indicates that the file is used by the operating system?

a) Hidden file
b) Archive file
c) System file
d) Subdirectory

A

System file

43
Q

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

A

Archive file

44
Q

Which bit in the file attribute byte signifies a subdirectory?

a) Bit 0
b) Bit 3
c) Bit 4
d) Bit 5

A

Bit 4

45
Q

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

A

Returns control from a procedure

46
Q

Which directive specifies the starting point of an assembly language program?

a) ORG
b) PROC
c) END
d) START

A

ORG

47
Q

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

A

Specifies that code and data fit within a single 64KB segment each

48
Q

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

A

Start of the code segment

49
Q

What happens if a POP instruction is executed on an empty stack?

a) Data corruption
b) Overflow error
c) Underflow error
d) No effect

A

Underflow error

50
Q

Which register is modified when data is pushed onto the stack?

a) CX
b) SP
c) DX
d) AX

A

SP

51
Q

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

A

It decrements SP

52
Q

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

A

PUSH AX stores the value of AX, while PUSH DX stores the value of DX

53
Q

Which register controls the number of iterations in a LOOP instruction?

a) SP
b) DX
c) CX
d) BX

A

CX

54
Q

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

A

The loop terminates

55
Q

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

A

Repeats the code at the label until CX = 0