Skip to main content

MVI Instruction in 8085 - Move Immediate Data into Registers

Introduction

Need to load a specific value directly into a register? That’s where MVI (Move Immediate) comes in! Unlike MOV, which transfers data between registers, MVI allows you to assign a fixed value directly to a register or memory location.

In this guide, we’ll break down how MVI works, explore its execution at the pin level, and provide hands-on examples so you can see it in action!

Syntax & Operand Details

Mnemonic: MVI
Operands: Destination, 8-bit Data
Syntax: MVI D, XX

  • D = Destination Register (where data is loaded)

  • XX = 8-bit Immediate Data

Addressing Modes

MVI uses immediate addressing mode, meaning data is directly provided in the instruction.

Hex Code Representation

Instruction

Opcode

Example

MVI A, 32H

3E 32

Loads 32H into A

MVI B, 45H

06 45

Loads 45H into B

MVI C, FFH

0E FF

Loads FFH into C

MVI D, 10H

16 10

Loads 10H into D

MVI E, 77H

1E 77

Loads 77H into E

MVI H, 2AH

26 2A

Loads 2AH into H

MVI L, 99H

2E 99

Loads 99H into L

Execution & Pin-Level Breakdown (T-Cycle Analysis)

T-Cycle Breakdown:

T-State

Operation

Affected Pins

T1

Fetch opcode

AD0-AD7 (Multiplexed Address/Data)

T2

Fetch immediate data

AD0-AD7 (Data Transfer)

T3

Load data into register

Control signals (ALE, WR)

Example with Step-by-Step Execution

Example: Load 45H into Register B

MVI B, 45H  ; Load 45H into register B

Step-by-Step Execution:

  1. The processor fetches the instruction opcode (06).

  2. The next byte (45H) is fetched and stored in register B.

  3. Register B now holds 45H.

Try It in Live 8085 Simulator! 


Popular posts from this blog

Live 8085 Simulator Tutorial Welcome to the  Live 8085 Simulator , the most comprehensive mobile app for learning and simulating Intel 8085 Assembly Language Programming. Whether you’re a student, hobbyist, or educator, this app is designed to give you hands-on experience with 8085 programming and peripheral interfacing, all on your phone. 📱  Getting Started   Download & Install  Get the app from the  Google Play Store . Home Screen Overview Once you launch the app, you’ll find options to: Write 8085 Assembly Code Load Example Programs Run Simulations Writing Your First Program Step 1: Open the Code Editor Tap on   New Program Type your 8085 Assembly code directly. Step 2: Assemble Tap the    Run  button. Check for any syntax errors highlighted in the editor. Step 3: Run Tap  Run  to execute the program. Use  Run or   Step to control execution.