[Oberon] Batch processing of Oberon commands
Andreas Pirklbauer
andreas_pirklbauer at yahoo.com
Tue Jun 16 08:11:53 CEST 2020
> 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)
or e) modify Oberon.WriteSector to use two buffers instead of only one:
PROCEDURE WriteSector; (*secno, n, list of n values (words) - write sector*)
VAR k, m, n, secno: INTEGER;
buf, buf0: ARRAY 256 OF INTEGER;
BEGIN RS232.RecInt(secno); RS232.RecInt(n); k := 0;
WHILE k < n DO RS232.RecInt(m); buf0[k] := m; INC(k) END ;
RS232.SendStr("WriteSector");
Disk.GetSector(secno*29, buf); k := 0;
WHILE k < n DO buf[k] := buf0[k]; INC(k) END ;
Disk.PutSector(secno*29, buf)
END WriteSector;
PS: I tested 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 ~
on an emulator - where the two Unix pipes connecting host and target are surely
faster than a physical RS232 line - and saw no problem (but then, GetSector on
the host’s SSD may (?) also be faster than GetSector executed on an SD card)
More information about the Oberon
mailing list