#    Set up Interrupt Descriptor Table for PE=0, USE16.
#    To be INLINE in flow of control during setup

# This can be done in any modeoid, but the vectors are schmegments.


= $IDT16 to BP

	# L defaultallRMvectors
zero DI					# for DI = 0 to 127
L perRMIDTvector
	pushcore
	  = twitch16 to A		# install twitch to vector DI 		
          call installunP
	pullcore
        1+ DI
        -test 127 with DI
when    not	zero	short	perRMIDTvector

					#L RMdefaultallIRQs
= $firstIRQ to DI			# for DI = 0 to 127
L RMperIRQvector
	pushcore
	= IRQtwitch16 to A		# install IRQtwitch to vector DI
          call installunP
	pullcore
        1+ DI
        -test $((firstIRQ+0x10)) with DI
when    not     zero	short	RMperIRQvector


= 0x20 to DI
pushcore
= $IRQ0twitch16 to A
call installunP
pullcore


#setIDT $RMIDTpointer

