*Algebraic behavior in the Simulator*

**
The following program allows simulate one algebraic calculator
Contents of NORMAL.PRG
**

cf 00 cf 01 cf 02 cf 03 cf 04 dsp 84 = (Write two spaces between 84 and = ) useron rtn lbl + fs? 04 xeq R sf 00 sf 04 enter^ rtn lbl - fs? 04 xeq R sf 01 sf 04 enter^ rtn lbl * fs? 04 xeq R sf 02 sf 04 enter^ rtn lbl / fs? 04 xeq R sf 03 sf 04 enter^ rtn lbl R cf 04 fs?c 00 + fs?c 01 - fs?c 02 * fs?c 03 / rtn

Example: Calculate the following operation using normal form:

(3 + 6 -2) * 4 / 2

In RPN :

3 [ENTER] 6 + 2 - 4 * 2 /

In algebraic (normal) form:

[XEQ]NORMAL

3 [+] 6 [-] 2 [*] 4 [/] 2 [=]