¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: PIC interrupts


 

--- In Electronics_101@..., "Leon Heller"
<leon.heller@...> wrote:

----- Original Message -----
From: "rtstofer" <rstofer@...>
To: <Electronics_101@...>
Sent: Saturday, October 07, 2006 7:16 AM
Subject: [Electronics_101] Re: PIC interrupts





In the second case, the code is probably not portable. The Microchip
assembler include files contain the only correct definitions for the
various registers and bits.
He also used

goto $-1

Leon
--
Leon Heller, G1HSM
Suzuki SV1000S motorcycle
leon.heller@...

Yes... It was late and I was thinking about mentioning that but I
fell asleep first.

PC relative branches (as in '$ - 1') are highly problematic when
trying to port the code to a pipelined architecture such as one of the
ARM processors. It isn't going to work and will take a lot of time to
debug.

It also complicates adding or removing statements from the loop -
assuming the target is more than 1 instruction away.

That coding style is so bad that I cringe every time I see it.
Besides serving as a perfectly good bad example, it will set
programming and new users back about 40 years.


Richard

Join [email protected] to automatically receive all group messages.