larsbrinkhoff / xForth

Experimental Forth cross compiler for tiny devices
GNU General Public License v3.0
61 stars 14 forks source link

M16C #31

Open larsbrinkhoff opened 7 years ago

larsbrinkhoff commented 7 years ago

If this becomes a thing, here is some information. Including a blink test program:
http://www.fischl.de/thomas/elektronik/r8c/

larsbrinkhoff commented 7 years ago

I'm not sure how these all relate to each other:

TG9541 commented 7 years ago

According to German Wikipedia articles they all share the same instruction set, registers, etc. The R8C has 8bit internal data paths (8088 style) but is functionally identical. M32C seems to be a 16bit controller with more features than the M16C.

larsbrinkhoff commented 7 years ago

Thanks. Wikipedia says that the C parts are CISC designs, and the M32R is RISC.

I had to check the manuals to find more details. Indeed the M16C looks CISCy, with four data registers, two address registers, and instructions being one or two bytes. The M32R has sixteen general-purpose registers (well, including link register and stack pointer), and instructions are 16 or 32 bits.

M32C looks much like M16C like you said. Some instructions can be tree bytes. R32C expands registers to 32 bits and doubles the number of address registers. Instructions can be one to fourteen (!) bytes.