# softNMI is subordinate to NMIoff/on 


L NMIoff
        push A
        push D
        = 255 to A
        = 0x70 to D
        send byte
#Ralf
#        Note:   any write to PORT 0070h should be followed by an action to
 #                 PORT 0071h or the RTC wil be left in an unknown state.
        1+ D
        recieve byte            # may need a delay for the read to register
        pull D                  # as a read, I guess. Barf.
        pull A			# In which case this is ludicrous as a macro.
return



L NMIon              # no reg effects, needs a stack
        push A
        push D
        = $_IIIIIII to A
        = 0x70 to D
        send byte

        1+ D
        recieve byte
        pull D
        pull A
return



L EISAsoftNMIenable	# no reg effects
	push A
	push D
	= $______I_ to A
	= 0x461 to D
	send byte
	pull D
	pull A
return



L EISAsoftNMIenabled	# A ~= 0 when enabled. Then try a softNMI.
	push A		# ~ZF should = enabled on return. 
        push D		# Moves tend not to effect flags on x86.
	zero A
        = 0x461 to D
        recieve byte
	AND $______I_ with A
        pull D
        pull A
return


L nosurprises                   # no reg effects
        call NMIoff
        IRQsoff                 # was "nosurprises"
return


L surprises             # no reg effects
        call NMIon
        IRQson
return


