gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tales of mc


From: Benjamin Kowarsch
Subject: Re: Tales of mc
Date: Sun, 11 Sep 2022 23:14:16 +0900


On Sun, 11 Sept 2022 at 11:02, john o goyo <jog37@riddermarkfarm.ca> wrote:

I know that mc is a boot-strapping tool that does not translate all of Modula-2. 
How much does it understand?

[...] I found that SHIFT() is not known to it.

You could use my portable bit operations library.

It has no dependencies, is portable across PIM and ISO dialects, and all Modula-2 compilers.

It provides arithmetic and logical shifting as well as left shifting through carry.

CARDINAL bit operations

https://github.com/m2sf/m2bsk/blob/master/src/lib/CardBitOps.def
https://github.com/m2sf/m2bsk/blob/master/src/lib/imp/CardBitOps.mod

INTEGER bit operations

https://github.com/m2sf/m2bsk/blob/master/src/lib/IntBitOps.def
https://github.com/m2sf/m2bsk/blob/master/src/lib/imp/IntBitOps.mod

LONGINT bit operations

https://github.com/m2sf/m2bsk/blob/master/src/lib/LongIntBitOps.def
https://github.com/m2sf/m2bsk/blob/master/src/lib/imp/LongIntBitOps.mod

I have also implemented a portable 64-bit cardinal type along with bit operations on it.

https://github.com/m2sf/m2bsk/tree/master/src/lib/CARD64

The CARD64 library works with the following memory models:

(a) 16-bit cardinal/32-bit integer
(b) 32-bit cardinal/32-bit integer
(c) 32-bit cardinal/64-bit integer

regards
benjamin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]