progs/test-small.j
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Fri, 15 Jul 2016 10:54:09 +0100
changeset 406 0a42d73e795b
parent 375 bf36664a3196
child 708 4980f421b3b0
permissions -rw-r--r--
repl-slides
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
375
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
.class public test.test
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
.super java/lang/Object
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
.method public <init>()V
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
   aload_0
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
   invokenonvirtual java/lang/Object/<init>()V
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
   return
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
.end method
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
.method public static write(I)V 
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
    .limit locals 1 
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
    .limit stack 2
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
    getstatic java/lang/System/out Ljava/io/PrintStream; 
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
    iload 0 
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
    invokevirtual java/io/PrintStream/println(I)V 
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
    return 
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
.end method
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
.method public static main([Ljava/lang/String;)V
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
   .limit locals 200
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    21
   .limit stack 200
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    22
   ldc 1
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    23
   ldc 2
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    24
   iadd
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    25
   istore 0
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    26
   iload 0
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
   invokestatic test/test/write(I)V
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    28
   return
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
.end method