Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/20/08 17:42
Read: times


 
Msg Score: -2
 -2 Looks like homework
#153741 - Registers and data movment.
Hi guys,

I have a 2 problems. This is my first problem which was easy and I have the answer.:

a) write a well -structured assembly language program for the 8051 microcontroller that will load memory locations 30h to 34h consecutive withimmediate data values 01h to 05h respectively.

the answer:

MOV SP,#256-32

MOV R1,#30H
MOV A,#01H
LOOP1:MOV @R1,A
INC A
INC R1
AJMP LOOP0

LOOP0: CJNE R1,#34H,LOOP1

MOV @R1,A

END


The second question is what I need:

b)The program will then read back the data values stored in these memory locations to perform a running total of the contents of the five locationsand store the total result in the next consecutive memory location.


Can someone help me donig question " b " please? any ideas are welcomed.

Thanks alot,

Jes



...replace this with your code...


List of 18 messages in thread
TopicAuthorDate
Registers and data movment.            01/01/70 00:00      
   ...replace this with your code...            01/01/70 00:00      
      IDEA            01/01/70 00:00      
         Any idea...            01/01/70 00:00      
            I bet if your instructor knew about this...            01/01/70 00:00      
               Too bad ...            01/01/70 00:00      
                  In the UK...            01/01/70 00:00      
                     if they told ...            01/01/70 00:00      
   my CODE            01/01/70 00:00      
      Here iis a hint:            01/01/70 00:00      
      how is that ever going to stop ?            01/01/70 00:00      
   i'VE GOT THE CODE!!!!            01/01/70 00:00      
      Please use the insert code button!            01/01/70 00:00      
         Is "well structured" code ...            01/01/70 00:00      
            comment            01/01/70 00:00      
               then, why don't you ?            01/01/70 00:00      
         Acall            01/01/70 00:00      
            Acall???            01/01/70 00:00      

Back to Subject List