/[projet1]/users/dbug/tests/IrqBenchmark/profiler/profile_test.s
Defence Force logotype

Contents of /users/dbug/tests/IrqBenchmark/profiler/profile_test.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 938 - (show annotations)
Sun Jun 9 19:22:25 2013 UTC (6 years, 11 months ago) by coco
File size: 625 byte(s)


1
2 #define PROFILER_ASM
3 #include "profile.h"
4
5 ;
6 ; Test routines for the profiler
7 ;
8
9 .dsb 256-(*&255)
10
11 ; Wait 20000 cycles -> 21593
12 _Test_20000
13 .(
14 ; (1525+4)*11+1=16820
15 ldy #12
16 outer_loop
17 ; 6*254+1=1525
18 ldx #255
19 inner_loop
20 nop ; 2
21 dex ; 2
22 bne inner_loop ; 2/3
23
24 dey ; 2
25 bne outer_loop ; 2/3
26
27 rts
28 .)
29
30
31
32 _TestAsm
33 .(
34 PROFILE_ENTER(ROUTINE_ASM)
35
36 ; (1525+4)*11+1=16820
37 ldy #12
38 outer_loop
39 ; 6*254+1=1525
40 ldx #255
41 inner_loop
42 nop ; 2
43 dex ; 2
44 bne inner_loop ; 2/3
45
46 dey ; 2
47 bne outer_loop ; 2/3
48
49 PROFILE_LEAVE(ROUTINE_ASM)
50
51 rts
52 .)

  ViewVC Help
Powered by ViewVC 1.1.26