Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- There is such a thing as a fish.
- A fish has a register which is a number.
- A fish has a voice which is a scribe.
- A fish has a brain which is a mathematician.
- A fish has an eye which is a number.
- A fish has an input which is an inputter.
- A fish can validate.
- A fish can add.
- A fish can subtract.
- A fish can square.
- A fish can output.
- A fish can interpret.
- When a fish is to validate:
- brain's first operand is register.
- brain's second operand is 256.
- brain is to compare.
- If brain says it's equal then register is 0.
- brain's first operand is register.
- brain's second operand is -1.
- brain is to compare.
- If brain says it's equal then register is 0.
- When a fish is to add:
- brain's first operand is register.
- brain's second operand is 1.
- brain is to add.
- register is brain's result.
- I am to validate.
- When a fish is to subtract:
- brain's first operand is register.
- brain's second operand is 1.
- brain is to subtract.
- register is brain's result.
- I am to validate.
- When a fish is to square:
- brain's first operand is register.
- brain's second operand is register.
- brain is to multiply.
- register is brain's result.
- I am to validate.
- When a fish is to output:
- voice is to write register.
- voice is to asciiWrite 10.
- When a fish is to interpret:
- input is to readOne eye.
- If input says it's done then I am to quit.
- brain's first operand is eye.
- brain's second operand is 105.
- brain is to compare.
- If brain says it's equal then I am to add.
- brain's first operand is eye.
- brain's second operand is 100.
- brain is to compare.
- If brain says it's equal then I am to subtract.
- brain's first operand is eye.
- brain's second operand is 115.
- brain is to compare.
- If brain says it's equal then I am to square.
- brain's first operand is eye.
- brain's second operand is 111.
- brain is to compare.
- If brain says it's equal then I am to output.
- I am to loop.
- When this program starts:
- There is a fish called Deadfish.
- Deadfish's register is 0.
- Deadfish is to interpret.
Advertisement
Comments
-
- This program can also be seen on https://esolangs.org/wiki/ORK#Deadfish
Add Comment
Please, Sign In to add comment