Quantcast
Channel: Keil Discussion Forum RSS Feed
Viewing all articles
Browse latest Browse all 3049

C51: Homework help

$
0
0
Question: Write a program to copy 10 bytes of data at ROM address 500H to RAM starting at location 40H. Start with creating a look-up table at a convenient location ORG 500H TABLE: DB 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ORG 40H START: MOV DPTR, #TABLE ;SOURCE POINTER MOV R1, #40H ;DESTINATION POINTER MOV R3, #10 ;COUNTER BACK: MOVC A, @A+DPTR ;GET A BYTE FROM THE SOURCE MOV @R1, A INC R1 INC DPTR DJNZ R3, BACK ;Does this 10 times END This is what I have but I have no i

Viewing all articles
Browse latest Browse all 3049

Trending Articles