none-None1

Deadfish in ORK

Oct 2nd, 2026 (edited)
32
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | Source Code | 0 0
  1. There is such a thing as a fish.
  2. A fish has a register which is a number.
  3. A fish has a voice which is a scribe.
  4. A fish has a brain which is a mathematician.
  5. A fish has an eye which is a number.
  6. A fish has an input which is an inputter.
  7. A fish can validate.
  8. A fish can add.
  9. A fish can subtract.
  10. A fish can square.
  11. A fish can output.
  12. A fish can interpret.
  13.  
  14. When a fish is to validate:
  15. brain's first operand is register.
  16. brain's second operand is 256.
  17. brain is to compare.
  18. If brain says it's equal then register is 0.
  19. brain's first operand is register.
  20. brain's second operand is -1.
  21. brain is to compare.
  22. If brain says it's equal then register is 0.
  23.  
  24. When a fish is to add:
  25. brain's first operand is register.
  26. brain's second operand is 1.
  27. brain is to add.
  28. register is brain's result.
  29. I am to validate.
  30.  
  31. When a fish is to subtract:
  32. brain's first operand is register.
  33. brain's second operand is 1.
  34. brain is to subtract.
  35. register is brain's result.
  36. I am to validate.
  37.  
  38. When a fish is to square:
  39. brain's first operand is register.
  40. brain's second operand is register.
  41. brain is to multiply.
  42. register is brain's result.
  43. I am to validate.
  44.  
  45. When a fish is to output:
  46. voice is to write register.
  47. voice is to asciiWrite 10.
  48.  
  49. When a fish is to interpret:
  50. input is to readOne eye.
  51. If input says it's done then I am to quit.
  52. brain's first operand is eye.
  53. brain's second operand is 105.
  54. brain is to compare.
  55. If brain says it's equal then I am to add.
  56. brain's first operand is eye.
  57. brain's second operand is 100.
  58. brain is to compare.
  59. If brain says it's equal then I am to subtract.
  60. brain's first operand is eye.
  61. brain's second operand is 115.
  62. brain is to compare.
  63. If brain says it's equal then I am to square.
  64. brain's first operand is eye.
  65. brain's second operand is 111.
  66. brain is to compare.
  67. If brain says it's equal then I am to output.
  68. I am to loop.
  69.  
  70. When this program starts:
  71. There is a fish called Deadfish.
  72. Deadfish's register is 0.
  73. Deadfish is to interpret.
Advertisement
Comments
Add Comment
Please, Sign In to add comment