1
0
mirror of https://github.com/aap/pdp6.git synced 2026-02-07 17:01:50 +00:00

emu: implemented Data Control (untested)

This commit is contained in:
aap
2017-10-10 21:29:30 +02:00
parent 74e046d2ae
commit a47c3c2bd4
7 changed files with 285 additions and 8 deletions

View File

@@ -38,6 +38,9 @@ reset(int fd)
struct timespec slp = { 0, 1000*1000*1000 / BAUD };
//#define SLEEP nanosleep(&slp, NULL)
#define SLEEP
void
readwrite(int ttyin, int ttyout, int ptyin, int ptyout)
{
@@ -63,7 +66,7 @@ readwrite(int ttyin, int ttyout, int ptyin, int ptyout)
return;
else{
write(ttyout, &c, 1);
nanosleep(&slp, NULL);
SLEEP;
}
}
/* read from tty, write to pty */
@@ -74,7 +77,7 @@ readwrite(int ttyin, int ttyout, int ptyin, int ptyout)
if(c == 035)
return;
write(ptyout, &c, 1);
nanosleep(&slp, NULL);
SLEEP;
}
}
}