chicken-php
chicken-php copied to clipboard
[Question] How to loop in Chicken?
I'm trying to write an interpreter for Chicken in C#, and while creating the "Fr"/"Jump" instruction, I noticed that it jumps relative to the instruction pointer's current position, rather than to an absolute position in the stack. Since values in Chicken can only be positive (due to the fact that you can't put a negative number of the word "Chicken" on a line), how could a program jump backward to run previous instructions repeatedly?
If you have an example, I would prefer Eggsembly rather than compiled Chicken.
You can have negative numbers:
push 0
push 1
fox