SX Microcontoller Basic Math Method Expression Evaluator



;Evaluating '3*A^2+4*B+C+5'

;const (3) :1 @36.
;var (A) :1 @37
;const (2) :1 @38.
;SQUARE 8bits @38 ^ @37 to @37...38.
;constdivmul @37 * 3 @37 * @36 to @36...39.
;const (4) :1 @40.
;var (B) :1 @41
;constdivmul @41 * 4 @41 * @40 to @40...41.
;var (C) :1 @42
;const (5) :1 @43.
;ADD 8bit @43 + @42 to @42.
;ADD 16bit @42 + @40 to @40...41.
;ADD 32bit @40 + @36 to @36...39.
Expression:

show the process
Examples: Operations (In reverse order of priority) Atoms: Reading the results:
At signs (@) indicate memory locations (file register address). Colons (:) indicate width in bytes. Items in () are the sepecific item being worked with by the general method. Links take you to code library indexes or code generators for the required operation.
To do: