Command-line testing

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Command-line testing

Simon van Meygaarden
Greetings, all.

Not sure if this is worth mentioning, but why not. My eyes are not that good, anymore, after spending 30 years behind CRTs and screens, and so I use a large white font (15 point) on a black background within a GNOME based desktop of an Ubuntu based distribution. Works nicely, except, I can't increase the font-size of the Hardware Simulator. I can flip the colors, but the font remains very small, and, for me, almost unreadable.

So, instead, I use command-line testing.

Whenever I start working on a chip, say Not.hdl, I open my editor and start by making a bash/batch script:

In Linux - Not.sh:
        ~/nand2tetris/tools/HardwareSimulator.sh Not.tst
        sleep 30

In Windows - Not.cmd
        c:\nand2tetris/tools/HardwareSimulator.bat Not.tst
        pause

Then I open the Not.dhl, add code, save, alt-tab to file manager, and execute Not.sh/Not.cmd, which opens a terminal/command sessions, and show the result. In Linux, it closes automatically in 30 seconds, in Windows you'll have to close it yourself, because I can't remember how to start a timer in cmd.

In any case, it's really fast, and you can keep your fingers on the keyboard, and yet, you can still, if you want, do it manually if there is an error.

Take care,
Simon