Skip to content

Instantly share code, notes, and snippets.

@Wheatwizard
Last active February 28, 2017 21:42
Show Gist options
  • Save Wheatwizard/8a6e882fad6085958128125c0a91f552 to your computer and use it in GitHub Desktop.
Save Wheatwizard/8a6e882fad6085958128125c0a91f552 to your computer and use it in GitHub Desktop.
A list of the instructions for a hypothetical language I am designing
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