;
; Test bytecode ASM program:
; Matthew W. Coan
; 05/17/2002
;
.class test
.access public
.modifyers
.extends java.lang.Object
.implements

.field a
.access public
.modifyers
.type I

;;;;;;;;;;;;;;;;;;;;
;; Main entry point
;;;;;;;;;;;;;;;;;;;;
.method main
.maxStack 5
.access public
.modifyers static
.signature ([Ljava/lang/String;)V
.args args

.data
int b
int c
test t

.code
fieldref java.lang.System out Ljava/io/PrintStream; system_out
new test
dup
invokespecial test <init> ()V
astore t
fieldref test a I a
aload t
ipush 1
putfield a
ipush 2
istore b
aload t
getfield a
iload b
iadd
istore c
getstatic system_out
iload c
invokevirtual java.io.PrintStream println (I)V
iload c
invokestatic test printIt (I)V
aload t
iload c
iload b
invokevirtual test printIt (II)V
return
.end

;;;;;;;;;;;;;;;;;;;;;;;;
;; Test instance method
;;;;;;;;;;;;;;;;;;;;;;;;
.method printIt
.maxStack 5
.access public
.modifyers
.signature (II)V
.args i i2

.data

.code
fieldref java.lang.System out Ljava/io/PrintStream; system_out
getstatic system_out
iload i
invokevirtual java.io.PrintStream println (I)V
getstatic system_out
iload i2
invokevirtual java.io.PrintStream println (I)V
return
.end

;;;;;;;;;;;;;;;;;;;;;;
;; Test static method
;;;;;;;;;;;;;;;;;;;;;;
.method printIt
.maxStack 5
.access public
.modifyers static
.signature (I)V
.args i

.data

.code
fieldref java.lang.System out Ljava/io/PrintStream; system_out
getstatic system_out
iload i
invokevirtual java.io.PrintStream println (I)V
return
.end
