Jasmin is a programming language created in 1997.
#859on PLDB | 27Years Old | 74Repos |
Jasmin is an assembler for the Java Virtual Machine. It takes ASCII descriptions of Java classes, written in a simple assembler-like syntax using the Java Virtual Machine instruction set. It converts them into binary Java class files, suitable for loading by a Java runtime system.
.class public Main
.super java/lang/Object
.method public <init>()V
aload_0
invokenonvirtual java/lang/Object/<init>()V
return
.end method
.method public static main([Ljava/lang/String;)V
.limit stack 2
getstatic java/lang/System/out Ljava/io/PrintStream;
ldc "Hello, world!"
invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
return
.end method
.class public Jasmin
.super java/lang/Object
.method public static main([Ljava/lang/String;)V
.limit stack 2
getstatic java/lang/System/out Ljava/io/PrintStream;
ldc "Hello World"
invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
return
.end method
.class public op2
.super java/lang/Object
;
; standard initializer (calls java.lang.Object's initializer)
;
.method public <init>()V
aload_0
invokenonvirtual java/lang/Object/<init>()V
return
.end method
.method public static main([Ljava/lang/String;)V
.limit locals 1
.limit stack 5
BeginGlobal:
.line 2
getstatic java/lang/System/out Ljava/io/PrintStream;
ldc 0x1
ldc 0x0
iand
invokevirtual java/io/PrintStream/println(Z)V
.line 3
getstatic java/lang/System/out Ljava/io/PrintStream;
ldc 0x1
ldc 0x0
ior
invokevirtual java/io/PrintStream/println(Z)V
EndGlobal:
return
.end method
Feature | Supported | Example | Token |
---|---|---|---|
Strings | ✓ | "Hello world" | " |
Comments | ✓ | ; A comment | |
Line Comments | ✓ | ; A comment | ; |
Semantic Indentation | X |