On Mon, Sep 13, 2010 at 9:27 AM, Mike Harrison wrote= : > On Mon, 13 Sep 2010 06:56:29 -0700, you wrote: > >>Quoting Olin Lathrop : >> >>> ... >>> really don't understand the reluctance to use assembly when required. >> >>Not a reluctance, but a consideration (and hence investigation) to try >>C instead, yet be able to handle some low-level comms. =A0The thought of >>C came up because I'd need to do a considerable amount of >>floating-point math, and I'm also considering Atmel chips (which >>really touts C as being able to do everything). >> >>I'm now reminded of eevblog where he discussed assembly-language >>programmers. :) >> >>Cheers, >>-Neil. > > In practice, once you get used to a compiler, you can write fiddly code a= nd have a pretty good idea > what code it's going to generate. You can always look at the generated co= de to check it's doing what > you think it should. > > Inline assembler or seperate assembler modules are also not a problem to = do, however you may have > some constrints imposed by the way the compiler uses memory or registers.= Most MCU compilers' > documentation gives a reasonable amount of info on the constraints, calli= ng conventions =A0etc. when > mixing C and assembler. > I suggest the OP take the compiler's assembly output and use it as the starting point for his inline assembly. Regards, Mark markrages@gmail --=20 Mark Rages, Engineer Midwest Telecine LLC markrages@midwesttelecine.com --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .