Using the LC-3 Decompose Tool in the EWS Labs
Installation
- First, you need to download the tool package into your home directory.
From this page,
grab the Linux binary distribution, or just get it directly
here.
- Open a terminal.
- Unpack the file by typing: tar xjf Downloads/Decompose-0.10-linux-binaries.tar.bz2
- You now have a directory named decompose that contains both the Flash program (Decompose.swf) and a server for writing skeletal LC-3 assembly code from your decompositions (DecomposeServer.exe).
Using the Tool
You can probably open the directory in a file browser and double-click
the .swf file. If for some reason your program type mapping to application
is not set up, though, you can also open a browser and target the file
by typing the URL: file:///home/<netid>/decompose/Decompose.swf
Using the Server
If you want to create skeletal assembly, you will need to allow Flash to
use the Internet (once), and you will need to run the server (whenever
you want to export your decomposition as assembly).
To run the server...
- Open a terminal.
- Change to the decompose directory: cd decompose
- Run the server: ./DecomposeServer.exe .
- The second argument (".") tells the server to write your programs
into the programs subdirectory of the current directory. The server will
create that directory if it doesn't exist.
- Now that the server is running, you can push the "Export" button
to write LC-3 assembly based on your decomposition. The server
name should be "localhost".
- You may also want to
save the decomposition, but be aware that it may not migrate from machine
to machine in EWS--I'm not sure--it should, technically, but clearing
browser cache destroys all Flash content, too...be careful...and probably
just don't count on it surviving from session to session for now.
To grant Flash permission to use the Internet...
- Start the Decompose tool (as above).
- Right-click in the tool window and pick Settings...
- A new web page will open--choose the Global Security Settings tab.
- Add the /home/<netid>/decompose directory to the list of exceptions
(those allowed to use the Internet).
- I've always found Flash' settings model a little finicky, so you may
need to try a couple of times. Closing the settings and then re-starting
the Decompose app (reload the page) did the trick for me in the EWS lab,
though.