[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] CRAZY idea
- Subject: [ale] CRAZY idea
- From: ChrisF at computone.com (Chris Fowler)
- Date: Tue, 5 Jun 2001 07:49:59 -0400
I'm reading the ALE arhives of someone wanting to use a PS/1 as a serial terminal that only supported parallel ports.?? The suggestion made to them was to use PLIP how about this.
// PTERMINALD.C
Open(master pty)
Open(slave pty)
Open(/dev/lp0)
fork()
// Child
close(master)
set_term(slave);
dup2(slave ,0)
dup2(slave ,1)
dup2(slave, 2)
execl("/sbin/mingetty", "/sbin/mingetty", 0);
//Parent
Select(lp0 + Master)
If(master)
?????????????? write(lp0)
if(slave)
?????????????? write(master)
loop forver
// PTERMINALC.C
open("/dev/lp0")
setterm(0)
select(0 + lp0)
if(lp0)
?????????????? write(1)
if(0)
?????????????? write(lp0)
The above is just my form of pseudo code.?? Will it work??? What is the minimal amount of pins do I need in order to make it happen?
Thanks,
Chris Fowler