Close

Monitor Program Update

A project log for CPU4

This is my fourth home brew CPU

agpcooperagp.cooper 08/02/2017 at 05:377 Comments

Monitor Program

I have rewritten the monitor program for a 16 bit address and a 4 MHz clock.

Still needs to be simulated before burning to PROM:

You get a feel for just how primitive these simple CPUs are from the code above.

The CPU OpCode interpreter would commence on line 116.

AlanX

Discussions

agp.cooper wrote 08/04/2017 at 07:56 point

Yes, it is in the pipe line (I have a Subleq version already).
The problem is space is a super premium for these simple CPUs.
The thing about this style of code (and this version is better than most) is it does your "head in". Especially self modifying code.
AlanX

  Are you sure? yes | no

Ed S wrote 08/04/2017 at 12:12 point

Ah, you have both a space constraint and low code density!

  Are you sure? yes | no

agp.cooper wrote 08/04/2017 at 13:28 point

That seems to be the problem with these simple CPU.
I want to do it in 8 bits but there is not enough space to do it in.
Thus the demise of the 8 bit Subleq CPU. Absolutely no chance of a simple monitor program in 8 bits! I was actually lucky to get it to fit in my 8bit TTA and to leave space for a program.
AlanX

  Are you sure? yes | no

Ed S wrote 08/04/2017 at 13:34 point

A possible way forward is nested interpreters: for example the Tiny Basic interpreter is written in an interpreted bytecode.  Also we have Sweet 16. And I think the TI/99's Basic is also written in an interpreted bytecode.

  Are you sure? yes | no

agp.cooper wrote 08/05/2017 at 03:12 point

I think another name for "nested interpreters" is Forth?
Forth is an option (but I think it would need a couple of 'k' of ROM) but at the moment the key issue is to get the CPU to talk to a Front Panel. It all get very complicated very quickly without a front panel. Another reason Subleq died was because it was getting very complicated to program it (direct memory access and a Arduino!).
Once you add an Arduino then the project loses the authentic retro feel (but I understand!). There is a guy building a transistor 8080 but he uses ATMEL microcontroler for "house keeping"! Go figure!
Intrepreted ByteCode (perhaps P-Code) is where I am headed!
AlanX

  Are you sure? yes | no

Ed S wrote 08/05/2017 at 05:25 point

P-code would be the same kind of idea too - there may be  a way to do it. Or you might be able to add a few instructions to help make programs shorter.

  Are you sure? yes | no

Ed S wrote 08/04/2017 at 07:19 point

Is this is the sort of thing where a macro assembler would help?

  Are you sure? yes | no