Hi, Just thinking, as part of en exercise, we could enrich pseudo module SYSTEM. We have COPY command, we could add a complementing MSET, filling a memory block with arbitrary word. Similarly we have memset(), memcpy() on linux, and I have seen lately a habit in mimicking some ux* commands in Oberon :-) SYSTEM.MSET (choosing other name not to imply Oberon SET{}) Can it be useful in some low level programming, I know NEW() fills block with NIL (0), but sometimes we need -1, or even other? Everything is word aligned and padded by compiler, so MSET could go by words. Bad idea? -- Tomas Kral <thomas.kral@email.cz>
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. br Jörg
Am 25.06.2020 um 16:20 schrieb Tomas Kral <thomas.kral@email.cz>:
Hi,
Just thinking, as part of en exercise, we could enrich pseudo module SYSTEM.
We have COPY command, we could add a complementing MSET, filling a memory block with arbitrary word.
Similarly we have memset(), memcpy() on linux, and I have seen lately a habit in mimicking some ux* commands in Oberon :-)
SYSTEM.MSET (choosing other name not to imply Oberon SET{})
Can it be useful in some low level programming, I know NEW() fills block with NIL (0), but sometimes we need -1, or even other?
Everything is word aligned and padded by compiler, so MSET could go by words.
Bad idea?
-- Tomas Kral <thomas.kral@email.cz> -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
participants (2)
-
Joerg -
Tomas Kral