progs/fib.j
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Sat, 15 Jun 2013 09:23:18 -0400
changeset 93 4794759139ea
child 207 f824e1331fc6
permissions -rw-r--r--
better organised
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
93
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
.class public fib.fib
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
.super java/lang/Object
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
.method public <init>()V
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
   aload_0
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
   invokenonvirtual java/lang/Object/<init>()V
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
   return
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
.end method
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
.method public static write(I)V 
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
    .limit locals 5 
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
    .limit stack 5 
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
    iload 0 
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
    getstatic java/lang/System/out Ljava/io/PrintStream; 
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
    swap 
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
    invokevirtual java/io/PrintStream/println(I)V 
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
    return 
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
.end method
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    21
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    22
.method public static main([Ljava/lang/String;)V
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    23
   .limit locals 200
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    24
   .limit stack 200
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    25
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    26
ldc 19
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
istore 0
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    28
ldc 0
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
istore 1
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    30
ldc 1
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    31
istore 2
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    32
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    33
Loop_begin_0:
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    34
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    35
ldc 0
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    36
iload 0
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    37
if_icmpge Loop_end_1
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    38
iload 2
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    39
istore 3
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    40
iload 1
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    41
iload 2
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    42
iadd
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    43
istore 2
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    44
iload 3
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    45
istore 1
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    46
iload 0
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    47
ldc 1
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    48
isub
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    49
istore 0
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    50
goto Loop_begin_0
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    51
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    52
Loop_end_1:
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    53
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    54
iload 2
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    55
invokestatic fib/fib/write(I)V
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    56
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    57
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    58
   return
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    59
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    60
.end method