// sommapos // sommare tre variabili, se positive, memorizzate a partire da lv + 5 // risultato in lv + 4 .main .var x0 x1 x2 x3 somma a b c .end-var // inizializzazione delle variabili BIPUSH 2 ISTORE a BIPUSH -5 ISTORE b BIPUSH 1 ISTORE c // inizio programma BIPUSH 0 ISTORE somma ILOAD a IFLT dopo1 ILOAD somma ILOAD a IADD ISTORE somma dopo1: ILOAD b IFLT dopo2 ILOAD somma ILOAD b IADD ISTORE somma dopo2: ILOAD c IFLT fine ILOAD somma ILOAD c IADD ISTORE somma fine: ILOAD somma OUT HALT .end-main