| Copyright 1984 by the Massachusetts Institute of Technology

| Routines to do the machine dependent timer stuff.

.insrt	"../../include/maclib.a68"
.insrt	"../../include/system.a68"

	.globl	mdt_init
	.globl	time_int

| Gets called during system initialization to do any setup that
| the timer code needs. This basicly means setting the interrupt vector
| to point to the interrupt handler.
mdt_init:
	movl	#mdt_int,#108:l		|load interrupt vector
	movb	#PCR:l,d0
	orb	#0x4,d0			|enable line clock
	movb	d0,#PCR:l
	rts

| The timer interrupt handler just pushes the registers and calls the C routine
| which handles the timer functions of the system.
mdt_int:
	save	A0!A1!A2!A3!A4!A5!A6!A7!D0!D1!D2!D3!D4!D5!D6!D7
	jsr	time_int
	restore
	rte
