Hi, I am calling a PROC to test two values in assembly x86 16bits and then jump if the value is bigger than zero, so I am doing something like this:
TESTIT PROC
CMP AX,1
JG FOO
RET
TESTIT ENDP
FOO:
;do something
END FOO
MAIN:
CALL TESTIT
.EXIT
END MAIN
END
My questions is simple, how do I return back from FOO to the point in MAIN that called TESTIT. I do not want to perform a JMP from FOO to MAIN, as that will call TESTIT again. When I try to put RET at the end of FOO, the command window gets stuck with a blinking cursor.
Note: I know this can be achieved using the pseudo op .IF ... .ENDIF
instead of JG but I want to try and achieve the same result without the pseudo op, which does some magic in the background I do not know how to achieve manually.