Mostly an experiment. Features: A stack (wow I know - full of ints from 0 to 63 with anything over wrapping around, can hold up to 4096 data points, any additional will be deleted) Input Output via a variable aptly named output (UI isn't that great) Commands/Syntax: <a number from 0 to 63>: adds number to Stack +: pops first two numbers off stack, adds their sum to the Stack -:pops first two numbers off stack, adds their difference to the Stack *: pops first two numbers off stack, adds their product to the Stack /: pops first two, adds their integer quotient rounded down %: pops first two, adds second modulo first _: adds user input to the stack r: adds random number to the stack o: outputs top number of stack to the variable s: outputs top number to variable as a special character :<line number>: goes to that line number (e.g. :25 goes to line 25) =<line number>: pops top number, goes to line number if nonzero ><line number>: pops top 2, goes to line number if second greater than first <<line number>: pops top 2, goes to line number if first is greater than second !<line number>: pops number, goes to that line number if zero #: clears the variable @: outputs the variable ?: asks the variable and adds answer to Stack
Features: error handling Take Care (lazy coding or features): -Will not reveal Syntax errors for <,>, and ! but does for =. - = is the default Boolean goto instead of equals -For operations, e.g. (-), if a is first number on stack and b is second, then it adds b-a not a-b. -Numbers too large or small for the Stack are taken mod 64, then added