A command cannot begin with 10 (Mult.hack)

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

A command cannot begin with 10 (Mult.hack)

linuxdeveloper
I am receiving an error no matter what my Mult.hack file is.

The error is "A command cannot begin with 10"

What could be causing this error?
Reply | Threaded
Open this post in threaded view
|

Re: A command cannot begin with 10 (Mult.hack)

ivant
It would help if you actually show us an example of the file.
Reply | Threaded
Open this post in threaded view
|

Re: A command cannot begin with 10 (Mult.hack)

linuxdeveloper
This post was updated on .
For purposes of testing I am using this file:

removed

If I run CPUEmulator on an assembly file I also receive the following:

~/src/nand2tetris/projects/04/mult] master(+0/-10)* 255 ± CPUEmulator Mult.asm 
In script /home/user/src/nand2tetris/projects/04/mult/Mult.asm, Line 12, A command cannot begin with '@'
Reply | Threaded
Open this post in threaded view
|

Re: A command cannot begin with 10 (Mult.hack)

ivant
This is strange. I pasted your program in a Mult.hack file and was able to run the test normally. Please edit your post and remove the program.

Can you also tar.gz the whole Mult directory and send it to me directly? Just click on my name and then on the "Send email" link. If you can't attach files, just send a "hello" email and attach the file when I reply.
Reply | Threaded
Open this post in threaded view
|

Re: A command cannot begin with 10 (Mult.hack)

linuxdeveloper
This post was updated on .
I sent you a message and removed the program. Why did you want me to remove the program?

It seems to work with the GUI, but not with the batch processor.

I made sure to update to the latest version of the tools.
Reply | Threaded
Open this post in threaded view
|

Re: A command cannot begin with 10 (Mult.hack)

ivant
This post was updated on .
Many people go through the forum to get help, but it's not good if they get a ready solution. So it is a standard practice on this forum to be asked to remove the code once you get the answer.

The part about the batch processor was quite important. I'll try it when I get your code.
Reply | Threaded
Open this post in threaded view
|

Re: A command cannot begin with 10 (Mult.hack)

WBahn
Administrator
In reply to this post by linuxdeveloper
linuxdeveloper wrote
For purposes of testing I am using this file:

removed

If I run CPUEmulator on an assembly file I also receive the following:

~/src/nand2tetris/projects/04/mult] master(+0/-10)* 255 ± CPUEmulator Mult.asm 
In script /home/user/src/nand2tetris/projects/04/mult/Mult.asm, Line 12, A command cannot begin with '@'
You are running Mult.asm as a script.

You want to run the Mult.tst file as the script. It will then load Mult.hack.

Follow the steps given in Section 4.4.


This, in turn, means that after you write your Mult.asm file you need to assemble it into a Mult.hack file before running the test script.