King Rat and HVM problem

Post Reply
ratlover32
Posts: 3
Joined: Sat Jun 28, 2008 1:10 pm

King Rat and HVM problem

Post by ratlover32 »

I am having trouble with the HVM challenges because I can't figure out how to get the initial values to be included. I always get the stack underflow error. I know that my code is right, for I have tested it by embedding the numbers in the code, but I can't get my solution to work in JS, Python, or the actual challenge page. Could someone please tell me how you initialize the memory cells?

Thank you,
ratlover32
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

let's say your program is

Code: Select all

0<1<+p
you put the initial memory as:

Code: Select all

1,2
and the program will print 3.

does that help?

adum
ratlover32
Posts: 3
Joined: Sat Jun 28, 2008 1:10 pm

Post by ratlover32 »

Thank you!
That helps a lot. I didn't realize that you had to have something in the stack to load the memory cells.
- ratlover32
Post Reply