hackvm documentation for 'v'

Post Reply
User avatar
ernie
Posts: 14
Joined: Sun Apr 22, 2007 1:22 pm
Contact:

hackvm documentation for 'v'

Post 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.
User avatar
bok
Site Admin
Posts: 24
Joined: Tue Jan 30, 2007 11:49 pm

Post by bok »

You're right, the documentation was wrong. I've fixed that on the web page.
Thanks for spotting that.
Post Reply