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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/30/03 16:22
Read: times


 
#51713 - RE: risc and cisc, to Peter - II
Responding to: ???'s previous message
Hi Peter,

Long time no see(:-)

OK, DJNZ is one and only instruction that is not what counts, this does not affect the matter.

>You can also easy build a 16 bit counter loop on the
>8051 with only 2 instructions:

label:

djnz r1, label
djnz r0, label

That's not good, there is not, so say, the linearity, f.e. what's happend with delay if (r1,r0)=(0x00,0xFF) and then (r1,r0)=(0x01,0x00).

In your previous post you said "thus assembler programming on RISC was more akward, since more to write" and gave us your examples for 8051 and AVR MC.

Let's see another example. Suppose, we want to shift 32-bit value in registers r3,r2,r1,r0 what is very usefull for mathematical operations (multiply, divide).

AVR fragment:

lsl r0
rol r1
rol r2
rol r3 (takes 4 lines, and 8 bytes)

8051 fragment:

clr c
mov a,r0
rlc a
mov r0,a
mov a,r1
rlc a
mov r1,a
mov a,r2
rlc a
mov r2,a
mov a,r3
rlc a
mov r3,a (takes 13 lines, and 13 bytes)

What is akward, what is not...

I enumerate more tasks:

1) loading the values into registers that is usefull for mathematical operations too.

2) comparing the signed values in registers and making decision

3) moving the big buffer (256+ bytes) in XRAM.

AVR'll quid in always.

Regards,
George


List of 22 messages in thread
TopicAuthorDate
risc and cisc            01/01/70 00:00      
   RE: risc and cisc            01/01/70 00:00      
      RE: risc and cisc            01/01/70 00:00      
         RE: risc and cisc            01/01/70 00:00      
            RE: risc and cisc            01/01/70 00:00      
         RE: risc and cisc            01/01/70 00:00      
            RE: risc and cisc            01/01/70 00:00      
            RE: risc and cisc, to Peter            01/01/70 00:00      
               RE: risc and cisc, to George            01/01/70 00:00      
                  RE: risc and cisc, to Erik            01/01/70 00:00      
                     RE: risc and cisc, to Erik            01/01/70 00:00      
                        RE: risc and cisc, to Erik            01/01/70 00:00      
                           RE: risc and cisc, to George            01/01/70 00:00      
               RE: risc and cisc, to Peter            01/01/70 00:00      
                  RE: risc and cisc, to Peter - II            01/01/70 00:00      
                     RE: risc and cisc, to Peter - II            01/01/70 00:00      
                        RE: risc and cisc, to Peter - II            01/01/70 00:00      
                           RE: risc and cisc, to Peter - II            01/01/70 00:00      
                     RE: risc and cisc, to Peter - II            01/01/70 00:00      
   RE: risc and cisc            01/01/70 00:00      
   RE: WGASA            01/01/70 00:00      
      RE: WGASA            01/01/70 00:00      

Back to Subject List