Tue Oct 25 2005 01:03, Alex Mogilnikov wrote to Yuriy K:
AM>>> üÔÏ ÆÉÇÎÑ, ÐÒÉ ÐÏÑ×ÌÅÎÉÉ ÎÏ×ÏÊ ÍÏÄÉÆÉËÁÃÉÉ ÐÒÏÃÅÓÓÏÒÁ × ÔÏÍ AM>>> ÖÅ ÓÅÍÅÊÓÔ×Å ÐÒÉÄÅÔÓÑ ÍÏÄÉÆÉÃÉÒÏ×ÁÔØ ËÏÍÐÉÌÑÔÏÒ ÞÔÏÂÙ ÎÁÐÒÉÍÅÒ AM>>> ÄÏÂÁ×ÉÔØ ÐÏÄÄÅÒÖËÕ ÎÏ×ÏÇÏ ×ÅËÔÏÒÁ ÉÌÉ ÉÓËÌÀÞÅÎÉÑ.
YK>> úÁÞÅÍ? 8-0. åÓÌÉ ÍÅÈÁÎÉÚÍ ÏÂÒÁÂÏÔËÉ ÎÅ ÐÏÍÅÎÑÌÓÑ, ÔÏ ÄÏÂÁ×ÌÑÅÔÓÑ YK>> ÏÐÒÅÄÅÌÅÎÉÅ ÎÏ×ÏÇÏ ×ÅËÔÏÒÁ × ÈÉÄÅÒÅ É ×ÓÅ.
AM> HÁÐÒÉÍÅÒ Õ ARM äÌÑ ÒÁÚÎÙÈ ÉÓËÌÀÞÅÎÉÊ ÎÕÖÎÙ ÒÁÚÎÙÅ ËÏÍÁÎÄÙ ×ÏÚ×ÒÁÔÁ. AM> ÷ÏÚ×ÒÁÔ ÉÚ ÏÂÙÞÎÏÊ ÆÕÎËÃÉÉ - mov pc,lr, ×ÏÚ×ÒÁÔ ÉÚ swi - movs pc,lr, AM> ×ÏÚ×ÒÁÔ ÉÚ irq - subs pc,lr,#4, ×ÏÚ×ÒÁÔ ÉÚ data abort - subs pc,lr,#8. AM> óÅÊÞÁÓ ÐÏÓÍÏÔÒÅÌ - gcc ÄÌÑ ÆÕÎËÃÉÊ Ó ÁÔÒÉÂÕÔÏÍ interrupt ÄÅÌÁÅÔ ×ÏÚ×ÒÁÔ AM> ÞÅÒÅÚ subs pc,lr,#4. úÎÁÞÉÔ ÏÂÒÁÂÏÔÞÉË swi Ñ ÔÁËÉÍ ÏÂÒÁÚÏÍ ÓÄÅÌÁÔØ ÕÖÅ ÎÅ AM> ÓÍÏÇÕ, É ÓÐÅÃÉÁÌØÎÏÇÏ ÁÔÒÉÂÕÔÁ ÎÁ ÜÔÏÔ ÓÌÕÞÁÊ Ñ × ÄÏËÅ ÎÅ ×ÉÄÅÌ.
óÔÒÁÎÎÏ ÜÔÏ ... (ÔÒÅÈÍÉÎÕÔÎÏÅ ÛÕÒÛÁÎÉÅ ÇÕÇÌÅÍ) ... ×ÓÅ ÔÁÍ ÅÓÔØ.
formatting link
interrupt Use this attribute on the ARM, ... indicate that the specified function is an interrupt handler. The compiler will generate function entry and exit sequences suitable for use in an interrupt handler when this attribute is present.
Note, for the ARM, you can specify the kind of interrupt to be handled by adding an optional parameter to the interrupt attribute like this:
void f () __attribute__ ((interrupt ("IRQ"))); Permissible values for this parameter are: IRQ, FIQ, SWI, ABORT and UNDEF.
YK>> interrupt [INTVEC_START + 0x62] void TC6_interrupt(void);
AM> äÁ, ÔÏÞÎÏ. ÷ÉÄÅÌ Ñ ÔÁËÕÀ ËÏÎÓÔÕÒËÃÉÀ. ëÏÍÐÉÌÑÔÏÒ ÓÁÍ ÇÅÎÅÒÉÔ ËÏÍÁÎÄÕ AM> jmp ÐÏ ÕËÁÚÁÎÎÏÍÕ ÁÄÒÅÓÕ.
:-)))) HÅÔ ÔÁÍ ÉÎÓÔÒÕËÃÉÉ jmp, ÔÁÍ ÐÒÏÓÔÏ Ä×Á ÂÁÊÔÁ ÁÄÒÅÓÁ.
WBR, Yuriy.