Sooo.....
Long time no post of this project. I'm sorry for that, I am pretty busy with exams and the study next year after the exams, but that doesn't mean I haven't worked on it. As you may know is the Shunting-Yard-Algorithm already done, which means I've started with the part to evaluate the RPN notation stuff. Not very easy, because I want to optimize the output very well, but that also means more statements, and stuff, bla bla bla.... For each operator, there are 4 possibilities:
- <number> <number> <operator>
- <number> <variable> <operator>
- <variable> <number> <operator>
- <variable> <variable> <operator>
Both numbers, is just popping the numbers and operator from the stack, and push the result. And for the other cases, I've written routines to evaluate them and add the output to the program data. For now, it's pretty optimized, and I'm finally happy that I've a screenshot now
I've only implemented + and - yet, and I'm busy with *. I hope to make good progress!
P.S. Now that I'm posting this post, I see that <number> - <variable> can be shorter:
ld a, <number> / ld hl, <variable> / sub a, (hl)
EDIT: here is my table for multiplying a variable with a given number: