Docsity

Assembly to Machine: MOV Instruction and Addressing Modes, Lecture notes of Microprocessors

Partial preview of the text

Download Assembly to Machine: MOV Instruction and Addressing Modes and more Lecture notes Microprocessors in PDF only on Docsity!

CONVERTING

ASSEMBLY

LANGUAGE TO

MACHINE LANGUAGE

And Vice

Versa

Introduction: MOV Instruction

MOV destination, source

This instruction copies the contents of source into destination

  • 2 operand format

Next… different addressing modes using the MOV instruction……….

Addressing Modes: Summary

Addressing Modes: Summary

Instruction Format: Another variation

Opcode field (6 bits) specifies the operation (add, subtract, move)

Register Direction Bit (D bit) Tells the register operand in REG field in byte 2 is source or

destination operand

0: source 1: destination Data Size Bit (W bit)

Specifies whether the operation will be performed on

0: 8 bits 1: 16 bits

Instruction Format ctd…

REG Encoding:

R/M field

Register/memory (R/M) Field Encoding

Examples ctd…

■ MOV BL, AL = 10001000 11000011 = 88 C3h

■ADD AX, [SI] = 00000011 00000100 = 03 04 h

■ ADD [BX] [DI] + 1234h, AX = 00000001 10000001 __ __ h = 01 81 34 12 h

■ MOV DH, [BX+DI+20H]

■ MOV [BP], DL

■ MOV AX, [2000H]

■ CONVERT TO ASSEMBLY LANGUAGE

■ 8BECH

■ 8B9E004CH

■ 8A3E3420H