Re: New vCPU instructions? (poll)
Posted: 24 Oct 2019, 09:15
Thanks for testing! I had played with it already, but only as a non-returning JMPI. For some reason it didn't crash, while it should have. So now it also works ok as a call mechanism, as intended. This will make larger programs possible and the chances of this making it into a "ROMv5" are pretty good.
In GCL notation, it will be using the exclamation mark, similar to the notation of calling through a variable:
for
Or if your have a label:
(Label notation is still developing. I'm not fully happy with the two namespaces we have.)
This new immediate-call notation conflicts with SYS calls, because those are written as "<cycles>!". Currently the compiler disambiguates on the magnitude: SYS calls have a small operand. But I added a double-exclamation alternative: "<cycles>!!". Once we freeze gcl0x and call it gcl1, I plan to deprecate the older SYS call notation with a warning.
In GCL notation, it will be using the exclamation mark, similar to the notation of calling through a variable:
Code: Select all
$2800!
Code: Select all
85 00 28 CALLI $2800
Code: Select all
{Caller}
push
...
\Label!
...
pop ret
{Function}
_Label=*
...
ret
This new immediate-call notation conflicts with SYS calls, because those are written as "<cycles>!". Currently the compiler disambiguates on the magnitude: SYS calls have a small operand. But I added a double-exclamation alternative: "<cycles>!!". Once we freeze gcl0x and call it gcl1, I plan to deprecate the older SYS call notation with a warning.