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
INTEGER bit operations
LONGINT bit operations
I have also implemented a portable 64-bit cardinal type along with bit operations on it.
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