|
| 1 | +Jasmin README file May 28, 2004, Patrick Lam |
| 2 | + |
| 3 | +Welcome to Jasmin version sable-1.2.7. |
| 4 | + |
| 5 | +This is a specialized version of jasmin which is used as a back end for the |
| 6 | +Soot framework. |
| 7 | + |
| 8 | +Note that with permission from Jonathan Meyer, this package is distributed |
| 9 | +under the GNU Library General Public License and so can be distributed with |
| 10 | +Soot. |
| 11 | + |
| 12 | + |
| 13 | +Original Jasmin README: |
| 14 | +--------------------------------------------------------------------------- |
| 15 | + |
| 16 | +Jasmin README file 1 March 1997, Jonathan Meyer |
| 17 | + |
| 18 | +Description |
| 19 | +----------- |
| 20 | +Welcome to Jasmin version 1.06. |
| 21 | + |
| 22 | +Jasmin is a Java Assembler Interface. It takes ASCII descriptions for Java |
| 23 | +classes, written in a simple assembler-like syntax, and using the Java |
| 24 | +Virtual Machine instruction set. It converts them into binary Java class |
| 25 | +files suitable for loading into a Java interpreter. |
| 26 | + |
| 27 | +Jasmin was written as the companion to the book "Java Virtual Machine", |
| 28 | +published by O'Reilly, written by Troy Downing and myself. |
| 29 | +(See http://www.ora.com/catalog/javavm/). |
| 30 | + |
| 31 | +If you want to know more about what Jasmin is, why I wrote Jasmin, |
| 32 | +or what kinds of uses Jasmin can be put to, look at doc/about.html. |
| 33 | + |
| 34 | +Home Page |
| 35 | +--------- |
| 36 | +Check out the Jasmin home page at: |
| 37 | + |
| 38 | + http://cat.nyu.edu/meyer/jasmin |
| 39 | + |
| 40 | +this will tell you the latest news on Jasmin - in particular, make sure that you |
| 41 | +have the most recent version, since I'm sure to add bells and whistles over time! |
| 42 | +(For example, I plan to rewrite the parser in Jasmin so that it does more error |
| 43 | +checking). Also, you can register on this page to receieve news about new releases |
| 44 | +and bug fixes. |
| 45 | + |
| 46 | +Requirements |
| 47 | +------------ |
| 48 | +Jasmin is written in Java, so it should be fairly straightforward to get it |
| 49 | +set up and running in your environment. |
| 50 | + |
| 51 | +I have tested Jasmin with the Sun JDK 1.0 on Solaris and Windows 95, and with J++ |
| 52 | +on Windows NT. |
| 53 | + |
| 54 | +In the bin directory are scripts for running Jasmin on Unix systems and batch files |
| 55 | +for Windows. These may need some tailoring on your system. |
| 56 | + |
| 57 | +Installation Instructions |
| 58 | +------------------------- |
| 59 | +Below you will find installation instructions for: |
| 60 | + |
| 61 | +-- Windows 95/NT and J++ |
| 62 | +-- Windows 95/NT and Sun's JDK or Symantec Cafe |
| 63 | +-- Unix and the Sun JDK |
| 64 | + |
| 65 | +Jasmin should run on other platforms that have Java installed. Look at the scripts |
| 66 | +in the bin directory to get an idea of how Jasmin is started. |
| 67 | + |
| 68 | +A version of the classes for Jasmin in ZIP format is available. See the Jasmin |
| 69 | +home page (http://cat.nyu.edu/meyer/jasmin). |
| 70 | + |
| 71 | +******** Windows 95/NT and J++ ******** |
| 72 | + |
| 73 | +-- Basic Installation |
| 74 | + |
| 75 | + 1. Extract the jasmin distribution files and place them in C:\JASMIN |
| 76 | + |
| 77 | + 2. Add C:\JASMIN\BIN to your path by editing your AUTOEXEC.BAT. |
| 78 | + |
| 79 | +Then you run Jasmin using the vjasmin command (as show below). |
| 80 | + |
| 81 | +-- Notes |
| 82 | + |
| 83 | +Under J++, you use jvc (instead of javac) to compile Java code, and jview (instead |
| 84 | +of java) to run it. |
| 85 | + |
| 86 | +If you want to maintain the Jasmin files somewhere other than C:\JASMIN, |
| 87 | +first move the files to the location you want to use, then edit the bin\vjasmin.bat |
| 88 | +script and change the JASMIN variable so that it points to the jasmin directory. |
| 89 | +Then add the jasmin bin directory to your path by editing your AUTOEXEC.BAT. |
| 90 | + |
| 91 | +-- Trying Jasmin out |
| 92 | + |
| 93 | +If you are using Jasmin with Visual J++ on Windows 95/NT, you can quickly try out |
| 94 | +Jasmin by installing the files in c:\jasmin and then typing to a DOS command prompt: |
| 95 | + |
| 96 | + cd c:\jasmin |
| 97 | + vjasmin examples\HelloWorld.j |
| 98 | + |
| 99 | +After running Jasmin, you should find the compiled HelloWorld.class file |
| 100 | +in the examples directory. |
| 101 | + |
| 102 | +You can then run the HelloWorld program by doing: |
| 103 | + |
| 104 | + jview examples.HelloWorld |
| 105 | + |
| 106 | +******** Windows 95/NT and Sun's JDK or Symantec Cafe ******** |
| 107 | + |
| 108 | +I have run Jasmin under Windows 95 using Symantec Cafe (it probably works |
| 109 | +under other implementations of the JDK as well). |
| 110 | + |
| 111 | +-- Basic Installation |
| 112 | + |
| 113 | + 1. Extract the jasmin distribution files and place them in C:\JASMIN. |
| 114 | + |
| 115 | + 2. Add C:\JASMIN\BIN to your path by editing your AUTOEXEC.BAT. |
| 116 | + |
| 117 | +-- Notes |
| 118 | + |
| 119 | +On some systems, you may need to add the C:\JASMIN\CLASSES directory to your |
| 120 | +CLASSPATH variable. CLASSPATH is either defined in C:\AUTOEXEC.BAT (JDK) or |
| 121 | +or C:\Cafe\BIN\SC.INI (Cafe version 1.2 and later). |
| 122 | + |
| 123 | +If you want to maintain the Jasmin files elsewhere in your directory hierarchy, |
| 124 | +first move the files to the location you want to use, then edit the bin\jasmin.bat |
| 125 | +script and change the JASMIN variable so that it points to the jasmin directory. |
| 126 | +Then add the jasmin bin directory to your path by editing your AUTOEXEC.BAT. |
| 127 | + |
| 128 | +-- Trying Jasmin Out |
| 129 | + |
| 130 | +If you are using Sun's JDK or Symantec Cafe on Windows 95/NT, you can try Jasmin by |
| 131 | +installing the files in c:\jasmin and then typing to a DOS command prompt: |
| 132 | + |
| 133 | + cd c:\jasmin |
| 134 | + jasmin examples\HelloWorld.j |
| 135 | + |
| 136 | +After running Jasmin, you should find the compiled HelloWorld.class file |
| 137 | +in the examples directory. |
| 138 | + |
| 139 | +You can then run the HelloWorld program by doing: |
| 140 | + |
| 141 | + java -verify examples.HelloWorld |
| 142 | + |
| 143 | +Its a good idea to use the '-verify' option for Java programs compiled with |
| 144 | +Jasmin, since this will catch any structural violations you have in |
| 145 | +your code. |
| 146 | + |
| 147 | +******** Unix and the Sun JDK ******** |
| 148 | + |
| 149 | +I've tried Jasmin on SGIs and Suns running Sun's JDK 1.02. It should work on |
| 150 | +other Unix boxes with the JDK as well. |
| 151 | + |
| 152 | +-- Basic Installation |
| 153 | + |
| 154 | + 1. Extract the jasmin distribution files and place them in /usr/local/jasmin. |
| 155 | + |
| 156 | + 2. Add /usr/local/jasmin/bin to your path, by editing your .cshrc (or equivalent). |
| 157 | + |
| 158 | +-- Notes |
| 159 | + |
| 160 | +If you want to maintain the Jasmin files somewhere other than /usr/local/jasmin, |
| 161 | +first extract the files, then edit the bin/jasmin script and change the JASMIN variable |
| 162 | +so that it points to the jasmin directory. Then add the Jasmin bin directory to |
| 163 | +your path. |
| 164 | + |
| 165 | +-- Trying Jasmin Out |
| 166 | + |
| 167 | +On Unix systems with the JDK installed, change into the directory containing |
| 168 | +this readme file, then type to a shell prompt: |
| 169 | + |
| 170 | + jasmin examples/HelloWorld.j |
| 171 | + |
| 172 | +After running Jasmin, you should find the compiled HelloWorld.class file |
| 173 | +in the examples directory. |
| 174 | + |
| 175 | +You can then run the HelloWorld program by doing: |
| 176 | + |
| 177 | + java -verify examples.HelloWorld |
| 178 | + |
| 179 | +Its a good idea to use the '-verify' option for Java programs compiled with |
| 180 | +Jasmin, since this will catch any structural violations you have in |
| 181 | +your code. |
| 182 | + |
| 183 | + |
| 184 | +Problems/Questions |
| 185 | +------------------ |
| 186 | +If you have a problem with Jasmin, please visit the Jasmin home page at: |
| 187 | + |
| 188 | + http://cat.nyu.edu/meyer/jasmin |
| 189 | + |
| 190 | +this will give you instructions on how to submit problem reports. There is |
| 191 | +also a FAQ on this page that you could check to see if your problem has already been |
| 192 | +encountered. |
| 193 | + |
| 194 | +Where Next |
| 195 | +---------- |
| 196 | +After trying Jasmin out, have a look at the HelloWorld.j source, and try |
| 197 | +compiling and running the other examples. |
| 198 | + |
| 199 | +There is documentation for Jasmin in the doc directory. You should probably |
| 200 | +start with the 'guide.html' document. |
| 201 | + |
| 202 | +If you decide you want to use Jasmin on files in other directories, see the |
| 203 | +Installation Instructions below. |
| 204 | + |
| 205 | +Rebuilding Jasmin |
| 206 | +----------------- |
| 207 | +The bin/compile.sh script is what I use to rebuild Jasmin under Solaris. I've |
| 208 | +included it for your enjoyment, though your mileage may vary. |
| 209 | + |
| 210 | +Java API to Jasmin |
| 211 | +------------------ |
| 212 | +In the doc/api directory is a description of some of the public classes in the |
| 213 | +Jasmin package. You may find this a more appropriate hook to the Jasmin assembler in |
| 214 | +your application. Note that this API is under revision and may change (but its very |
| 215 | +small and basic, so changes should be easy to adapt to). |
| 216 | + |
| 217 | +Files |
| 218 | +----- |
| 219 | +The following files are included in this distribution: |
| 220 | + |
| 221 | + README - this file |
| 222 | + bin/ - Shell scripts and Batch files for running Jasmin under DOS/Unix |
| 223 | + examples/ - directory containing example files written for Jasmin |
| 224 | + src/ - the Java source code and for the jasmin package |
| 225 | + lib/ - contains Java sources for the java_cup and jas packages |
| 226 | + classes/ - contains Java class files used by jasmin. |
| 227 | + doc/ - various documentation files. |
| 228 | + |
| 229 | +Copyright |
| 230 | +--------- |
| 231 | +Jasmin is Copyright (1997) Jonathan Meyer, under the terms of |
| 232 | +the GNU General Public License. See COPYING for more. |
| 233 | + |
| 234 | +Jasmin uses the JAS package which has its own copyright - see lib/jas/README. |
| 235 | + |
| 236 | +Jasmin was built partially using the java_cup package, which is also in |
| 237 | +the lib directory. |
0 commit comments