Assembler not in Source Code

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Assembler not in Source Code

Kyle Smith
Hello,

I downloaded the source code and noticed the Assembler source was not included.

Is this code available anywhere? I'd like to rebuild it with a scroll-bar fix I made.


Thanks,
Kyle
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Assembler not in Source Code

Dinah
I just noticed the same omission and was about to post about it when I saw your post. I'm sad that no one official has replied. I'm very interested in this code also
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Assembler not in Source Code

Warren Toomey
In reply to this post by Kyle Smith
I'm not a great Java programmer, but are you sure the Assembler source is missing?

(on Linux): $ unzip -l tecs-open-source-2.5.zip | grep -i assem
        0  11-23-06 02:05   CompilersPackageSource/Hack/Assembler/
     1845  02-03-06 23:20   CompilersPackageSource/Hack/Assembler/AssemblerException.java
     2924  02-03-06 23:20   CompilersPackageSource/Hack/Assembler/AssemblyLineTokenizer.java
    15168  02-03-06 23:20   CompilersPackageSource/Hack/Assembler/HackAssembler.java
     2007  02-03-06 23:20   CompilersPackageSource/Hack/Assembler/HackAssemblerEvent.java
     2105  02-03-06 23:20   CompilersPackageSource/Hack/Assembler/HackAssemblerGUI.java
    17502  02-03-06 23:20   CompilersPackageSource/Hack/Assembler/HackAssemblerTranslator.java

Cheers, Warren
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Assembler not in Source Code

Dinah
I decompiled all of the jars and classes. If someone knows of somewhere I can post these files, I'd be happy to do so.

For anyone unfamiliar with decompiling: this is NOT the same as having the original source code. Among other things: many helpful variable names are lost, some syntax is lost, all comments are lost, and usage of enums are often lost. I still wish they'd update the download with the original source but I guess this is good enough for now.

If you want to decompile for yourself, here are some easy to use, stand-alone (as opposed to Eclipse plug-ins), Windows apps:
http://java.decompiler.free.fr/ -- free
http://members.fortunecity.com/neshkov/dj.html -- free to try. the trial is limited to 10 times of opening the app, so keep it open as long as possible if you're decompiling multiple files

Regarding missing files, here are the ones I found after decompiling that were not included in the source code on the main site (as of today 2-11-10)

HackAssemblerMain.class

AssemblerGUI.jar
- ASMFileFilter.class
- AssemblerComponent.class
- HACKFileFilter.class

Compilers.jar
- CompilationEngine.class
- IdentifierProperties.class
- JackCompiler.class
- JackException.class
- JackTokenizer.class
- SymbolTable.class
- VMWriter.class

TranslatorsGUI.jar
- TranslatorComponent.class
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Assembler not in Source Code

Noam
In reply to this post by Warren Toomey
OK, guys, so here's the story:

On purpose we did not include the source code of the assembler, since it is a student project and we didn't want to make a complete solution available.  Underneath, both the hardware simulator and the HACK simulator include within them the assembler code since they allow uploading assembly language code into the CPU.  The idea was that if the student made the effort to dive into the source code, then we can let is pass, but we still would prefer a stand-alone solution not to be posted.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Assembler not in Source Code

Warren Toomey
As an aside, I've written a tool to cross-compare multiple source code bases simultaneously, to find any similar code. I use it, amongst other things, to look for plagiarism in student submissions. At present, it can deal with C, Java or Python source code, but extending to other languages is not too hard.

If the assembly source code from the book's software was out there, this would be one way to check if students had "borrowed" it when writing their answer. But I also understand the authors' reluctance not to divulge the code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Assembler not in Source Code

Dinah
In reply to this post by Noam
Got it. I won't post my stuff.

Personally, I've already gone through the book cover to cover and am now converting the tools to C# and modifying them for personal hobbyist projects. The full source code for the assembler would be nice, but available disassemblers have worked well enough.
Loading...