1 #include <aros/asmcall.h>
2 #include <exec/interrupts.h>
3 #include <hardware/intbits.h>
6 #include <proto/exec.h>
8 int __nocommandline
= 1;
10 static int counter
= 0;
12 AROS_UFH4(static ULONG
, vblank_handler
,
13 AROS_UFHA(APTR
, unused
, A0
),
14 AROS_UFHA(APTR
, mydata
, A1
),
15 AROS_UFHA(APTR
, self
, A5
),
16 AROS_UFHA(struct ExecBase
*, SysBase
, A6
))
27 static struct Interrupt vblank_int
=
29 .is_Code
= (APTR
)vblank_handler
34 AddIntServer(INTB_VERTB
, &vblank_int
);
36 while (!(CheckSignal(SIGBREAKF_CTRL_C
)))
38 Printf("\rVBlank counter: %lu ", counter
);
41 RemIntServer(INTB_VERTB
, &vblank_int
);
43 Printf("\nTerminated\n");