Jasmin (programming language)

from Wikipedia, the free encyclopedia
jasmine
Paradigms : imperative , object-oriented
Developer: Jon Meyer, Troy Downing
Current  version : 2.4   (May 7, 2010)
Influenced by: Java
Operating system : platform independent
License : BSD license
[1]

Jasmin is an assembler for the Java Virtual Machine , which from assembly language -like instructions Java - bytecode generated.

The instructions used describe the Java classes to be generated in ASCII format. Jasmin uses this to create Java class files that can be run in a Java virtual machine .

The programming language Jasmin should not be confused with the Jasmin assembler interpreter of the Technical University of Munich.

example

Hello world program

; HelloWorld.j

.bytecode 50.0
.source HelloWorld.java
.class public HelloWorld
.super java/lang/Object

.method public <init>()V
  .limit stack 1
  .limit locals 1
  aload_0
  invokespecial java/lang/Object/<init>()V
  return
.end method

.method public static main([Ljava/lang/String;)V
  .limit stack 2
  .limit locals 1
  getstatic java/lang/System/out Ljava/io/PrintStream;
  ldc "Hallo Welt!"
  invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
  return
.end method

Web links

Individual evidence

  1. Jasmin a Java Assembler Interpreter ( English ) TU Munich. Retrieved November 27, 2009.