[Oberon] Batch processing of Oberon commands
joerg.straube at iaeth.ch
Tue Jun 16 00:27:00 CEST 2020
For the open-ended commands 50 and 52 ORC.SR has a problem: If the sending side is fast and the receiving side is slow, the sender overflows the receiver buffer. Look at this:
ORC.SR 52 100 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ~
After reading the sector (100) and the nbr of bytes (20) Oberon0 calls "Kernel.GetSector". While the receiver does GetSector, the sender starts sending 1 2 3..
On RS232 @ 9600 baud, transmitting one byte takes ~1ms. I didn't check how long the system is busy with GetSector(), but probably longer than 1 ms. RS232R.v has no buffer to store received bytes. There are different possibilities to solve the issue
a) implement a buffer in RS232.v (eg 16 bytes)
b) implement a buffer in RS232.Mod by using interrupts.
c) sync the receiver with the sender with CTS (out-of-band HW flow control, Verilog has to be changed)
d) sync the receiver with the sender with XON (in-band SW flow control, RS232.Mod has to be changed)
Most probably d) is easiest.
Am 13.06.20, 15:07 schrieb "Oberon im Auftrag von Andreas Pirklbauer" <oberon-bounces at lists.inf.ethz.ch im Auftrag von andreas_pirklbauer at yahoo.com>:
> The SR code allows to send several commands to the other side (WHILE) before switching to the receive mode (REPEAT).
The intended use case is that the WHILE loop sends only one command at a time, with or without parameters, for example:
ORC.SR 101 ~ # clear the file directory on the target system
ORC.SR 12 "*.Mod" ~ # list files on the target system matching the specified prefix
ORC.SR 21 Edit ~ # unload a module on the target system
if one wants to send multiple commands, one should invoke ORC.SR multiple times.
PS: Project Oberon ch.14.2, p.78: "User-friendliness was not attributed any importance at this point, and it would indeed be
luxury. We refrain from elaborating on further details and concentrate on providing a list of commands provided by Oberon0."
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
More information about the Oberon