1 ; /**
2 ; * @file c64x.s
3 ; *
4 ; * @breif
5 ; * Assembly functions for c64x compatible devices
6 ; */
8 .text
10 ; ********************************************************************************
11 ; * Provide a rough delay, in CPU cycles.
12 ; * On Entry:
13 ; * A4 = number of cycles to delay
14 ; ********************************************************************************
15 .def _chipDelay32
16 _chipDelay32:
18 ZERO .L2 B4
19 SHRU .S1 A4,3,A0
20 CMPLTU .L2X B4,A4,B0
21 [!A0] BNOP .S1 cend, 5
23 [!B0] BNOP .S1 cend, 3
24 MVKL .S1 1,A5
25 MVKH .S1 1,A5
28 dosub:
29 SUB .L1 A0,A5,A0
30 NOP 2
31 [A0] BNOP .S1 dosub,5
35 cend:
36 RETNOP.S2 B3, 5