Skip to content

Yay – The Grandson Compiler Is Close…

October 23, 2017

I’ve been working on a new version of the compiler off and on all this year and finally, in the last couple of days, I’ve done some thorough testing.

Version NW supports code generation for the 1804/5/6 with option “Wf-cpu1805” and also allows tailoring for the run-time environment with “-Wf-env=xxxx”. Under the covers I’ve switched the stack discipline so the 1802/4/5/6 maintains a clean stack – R2 always points BELOW the last byte used.

The -cpu1805 option sets the CPU 1805 for the assembler, tells the macros to generate 1804/5/6 specific instructons, and also tells the compiler that registers 4 and 5 are available for variables.

The -env=xxxx makes the compiler include xxxxprolog.inc before the compiler prolog so you can set codeloc, stackloc, cpuspeed, or whatever and include xxxxepilog.inc after the compiler epilog so you can have a custom I/O setup.

Testing for the 1806 code is a bit painful: I have a fakeloader setup that will load code to an other than location 0 but I have to run the test suite of a dozen or so programs for the 1802 at location 0, 1802 at an offset, then 1805. In every one of those sequences I think I found errors – mostly related to the stack discipline.

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: