scotws / tinkasm

A Tinkerer's Assembler for the 6502/65c02/65816
GNU General Public License v3.0
10 stars 0 forks source link

Replace EVAL math construction with { } with [ ] for stack-based math #12

Closed scotws closed 5 years ago

scotws commented 5 years ago

EVAL is dangerous and needs to go. We can replace the braces by [ and ] and use them to delimit stack-based math engine in the form of [ 2000 10 +]. Note we should still support simple math such as $1000+1 because it is so useful.

scotws commented 5 years ago

Math routines should live in their own module. Consider including math directives such as .swap, .drop, .dup but make sure they are only legal in stack_math module.