.TITLE EXAMPLE ; This program will calculate the value of the ; function F(X) = 2*X + 32*X*X for integer inputs ; Variable list: X: .WORD 15 ; Input is decimal 15 Y: .BLKW 1 ; Provide storage for the result .ENTRY Function, 0 Begin: MULW3 #2, X, R2 ; R2 now has 2*X MULW3 X, X, R3 ; R3 now has X*X MULW2 #32, R3 ; R3 now has 32*X*X ADDW3 R2, R3, Y ; Y has the value Done: $EXIT_S .END Function