Commit Graph

9 Commits

Author SHA1 Message Date
Virgil Dupras a034f63e23 test: begin adding common test harnessing code
This should make tests a bit more convenient to write and debug.

Moreover, begin de de-IX-ization of parseExpr. I have, in a local WIP, a
parseExpr implemented using a recursive descent algo, it passes all tests, but
it unfortunately assembles a faulty zasm. I have to find the expressions that
it doesn't parse properly.

But before I do that, I prefer to commit these significant improvements I've
been making to tests harness in parallel of this development.
2019-12-23 15:41:25 -05:00
Virgil Dupras a680fd3328 basic: add support for signed integers 2019-11-23 14:56:23 -05:00
Virgil Dupras 501fe96e07 lib/expr: use the IX register a bit less
It's an awkward register to use and avoiding its use allows us to strip the
resulting binary significantly. parseEXPR keeps the same signature though.
2019-11-22 19:56:08 -05:00
Virgil Dupras 2f71ad6d2f lib/expr: add left/right shifting operators 2019-11-22 18:35:10 -05:00
Virgil Dupras a03c5ac700 lib/expr: add bitwise operators 2019-11-22 17:16:51 -05:00
Virgil Dupras 972e8221f1 lib/expr: add division and modulo operators 2019-11-22 15:03:16 -05:00
Virgil Dupras 1b01f13105 lib/expr: refactor for easier operator addition 2019-11-22 14:45:12 -05:00
Virgil Dupras 7262993f14 basic: add if 2019-11-21 16:06:14 -05:00
Virgil Dupras f5b04fc02f basic: add expression support to print
Again, same thing as in zasm.
2019-11-18 15:52:44 -05:00