////////////Program to sum two bits
////////////The ribbon must be 4 chars length
////////////The firts 2 chars are the bits to sum
////////////The final 2 bits is where the result will be stored
////////////The final 2 bits could have any value intially, it'll be ignored
////////////By: Alberto Avila
//If the first bit is a zero, run procedure Zero Plus X
Start:ZeroPlusX:0:0:RIGHT
//If the first bit is a one, run procedure One Plus X
Start:OnePlusX:1:1:RIGHT
//////////PROCEDURES
////Zero Plus X
//If the second bit is Zero, run procedure Zero Plus Zero
ZeroPlusX:ZeroPlusZero:0:0:RIGHT
//If the second bit is One, run procedure Zero Plus One
ZeroPlusX:ZeroPlusOne:1:1:RIGHT
////Zero Plus Zero
//Print Zero and Loop to End
ZeroPlusZero:ZeroPlusZero:0:0:RIGHT
ZeroPlusZero:ZeroPlusZero:1:0:RIGHT
////Zero Plus One
//Print Zero and goto ZeroPlusOne2
ZeroPlusOne:ZeroPlusOne2:0:0:RIGHT
ZeroPlusOne:ZeroPlusOne2:1:0:RIGHT
//Print One and END
ZeroPlusOne2:END:0:1:RIGHT
ZeroPlusOne2:END:1:1:RIGHT
////One Plus X
//if the second bit is one, run One Plus One
OnePlusX:OnePlusOne:1:1:RIGHT
//if the second bit is zero, run Zero Plus One
OnePlusX:ZeroPlusOne:0:0:RIGHT
////One Plus One
//Print One and goto 2
OnePlusOne:OnePlusOne2:0:1:RIGHT
OnePlusOne:OnePlusOne2:1:1:RIGHT
//Print Zero and END
OnePlusOne2:END:0:0:RIGHT
OnePlusOne2:END:1:0:RIGHT
////END
END:END:0:0:RIGHT
END:END:1:1:RIGHT
-Start