Hi, Out of interest, is the wakeup attribute meaningless if the function is specified as naked?
I know, I could check this myself by inspecting the compiled assembler but thought I'd ask 1st as others may be interested in the answer ;) Thanks Luke -----Original Message----- From: Mark Stokes [mailto:m.sto...@ieee.org] Sent: Tuesday, 25 February 2003 5:08 AM To: mspgcc-users@lists.sourceforge.net Subject: RE: [Mspgcc-users] assembler interrupts You can do it in C... The compiler will do nothing automatically (because of the naked property), so you can do whatever you want w/ the registers in __asm__ statements. And the vector table is set. Check section "6. Interrupt API" here: http://mspgcc.sourceforge.net/doc_intro.html Here's a quick example asm statement that will add two numbers together (in BCD math): In this case, there are two globals: unsigned long int var1, inc1; __attribute__((naked)) interrupt (BASICTIMER_VECTOR) wakeup BasicTimerIRQ(void) { __asm__( "CLRC \n\t" "DADD.W %A1, %A0 \n\t" "DADD.W %B1, %B0 \n\t" : "=m" (var1) : "m" (inc1) ); __asm__( "reti" ); } -Mark -----Original Message----- From: mspgcc-users-ad...@lists.sourceforge.net [mailto:mspgcc-users-ad...@lists.sourceforge.net] Sent: Monday, February 24, 2003 3:44 PM To: mspgcc-users@lists.sourceforge.net Subject: [Mspgcc-users] assembler interrupts How can I specify that an assembler function is a particular interrupt handler. In other words, how to I set the vector table entry in assembler. I would like to make a timer A interrupt handler in assembly. I have done it in C, but need more control over the exact register usage. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users ____ This communication contains information which is confidential and the copyright of Nautronix. If you are not the intended recipient of this communication please delete and destroy all copies and advise Nautronix immediately. If you are the intended recipient of this communication you should not copy, disclose or distribute this communication without the prior authority of Nautronix. Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of Nautronix. Except as required at law, Nautronix does not represent, warrant and/or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.