17
22/08/2003
Copyright Teemu Kerola 2003
If-then-else -valinta
(2)
if (a<b)
x = 5;
else
x = y;
LOAD
R1, A
COMP
R1, B
JNLES
Else
LOAD
R1, =5
STORE
R1, X
JUMP
Done
Else
LOAD
R1, Y
STORE
R1, X
Done
NOP
?
LOAD
R2, Y
LOAD
R1, A
COMP
R1, B
JNLES
Else
LOAD
R2, =5
ELSE
STORE
R2, X
vai olisiko tämä parempi: