6Fermer8
GoldenCrystalLe 26/08/2003 à 16:18
Bon, si on prends la fonction __gray_int1_handler_hw2:
__gray_int1_handler_hw2:
	move.w   %sr,-(%a7)                | save content of status register on stack
	move.w   #0x2700,%sr               | disable ALL interrupts (no one should
	                                   | interrupt us ...)
	movem.l  %d0-%d7/%a0-%a6,-(%a7)

---- traîtement de l'interruption ---
__gray_to_oldint:
	movem.l  (%a7)+,%d0-%d7/%a0-%a6
	move.w   (%a7)+,%sr                 | restore content of status register
    |--------------------------------------------------------------------------
    |  JUMP to previous installed interrupt handler
    |--------------------------------------------------------------------------
	.word    0x4ef9                     | opcode of "JMP address" instruction
__gray_old_int1_hw2:
	.long    0x00000000


et dans __gray_int_handler on peut voir ça:
move.l 0x64,(__gray_old_int1_hw2 - __gray_int1_handler_hw2,%a0)
ça initialise __gray_old_int1_hw2 pour que la routine de l'interruption fasse un saut direct à l'ancienne routine d'interruption.