source: rtems/c/src/lib/libbsp/i960/cvme961/timer/timerisr.s @ 11290355

4.104.114.84.95
Last change on this file since 11290355 was ac7d5ef0, checked in by Joel Sherrill <joel.sherrill@…>, on 05/11/95 at 17:39:37

Initial revision

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*  timer_isr()
2 *
3 *  This routine initializes the Z8536 timer on the SQSIO4 SQUALL
4 *  board for the CVME961 board.  The timer is setup to provide a
5 *  tick every 0x10000 / 2 milliseconds.  This is used to time
6 *  executing code.
7 *
8 *  Input parameters:  NONE
9 *
10 *  Output parameters:  NONE
11 *
12 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
13 *  On-Line Applications Research Corporation (OAR).
14 *  All rights assigned to U.S. Government, 1994.
15 *
16 *  This material may be reproduced by or for the U.S. Government pursuant
17 *  to the copyright license under the clause at DFARS 252.227-7013.  This
18 *  notice must appear in all copies of this file and its derivatives.
19 *
20 *  $Id$
21 */
22
23#include "asm.h"
24
25.set PORT_A,     0xc00000a8                 # port A
26.set PORT_B,     0xc00000a4                 # port B
27.set PORT_C,     0xc00000a0                 # port C
28.set CTL_PORT,   0xc00000ac                 # control port
29
30.set T1CSR,      0x0a                       # T1 command/status reg
31.set RELOAD,     0x24                       # clr IP & IUS,allow countdown
32
33        PUBLIC(_timerisr)
34SYM (_timerisr):
35        #ldconst   1,r4
36        #modpc     0,r4,r4               # enable tracing
37
38        ld      _Ttimer_val,r6           # r6 = test timer
39
40        ldconst T1CSR,r4                 # r4 = T1 control status reg
41        stob    r4,CTL_PORT              # select T1CSR
42        ldconst RELOAD,r5                # r5 = reset value
43        stob    r5,CTL_PORT              # reset countdown
44        addo    1,r6,r6
45        st      r6,_Ttimer_val           # increment test timer
46loop_til_cleared:
47        clrbit 4,sf0,sf0
48        bbs    4,sf0,loop_til_cleared
49leaf:   ret
50
51        .leafproc _flush_reg, flush_reg.lf
52        .globl    _flush_reg, flush_reg.lf
53_flush_reg:
54        lda     leaf,g14                 # g14 = exit address
55flush_reg.lf:
56        flushreg
57        mov     g14,g0                   # g0 = exit address
58        ldconst 0,g14                    # set g14 for non-leaf
59        bx      (g0)
Note: See TracBrowser for help on using the repository browser.