Page 2 of 2

Re: New vCPU instructions? (poll)

Posted: 24 Oct 2019, 09:15
by marcelk
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:

Code: Select all


Code: Select all

85 00 28                 CALLI $2800
Or if your have a label:

Code: Select all

   pop ret

(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.