Tuesday, October 9, 2007

Communicating RPN stack and LASTX register transitions, a notation

I will try using the following notation to communicate program's effect on the stack and LASTX register:
[X, Y, Z, T | L]-> opr. desc. ->[X', Y', Z', T' | L']
So for example to describe sqrt:
[X, Y, Z, T | L]-> sqrt ->[sqrt(X), Y, Z, T | X]
and addition:
[X, Y, Z, T | L]-> + ->[Y+X, Z, T, T | X]

No comments: