Higher Subleq | Error | Output | Subleq | ITR |
int i=3;
void main()
{
while( i ) { __out 48+i; i=i-1; }
i = 48;
while( i<58 ) { __out i; i=i+1; }
}
|
|
3210123456789
|
top:top top sqmain
. _i:3
_main:
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; bp 0
bp; sp bp
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; t1 0
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; t2 0
l1:
t1; _i Z; Z t1 ?+3; Z Z ?+9; Z; _i t1; _i t1
Z t1 l2
t1; t2; c1 t1; _i t1; t1 t2
t2 (-1)
t1; _i Z; Z t1; Z; dec t1
_i; t1 Z; Z _i; Z
Z Z l1
l2:
_i; c1 Z; Z _i; Z
l3:
t1; c3 Z; Z t1; Z; _i t1
Z t1 l4
_i (-1)
t1; t2; _i t1; dec t1; t1 t2
_i; t2 Z; Z _i; Z
Z Z l3
l4:
?+8; sp ?+4; t2; 0 t2; inc sp
?+8; sp ?+4; t1; 0 t1; inc sp
sp; bp sp
?+8; sp ?+4; bp; 0 bp; inc sp
?+8; sp ?+4; ?+7; 0 ?+3; Z Z 0
sqmain:
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; ?+2 0 _main; . ?; inc sp
Z Z (-1)
. c2:0 c1:48 c3:58
. t1:0 t2:0
. inc:-1 Z:0 dec:1 ax:0 bp:0 sp:-sp
|
Root (mg_9_2.hsq:11)
Declaration (mg_9_2.hsq:1)
Keyword [int] (mg_9_2.hsq:1)
Declarator [=] (mg_9_2.hsq:1)
Id [i] (mg_9_2.hsq:1)
Const [3] (mg_9_2.hsq:1)
Function:0 [main] (mg_9_2.hsq:2)
Keyword [void] (mg_9_2.hsq:2)
Param-type-list (mg_9_2.hsq:2)
Block (mg_9_2.hsq:3)
Keyword-statement [while] (mg_9_2.hsq:4)
Equality [!=] (mg_9_2.hsq:4)
Variable [i] (mg_9_2.hsq:4) =:1
Const [0] (mg_9_2.hsq:4)
Block (mg_9_2.hsq:4)
OperatorIO [__out] (mg_9_2.hsq:4)
Additive [+] (mg_9_2.hsq:4)
Const [48] (mg_9_2.hsq:4)
Variable [i] (mg_9_2.hsq:4) =:1
Assignment [=] (mg_9_2.hsq:4)
Variable [i] (mg_9_2.hsq:4) =:1
Additive [-] (mg_9_2.hsq:4)
Variable [i] (mg_9_2.hsq:4) =:1
Const [1] (mg_9_2.hsq:4)
Assignment [=] (mg_9_2.hsq:6)
Variable [i] (mg_9_2.hsq:6) =:1
Const [48] (mg_9_2.hsq:6)
Keyword-statement [while] (mg_9_2.hsq:7)
Relational [<] (mg_9_2.hsq:7)
Variable [i] (mg_9_2.hsq:7) =:1
Const [58] (mg_9_2.hsq:7)
Block (mg_9_2.hsq:7)
OperatorIO [__out] (mg_9_2.hsq:7)
Variable [i] (mg_9_2.hsq:7) =:1
Assignment [=] (mg_9_2.hsq:7)
Variable [i] (mg_9_2.hsq:7) =:1
Additive [+] (mg_9_2.hsq:7)
Variable [i] (mg_9_2.hsq:7) =:1
Const [1] (mg_9_2.hsq:7)
|