0 Members and 1 Guest are viewing this topic.
Btw, slightly off topic, but thanks Runer112 for reminding me of using the stack to help out with this
Quote from: Hot_Dog on April 28, 2011, 08:39:14 pmBtw, slightly off topic, but thanks Runer112 for reminding me of using the stack to help out with thisOh I bet that is how Axe does it... I use a completely different method which is why ReCode does math right to left...
What's infix and what's postfix?
While we're on the subject...http://xkcd.com/645/
prefix (a.k.a Polish Notation): + 1 2infix: 1 + 2postfix (a.k.a Reverse Polish Notation): 1 2 +with infix you have to worry about order of operations, whereas with postfix and prefix you don't.While we're on the subject...http://xkcd.com/645/
Well, the only issue is that my ASM is a bit on the completely awful side. But I could give it a go. At the very least I could write a low-level pseudocode for implementation.
So, would we code in order of operations, left to right, right to left, or RPN?
Log10: ld de,4 ld bc,-10000 add hl,bc jr c,Log10End dec e ld bc,-1000-(-10000) add hl,bc jr c,Log10End dec e ld bc,-100-(-1000) add hl,bc jr c,Log10End dec e ld a,l add -10-(-100) jr c,Log10End dec eLog10End: ex de,hl ret