Skip to main content

Addressing Modes in 8085

Addressing Modes in 8085
There are five addressing modes in 8085.

1. Immediate Addressing Mode: - An immediate is transferred directly to the register.

Eg: - MVI A, 30H (30H is copied into the register A)

          MVI B,40H(40H is copied into the register B).

2. Register Addressing Mode: - Data is copied from one register to another register.

Eg: - MOV B, A (the content of A is copied into the register B)

          MOV A, C (the content of C is copied into the register A).

3. Direct Addressing Mode: - Data is directly copied from the given address to the register.

Eg: - LDA 3000H (The content at the location 3000H is copied to the register A).

4. Indirect Addressing Mode: - The data is transferred from the address pointed by the data in a register to other register.

Eg: - MOV A, M (data is transferred from the memory location pointed by the regiser to the accumulator).

5.Implied Addressing Mode: - This mode doesn't require any operand. The data is specified by opcode itself.

Eg: - RAL
          CMP

Comments

Popular posts from this blog

C Program for Runge-Kutta-4 (RK-4) Method

Program for Runge-Kutta-4 (RK-4) Method #include <stdio.h> #include <conio.h> #include <math.h> float f(float x,float y) {   return ((y*y-x*x)/(y*y+x*x));   //y'=f(x,y)=equation } void main() {   float x0,y0,h,xn,yn;   printf("Enter x0 and y0: ");   scanf("%f%f",&x0,&y0); //y(x0)=y0   printf("Enter xn: ");   scanf("%f",&xn);   printf("Enter interval(h): ");   scanf("%f",&h);   do   {     float m1=f(x0,y0);     float m2=f(x0+h/2,y0+m1*h/2);     float m3=f(x0+h/2,y0+m2*h/2);     float m4=f(x0+h,y0+m3*h);     float m=(m1+2*m2+2*m3+m4)/6;     yn=y0+m*h;     //for next iteration         x0=x0+h;     y0=yn;   }while(x0<xn); printf("\n\nHence, y(%0.1f)=%0.4f",xn,yn); getch(); }