Spill The Beans!

Download 1.1 Version
Spill The Beans! Classes (28K)
Sources (28K)
TEA APIs page
TEA APIs
This week I provide the Java 1.1 version of Spill The Beans!. You can find the version for Java 1.0.2 in Weekly Applets - Issue 2. This is not a simple applet but a complete application. It's useful to view in an understandable form class files, showing them in three ways: a dump view, an assembly view with the VM sintax and an assembly view with a simplified sintax. To execute Spill The Beans! you need to download the TETRACTYS Enhanced Apis too.

Installation

Download Shortcuts for Spill The Beans!
Classes
Batch file for Win95 & Classes (28 KB)
TETRACTYS Enhanced Apis (55 KB)
Docs
"Spill The Beans!" Source Code (28 KB)
TEA Source Code (76 KB)
TEA Javadoc generated docs (115 KB)
To use this application simply download SpillTheBeans1.zip, unzip it in a directory of your choice and open the SpillTheBeans.bat file. Change the variables in the bat file according to your directory tree. You need also to download the Tetractys Enhanced Apis (follow the instruction in the TEA APIs page). Finally, execute SpillTheBeans.bat.

If something goes wrong, it's important that you check the correct directories: in PATH you must add the directory where java.exe is stored, while in CLASSPATH you must put the directory you have created for spill.jar and tea.jar (it's not a bad idea to add the path for the classes.zip of Java 1.1, too). Remember that the icons (GIF images) must be in a directory called /icons.

If the problem persists, write directly to TETRACTYS Freeware with a description of what goes wrong. For any comment or suggestion, please use the comments form.

Controls

As usual there is a text area, a status bar, a tool bar and a menu bar. The use is very simple and the items in the menus are few.

Sparse notices

When a class file is selected and DUMP is not checked, in the tool bar appears the list of the methods. If a method is large, it is spanned on multiple text areas (due to a text size limit for standard text areas).

Changes in the check of SIMPLE SINTAX and SHOW PACKAGES involve only the current method, unless the text area shows the class header (first page).

To understand the DUMP view and the VM sintax read The Java Virtual Machine Specification. You can find it somewhere at JavaSoft.

Simplified sintax instructions

Remember that the Java Virtual Machine uses only stack, no registers.

nopno operationloadloads a value from the stackstorestore a value into the stack
poppops a valuepop2pops two valuesdupduplicates a value
dup_x1...,x2,x1-> ...,x1,x2,x1dup_x2...,x3,x2,x1-> ...,x1,x3,x2,x1dup2duplicates two values
dup2_x1...,x4,x3,x2,x1-> ...,x2,x1,x4,x3,x2,x1dup2_x2...,x4,x3,x2,x1-> ...,x2,x1,x4,x3,x2,x1swap...,x2,x1-> ...,x1,x2
addaddssubsubtractsmulmultiplies
divdividesmodfinds the remaindernegnegates
shlshift leftshrsigned shift rightushrunsigned shift right
andlogical andorlogical orxorlogical xor
longconversionfloatconversiondoubleconversion
byteconversioncharconversionshortconversion
cmpltrue if equal or lesscmpgtrue if equal or greaterifXXjumps if XX is satisfied
gotojumpsjsrjumps to subroutineretreturns from subroutine
switchswitch clausereturnreturns from methodinvokeinvokes a method
newnew objectnewarraynew arraycheckcastchecks casting
instanceofchecks if instance of

TETRACTYS Freeware Main Page

In the next Issue Weekly Applet will be

PVD: Post Visitors' Data in your Mailbox

GeoCities