Trying to figure out how to properly call a subroutine that has multiple parameters, multiple times in x86 assembly. Any help is appreciated! Using the Irvine libraries for this one. The first portion of code is what I was attempting but it doesn't seem to work, at least not the way it should:
push OFFSET r1
push OFFSET c0
push OFFSET b0
push OFFSET a0
push 0
call quadratic ;(0,a0,b0,c0,r1)
and the second portion of code seems to be correct:
quadratic PROC
; calculation of the roots of a parabola
; Receives from stack
; flag = type of root (0=positive, 1=negative) [integer, value parameter]
; a$, b$, c$ = parabola parameters [REAL reference parameters]
; Returns
; Specified root [REAL8 reference parameter]
PARAMS = 3*TYPE DWORD ; number of temporaries plus return address
FLAG = PARAMS+0
A$ = PARAMS+4
B$ = PARAMS+8
C$ = PARAMS+12
RESULT = PARAMS+16
If more of the code is needed to determine the proper way of calling the subroutine just let me know. Thanks again!