any code to calculate y=a*x^2+b*x+c ?

I'm looking for 8086 ASM code that calculates
[code]y=a*x^2+b*x+c[/code] with a, b, c coefficients
and x varying for positive values.

If possible I'd like it to be compatible with

Thank you.


  • [code]
    ;Input: AL = A, BH=B, BL=X, CX=C
    ;Output: SI:DI = Y
    mul bl ;AX = AL * CL
    mul ax ;DX:AX = AX * AX
    mov di,ax
    mov si,dx
    mov al,bh
    mul bl ;AX = AL * BL
    add ax,cx
    add di,ax
    adc si,0
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion