# `rst`

[Z80 Documentation](https://asm-editor.specy.app/documentation/z80.md) › [Instructions](https://asm-editor.specy.app/documentation/z80/instruction.md)

Web page: https://asm-editor.specy.app/documentation/z80/instruction/rst

**Restart**

Category: Control flow

Pushes the return address onto the stack and jumps to a fixed address from 00h to 38h in steps of 8.

1 byte · 11 cycles

## Flags

| Flag | Effect |
| --- | --- |
| S | not changed |
| Z | not changed |
| H | not changed |
| P/V | not changed |
| N | not changed |
| C | not changed |

## Forms

- `rst 00` · The current PC value plus one is pushed onto the stack, then is loaded with 0.

- `rst 08` · The current PC value plus one is pushed onto the stack, then is loaded with 8.

- `rst 10` · The current PC value plus one is pushed onto the stack, then is loaded with 16.

- `rst 18` · The current PC value plus one is pushed onto the stack, then is loaded with 24.

- `rst 20` · The current PC value plus one is pushed onto the stack, then is loaded with 32.

- `rst 28` · The current PC value plus one is pushed onto the stack, then is loaded with 40.

- `rst 30` · The current PC value plus one is pushed onto the stack, then is loaded with 48.

- `rst 38` · The current PC value plus one is pushed onto the stack, then is loaded with 56.

## Example

```z80
        .org 0x0000
        ret             ; the handler that `rst 00` jumps to
        .org 0x8000
start:  rst 00          ; a one byte call to 0x0000
        halt
        end start       ; without this the program would start at the handler
```
