---
title: "Programming model of 8085"
subject: "Microprocessor"
chapter: 2
key: "semester_4/microprocessor:8085-programming-model"
source: https://www.bctengineer.com/q/semester_4/microprocessor/8085-programming-model
site: BCT Engineering
---

# Programming model of 8085

Microprocessor · Chapter 2: Programming with 8085 Microprocessor

- Asked in: 2075 Baisakh, 2+4 marks; 2071 Bhadra, 8 marks (asked 2 times)
- Video: [Programming Modal of 8085 | Register Model of 8085 | Types of registers in 8085 Microprocessor](https://www.youtube.com/watch?v=0Au-C0zIuMM) — Engineering Funda
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/microprocessor/8085-programming-model
- Whole chapter: https://www.bctengineer.com/md/semester_4/microprocessor/chapter-2

## Question

Explain briefly the programmer's model (programming model) of 8085 microprocessor and explain each unit.

## Short answer

The programmer's model includes the accumulator, flag register, six general-purpose registers (B,C,D,E,H,L) usable as BC, DE, HL pairs, PC, and SP. The accumulator is the primary operand register, HL serves as a memory pointer, and PC/SP manage instruction sequencing and stack.

## Answer

The **programmer's (programming) model** shows the registers of the 8085 that a programmer can use or must know about, ignoring internal hardware like the ALU and decoder.

```text
 8-bit registers                  16-bit registers
 +-----------+-----------+        +---------------------+
 | A (Acc)   |  Flags    |        |  Stack Pointer (SP) |
 +-----------+-----------+        +---------------------+
 |    B      |    C      |        |  Program Counter(PC)|
 +-----------+-----------+        +---------------------+
 |    D      |    E      |
 +-----------+-----------+        Flags: S Z - AC - P - CY
 |    H      |    L      |
 +-----------+-----------+
```

#### Units
1. **Accumulator (A)**: an 8-bit register that holds one operand and receives the result of arithmetic and logic operations. All I/O data transfers (IN, OUT) go through A.
2. **General purpose registers (B, C, D, E, H, L)**: six 8-bit registers used for temporary data storage. They can be used as pairs BC, DE, HL for 16-bit data; HL also acts as a memory pointer, and the memory location addressed by HL is called pseudo-register **M**.
3. **Flag register**: holds the five flags S, Z, AC, P, CY (the remaining 3 bits are unused), showing the result status.
4. **Program Counter (PC)**: 16-bit register that stores the memory address of the next instruction to be fetched. It is incremented automatically after each fetch, and changed by jump, call and return.
5. **Stack Pointer (SP)**: 16-bit register that points to the top of the stack (a LIFO area in RAM). Used by PUSH, POP, CALL, RET. It is decremented on push and incremented on pop.
6. **Temporary registers W and Z** (not accessible to programmer) are used internally for instructions like CALL and XCHG.

The 16-bit PC and SP give a 64 KB memory space (0000H to FFFFH).

## Check yourself

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

1. Which statement about the accumulator (A) in the 8085 programmer's model is correct?
   A. It is a 16-bit register that holds the address of the next instruction
   B. It holds one operand and receives the result of arithmetic/logic operations, and all IN/OUT transfers go through it
   C. It is used only to store the flags after an arithmetic operation
   D. It can be paired with B to form a 16-bit register pair AB
   Answer: B. A is an 8-bit register that supplies one operand to the ALU and receives the result; IN and OUT always transfer data through A. (Key point: Accumulator holds an operand and the ALU result; all IN/OUT go through A)

2. In the 8085, what is the pseudo-register M?
   A. A hidden 8-bit register inside the ALU
   B. The memory location whose address is in the stack pointer
   C. The memory location whose address is held in the HL pair
   D. Another name for the temporary registers W and Z
   Answer: C. HL acts as a memory pointer, and the memory location addressed by HL is referred to as M (as in MOV A,M). (Key point: HL pair acts as memory pointer; M is the location addressed by HL)

3. What do the 16-bit registers PC and SP hold?
   A. PC holds the address of the next instruction to fetch; SP holds the address of the top of the stack
   B. PC holds the current opcode; SP holds the size of the stack
   C. PC holds the address of the top of the stack; SP holds the address of the next instruction
   D. Both hold 16-bit data used by arithmetic instructions
   Answer: A. PC stores the address of the next instruction and is incremented after each fetch; SP points to the top of the LIFO stack in RAM. (Key point: PC holds the address of the next instruction; SP points to the stack top)

4. How many flags does the 8085 flag register contain?
   A. 8 flags, one per bit
   B. 4 flags: S, Z, P, CY
   C. 6 flags: S, Z, AC, P, CY, OV
   D. 5 flags: S, Z, AC, P, CY, with 3 bits unused
   Answer: D. The 8-bit flag register uses five bits for S, Z, AC, P and CY; the other three bits are unused. (Key point: Flag register has 5 flags (S, Z, AC, P, CY); 3 bits unused)

## Related in Microprocessor

- [8086 architecture and programmer registers](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3A8086-architecture-registers) — Microprocessor, chapter 3
- [Internal architecture of 8085](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3A8085-architecture) — Microprocessor, chapter 2, asked 3×
- [8085 flags and their effect](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3A8085-flags-effect) — Microprocessor, chapter 2, asked 3×
- [Features and addressing modes of 8085](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3A8085-features-addressing-modes) — Microprocessor, chapter 2
- [Characteristics and signals of 8085](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3A8085-characteristics-signals) — Microprocessor, chapter 2
- [Important pin signals of 8085](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3A8085-important-pin-signals) — Microprocessor, chapter 2

## Related in other subjects

- [12-bit DAC with 8085](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Adac12-with-8085) — Instrumentation II, chapter 4, asked 2×
- [Memory-mapped I/O design for 8085](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Amemmapped-io-design-1000h) — Instrumentation II, chapter 2
- [Interfacing: 512-byte RAM with 8085](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Arag-ram-512-interface) — Instrumentation II, chapter 2
- [8-channel ADC interface with 8255 and 8085](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Aadc8-8255-problem) — Instrumentation II, chapter 4
