Kawa/Raw programs

From Esolang
Jump to navigation Jump to search

Raw versions of the example programs found in Kawa.

Hello, world!

two;;;;
seven;;;;
nop;withtwo;pushtop;;
one;;;;
zero;;;;
one;;;;
nop;withtwo;pushtop;sequentially;
eight;;;;
zero;;;;
one;;;;
nop;withtwo;astwo,pushtop,pushtop;sequentially;
one;;astwo,astwo;;
nop;withtwo;pushtop;sequentially;
four;;astwo;;
nop;withtwo;pushtop;;
two;;;;
three;;;;
nop;withtwo;pushtop;;
seven;;;;
eight;;;;
nop;withtwo;pushtop;;
one;;astwo,astwo;;
nop;withtwo;pushtop;sequentially;
four;;;;
one;;astwo;;
nop;withtwo;pushtop;sequentially;
eight;;;;
zero;;;;
one;;;;
nop;withtwo;pushtop;sequentially;
zero;;astwo;;
one;;;;
nop;withtwo;pushtop;sequentially;
three;;astwo;;
nop;withtwo;pushtop;;
output;asone;;sequentially,poptop,sequentially;

Fibonacci sequence

zero;;pushtop;;
one;;pushtop;;
nop;withtwo,asone;astwo,pushtop;poptop,astwo,pushbottom,poptop;flag1
output;;;;
two;;;;
three;;;;
nop;withtwo;;;
output;asone;;;
jumpback;;;;flag1

Cat program

input;;;;
output;asone;;sequentially;

Truth-machine

zero;;;;
one;;;;
input;withtwo,limit,asone;;;
condif;negate;;;
output;;;astwo;flag1
jumpback;;;;flag1
condend;;;;
output;;;;

Infinite loop

jumpback;;;;

brainfuck implementation

zero;;;;
zero;;;;
zero;;;;
three;;;;
nop;withtwo;;sequentially;
one;;swap;;flag1
nop;withtwo,asone,negate;;;
condif;negate;;;
zero;asone;pushtop;;
jumpback;;;;flag1
condend;;;;
one;;swap;;
nop;withtwo,asone,negate;pushtop;;
input;;poptop;;
nop;;;pushtop,sequentially,swap,poptop,sequentially,swap;flag1
condif;limit;;;
jumpend;;;;
condend;;;;
two;;;;
six;;;;
nop;withtwo;;;
condif;withtwo;discard;;
jumpback;;poptop,pushbottom;;flag1
condend;;;;
zero;;;;
six;;;;
nop;withtwo;;;
condif;withtwo;discard;;
jumpback;;popbottom,pushtop;;flag1
condend;;;;
three;;;;
four;;;;
nop;withtwo;;;
condif;withtwo;discard;;
one;;;;
nop;withtwo,asone;pushbottom;popbottom;
six;;;;
five;;;;
two;;;;
nop;withtwo;;;
nop;withtwo;;;
nop;withtwo,limit;pushbottom;popbottom;
jumpback;;;;flag1
condend;;;;
five;;;;
four;;;;
nop;withtwo;;;
condif;withtwo;discard;;
one;;;;
nop;withtwo,asone,negate;pushbottom;popbottom;
six;;;;
five;;;;
two;;;;
nop;withtwo;;;
nop;withtwo;;;
nop;withtwo,limit;pushbottom;popbottom;
jumpback;;;;flag1
condend;;;;
six;;;;
four;;;;
nop;withtwo;;;
condif;withtwo;discard;;
output;asone;;popbottom,astwo,pushbottom;
jumpback;;;;flag1
condend;;;;
four;;astwo;;
nop;withtwo;;;
condif;withtwo;discard;;
five;;astwo;;
two;;;;
nop;withtwo;;;
nop;withtwo;;;
zero;;;;
input;asone,withtwo,limit;popbottom,discard,pushbottom;;
jumpback;;;;flag1
condend;;;;
one;;;;
nine;;;;
nop;withtwo;;;
condif;withtwo;discard;;
condif;negate;pushbottom;popbottom;
jumpback;;;;flag1
condend;;;;
one;;pushtop;;
nop;;;pushtop,sequentially,swap,poptop,sequentially,swap;flag2
one;;;;
nine;;;;
nop;withtwo;;;
condif;withtwo;discard;;
one;;;;
nop;withtwo,asone;pushtop;poptop;
condend;;;;
three;;;;
nine;;;;
nop;withtwo;;;
condif;withtwo;discard;;
one;;;;
nop;withtwo,asone,negate;pushtop;poptop;
condend;;;;
condif;negate;pushtop;poptop;
jumpback;;;;flag2
condend;;;;
jumpback;;;poptop,discard;flag1
condend;;;;
three;;;;
nine;;;;
nop;withtwo;;;
condif;withtwo;discard;;
condif;;pushbottom;popbottom;
jumpback;;;;flag1
condend;;;;
one;;pushtop;;
nop;;;sequentially,swap,pushtop,sequentially,swap,poptop;flag2
one;;;;
nine;;;;
nop;withtwo;;;
condif;withtwo;discard;;
one;;;;
nop;withtwo,asone,negate;pushtop;poptop;
condend;;;;
three;;;;
one;;;;
nop;withtwo;;;
condif;withtwo;discard;;
one;;;;
nop;withtwo,asone;pushtop;poptop;
condend;;;;
condif;negate;pushtop;poptop;
jumpback;;;;flag2
condend;;;;
jumpback;;;poptop,discard;flag1
condend;;;;
jumpback;;;;flag1

Kolakoski sequence

two;;;;
one;;;;
output;;;sequentially;
two;;astwo,pushtop;;
two;;;;flag1
nop;withtwo,limit;;swap;
one;;;;
nop;withtwo,asone;;;
output;;;popbottom,astwo,pushbottom;
one;;;;
condif;withtwo;swap,discard,discard;popbottom;
nop;;astwo,pushtop;;
condelse;;;;
nop;;astwo,astwo,pushtop,pushtop;;
condend;;;;
jumpback;;;;flag1