Implement FLUSH in the output handlers.
This commit is contained in:
parent
88af6a29d2
commit
d7333e4479
|
@ -91,7 +91,11 @@ static void tock_tlp_output (Workspace wptr) {
|
||||||
case 0: {
|
case 0: {
|
||||||
uint8_t ch;
|
uint8_t ch;
|
||||||
ChanIn (wptr, in, &ch, sizeof ch);
|
ChanIn (wptr, in, &ch, sizeof ch);
|
||||||
|
if (ch == 255) { // FLUSH
|
||||||
|
fflush (out);
|
||||||
|
} else {
|
||||||
ExternalCallN (fputc, 2, ch, out);
|
ExternalCallN (fputc, 2, ch, out);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#USE "course"
|
||||||
|
|
||||||
PROC main (CHAN OF BYTE in, out)
|
PROC main (CHAN OF BYTE in, out)
|
||||||
BOOL running:
|
BOOL running:
|
||||||
SEQ
|
SEQ
|
||||||
|
@ -13,4 +15,5 @@ PROC main (CHAN OF BYTE in, out)
|
||||||
out ! b - ('a' - 'A')
|
out ! b - ('a' - 'A')
|
||||||
TRUE
|
TRUE
|
||||||
out ! b
|
out ! b
|
||||||
|
out ! FLUSH
|
||||||
:
|
:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user