'MPLAB macro problems.'
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:
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.
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 Olsson, MORGANS REGLERTEKNIK, Sweden, ph: +46 (0)414 70741; fax 70331
> 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,
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
More... (looser matching)
- Last day of these posts
- In 1998
, 1999 only
- New search...