]> git.sesse.net Git - pistorm/blob - a314/a314device/int_server.asm
Merge pull request #25 from paulofduarte/wip-crap
[pistorm] / a314 / a314device / int_server.asm
1         XDEF    _IntServer
2         CODE
3
4 SIGB_INT        equ     14
5 SIGF_INT        equ     (1 << SIGB_INT)
6
7                 ; a1 points to interrupt_data
8 _IntServer:     move.l  4(a1),a5        ; interrupt_data.ca
9
10                 move.b  0(a5),d0        ; A_EVENTS
11                 and.b   1(a5),d0        ; A_ENABLE
12                 beq.s   should_not_signal
13
14                 move.b  #0,1(a5)
15
16                 move.l  $4.w,a6
17                 move.l  #SIGF_INT,d0
18                 move.l  0(a1),a1        ; interrupt_data.task
19                 jsr     -324(a6)        ; Signal()
20
21 should_not_signal:
22                 moveq   #0,d0
23                 rts