1 | ROM_HI:C34D _CAN0_receive: ; DATA XREF: USER_VEC:FFB2↓o
|
2 | ROM_HI:C34D leas -3,sp ; Load effective address into SP
|
3 | ROM_HI:C34F brset byte_FSR_3161,#0x10,loc_ROM_HI_C386 ; Ignore remote frames (RTR Bit set)
|
4 | ROM_HI:C354 ldab CAN0IDAC ; load "MSCAN Identifier Acceptance Control Register" into B
|
5 | ROM_HI:C357 andb #7 ; mask out by bits found at 0x0007
|
6 | ROM_HI:C359 stab 2,sp ; push B to stack index 2
|
7 | ROM_HI:C35B ldd #3 ; load D (A,B) from 0x0003 ...
|
8 | ROM_HI:C35E std 0,sp ; ... and push to stack
|
9 | ROM_HI:C360
|
10 | ROM_HI:C360 loc_ROM_HI_C360: ; CODE XREF: _CAN0_receive+28↓j
|
11 | ROM_HI:C360 ldd 0,sp ; D = SP[0]
|
12 | ROM_HI:C362 lsld ; D = D * 2
|
13 | ROM_HI:C363 tfr d,y ; Y = D
|
14 | ROM_HI:C365 ldd CAN0RXFG ; D = [CAN-ID]
|
15 | ROM_HI:C368 andb #0xF8 ; D:0-7 (=B) AND 0b1111 1000
|
16 | ROM_HI:C36A cpd -0x3B7,y ; Compare D to memory (16-bit)
|
17 | ROM_HI:C36E beq loc_ROM_HI_C377 ; Branch if equal
|
18 | ROM_HI:C370 ldy 0,sp ; Load Y
|
19 | ROM_HI:C372 dey ; Decrement Y
|
20 | ROM_HI:C373 sty 0,sp ; SP[0] = SP[0] - 1
|
21 | ROM_HI:C375 bge loc_ROM_HI_C360 ; while A >= 0
|
22 | ROM_HI:C377
|
23 | ROM_HI:C377 loc_ROM_HI_C377: ; CODE XREF: _CAN0_receive+21↑j
|
24 | ROM_HI:C377 ldy 0,sp ; Load Y
|
25 | ROM_HI:C379 blt loc_ROM_HI_C386 ; if a < 0
|
26 | ROM_HI:C37B ldab -0x3AF,y ; Load B
|
27 | ROM_HI:C37F clra ; Clear A
|
28 | ROM_HI:C380 std 0,sp ; Store D
|
29 | ROM_HI:C382 call sub_ROM_HI_C38E,#3 ; Call subroutine in expanded memory
|
30 | ROM_HI:C386
|
31 | ROM_HI:C386 loc_ROM_HI_C386: ; CODE XREF: _CAN0_receive+2↑j
|
32 | ROM_HI:C386 ; _CAN0_receive+2C↑j
|
33 | ROM_HI:C386 ldab #1 ; Load B
|
34 | ROM_HI:C388 stab CAN0RFLG ; ACK received CAN-Message (load next from buffer)
|
35 | ROM_HI:C38B leas 3,sp ; restore stack
|
36 | ROM_HI:C38D rti ; Return from interrupt
|
37 | ROM_HI:C38D ; End of function _CAN0_receive
|