What language do most students use to write the assembler?

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

Re: What language do most students use to write the assembler?

pmk21
This post was updated on .
I used Python since the assembler is entirely a string manipulation problem.  Mine is a little longer since I recently added support to produce a listing file as suggested on the Coursera site discussion forums.  Once you start project 8, you'll see the value of a listing file to help with the emulators.
Reply | Threaded
Open this post in threaded view
|

Re: What language do most students use to write the assembler?

mijuraut
In reply to this post by Marty Billingsley
I used Java (I had had most practice with it).

A bit under 500 lines total with maybe a bit over 50% code and little under 50% comments & whitespace.

Java provided seamless conversion from decimal int to string binary (found from Integer). I found that Java.util.HashMap is nice for the symbol table. Also, the String class has many useful tools like substring(beginIndex, endIndex), charAt(0) and indexOf('a').
Reply | Threaded
Open this post in threaded view
|

Re: What language do most students use to write the assembler?

WBahn
Administrator
In reply to this post by Marty Billingsley
The first time I taught it I required everyone to use Python. I had a couple of ulterior motives. First, I didn't want to have to deal with grading programs written in a bunch of different languages. Second, few of the students had been exposed to a scripting language, so I wanted them to get that exposure. Third, I was able to force them to write their Python code in a manner very similar to how the Jack programs would have to be written later on, so we could talk about the whats and whys and they could get comfortable with it up front. Finally, I barely knew anything about Python and saw it as a chance to learn a new language for myself.

Now I let them use any language they want and make the grading based on the correctness of the output files combined with a very superficial code review.

But I strongly recommend to them that they use an object-oriented language, if for no other reason than the project descriptions in the text are written from an object-oriented perspective.


Reply | Threaded
Open this post in threaded view
|

Re: What language do most students use to write the assembler?

Lozminda
In reply to this post by Marty Billingsley
Anyone using C++ ? I am !
Reply | Threaded
Open this post in threaded view
|

Re: What language do most students use to write the assembler?

Taimor
In reply to this post by Marty Billingsley
could anyone help me to write the assembler using MATLAB?
Reply | Threaded
Open this post in threaded view
|

Re: What language do most students use to write the assembler?

Taimor
In reply to this post by WBahn
Would you help me to write the assembler using MATLAB?
12