Ticker

6/recent/ticker-posts

Header Ads Widget


 

SIMPLE ASSEMBLY LANGUAGE PROGRAM





SIMPLE ASSEMBLY LANGUAGE PROGRAM


  • Add two 8 bit number 35H and 42H. Store the result on memory location 50H.
Program-
ORG 0000H
MOV A,#35H;..in accumulator A 35 value is store i.e.a=35H
ADD A,#42H;..add content of A with 42H
MOV 50H,A;..mov the result in location 50H
END




  • Write Assembly Language program to add two number which are store on internal memory location 32H, 33H. Store the result on memory location 34H
Program-
ORG 0000H
MOV A,32H
MOV R1,33H
ADD A,R1
MOV 34H,A
END

  • Subtract two 8 bit number 55H and 25H. Store the result on memory location 50H.
Program-
ORG 0000H
MOV A,#55H
SUB A,#25H
MOV 50H,A
END


  • Multiply two 8 bit number 5H and 2H. Store the result on memory location 45H.
Program-
ORG 0000H
MOV A,#5H
MOV B,#2H
MUL A,B
MOV 45H,A
END

  • Divide two 8 bit number 4H and 2H. Store the result on memory location 35H.
Program-
ORG 0000H
MOV A,#4H
MOV B,#2H
DIV A,B
MOV 35H,A
END


Post a Comment

0 Comments