.TITLE Function Evaluate F(X) ; Page 65 of Section 2.4 ; This program will calculate the value ; of the function F(X) = 2X + 512 X**2 for ; integer inputs. X: .LONG 15 ; input is decimal 15 .ENTRY Function, 0 MULL3 #2, X, R2 ; R2 now has 2X MULL3 X, X, R3 ; R3 now has X**2 MULL2 #512, R3 ; R3 now has 512X**2 ADDL2 R2, R3 ; R3 has the value of F $EXIT_S .END Function