hack (file) doesn't exist

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

hack (file) doesn't exist

Andrew
Hi there,

I'm trying to load the test script for Mult.asm but every time I do it says,

"...projects\04\mult/Mult.hack doesn't exist"

The test script is also being loaded from the projects\04\mult folder

My Mult is an asm file, which I think it should be. I don't see this error elsewhere on the forums. Does anyone know offhand what this indicates?
Reply | Threaded
Open this post in threaded view
|

Re: hack (file) doesn't exist

Andrew
I see I do have an algorithm error that I am going to fix now, but I'm not sure that is related to the test script error.

Also, I neglected to add that the test does not run due to this error, but can be run and tested manually in its absence.
Reply | Threaded
Open this post in threaded view
|

Re: hack (file) doesn't exist

Andrew
Manual tests seem to consistently confirm my code, but the verification problem does remain.
Reply | Threaded
Open this post in threaded view
|

Re: hack (file) doesn't exist

ybakos
Sounds like you are using the CPU Emulator to run the test script. You can do this, since the CPUEmulator can execute test scripts that load .asm files and translate them behind the scenes to .hack.

However, you need to edit the .tst file. Change the line that reads load Mult.hack to load Mult.asm. Then reload the script in the CPU Emulator, and run the test.
Reply | Threaded
Open this post in threaded view
|

Re: hack (file) doesn't exist

cadet1620
Administrator
This post was updated on .
In reply to this post by Andrew
Andrew wrote
Hi there,

I'm trying to load the test script for Mult.asm but every time I do it says,

"...projects\04\mult/Mult.hack doesn't exist"
You need to use the supplied assembler to convert your .asm source file to a .hack binary file.

From section 4.4: Project
  2. Use the supplied assembler (in either batch or interactive mode) to
  translate your program. If you get syntax errors, go to step 1. If there
  are no syntax errors, the assembler will produce a file called
  projects/04/mult/Mult.hack, containing binary machine instructions.


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

Re: hack (file) doesn't exist

Andrew
In reply to this post by Andrew
Thanks you guys