Java byte-code is the form of instructions that the Java virtual machine executes. Each byte-code instruction is one byte in length (hence the name), thus the number of byte-codes is limited to no more than 256. Not all 256 possible byte-code values are used, in fact Sun Microsystems, the original creators of the Java programming language, the Java virtual machine and other components of the Java Runtime Envirnoment, have permenently set aside a number of values to be permenently unimplemented. The bytecodes are given below.
The Java byte-codes
Mnemonic | Description | |
aaload | loads onto the stack a reference to an array | |
aastore | stores into a reference to an array | |
aconst_null | pushes a null reference onto the stack | |
aload | loads a refernce onto the stack from a local variable | |
aload_0 | loads a refernece from local variable 0 | |
aload_1 | loads a refernece from local variable 1 | |
aload_2 | loads a refernece from local variable 2 | |
aload_3 | loads a refernece from local variable 3 | |
anewarray | creates a new array of references | |
areturn | returns a reference from a method | |
arraylength | gets the length of an array | |
astore | stores a reference into a local variable | |
astore_0 | stores a reference into local variable 0 | |
astore_1 | stores a reference into local variable 1 | |
astore_2 | stores a reference into local variable 2 | |
astore_3 | stores a reference into local variable 3 | |
athrow | throws an error or exception | |
baload | loads a byte or boolean value from an array | |
bastore | stores a byte or boolean value into an array | |
bipush | pushes a byte onto the stack | |
caload | loads a char from an array | |
castore | stores a char into an array | |
checkcast | checks whether an object is of a certain type | |
d2f | converts a double to a float | |
d2i | converts a double to an int | |
more to be added later