4.B. PROGRAMMING A MICROPROCESSOR

 

 
























…Its through the language and culture that a society breaths..


.. to understand the world of microprocessors and to communicate with them one must know their language and model…

 

The figure above shows the programming model of 8085 microprocessor. 

 

LANGUAGE OF A MICROPROCESSOR:

Microprocessor cannot understand a program written in Assembly language.A program known

as Assembler is used to convert a Assembly language program to machine language.

 

Another general concept is that of an addressing mode. We have seen three addressing modes so far. They are:

1. Data Register Direct. The operand is in a register.

e.g., MOVE D0,D1 ;both operands

2. Immediate Data. The operand appears in the instruction.

e.g., MOVE #1,D1 ;left operand only

3. Absolute. The memory address of the operand appears in the instruction.

e.g., MOVE 1000,2000 ;both operands

 

INSTRUCTION SET

The instruction set consists of 74 operation codes and 246 Instructions.The instructions can be 

classified as

1.Data Transfer (Copy)

MOV-Move the contents of specified registers

OUT/IN -Copy between Input/Output Port and Accumulator

 

2.Arithmetic

ADD-Add contents of specified register  to Accumulator

SUB-Subtract a 8-bit number from Accumulator

ADI-Add a 8-bit number  to  accumulator

SUI-Subtract a 8-bit number from accumulator

INC-increment the contents of specified Register  by 1

DCR-decrement the contents of specified Register  by 1

3.Logical and Bit manipulation

          AND two 8-bit numbers

          OR two 8-bit numbers

          Exclusive-OR two 8-bit numbers

          Compare two 8-bit numbers

          Complement

          Rotate Left/Right Accumulator bits

4.Branch

          Jumps

              •Conditional jumps

              •Unconditional jumps

          Call & Return

               •Conditional Call & Return

               •Unconditional Call & Return

 

5.Machine Control

 

   HLT  Stop program execution

   NOP  Do not perform any operation

 

 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s