TweeZcodeCompiler / twee_zcode_compiler

compiler project at FU Berlin
MIT License
3 stars 0 forks source link

Test file "somewhatComplexAddition" generates a illegal opcode #100

Closed lhochstetter closed 9 years ago

lhochstetter commented 9 years ago

As the title says following test file produces a "fatal error: stack underflow (pc=0xaae)" after successful execution

Code:

::Start

Die glorreiche Addition von zwei Zahlen über Set, Print, Display und If Else

$a = <<set $a = 10>><<print $a>>
$b = <<set $b = 22>><<print $b>>
<<display "ADD">>
::ADD
<<if $a >= 0>>
$a = <<print $a>> <<set $a = $a-1>>
$b = <<print $b>> <<set $b = $b+1>>
<<display "ADD">>
<<else if $a is 0>>
FERITG!
<<endif>>
lhochstetter commented 9 years ago

somehow fixed ... magic