Page 1 of 1

hackvm documentation for 'v'

Posted: Tue Jul 15, 2008 2:21 pm
by ernie
the hackvm documentation says:
'v' Remove S<S0+1> from the stack and push it on top (ex: 0v swaps S0 and S1)

i think it's meant to say '1v swaps s0 and s1'

because code:
010v

stack is
0 [0]
1 [0,1]
0 [0,1,0]
v [0,1]

0,1 are not getting switched.

Posted: Tue Jul 15, 2008 4:23 pm
by bok
You're right, the documentation was wrong. I've fixed that on the web page.
Thanks for spotting that.