Microcontroller 8051 Assembly Language
#1

Microcontroller 8051 Assembly Language

Addressing Modes
Register
Direct
Register Indirect
Immediate
Relative
Absolute
Long
Indexed
Direct Addressing Mode
Although the entire of 128 bytes of RAM can be accessed using direct addressing mode, it is most often used to access RAM loc. 30 – 7FH.

MOV R0, 40H
MOV 56H, A
MOV A, 4 ; ≡ MOV A, R4
MOV 6, 2 ; copy R2 to R6
; MOV R6,R2 is invalid !
Register Indirect Addressing Mode
In this mode, register is used as a pointer to the data.

MOV A,@Ri ; move content of RAM loc. where address is held by Ri into A ( i=0 or 1 )

MOV @R1,B

In other word, the content of register R0 or R1 is sources or target in MOV, ADD and SUBB insructions.

Immediate Addressing Mode
MOV A,#65H

MOV R6,#65H

MOV DPTR,#2343H

MOV P1,#65H
Relative, Absolute, & Long Addressing
Used only with jump and call instructions:

SJMP

ACALL,AJMP

LCALL,LJMP
Indexed Addressing Mode
This mode is widely used in accessing data elements of look-up table entries located in the program (code) space ROM at the 8051

MOVC A,@A+DPTR
(A,@A+PC)
A= content of address A +DPTR from ROM
Note:
Because the data elements are stored in the program (code ) space ROM of the 8051, it uses the instruction MOVC instead of MOV. The “C” means code.
Some Simple Instructions
MOV dest,source ; dest = source

MOV A,#72H ;A=72H
MOV R4,#62H ;R4=62H
MOV B,0F9H ;B=the content of F9’th byte of RAM

MOV DPTR,#7634H
MOV DPL,#34H
MOV DPH,#76H

MOV P1,A ;mov A to port 1

Note 1:
MOV A,#72H ≠ MOV A,72H
After instruction “MOV A,72H ” the content of 72’th byte of RAM will replace in Accumulator.

Note 2:
MOV A,R3 ≡ MOV A,3
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: tmb co th loc es, databank jupiteroverseas com loc es, standardboiler com loc es, explanation of the traffic light signal assembly language program using 8051, processsystem com loc es**n car black box, need a program for 8051 microcontroller in assembly language for a two way traffic light, assembly language programming 89c51,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  Interfacing of 8051 with displays seminar paper 1 1,378 28-03-2014, 07:05 PM
Last Post: Guest
  DYNAMIC LANGUAGE seminar addict 2 1,984 03-01-2013, 12:30 PM
Last Post: seminar details
  Microprocessor Microcontroller and Programming Basics seminar addict 1 2,247 03-12-2012, 12:57 PM
Last Post: seminar details
  PROPELLER LED DISPLAY USING 8051 project uploader 1 3,899 28-11-2012, 11:55 AM
Last Post: seminar details
  8051 Microcontroller Kit User manual seminar paper 1 1,819 06-11-2012, 01:20 PM
Last Post: seminar details
  Development of Power Factor Controller using PIC Microcontroller seminar paper 2 2,162 02-11-2012, 04:43 PM
Last Post: seminar details
  APLICATION OF ARM-MICROCONTROLLER seminar details 0 1,659 08-06-2012, 04:52 PM
Last Post: seminar details
  MICROCONTROLLER PPT seminar details 0 1,651 08-06-2012, 01:47 PM
Last Post: seminar details
  8051 Tutorial seminar details 0 836 08-06-2012, 01:44 PM
Last Post: seminar details
  C++ Language Tutorial seminar paper 0 2,040 16-03-2012, 12:11 PM
Last Post: seminar paper

Forum Jump: