On Thu, 15 Feb 2007 12:12:13 +0000, Pete Fenelon <pete@fenelon.com> wrote:>David Brown <david@westcontrol.removethisbit.com> wrote: >> to read data from an array. The msp430 is about as good as it gets for >> 16-bit cpus, for the same reasons. > >Essentially PDP-11 rethought ;) ><snip>Not as an improvement, in my opinion. Jon
PIC vs ARM assembler (no flamewar please)
Started by ●February 14, 2007
Reply by ●February 15, 20072007-02-15
Reply by ●February 15, 20072007-02-15
On Thu, 15 Feb 2007 18:39:57 +1000, The Real Andy <therealandy@nospam.com> wrote:>On 14 Feb 2007 15:18:52 -0800, ucadv07@gmail.com wrote: > ><snip> > >If you have worked with an instructions set for some time, and you >know it well, then it is going to be easy. However, this does not make >it better. Chances are the first instuction set you learn will be the >best, until you actually learn the next. After learning half a dozen, >they are all the same, they are instruction sets. Each has its good, >and each has its bad.Agreed. What counts are support by the manufacturer, its peripherals and I/O specs, number of I/O, its price, its power consumption, its voltage range, its general performance, good brown out detection if present, clocking options, packaging and size, software tools, etc. In other words, the instruction sets peculiarities are way down on my list. In fact, I usually will only glance at them in making a decision, just to be sure there is good documentation on it and that the ALU and memory transfer speeds are roughly in the right ballpark -- but not the instruction set's esthetic appeal. I pretty much like them all and feel comfortable with anything from a 2- or 4- bit wide bit-slice, 46-bit 2k word mercury delay line contraption, on up to some 1024-bit VLIW. I like them all and enjoy working with them. So I agree and enjoy most instruction sets, taking them each on their own terms. The PIC12/PIC16 are beautiful in their way because they expose ALU design in clear fashion -- the bare bones. And that has its appeal. The PDP11 is very attractive from its orthogonal and expansive support for addressing modes and its well tailored instructions. I enjoy getting into the 'mindset' of most any instruction set design. Jon
Reply by ●February 15, 20072007-02-15
On 2007-02-15, Jonathan Kirwan <jkirwan@easystreet.com> wrote:> On Thu, 15 Feb 2007 12:12:13 +0000, Pete Fenelon <pete@fenelon.com> > wrote: > >>David Brown <david@westcontrol.removethisbit.com> wrote:>>> to read data from an array. The msp430 is about as good as it >>> gets for 16-bit cpus, for the same reasons. >> >>Essentially PDP-11 rethought ;) >><snip> > > Not as an improvement, in my opinion.The MSP430 instruction set isn't as regular as the PDP-11: the MSP430 gave up a couple important addressing modes presumably as a tradeoff for more registers. I think they should have tried harder to include destination addressing modes like register-indirect and register-indrect with autoincrement. Not having register indrecect (possibly with auto incrment) available for the destination makes a lot of common C-language-pointer stuff more expensive that it ought to be. Still, ISA-wise, the MSP430 is miles ahead of things like the 8051, 8086, PIC, AVR, and the like. -- Grant Edwards grante Yow! .. my NOSE is NUMB! at visi.com
Reply by ●February 15, 20072007-02-15
"Roberto Waltman" <usenet@rwaltman.net> wrote in message news:0549t2d5rtfa0gfuetv1vcot14g0hnu6e1@4ax.com...> ucadv07@gmail.com wrote:> Back to the assembly question: I do not work in assembler, period. > The embedded projects I have been involved with the past few years > were based on medium to high end x86 / PowerPC / ARM9 / C2000 / C6000 > CPUs, all running mostly C/C++ code. > I am not claiming this is the way it should be in any conceivable > situation, but I believe it reflects what embedded development is for > many, (if not most,) people today. > > The few lines of assembly were in initialization code after power up, > a few inline statements to enable/disable interrupts, etc. I do not > expect this to change in the future.Much of startup and special instructions can nowadays be done in C using intrinsics, so there is rarely an excuse for using assembler.> Being "forced to code in assembly" to me means having to write a few > more code snippets like those. For this type of usage any assembler > is tolerable.Yes. Compilers, especially in the ARM world, are nowadays so good that very few assembly programmers can beat them. It's really only useful when you need to get that last 10% of performance in those rare loops where the loop optimizer doesn't do well enough and changing the source code or using intrinsics doesn't help either.> The instruction set of CPUs like the PowerPC and ARM is designed to > support efficient compilation of high level languages, it should come > as no surprise that hand-coding in assembler is not easy or > straightforward.Interestingly ARM was originally designed to be a good *assembler* target and in the first few years everything, including OSes, was written in pure assembler. Some of the features that make ARM assembler powerful make writing compilers more difficult. On balance it is simple enough that good compilers can be written and yet complex enough that you need few instructions to do a particular job (unlike other RISCs). Wilco
Reply by ●February 16, 20072007-02-16
Jonathan Kirwan wrote:> On Thu, 15 Feb 2007 12:12:13 +0000, Pete Fenelon <pete@fenelon.com> > wrote: > >> David Brown <david@westcontrol.removethisbit.com> wrote: >>> to read data from an array. The msp430 is about as good as it gets for >>> 16-bit cpus, for the same reasons. >> Essentially PDP-11 rethought ;) >> <snip> > > Not as an improvement, in my opinion. > > JonI remember that thread :-) The msp430 ISA is not perfect - some changes from the PDP-11 were improvements, some were clear tradeoffs for other reasons (smaller, faster or lower power design), and some changes were for the worse. But still, it is the nicest ISA available in a small, low power microcontroller at the moment.
Reply by ●February 16, 20072007-02-16
David Brown <david@westcontrol.removethisbit.com> wrote:> > The msp430 ISA is not perfect - some changes from the PDP-11 were > improvements, some were clear tradeoffs for other reasons (smaller, > faster or lower power design), and some changes were for the worse. But > still, it is the nicest ISA available in a small, low power > microcontroller at the moment.MSP430 also has the 'advantage' that what is included is the stuff that a C compiler tends to generate ;P It's a very nice 'baby micro'. If you want something even more PDP-11ish there's always the H8. pete -- pete@fenelon.com "it made about as much sense as a polythene sandwich"
Reply by ●February 16, 20072007-02-16
On Fri, 16 Feb 2007 09:22:51 +0000, Pete Fenelon <pete@fenelon.com> wrote:>David Brown <david@westcontrol.removethisbit.com> wrote: >> >> The msp430 ISA is not perfect - some changes from the PDP-11 were >> improvements, some were clear tradeoffs for other reasons (smaller, >> faster or lower power design), and some changes were for the worse. But >> still, it is the nicest ISA available in a small, low power >> microcontroller at the moment. > >MSP430 also has the 'advantage' that what is included is the stuff that >a C compiler tends to generate ;P > >It's a very nice 'baby micro'. If you want something even more PDP-11ish >there's always the H8.I like the H8. Jon
Reply by ●February 16, 20072007-02-16
On Fri, 16 Feb 2007 09:45:07 +0100, David Brown <david@westcontrol.removethisbit.com> wrote:>Jonathan Kirwan wrote: >> On Thu, 15 Feb 2007 12:12:13 +0000, Pete Fenelon <pete@fenelon.com> >> wrote: >> >>> David Brown <david@westcontrol.removethisbit.com> wrote: >>>> to read data from an array. The msp430 is about as good as it gets for >>>> 16-bit cpus, for the same reasons. >>> Essentially PDP-11 rethought ;) >>> <snip> >> >> Not as an improvement, in my opinion. >> >> Jon > >I remember that thread :-) > >The msp430 ISA is not perfect - some changes from the PDP-11 were >improvements, some were clear tradeoffs for other reasons (smaller, >faster or lower power design), and some changes were for the worse. But >still, it is the nicest ISA available in a small, low power >microcontroller at the moment.I hold my position that the resulting design shows less experience than it should have; from several different perspectives. Jon
Reply by ●February 16, 20072007-02-16
Jonathan Kirwan <jkirwan@easystreet.com> wrote:>>It's a very nice 'baby micro'. If you want something even more PDP-11ish >>there's always the H8. > > I like the H8. >It's a nice family. I did quite a lot of work on H8S, H8/Tiny (which I particularly like) and H8/300 a few years back and apart from Hitachi^H^H^H^H^H^H^H Renesas' tendency to move peripherals and IPRs around incompatibly they "just work" pretty well - good core with reasonable code density and nice interrupt handling, good peripherals, excellent timers, reasonable software tools. Very few big 'gotchas' when working with them. pete -- pete@fenelon.com "it made about as much sense as a polythene sandwich"
Reply by ●February 16, 20072007-02-16
On Fri, 16 Feb 2007 11:50:17 +0000, Pete Fenelon wrote:> It's a nice family. I did quite a lot of work on H8S, H8/Tiny (which I > particularly like) and H8/300 a few years back and apart from > Hitachi^H^H^H^H^H^H^H Renesas' tendency to move peripherals and > IPRs around incompatibly they "just work" pretty well - good core > with reasonable code density and nice interrupt handling, good > peripherals, excellent timers, reasonable software tools. Very few big > 'gotchas' when working with them.Looking at Renesas's recent advertising they seem to be pushing the R8C processors more than their H8 range - so not sure what will happen to H8. I think I read somewhere that essentially they will combine their two ranges to just one.