0;JMP - Expression expected error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

0;JMP - Expression expected error

nakamurabob
Hello,

I am currently using the last test case (StackTest.vm) to debug my VM translator. Attached is the code generated from my VM translator.

StackTest.asm

When I load the code into the CPU emulator, there is an error that says "Line 31 - Expression expected".

After browsing the forum I noticed that this error can mean the previous or the next two lines might be wrong. I looked at my code over and over again, it doesn't seem to be wrong.

At line 32, I decide to change 0;JMP to D;JMP and the program was able to load into the CPU emulator!

Is this a bug in the CPU emulator? 0;JMP was used in previous assembly programs, so I'm really confused about it.

(While this generated program loaded properly into memory, it did not past the test case, so I'm still working on that.)

Reply | Threaded
Open this post in threaded view
|

Re: 0;JMP - Expression expected error

cadet1620
Administrator
Your code as posted loads for me.  I notice that this is the modified code that has "D;JMP". I changed it back to "0;JMP" and it still loads without error.

You may have been writing "O;JMP" (letter "o") which will result in the "Line 31 - Expression expected" error you were seeing. (That's a typo I find myself making occasionally!)

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: 0;JMP - Expression expected error

nakamurabob
AHHH there we go. Yup, that was the problem. Thank you!