---
title: "RST instructions in 8085"
subject: "Microprocessor"
chapter: 2
key: "semester_4/microprocessor:rst-instructions"
source: https://www.bctengineer.com/q/semester_4/microprocessor/rst-instructions
site: BCT Engineering
---

# RST instructions in 8085

Microprocessor · Chapter 2: Programming with 8085 Microprocessor

- Asked in: 2075 Baisakh, 4 marks
- Video: [Restart Instructions In 8085 Microprocessor](https://www.youtube.com/watch?v=3-GZ7C2siEg) — Dr. Dhiman (Learn the art of problem solving) 
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/microprocessor/rst-instructions
- Whole chapter: https://www.bctengineer.com/md/semester_4/microprocessor/chapter-2

## Question

Explain the operations and uses of RST instructions in 8085.

## Short answer

RST n (n=0-7) is a 1-byte call to fixed address 8×n. It pushes return address onto the stack and loads PC with the vector. Uses include software interrupts, responding to INTR by placing opcode on bus, and fast routine calls.

## Answer

**RST n** (Restart, n = 0 to 7) is a 1-byte CALL instruction to a fixed address. When executed, the CPU pushes the current PC (address of the next instruction) onto the stack and loads PC with the vector address **8 x n**. Execution then continues at that address, and `RET` at the end of the routine returns to the main program. It takes 12 T-states (opcode fetch 6T + two memory writes).

| Instruction | Opcode | Vector address |
|---|---|---|
| RST 0 | C7 | 0000H |
| RST 1 | CF | 0008H |
| RST 2 | D7 | 0010H |
| RST 3 | DF | 0018H |
| RST 4 | E7 | 0020H |
| RST 5 | EF | 0028H |
| RST 6 | F7 | 0030H |
| RST 7 | FF | 0038H |

Opcode format: `11 NNN 111`, where NNN is the binary of n.

#### Operation (example RST 3)
```text
SP-1 <- PCH ;  SP-2 <- PCL ;  SP <- SP - 2
PC   <- 0018H
```
No flags are affected.

#### Uses
1. **Software interrupts**: a program can call a service routine with a 1-byte instruction, shorter than a 3-byte CALL (used for monitor/system calls and debugging breakpoints).
2. **Hardware interrupt response**: for the INTR interrupt, the external device puts an RST opcode on the data bus in response to INTA, and the CPU jumps to the matching vector. The 8085 also has internal restarts: TRAP = 0024H, RST 5.5 = 002CH, RST 6.5 = 0034H, RST 7.5 = 003CH.
3. **Fast access to frequently used routines** placed at the low addresses.

## Check yourself

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

1. To which address does RST 5 transfer control?
   A. 0005H
   B. 0028H
   C. 002CH
   D. 0050H
   Answer: B. The vector address is 8 x n, so RST 5 goes to 8 x 5 = 40 = 0028H. 002CH is the vector of the hardware interrupt RST 5.5, which is a different thing. (Key point: RST n jumps to the vector address 8 x n)

2. What does the CPU do when it executes RST 3?
   A. It resets all registers and starts again from 0000H
   B. It loads PC with 0018H without saving the return address
   C. It pops the return address from the stack and jumps to 0018H
   D. It pushes PC onto the stack, then loads PC with 0018H
   Answer: D. RST is a 1-byte CALL to a fixed address. PCH and PCL are pushed onto the stack, PC becomes 8 x 3 = 0018H, and RET at the end of the routine returns to the main program. (Key point: RST works like a 1-byte CALL: it pushes PC, then loads the vector)

3. Which of these is a correct use of RST instructions?
   A. Responding to INTR: the device puts an RST opcode on the bus during INTA
   B. Returning from a subroutine without using the stack
   C. Clearing the flag register before a program starts
   D. Disabling all interrupts, in the same way as DI
   Answer: A. For INTR, the interrupting device puts an RST opcode on the bus during INTA, which sends the CPU to the matching vector. RST is also used as a software interrupt because it takes only 1 byte, compared with 3 bytes for CALL. RST does not disable interrupts; that is what DI does. (Key point: With INTR, a device supplies an RST opcode in response to INTA)

## Related in Microprocessor

- [Classification of 8085 instructions](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3A8085-instruction-classification) — Microprocessor, chapter 2
- [8085 flags and their effect](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3A8085-flags-effect) — Microprocessor, chapter 2, asked 3×
- [Uses of ALE, IO/M, READY, RD pins](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3A8085-pin-uses-ale-iom) — Microprocessor, chapter 2
