Differences between interrupt service routine (ISR) and a subroutine

Hi

What are the differences between ISR and a subroutine in embedded systems, how about the following:

- interrupts are disabled by the microprocessor prior to calling the isr

- isr's are always smaller

- an isr cannot be written in C

- a subroutine always has arguments

- the CPU flags are stored on the stack in addition to the return address

Thanks

Reply to
2005
Loading thread data ...

Not always true.

not true

definitely just wrong

nope

Depends on the CPU

No problem

Reply to
James Beck

Sounds like a homework question, you want somebody else to answer for you.

Hint see if you can find a difference between interupts and functions on NON embedded systems.

Well I suggest you go back and read the book again, as these appear to be badly copied from a text book.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
 Click to see the full signature
Reply to
Paul Carpenter

Stick it up your ass, cheat.

pete

--
pete@fenelon.com "he just stuck to buying beer and pointing at other stuff"
Reply to
Pete Fenelon

It's the same in embedded systems as in every other system: an ISR is called by the processor after it has received a hardware signal, whereas a subroutine is called by software.

--=20 Fredrik =D6stman

Reply to
Fredrik :Ostman

This sounds like homework ?....

The key difference is that an isr must always store the processor status on entry, then restore it on exit. A subrouting function call doesn't necessarily need to. Both save the current program counter on entry and restore on exit

To get an idea why, look at something like the 68000 programmers reference manual - it's in pdf on the Freescale website. Chapter 5, exception processing...

Chris

Reply to
ChrisQuayle

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.