/* Not an official SSCI function, but how to reset RocketModems. ISA bus version  */
static void sModemReset(CONTROLLER_T *CtlP, int chan, int on)
/* Not an official SSCI function, but how to reset RocketModems. ISA bus version  */
static void sModemReset(CONTROLLER_T *CtlP, int chan, int on)
{
	ByteIO_t addr;
	Byte_t val;
	addr = CtlP->AiopIO[0] + 0x400;
	val = sInB(CtlP->MReg3IO);
	if ((val & 2) == 0) {
		val = sInB(CtlP->MReg2IO);
		sOutB(CtlP->MReg2IO, (val & 0xfc) | (1 & 0x03));
		sOutB(CtlP->MBaseIO, (unsigned char) (addr >> 6));
	}
	sEnAiop(CtlP, 1);
	if (!on)
		addr += 8;
	sOutB(addr + chan, 0);
	sDisAiop(CtlP, 1);
}