arp2600/sod
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
RPCalc is a programmable, stack based, reverse polish notation calculator An operation in rpcalc looks like this: 4 5 * '4' and '5' push the numbers 4 and 5 to the top of the stack, and the '*' operator multiplies the 4 and the 5 and pushes 20 to the stack where the 4 whilst also reducing the stack size by 1, makeing 20 the head of the stack. Functions can also be declared in rpcalc: :foo + + ; This defines a function call foo that performs the addition operation twice. A colon followed by an identifier begins a function definition, and a semi-colon finishes the function defintion. When a function is called, all operations inside the function are performed in order. Currently, a few functions are defined in rpcalc, but the end goal is to have rpcalc load up functions from a file at runtime.