Instruction formats-microprocessor, Assembly Language

Assignment Help:

Instruction Formats

A machine language instruction format has 1 or more number of fields linked with it. The first field is known as operation code field or op code field, which show the type of the operation to be performed by the CPU. The instruction format also has other fields known as operand fields. The CPU executes the instruction by using the information which reside in these fields.

There are 6 general formats of instructions in 8086 instruction set. The length of an instruction can vary from one byte to six bytes. The instruction formats are given as following:

1) One byte Instruction:  This format is just one byte long and can have theregister operands or  implied data . The least significant 3-bits of the op code are referring for specifying the register operand, if any. Or else all the 8-bits form an opcode and the operands are implied.

2) Register  to Register: This format is 2 bytes long. The first byte of the code indicatethe operation code and width of the operand indicated by w bit. The second byte of the code indicate the register operands and R/M field, as given below.

2261_instruction1.jpg

The register represented  by the REG field is 1 of the operands.  The R/M field indicate  another register or memory location, for example. the other operand.

3) Register to/from Memory with no Displacement:  This format is 2 bytes long and same as the register to register format except for the MOD field as shown.

460_instruction2.jpg

The MOD field indicates the mode of addressing. The R/M, MOD,REG and the W fields are decided inTable 3.2.

4) Register  to/from  Memory  with Displacement:  This type of instruction  format have  one or two extra bytes for displacement along with 2-byte the format of the register to/from memory without displacement. The format is given.

2109_instruction3.jpg

5) Immediate Operand to Register: In this format, the first byte and the 3-bits from the second byte which are utilized for REG field in case of register to register format are utilized for opcode. It also has one or two bytes of immediate data. The complete instruction format is as given below.

360_instruction4.jpg

6) Immediate Operand to Memory with 16-bit Displacement:  This type of instruction format requires 5 or 6 bytes for coding. The first 2 bytes have the information regardingMOD, OPCODE and R/M fields. The remaining 4 bytes have 2 bytes of displacement and 2 bytes of data as shown.

 

2472_instruction5.jpg


Related Discussions:- Instruction formats-microprocessor

Cmps-string manipulation instruction-microprocessor, CMPS : Compare String...

CMPS : Compare String Byte or String Word:-The CMPS instruction may be utilized to compare two strings of Words or byte. The length of the string ought to be stored in the CX. If

Assembly - Zombie Game using Irvine & Visual 2010, http://www.raritanval.ed...

http://www.raritanval.edu/uploadedFiles/faculty/cs/full-time/Brower/CISY256/2013Spring/CISY256%20Assembly%20Project.pdf

Port mapped or mapped input output, Port Mapped I/O or I/O Mapped I/O I...

Port Mapped I/O or I/O Mapped I/O I/O devices are mapped into a separate address space. This is generally accomplished by having a different set of signal lines to denote a mem

Program to add 8-bit series numbers-assembly language, Program: Write a pr...

Program: Write a program to perform addition of a series of 8-bit numbers. The series have 100 (numbers). Solution : In the first program, we have been implemented the add

Assembly Language Program, which uses BIOS interrupt INT 21 to read current...

which uses BIOS interrupt INT 21 to read current system time and displays it on the top-left corner of screen.

Not-logical instruction-microprocessor, NOT : Logical Invert: The NOT inst...

NOT : Logical Invert: The NOT instruction complements (inverts) the contents of an a memory location or operand register bit by bit. The instance are as following: Example :

#procedure, #Write a function to calculate the following arithmetic operati...

#Write a function to calculate the following arithmetic operation and return the result. A = 2 + (3x)3 + y/2n (x, y and n are arguments of the function where x is an integer in the

Third generation microprocessor, III rd Generation Microprocessor: T...

III rd Generation Microprocessor: The single 3rd generation microprocessor chip having 64-pins began with the introduction of 16-bit Intel 8086 in 1978. The other essential

Calculator, how to add 111 and 333 in assembly language

how to add 111 and 333 in assembly language

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd