so I'm trying to make a simple for loop in Jasmin that prints out hello world everytime it goes through the loop. The problem is whenever I try to increment it by adding one I get this error that says, "Error: Unable to initialize main class test Caused by: java.lang.VerifyError: (class: test, method: main signature: ([Ljava/lang/String;)V) Inconsistent stack height 1 != 2" It works when I'm not trying to add one, but not sure why it doesn't when I put it back in. Any help would be appreciated!
.class public test
.super java/lang/Object
.method public <init>()V
aload_0
invokenonvirtual java/lang/Object/<init>()V
return
.end method
.method public static main([Ljava/lang/String;)V
.limit stack 5
ldc 15
ldc 1
startLoop:
iflt endLoop
getstatic java/lang/System/out Ljava/io/PrintStream;
ldc "hello world"
invokevirtual java/io/PrintStream/print(Ljava/lang/String;)V
ldc 1
iadd
goto startLoop
endLoop:
return
.end method