예제 #1
0
void SERIAL_Init()
	{
	char sname[] = "COMx";
	// iterate through first 4 com ports and the rest (COM5-9)
	for (Bitu i = 0; i < 9; i++)
		{
		sname[3] = '1' + i;
		dosdevices[i] = new device_PRT(sname, ConfGetString(sname));
		DOS_AddDevice(dosdevices[i]);
		if (i < 4)
			serialPorts[i] = new CSerial(i, dosdevices[i]);
		}
	BIOS_SetComPorts((Bit16u*)serial_baseaddr);
	}
예제 #2
0
void PARALLEL_Init ()
	{
//	Section_prop *section = static_cast <Section_prop*>(sec);
	char pname[] = "LPTx";
	// iterate through first 3 lpt ports and the rest (LPT4-9)
	for (Bitu i = 0; i < 9; i++)
		{
		pname[3] = '1' + i;
		dosdevices[i] = new device_PRT(pname, ConfGetString(pname));
		DOS_AddDevice(dosdevices[i]);
		if (i < 3)
			parallelPorts[i] = new CParallel(i, dosdevices[i]);
		}
	}