All, My 2 cents worth. I think NO assembly language is CRUEL. It's all what you are comfortable with. Or how fast or easily you can climb the learning curve. Any new language or skill that you learn has it's difficulties and it's easy and simple to learn parts. Assembly language is no exception. If you need to, or want to, work with a part that you haven't worked with before, you have to learn the particular aspects of that part. And that may include assembly language. And in my opinion, reagrdless of what part you are using, you should have at least a working knowledge of assembly language for that part, even if you plan to do all you programming in a HLL. I do all of my programming for the PIC in assembly, unless the person I'm programming for asks for another language. Again, in my opinion, most HLL's for the PIC don't make a lot of sense to me. If they work for you, by all means use them. But for me, I just don't think they save me that much time. No, I'm not a PIC whiz or a computer genius. It just that assembly is what I'm comfortable with. And I had very little difficulty climbing the learning curve. The very first project I ever did with a PIC worked right out off the bat when powered up. That was early 1991, and I've been working primarily with PIC's ever since. And in all that time, assembly has been my language of choice. I've tried BASIC, C, PASCAL, evean JAL, and I alsways come back to assembly. With that said, I'll back down off the soapbox now, and let you all get on with your discussion. Regards, Jim >> Hmm. That depends on whether you want to include the >> principals of assembly language or not. ARM assembly >> language is just ... cruel, I think. > > I teach both PIC asm and ARM asm classes and if I had to pick the one > that is cruel I would not hesitate one moment, and it would not be ARM! > >> (someone on a yahoo ARM >> group pointed out that what would have been a MOVLW-like >> instruction on most processors became one MOVLW-like >> instructions and two ADDLW-like instructions when compiled >> from C. > > But there is no law that you'd have to do the same when writing your > own asm code! > > The reason is that ARM instructions are all 32 bit, so you can't load a > 32 bit constant in one instruction. But comparing to a PIC MOVLW: you > can load an 8-bit value in a single ARM instruction. Loading a 32 bit > value can be done with an assembler pseudo-instruction, in gcc it would > be: > > load r0, =123456 > > The effect is that 123456 is stored in code memory somewhere 'near' to > this instruction, and the instyruction becomes a pc-relative indirect > load. Compilers avoid this type of instruction, probably because they > might not be able to find a suitable 'near' location. > >> It makes sense given the architecture, but... Eww! > > no, it makes sense for a compiler. > > Wouter van Ooijen > > -- ------------------------------------------- > Van Ooijen Technische Informatica: www.voti.nl > consultancy, development, PICmicro products > docent Hogeschool van Utrecht: www.voti.nl/hvu > > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist