JVM Assembly Language Programming


.class public HelloWorld
.super java/lang/Object


; standard initializer
.method public ()V
   aload_0
 
   invokenonvirtual java/lang/Object/()V
   return
.end method

.method public static main([Ljava/lang/String;)V
   .limit stack 2

   ; push System.out onto the stack
   getstatic java/lang/System/out Ljava/io/PrintStream;

   ; push a string onto the stack
   ldc "Hello World!"
  
   ; call the PrintStream.println() method.
   invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V

   ; done
   return
.end method