I was definitely wrong about there being a bug in |MUL in my previous post, but it appears that something may be wrong with SUB.
This program is not yet complete (it doesn't plot anything on screen yet), but it calculates points to display a 3d cone.
100 MODE 2:PAPER 0:CLS:INK 0,0
200 FOR a=0 TO 61 STEP 2
300 FOR v=0 TO 193':LOCATE 1,1:PRINT v
410 '|CINT,@py,tmpYb:PRINT py;" ";
420 |CINT,@py,tmpY:PRINT py;" ";
There is a command: |SUB,tmpYb,tmpY,sin2
When I print tmpYb in line 410, I get 119 appearing several times, then 121, then 123 etc.
This is correct.
But if I use the code in line 401: |SUB,tmpY,tmpY,sin2
I only get zeroes being printed by line 420.
So it appears that |SUB is flawed when a variable is subtracting something from itself.
I can certainly get around this problem by using tmpYb - I just thought you'd like to know.
I don't know if any of the other RSX commands have similar problems when a variable operates on itself.
Using |ADD for tmpY to add something to itself seems to be OK though...