clkint:	moveml	#0xC0C0,sp@-	| save registers that C clobbers
|
| Restart the clock first.  This must be
| done at spl7()
|
CLKADDR=0x1d001
CLOAD=0x30
CREAD=0x30
CLATCH=0
CSELECT0=0
CFUDGE=30
	movw sr,d0
	movw #0x2700,sr
	lea CLKADDR,a0		| VALID handy clock pointer

	movb #CLATCH+CSELECT0,a0@(6)
16+3	movb #CREAD+CSELECT0,a0@(6)
8+1	movb a0@,d1
22+1	rorw #8,d1
8+1	movb a0@,d1
22+1	rorw #8,d1
8+2	addw #1000000/HZ-CFUDGE,d1
16+3	movb #CLOAD+CSELECT0,a0@(6)	| VALID set mode register
8+1	movb d1,a0@
22+1	rorw #8,d1
8+1	movb d1,a0@
	movw d0,sr
|
| If we came from user mode then don't
| do any kernel profiling.
|
	movw sp@(16),d0		| get the interrupt SR to test user mode
	btst #13,d0
	jeq clkintu		| were in user mode
