1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-14 14:48:08 +11:00
collapseos/blk/752
Virgil Dupras 2b7abf802f pcat: begin porting forth
I'm not sure yet where I'm going, but I'm not going to build the
8086 port from the ground up like I did with the z80, that is,
making is sustain itself and eventually merge its forth code with
core words. That would be too much work which would then be thrown
out (all those words I'll initially have to implement in asm which
are already implemented in Forth).

What I *think* I can do is build a mirror version of z80 boot code
and cross-compile it from the z80. This means it has to follow z80
stable ABI.

Nope, I'm not sure where I'm going...
2020-06-13 21:37:54 -04:00

8 lines
134 B
Plaintext

( Splits word into msb/lsb, lsb being on TOS )
: SPLITB
256 /MOD SWAP
;
: PC H@ ORG @ - BIN( @ + ;
: A, C, ;
: A,, SPLITB A, A, ;