1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-06 08:10:55 +11:00
collapseos/blk/813
Virgil Dupras 650481f849 z80/8086: extract 2>R code from stable ABI zone
Only its jump at 0x33 remains.

I've also fixed a strange offset oddity in 8086's (n) placement.
It was off by 2, but strangely, it ran properly. Anyway, now it's
fixed.
2020-07-05 08:03:15 -04:00

17 lines
381 B
Plaintext

( native words )
CODE EXECUTE 1 chkPS,
DI POPx, JMPn, lblexec @ RPCn,
CODE >R 1 chkPS,
BP INCx, BP INCx, [BP] 0 POP[w]+,
;CODE NOP, NOP, NOP,
CODE R>
[BP] 0 PUSH[w]+, BP DECx, BP DECx,
;CODE
CODE 2>R
PC 0x37 - ORG @ 0x35 + ! ( stable abi )
[BP] 4 POP[w]+, [BP] 2 POP[w]+, BP 4 ADDxi,
;CODE
CODE 2R> 2 chkPS,
[BP] -2 PUSH[w]+, [BP] 0 PUSH[w]+, BP 4 SUBxi,
;CODE