Re: PIC vs ARM assembler (no flamewar please)
- From: "Didi" <dp@xxxxxxxxxxx>
- Date: 15 Feb 2007 06:05:15 -0800
From my own experience, the 68k (i.e., ColdFire) ISA is the nicest I
have used. It has the right mixture between a reasonable number of
registers (enough to be useful, but few enough that you can keep track
of them in your head), fast orthogonal instructions, and convenient
addressing modes - you don't have to use half a dozen instructions just
to read data from an array.
I would second that, perhaps including the CPU32 addressing modes (all
68020 modes except the memory indirect ones).
The PPC takes a lot of getting used to, and
suffers from the problems of any pure RISC architecture.
Any RISC assembly language I know of is too inconvenient
to be used alone.
This is why I made up VPA, which includes the CPU32 instruction
set (and generates PPC native code).
But things can get better than in the 68k assembly.
For example, consider move.w to some register. It affects
only the lower word; pretty often we have to do
a clr first so we have a word operand zero extended,
or do a sign extend after the move to have it sign extended.
So except having a move.w having a movez.w and movex.w,
which do the above in one go, is pretty convenient, I seem
to use these no less than the plain "move" nowadays.
More than that, a movez.w- or movex.w- translates to
a single PPC opcode (lhz or lha etc.). There are
more of the kind, when I have to do plain CPU32 now
I feel it, well, not like a pain, but I certainly do
miss the fullblown VPA. And having some more registers
at your disposal is also nice, although not such
a huge difference, like you mentioned, 16 is about right
for the way our brains work (but having soe more
than 16 registers on the target CPU is crucial, e.g.
I use r4-r7 to emulate the addressing modes etc).
d0-a7 are r8-r23).
Dimiter
(I have posted before some references to my VPA, still
at http://tgi-sci.com/vpaex/ )
------------------------------------------------------
Dimiter Popoff Transgalactic Instruments
http://www.tgi-sci.com
------------------------------------------------------
On Feb 15, 1:40 pm, David Brown <d...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
ucad...@xxxxxxxxx wrote:
Had a discussion with a _hardware_ guy (as in transistors and OP-amps)
about "powerful" micros.
He his a PIC guy and claimed that PIC have a very nice instruction set
and is a pleasure to work with in assembly. He also mentioned the he
There are those that think being handcuffed to a bed and whipped is a
"pleasure" - no accounting for taste.
would rather use a d*** instead of an ARM7 because ARM7 is very hard
The d*** core is totally unrelated to the PIC proper, and is apparently
bearable to work with at the assembly level.
The ARM instruction set is not particularly nice for assembler
programming. It is hard to write good, tight code unless you are
particularly dedicated, and even then it takes a lot of thinking about.
The conditional execution instructions and orthogonal architecture are
well suited to compiler-generated code.
From my own experience, the 68k (i.e., ColdFire) ISA is the nicest I
have used. It has the right mixture between a reasonable number of
registers (enough to be useful, but few enough that you can keep track
of them in your head), fast orthogonal instructions, and convenient
addressing modes - you don't have to use half a dozen instructions just
to read data from an array. The msp430 is about as good as it gets for
16-bit cpus, for the same reasons. The AVR is not bad for an
eight-bitter, although they made a couple of terrible design decisions
regarding C compatibility. The PPC takes a lot of getting used to, and
suffers from the problems of any pure RISC architecture. It also makes
it clear that the acronym parses as (RI)SC, not R(IS)C.
.
- References:
- PIC vs ARM assembler (no flamewar please)
- From: ucadv07
- Re: PIC vs ARM assembler (no flamewar please)
- From: David Brown
- PIC vs ARM assembler (no flamewar please)
- Prev by Date: Re: Embedded board
- Next by Date: Setting the RESET vector on a 68HC11A0
- Previous by thread: Re: PIC vs ARM assembler (no flamewar please)
- Next by thread: Re: PIC vs ARM assembler (no flamewar please)
- Index(es):