-
-
Save Wheatwizard/8a6e882fad6085958128125c0a91f552 to your computer and use it in GitHub Desktop.
A list of the instructions for a hypothetical language I am designing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instructions = [ | |
#Actions | |
"NP", #No-op | |
"IG", #Increase Grouping size | |
"DG", #Decrease Grouping size | |
"RI", # Roll instructions 1 step | |
"UI", #Unroll instructions 1 step | |
"IT", #Increment the value of all tokens | |
"DT", #Decrement the value of all tokens | |
"RC", #Roll stack Clockwise | |
"RA", #Roll stack Anticlockwise | |
#Dyads | |
"AD", #Addition | |
"SB", #Subtraction | |
"ML", #Multiplication | |
"MO", #Perform the modulus | |
#Monads | |
"PU", #Push (returns the value) | |
"PR", #Print (returns the value) | |
"BO", #Boolean | |
"NO", #Not | |
"NE", #Negative | |
"FI", #Take the nth fibbonacci number | |
#Nilads | |
"PP", #Pop TOS | |
"LT", #Interpret the next token as a literal | |
#Exit | |
"EX", #Terminate Program | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment