I have no idea

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

I have no idea

kris.arj90
The first 5 projects in nand2tetris went more or less smoothly. Now i'm completely frustrated.. I have no clue  where to even begin. I have some experience in C,Python,Java and very basic Ruby. I thought my programing knowledge was enough for this course but I don't even know where to start..
Reply | Threaded
Open this post in threaded view
|

Re: I have no idea

ybakos
If you are starting to build the assembler, I recommend using Python or Java, given your experience. (I actually recommend Ruby, my favorite, but...)

Here's the very first step of the assembler: Can you write a program that can be executed from the command line that receives one command line argument (an asm filename), and can open that file for reading? Print the contents of the file to the screen.

For example:

assembler.py someFile.asm

Should print the contents of someFile.asm to the screen.



Reply | Threaded
Open this post in threaded view
|

Re: I have no idea

cadet1620
Administrator
In reply to this post by kris.arj90
This post shows how to set Windows up to be able to directly execute Python programs from the command prompt.

If you would like more help with a Hack assembler written in Python, including an example (without implementations) of how to write the classes recommended in the book, contact me directly.

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

Re: I have no idea

Rather Iffy
This post was updated on .
In reply to this post by kris.arj90
Experiment with string partitioning and with dictionaries in Python and the idea for the assembler will come to you.
There are lots of code examples on these two subjects available in the Python language manuals and tutorials.
I use "Learning Python"  of Mark Lutz quite a lot. That book is practical and fundamental at the same time.
I have no experience with the other languages usually compared with Python, so I would like to express my opinion limited to the case of Python.
Success