Searching \ for 'MPLAB macro problems.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/languages.htm?key=mplab
Search entire site for: 'MPLAB macro problems.'.

Truncated match.
PICList Thread
'MPLAB macro problems.'
1998\01\26@174133 by Morgan Olsson

picon face
As You've probably understood from my letter flood on macros,
I fancy macros a lot.

One problem only: MPLAB don«t...

Maybe someone can help ease my headache:
------
Problem one:
The only way I found to watch the simulator stepping thru the code is to
enable all assebler to list in the .lst file and open it before simulating.
(and maybe closing other .asm windows to avoid them popping up) It works,
but is messy.
------
Problen two:
When I misspell in a macro invocation, the error file points out the macro
definition instead.  Since I use the macros maybe more than hundred times
(yes!) in a program it is a headache to find the mis-spell.
------

(
I dont like the long cryptic kyrillic mnemonics Microchip have chosen
(This RISC has longer mnemonics than most CISC !!)  

So, I redefined almost every mnemonic to more readable, using macros, like
st (store) ll(load literal) ifs(if bit set do next), and on top of that I
make complicated macros based on them...  

Yes, I have had headaches when I misspelled something, but now I can read
my own programs... 8)
)

Anyone can help?
Or is there a better assembler and simulator?
Thanks a lot in advance
/Morgan

Morgan Olsson, MORGANS REGLERTEKNIK, Sweden, ph: +46 (0)414 70741; fax 70331
============================================================================

1998\01\27@122438 by Bob Shaver

flavicon
face
> (
>  I dont like the long cryptic kyrillic mnemonics Microchip have chosen
> (This RISC has longer mnemonics than most CISC !!)
>
> So, I redefined almost every mnemonic to more readable, using macros,
like
{Quote hidden}

Yes, either learn the native assembly or program in "C".  As painful as it
may be (at first), using macros to enhance(?) readability of every mnemonic
gives you readability in the short term at the expense of potential bugs,
difficulty finding errors, maintenance problems in the future.  It took me
a long time to get used to the PIC instructions, specially the "bit test
and skip" instructions.  This in spite of the fact that I had spent 4 years
programming DSP chips with even stranger instructions.  There are several
"C" compilers that allow you to write "C" code that is as efficient as
assembly code (within a few program words).  Now you can write "if"
statements that any programmer can read (do you want to maintain your code
forever??). And....the compiler will catch most spelling errors.  What a
deal.  You can also run MPSIM and in-circuit emulators debugging at the "C"
statement level or at the assembly level.  I think this qualifies as a
better simulator.

Bob.

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...