---
title: "Assembler statements and directives"
subject: "Microprocessor"
chapter: 3
key: "semester_4/microprocessor:assembly-directives"
source: https://www.bctengineer.com/q/semester_4/microprocessor/assembly-directives
site: BCT Engineering
---

# Assembler statements and directives

Microprocessor · Chapter 3: Programming with 8086 Microprocessor

- Asked in: 2072 Asoj, 2+6 marks; 2071 Magh, 8 marks; 2069 Poush, 2+6 marks; 2068 Bhadra, 2+6 marks (asked 4 times)
- Video: [Assembler directives | 8086 | Part-1/2 | MPMC | Lec-20 | Bhanu Priya](https://www.youtube.com/watch?v=YThVLmW3_kk) — Education 4u
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/microprocessor/assembly-directives
- Whole chapter: https://www.bctengineer.com/md/semester_4/microprocessor/chapter-3

## Question

What is statement in an assembly language program? Explain frequently used directives with suitable example.

## Short answer

An assembly statement may include label, opcode/directive, operands, and comment. Common directives: SEGMENT/ENDS define segments; DB/DW/DUP reserve data; EQU assigns constants; ASSUME links segment registers; PROC/ENDP define procedures; END marks the file end and entry point.

## Answer

#### Statement
An assembly language **statement** is one line of source code. It is either an instruction (translated to machine code) or a directive (an instruction to the assembler). General format:

```text
[label:]  mnemonic/directive  [operand(s)]  [;comment]
START:    MOV  AX,BX          ; copy BX into AX
```
Types of statements: instructions, assembler directives (pseudo-ops), macros, and comments.

#### Directives
**Directives** are commands to the assembler; they generate no machine code (except data definitions) and control memory allocation and program organisation.

| Directive | Purpose | Example |
|---|---|---|
| SEGMENT / ENDS | Start and end of a logical segment | `DATA SEGMENT` ... `DATA ENDS` |
| ASSUME | Tells assembler which segment is addressed by which segment register | `ASSUME CS:CODE, DS:DATA` |
| DB / DW / DD | Define byte / word / double word | `NUM DB 25H`, `ARR DW 10 DUP(0)` |
| EQU | Give a name to a constant | `COUNT EQU 10` |
| ORG | Set the location counter | `ORG 100H` (COM program) |
| PROC / ENDP | Start and end of a procedure (NEAR or FAR) | `ADD2 PROC NEAR` ... `ADD2 ENDP` |
| END | End of the source file, optionally gives start label | `END START` |
| DUP | Repeat a data value | `BUF DB 50 DUP(?)` |
| OFFSET / PTR | Offset of a label; override data size | `MOV BX,OFFSET ARR`, `MOV BYTE PTR [BX],5` |
| .MODEL, .DATA, .CODE, .STACK | Simplified segment directives | `.MODEL SMALL` |

**Example program using directives**
```asm
DATA    SEGMENT
        N1   DB 05H
        N2   DB 07H
        SUM  DB ?
DATA    ENDS
CODE    SEGMENT
        ASSUME CS:CODE, DS:DATA
START:  MOV  AX,DATA        ; initialise DS
        MOV  DS,AX
        MOV  AL,N1
        ADD  AL,N2
        MOV  SUM,AL         ; SUM = 0CH
        MOV  AH,4CH
        INT  21H
CODE    ENDS
        END  START
```
Here SEGMENT/ENDS define two segments, ASSUME links them to CS and DS, DB reserves memory, and END marks the end and entry point.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is an assembly language statement?
   A. A whole program
   B. One line of source: an instruction or a directive
   C. Only a comment
   D. Only a machine code byte
   Answer: B. A statement is a source line, either an instruction translated to machine code or a directive for the assembler. (Key point: Statement)

2. How do directives differ from instructions?
   A. They are executed by the CPU at run time
   B. They are commands to the assembler and generate no machine code (except data definitions)
   C. They generate more machine code than instructions
   D. They are only comments
   Answer: B. Directives control assembly, memory allocation and organisation. (Key point: Directives vs instructions)

3. What does ASSUME CS:CODE, DS:DATA do?
   A. Loads DS with the data segment address
   B. Tells the assembler which segment is addressed by which segment register
   C. Defines the segments
   D. Ends the program
   Answer: B. ASSUME only informs the assembler; the program must still load DS with MOV AX,DATA / MOV DS,AX. (Key point: ASSUME)

4. What is the role of END START?
   A. Ends the source file and gives the start label (entry point)
   B. Ends a procedure
   C. Ends a segment
   D. Defines a byte
   Answer: A. END marks the end of the source and optionally the entry point label. (Key point: END START)

## Related in Microprocessor

- [8086 assembly language operators](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3A8086-operators) — Microprocessor, chapter 3, asked 3×

## Related in other subjects

- [Second law statements; Kelvin-Planck and Clausius equivalence](https://www.bctengineer.com/question.md?key=semester_2%2Ffundamental_of_thermodynamics_and_heat_transfer%3Asecond-law-classical-kelvin-clausius) — Fundamental of Thermodynamics & Heat Transfer, chapter 5
- [Interpret: book for second-language readers](https://www.bctengineer.com/question.md?key=semester_5%2Fcommunication_english%3Ainterpret-book-for-second-language-readers) — Communication English, chapter 1
- [Purpose of continue statement](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Acontinue-purpose) — Computer Programming, chapter 5
- [Assembly constraints and tolerance fit calculation](https://www.bctengineer.com/question.md?key=semester_4%2Fcomputer_aided_design%3Aassembly-constraints-tolerance-fit) — Computer Aided Design, chapter 5
