VM Emulator fails to load files in test scripts on Windows 10

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

VM Emulator fails to load files in test scripts on Windows 10

PeterWeston
Hello -

I am running the BasicTest.tst from projects/07/MemoryAccess/BasicTest on Windows 10. The first instruction generates an error:
'cannot find C:\Users\Peter\Documents\nand2tetris\projects\07\MemoryAccess\BasicTest/BasicTest.asm'

As you can see, the directory separators are correct for Windows up until the last one, which is the Unix style. Is there a fix for this?

With regards -
Peter Weston
Reply | Threaded
Open this post in threaded view
|

Re: VM Emulator fails to load files in test scripts on Windows 10

cadet1620
Administrator
This post was updated on .
Windows accepts '/' in its filesystem calls so this is sloppy code, but should not be causing the problem.

Double-check that your VMTranslator wrote the correct name. In particular, check for BasicTest..asm which can be almost impossible to notice in Explorer since it hides the .asm extension leaving BasicTest. with a very small '.' in its default system font.

(FWIW, I've been using a Unix-like shell on Windows since 1995. It uses '/' for everything.)

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

Re: VM Emulator fails to load files in test scripts on Windows 10

PeterWeston
Hi Mark -

Thanks for replying. I am not worried about the '\', but the '/'. I seem to recall that in DOS the '/' was a switch delimiter. I think the operating system is not interpreting the '/BasicTest.asm' as a file at all, but an option, and therefor not even attempting to pass back a file handle.

I do have Linux installed as well, and everything seems good there. What is the shell you're using? Is it Cygwin?

With regards -
Peter Weston
Reply | Threaded
Open this post in threaded view
|

Re: VM Emulator fails to load files in test scripts on Windows 10

cadet1620
Administrator
My typo: it should have said "Windows accepts '/' ..."

I haven't seen any other reports of '/' causing problems on Win10.

I'm using an obscure ancient beast, "Thompson Toolkit for Windows". The version I got in '95 still runs OK.  Shows that nothing's really changed in Windows except for bug fixes and glitz!
Thompson Toolkit Version 4.1d for the Windows/NT operating system
Copyright 1995 Thompson Automation, Inc.
All Rights Reserved
[c:/usr/marka]
% tecs
[D:/TECS]
% cd proj*/07/mem*/bas*
[D:/TECS/projects/07/MemoryAccess/BasicTest]
% ls
BasicTest.asm  BasicTest.hack  BasicTest.out  BasicTest.vm
BasicTest.cmp  BasicTest.lst   BasicTest.tst  BasicTestVME.tst
[D:/TECS/projects/07/MemoryAccess/BasicTest]
% CPUEmulator BasicTest.tst
End of script - Comparison ended successfully
[D:/TECS/projects/07/MemoryAccess/BasicTest]
% mv BasicTest.asm BasicTest.asmX
[D:/TECS/projects/07/MemoryAccess/BasicTest]
% CPUEmulator BasicTest.tst
D:\TECS\projects\07\MemoryAccess\BasicTest/BasicTest.asm doesn't exist
[D:/TECS/projects/07/MemoryAccess/BasicTest]
% mv BasicTest.asmX BasicTest.asm
[D:/TECS/projects/07/MemoryAccess/BasicTest]
% cd ../..
[D:/TECS/projects/07]
% CPUEmulator MemoryAccess/BasicTest/BasicTest.tst
End of script - Comparison ended successfully
[D:/TECS/projects/07]
%
This example comes from a Win7/64 system. I don't have Win10 here at home.  "If it ain't broke, don't fix it!"

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

Re: VM Emulator fails to load files in test scripts on Windows 10

cadet1620
Administrator
In reply to this post by PeterWeston
What version of Java are you running on your Windows and Linux boxes?