Finals HDL

86 flashcardsby Axle
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
What does the JMP instruction do?
Transfers program control unconditionally to another part of the program.
2
What does “unconditional” mean in JMP instruction?
It always jumps regardless of any condition.
3
What determines conditional jumps?
Status flags such as Zero, Carry, Sign, Overflow, and Parity.
4
What do JE and JZ mean?
Jump if Equal or Jump if Zero.
5
What do JNE and JNZ mean?
Jump if Not Equal or Jump if Not Zero.
6
What does JA or JNBE mean?
Jump if Above or Jump if Not Below or Equal (for unsigned data).
7
What does JAE or JNB mean?
Jump if Above or Equal or Jump if Not Below.
8
What does JB or JNAE mean?
Jump if Below or Jump if Not Above or Equal.
9
What does JBE or JNA mean?
Jump if Below or Equal or Jump if Not Above.
10
What does JG or JNLE mean?
Jump if Greater or Jump if Not Less or Equal (for signed data).
11
What does JGE or JNL mean?
Jump if Greater or Equal or Jump if Not Less.
12
What does JL or JNGE mean?
Jump if Less or Jump if Not Greater or Equal.
13
What does JLE or JNG mean?
Jump if Less or Equal or Jump if Not Greater.
14
What does JS mean?
Jump if Sign (Negative).
15
What does JNS mean?
Jump if No Sign (Positive).
16
What does JC mean?
Jump if Carry.
17
What does JNC mean?
Jump if No Carry.
18
What does JO mean?
Jump if Overflow.
19
What does JNO mean?
Jump if No Overflow.
20
What does JP or JPE mean?
Jump if Parity Even.
21
What does JNP or JPO mean?
Jump if Parity Odd.
22
What does the LOOP instruction do?
Repeats a block of instructions a specific number of times.
23
Which register determines the number of LOOP repetitions?
The CX register.
24
What happens to CX after each LOOP execution?
CX decreases by 1.
25
When does the LOOP end?
When CX becomes zero.
26
What is a macro in assembly language?
A name that defines a set of instructions substituted wherever it appears.
27
Where must a macro be declared?
Before a segment.
28
What is the syntax for defining a macro?
macro_name macro(dummy_argument) … endm.
29
What is the purpose of the dummy_argument in a macro?
It acts as a placeholder for additional data or values.
30
What are the benefits of using macros?
They make programs shorter, easier to read, and reusable.
31
What does the ADD instruction do?
Performs binary addition.
32
What does the SUB instruction do?
Performs binary subtraction.
33
In ADD or SUB, what can operand1 be?
A register or a memory location.
34
In ADD or SUB, what can operand2 be?
A register, memory location, or immediate value.
35
Why is AAA used?
To adjust ASCII addition results in the AX register to correct decimal form.
36
What does AAA stand for?
ASCII Adjust after Addition.
37
What does the AAM instruction do?
Adjusts ASCII result after multiplication.
38
Why do operands need to be ANDed with 0Fh before AAM or AAD?
To clear the leftmost hex digit of 3s.
39
What is the function of MUL?
Multiplies unsigned data.
40
What is the function of IMUL?
Multiplies signed data.
41
Where is the multiplicand stored for byte multiplication?
In the AL register.
42
What is the purpose of the OR ax,3030h instruction?
To convert the result to ASCII format.
43
What does the DIV instruction do?
Divides unsigned data.
44
What does the IDIV instruction do?
Divides signed data.
45
Where is the quotient stored after division?
In the AL register.
46
Where is the remainder stored after division?
In the AH register.
47
What is the purpose of AAD?
Adjusts ASCII values before division.
48
What is a procedure in assembly language?
A sequence of instructions that performs a specific task.
49
How does a procedure start and end?
With PROC and ENDP directives.
50
Which instruction calls a procedure?
CALL.
51
Which instruction returns control from a procedure?
RET.
52
What instruction can also transfer control to a procedure but is less structured?
JMP.
53
What is the benefit of using procedures?
They make programs modular, reusable, and easier to maintain.
54
Which interrupt handles DOS disk services?
INT 21H.
55
What does INT 21H Service 3CH do?
Creates a new file.
56
What does AH = 3CH represent?
Service number for file creation.
57
What is stored in DX for INT 21H 3CH?
Address of the ASCIIZ string containing the file path and name.
58
What does CX represent in INT 21H 3CH?
File attribute or type.
59
What happens if file creation is successful?
File is created and carry flag is cleared.
60
What happens if file creation fails?
Carry flag is set, and error code is returned in AX.
61
What does error code 03 mean?
File not found.
62
What does error code 04 mean?
Path not found.
63
What does error code 05 mean?
Access denied.
64
What does error code 11 mean?
Invalid format.
65
What does error code 21 mean?
Drive not ready.
66
What does INT 21H Service 41H do?
Deletes a file.
67
What files cannot be deleted using INT 21H 41H?
Read-only files.
68
What does INT 21H Service 56H do?
Renames a file.
69
What happens if INT 21H 56H fails?
File not found or protected.
70
What does INT 21H Service 39H do?
Creates a directory.
71
What does AH = 39H represent?
Function number for creating a directory.
72
What does INT 21H Service 3AH do?
Removes a directory.
73
When can you not delete a directory?
When it is the current directory or contains files.
74
What does INT 21H Service 3BH do?
Changes the current working directory.
75
What does INT 21H Service 47H do?
Retrieves the current directory.
76
What does DL represent in INT 21H 47H?
Drive number (0 = default, 1 = A:, etc.).
77
What does SI represent in INT 21H 47H?
Address of the buffer to store the directory path.
78
What are operands?
The data or values that an instruction works on.
79
Give an example of operands.
In MOV AX, BX — AX and BX are operands.
80
What are directives?
Commands for the assembler, not the CPU.
81
What do directives do?
Define data, reserve memory, or control program structure.
82
Give examples of directives.
DB, DW, SEGMENT, ENDS, ORG, END.
83
What are labels?
Names given to memory addresses or code locations.
84
What is the purpose of labels?
Used for branching, loops, or procedures.
85
What are instructions?
Commands executed by the CPU to perform operations.
86
Give examples of instructions.
MOV, ADD, SUB, JMP, INT.
Study all 86 cards for free