Instruction Set of 8086 Part 1: Introduction Flashcards

(20 cards)

1
Q

What are the three types of programming languages?

A

High-Level Language: Machine-independent, natural language text (e.g., C++, Java). Assembly Language: Mnemonics for machine code, faster/smaller programs but machine-dependent (e.g., MOV, ADD). Machine Code: Binary instructions unique to a microprocessor (e.g., 01010011).”

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

What are the advantages of Assembly Language?

A

Advantages: Faster/short programs, easy to read/write to memory/I/O ports, reduced errors. Disadvantages: Machine-dependent, many instructions for small tasks.”

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

What is the 8086’s Instruction Set Architecture (ISA)?

A

“The set of ~117 instructions supported by the 8086, consisting of opcode (operation) and optional operands. Assembly language is case-insensitive.”

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

What are the four fields in an Assembly Language syntax line?

A

“1. Label (ends with colon, e.g., START:). 2. Opcode (operation, e.g., ADD). 3. Operands (data for the opcode). 4. Comment (preceded by ;).”

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

What is the purpose of the DB assembler directive?

A

Define Byte: Allocates 1 byte of memory. Example: WEIGHTS DB 18, 68, 45 creates a byte array. Use ? for uninitialized bytes.”

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

What does DW stand for in Assembly?

A

Define Word: Allocates 2 bytes (16 bits). Example: SUM DW 4589 stores 4589 as a word.”

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

How does the ORG directive work?

A

Origin: Assigns a starting (effective) address for a segment. Example: ORG 0010h sets the next data item to offset 0010h.”

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

What is the difference between NEAR and FAR calls?

A

NEAR: Intra-segment call (within the same segment). FAR: Inter-segment call (different segments).”

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

What are the rules for naming labels in Assembly?

A

“1. 1–31 characters.
2. Letters, digits, ?, ., @, _, $.
3. First character cannot be a digit.
4. Cannot use reserved words (e.g., MOV).”

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

What are the three memory segments in an Assembly program?

A

“1. Data Segment: Variables and constants. 2. Stack Segment: Allocates stack memory. 3. Code Segment: Program instructions.”

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

What is the purpose of the ENDS directive?

A

End Segment: Marks the end of a code/data/stack segment. Example: data segment ... ends.”

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

What does END start do in an Assembly program?

A

“Marks the end of the program and sets the entry point to the start label. Statements after END are ignored.”

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

How are ASCII strings defined in the Data Segment?

A

“Using single/double quotes. Example: LETTER DB 'ABC' or LETTER DB 41h,42h,43h.”

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

What is the role of the Linker in Assembly program flow?

A

“Converts object files (*.OBJ) into executable files (*.EXE) by resolving external references and combining modules.”

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

What are the categories of 8086 instructions?

A

“1. Data Transfer (MOV, XCHG). 2. Arithmetic (ADD, SUB). 3. Logical (AND, OR). 4. String Manipulation (MOVS, CMPS). 5. Control (CALL, JMP). 6. I/O (IN, OUT). 7. Other (POP, flags).”

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

What does DUP do in data allocation?

A

Duplicate: Repeats a value multiple times. Example: Y DB 6 DUP(0FFh) fills 6 bytes with 0FFh.”

17
Q

What is the difference between instructions and directives?

A

Instructions execute at runtime (translated to opcodes). Directives (e.g., DB, END) guide the assembler and do not execute.”

18
Q

How is the Stack Segment allocated?

A

“Using dw or dup. Example: stack segment dw 128 dup(0) ends allocates 128 words (256 bytes) for the stack.”

19
Q

What is the EQU directive used for?

A

Equate: Assigns a value to a symbolic name without allocating memory. Example: MASK EQU 10010001B.”

20
Q

What is the structure of a procedure in Assembly?

A

Defined with PROC and ended with ENDP. Example: CONTROL PROC FAR ... CONTROL ENDP.