Sum of 8-bit Numbers Stored in Memory Here we will discuss about 8051 programs but we can't discuss about all of the 8051 instructions. For programming 8051 we should know about assembler directives as well as instruction set. Click here to download Atmel c51 user guide that will discuss about 8051(c51 family microcontroller) instruction set, assembler directives, c51 cross assembler from Atmel. Program ORG 00H MOV R0,#50H ; get memory location in memory pointer R0 MOV R1,#51H ; get memory location on memory pointer register R1 MOV A,@R0 ; get content of memory location 50H to accumulator ADD A,@R1 ; add content of A with content of memory location 51H and store result in A MOV R0,#52H ; get 52H to memory pointer R0 MOV@R0,A ; copy content of A to memory location 52H END Add 16-bit Numbers ...
Comments
Post a Comment