I ordered some samples from freescale of various HC08s. They shipped same day, arrived today (2nd day) fedex. I was very impressed with service so far, but don't have any experience with motorola chips. One question: 1.) Is there a de-facto preferred assembler (think mpasm) for these? I've so far been very unsuccessful locating anything of that quality. The GCC bin-utils is so far the top candidate I've found, but the command line assembly can be a real PITA. Thanks guys, Robert B. -------------------------------------------- Robert B. email: robertb@nerdulator.net ----- Original Message ----- From: "Olin Lathrop" To: "Microcontroller discussion list - Public." Sent: Friday, November 12, 2004 3:02 PM Subject: Re: [PIC:] Getting started with PIC's > Wouter van Ooijen wrote: > > One good reason: It is very difficult (I would say inpossible) in asm > > libraries to use the few RAM locations in a PIC efficiently. Most asm > > porograms simply assign a unique location to what is in effect a local > > variable. A good HLL compiler will use a static-stack approach which > > re-uses the RAM locations. Been there, tried that, wrote a compiler > > instead. > > I get around this in a different way that in my opinion works very well. > The vast majority of time, the only variables defined in the code are for > persistant state. I define a set of "general registers" in global (non > banked) RAM when avaialable. By default, subroutine are expected to > preserve these except when they are explicitly returning values in them. On > subroutine entry, the general registers that the subroutine will trash are > pushed onto a software stack, and then restored right before returning. > These general registers are then used as local scratch inside the > subroutine, which is useful since they are fast and usually bank-independent > to access. > > All this is made very easy by the the GLBSUB (GLoBal SUBroutine) and > LEAVEREST (LEAVE and RESTore) macros in STD.INS.ASPIC at > http://www.embedinc.com/pic. The registers to save are listed once on the > GLBSUB line, and the same set is automatically restored by LEAVEREST. I > have used this scheme over many PIC projects, and found it to be very handy > and efficient of RAM. > > > ***************************************************************** > Embed Inc, embedded system specialists in Littleton Massachusetts > (978) 742-9014, http://www.embedinc.com > _______________________________________________ > 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