progs/test-small.j
author Christian Urban <urbanc@in.tum.de>
Mon, 27 Jan 2020 10:11:44 +0000
changeset 708 4980f421b3b0
parent 375 bf36664a3196
child 710 183663740fb7
permissions -rw-r--r--
updated
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
708
4980f421b3b0 updated
Christian Urban <urbanc@in.tum.de>
parents: 375
diff changeset
    22
$\mbox{}\hfill\tikz[remember picture] \node[] (LA) {};$  ldc 1 
375
bf36664a3196 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    23
   ldc 2
708
4980f421b3b0 updated
Christian Urban <urbanc@in.tum.de>
parents: 375
diff changeset
    24
   iadd        
4980f421b3b0 updated
Christian Urban <urbanc@in.tum.de>
parents: 375
diff changeset
    25
$\tikz[remember picture] \node[] (LB) {};$  istore 0 
4980f421b3b0 updated
Christian Urban <urbanc@in.tum.de>
parents: 375
diff changeset
    26
$\tikz[remember picture] \node[] (LC) {};$  iload 0     
4980f421b3b0 updated
Christian Urban <urbanc@in.tum.de>
parents: 375
diff changeset
    27
$\tikz[remember picture] \node[] (LD) {};$  invokestatic test/test/write(I)V 
375
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