Embedded System Lab M. Grace Mercy Asst. Professor Dept. of EECE, GST, GITAM gmatta@gitam.edu 9866073634 Experiment No.5 Block Transfer and Sum of first n-numbers 5a. Aim: To write an ALP to transfer the data from source to destination. Apparatus required: 1. LPC 2148 microcontroller trainer kit 2. Keil uvision software 3. Personal computer 4. Debugger 5. Connecting cables AREA PROG, CODE, READONLY ENTRY START LDR R0,=source LDR R1,=destination MOV R2,#5 UP LDR R3,[R0], #04 STR R3,[R1], #04 SUB R2,R2,#1 CMP R2,#0 BNE UP HERE B HERE source DCD 9, 1, 8, 2, 7 AREA Mydata, DATA, READWRITE destination DCD 0 ALIGN END Source Address of Memory location 0x000000024 0x000000028 0x00000002C 0x000000030 0x000000034 Data 09 00 00 00 01 00 00 00 08 00 00 00 02 00 00 00 07 00 00 00 Destination Address of Memory location 0x40000000 0x40000004 0x40000008 0x4000000C 0x40000010 Data 09 00 00 00 01 00 00 00 08 00 00 00 02 00 00 00 07 00 00 00 5b. Aim: To write an ALP to find the sum of first 10 numbers AREA PROG,CODE,READONLY MOV R1,#10 MOV R2,#0 LOOP ADD R2,R2,R1 SUBS R1,#01 BNE LOOP HERE B HERE END Result: