Expp 10
Expp 10
Expp 10
Date:
Ex. No: 10
Aim:
Program:
i. ALP to perform Addition
AREA ARMex, CODE, READONLY
; Name this block of code ARMex
ENTRY ; Mark first instruction to execute
main
LDR R1, =0x00001133
LDR R2, =0x00001111
ADD R3, R1,R2
;MOV R1, #0x33 ;R1 = 33
;MOV R2, #0x11 ;R2 = 11
;ADD R3, R1, R2 ;/* R3 = R1 + R2 */
HERE
B HERE ;/* End loop */
END ;/* End of file */
ii. ALP to perform Subtraction
AREA ARMex, CODE, READONLY
; Name this block of code ARMex
ENTRY ; Mark first instruction to execute
main
;/* Write your assembly language code starting after this line. */
MOV R1, #0x44
MOV R2, #0x11
SUB R3, R1, R2 ;/* R2 = R1 - R2 */
;/* Finish your assembly language code before this line. */
HERE
B HERE ;/* End loop */
Register No:________________________
18BMC304J-Laboratory
Register No:________________________
18BMC304J-Laboratory
Register No:________________________
18BMC304J-Laboratory
Result:
Thus, the assembly language program to generate sawtooth waveform using the 8051
microcontroller was written and executed successfully.
Register No:________________________