Discussion:
Build a processor that will work well with LCC
(too old to reply)
Donn Stewart
2018-02-03 23:11:30 UTC
Permalink
I have built two computer processors, most recently an 8-bit processor. It is very simple though, a pure accumulator-memory machine. I would like to build another more capable processor, and retarget LCC to it. What are the important processor features that would help?
Peter Percival
2018-02-04 18:18:59 UTC
Permalink
Post by Donn Stewart
I have built two computer processors, most recently an 8-bit processor.
Built from what? TTL chips, transistors, relays, ...?
Post by Donn Stewart
It is very simple though, a pure accumulator-memory machine. I would like to build another more capable processor, and retarget LCC to it. What are the important processor features that would help?
jacobnavia
2018-02-05 00:03:00 UTC
Permalink
Post by Donn Stewart
I have built two computer processors, most recently an 8-bit processor. It is very simple though, a pure accumulator-memory machine. I would like to build another more capable processor, and retarget LCC to it. What are the important processor features that would help?
wow...

It depends on your next model of course. How that will be?

Do not worry much with lcc, that is the really easy part.

Build more registers, if possible. You have a stack machine
(accumulator<-->memory). Put some of the stack in more registers and use
forth.

I wrote an lcc-->forth compiler long ago, it is not very difficult.

A more capable model would cache some values of the stack in a register
set, and have 16 bit operations.

Using 16 bit operations, you can have floating point with the cephes
math library, that will give you single, double and even long double
floating point. That is written in C, so if the cpu works, the compiler
works, floating point will work.

jacob

Loading...