1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-27 05:08:06 +11:00
collapseos/blk/449
Virgil Dupras adea75e50a Add alias and switch word types
I'm pretty happy about how lightweight the implementation turns
out to be.
2020-10-28 15:02:06 -04:00

16 lines
630 B
Plaintext

lblexec BSET ( DI -> wordref )
AL [DI] MOVr[], DI INCx, ( PFA )
AL AL ORrr, IFZ, DI JMPr, THEN, ( native )
AL DECr, IFNZ, ( not compiled )
AL DECr, IFZ, ( cell )
DI PUSHx, JMPs, lblnext @ RPCs, THEN,
AL DECr, IFZ, ( does )
DI PUSHx, DI INCx, DI INCx, DI [DI] MOVx[], THEN,
( alias or switch ) DI [DI] MOVx[],
AL DECr, IFNZ, ( switch ) DI [DI] MOVx[], THEN,
JMPs, lblexec @ RPCs,
THEN, ( continue to compiled )
BP INCx, BP INCx, [BP] 0 DX MOV[]+x, ( pushRS )
DX DI MOVxx, DX INCx, DX INCx, ( --> IP )
DI [DI] MOVx[], JMPs, lblexec @ RPCs,