; This program will calculate the value ; of the function F(x) = 2x + 512x^2 for ; integer inputs X: .LONG ^D15 ; Input is decimal 15 .ENTRY Function, 0 Begin: MULL3 #2, X, R2 ; R2 now has 2x MULL3 X, X, R3 ; R3 now has x*x MULL2 #512, R3 R3 now has 3x*x ADDL2 R2, R3 ; R3 has the value Done: $EXIT_S .END Function