mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-28 23:28:06 +11:00
2b7abf802f
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...
8 lines
134 B
Plaintext
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, ;
|