It's already possible to do indirectly, but I figured why not suggest it anyway?
I don't know what it'd be called but it would check to see if there's a value on the stack. If so then it'll replace this value with 1, if not it'll add 0 to the stack.
However I don't know how the stack works... if the stack automatically has all zeroes in it at all times and has no means of telling whether a value in a stack is a 0 or is supposed to be nonexistant, then please tell me and forget the idea (sgn abs would work just as well if that's the case!)
(If you don't quite fully understand what I mean, then my love for writing examples forces me to show you the following:
0 checkstack
would return 1
while, assuming the stack doesn't have any garbage in it, simply
checkstack
would return 0.)
Additionally, a swap operator, which would basically reverse the top of the stack.
(For example:
1 2 swap
would have 1 on the top of the stack and 2 right below it.
Though this probably won't be a very good reason to use it, it would allow:
.shoot -1 swap store
to put -1 in the .shoot sysvar.)
And my final suggestion: A delete-the-top-of-the-stack operator. Which basically just gets rid of the top of the stack.
(In example:
-1 .shoot 25 del store
would put -1 into .shoot.)
Thanks for reading this, and sorry for posting so many suggestions.
[Edit]
Another idea I forgot!
The halt operation. I'm not quite sure how it'll work, but it'll skip the gene as soon as it's called with a certain value.
Perhaps if the value is 0 it'll halt. Or maybe non-zero. Or maybe positive, or negative.
Personally I prefer the "if the value is 0" bit though!
Adding this in would probably be yet another step torwards making genes merely illusions, though. And adding... almost any of these operators would be yet another step torwards making the bots closer to nanobots then organisms.
Whether those are good things or bad are up to you to decide, I guess!