[Oberon] PO2013 - SD Image Tool
Tomas Kral
thomas.kral at email.cz
Thu May 21 12:19:42 CEST 2020
On Thu, 21 May 2020 12:11:57 +0200
Tomas Kral <thomas.kral at email.cz> wrote:
> This is what troubles me. With Oberon0 commands producing some longer
> output, ORC times out before reading pending data.
MODULE ORC
CONST Tout = 1000;
PROCEDURE RecByte(VAR ch: CHAR);
VAR T: LONGINT; ch0: CHAR;
BEGIN T := Oberon.Time() + Tout;
REPEAT UNTIL (V24.Available(portno) > 0) OR (Oberon.Time() >= T);
END RecByte;
PROCEDURE SR*;
(*receive input*)
REPEAT RecByte(xch);
IF xch = 0X THEN Texts.WriteString(W, " timeout"); Flush
END SR;
--
Tomas Kral <thomas.kral at email.cz>
More information about the Oberon
mailing list