mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 04:48:05 +11:00
adea75e50a
I'm pretty happy about how lightweight the implementation turns out to be.
16 lines
630 B
Plaintext
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,
|