durexforth
durexforth copied to clipboard
Commodore 128 Port
After the discussion in #95, I reorganized the Makefile so that conditional compilation ([if]
-[else]
-[then]
) was no longer needed.
Now, everything in forth_src/
is common to both systems, and forth_src/c64
and forth_src/c128
contain code that is specific to those machines. v
and gfx
now include vcore
and gfxcore
, which contain their platform-specific parts.
There are also a couple of new source files:
-
kernal
is intended to define platform-specific constants for kernal variables and subroutines; right now this is onlyk-tblx
, the TBLX zeropage location that indicates the current cursor line (used bymore
), but a lot of constants inv
could be factored into it for clarity. -
far
is only for the C128, and defines 'far' versions of!
,@
,c!
andc@
that can operate on memory in other banks.sys
on the C128 also defines asysfar
word that works likesys
but can call routines in other banks. -
platform
detects the type of system it is being compiled on, and defines aplatform
constant as either 64 or 128, depending on the system - with conditional compilation gone, there was no need for thenative-c128
compile-time constant, but I thought that platform detection might still be useful to somebody.
I have added a new section to the manual describing the 128 port and 128-specific words. I wasn't quite sure where in the table of contents it should go; feel free to move it as needed.
Thank you! How exciting! I will have a careful look in time and try to provide meaningful feedback. Looking forward!
Take your time - I realise there's a lot of changes in there. I'm new to Forth, so please forgive any novice mistakes!
Maybe this is a big enough change to warrant mention in README.md?
Hows the progress on this PR? This is very interesting indeed.
I forgot about this PR, sorry about that.
Since time passed, there now is a lot of conflicts. I will continue the work of merging this in #478