[Oberon] Oberon-07 - SYSTEM.MSET

John R. Strohm strohm at airmail.net
Fri Jun 26 07:20:31 CEST 2020


> --- joerg.straube at iaeth.ch wrote:
> In my point of view it’s not worth the effort as eg
>
> SYSTEM.PUT(Display.Base, 0BABEFACEH);
> SYSTEM.COPY(
>   Display.Base, Display.Base+4, 24575
> );
>
> fills the b/w screen with an arbitrary word.

Arguably, this should be undefined behavior.  SYSTEM.COPY() should ideally be
defined to be unpredictable if the blocks overlap, to allow an implementation
to run the loop "backwards", if that would yield better performance on that 
particular system.

I do not recall offhand whether SYSTEM.PUT() is expected to expand inline, or
do a subroutine call.  If the latter, it would make sense to provide a
SYSTEM.MEMSET().

--John R. Strohm









More information about the Oberon mailing list