News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Urgent Help

Started by vennila, April 28, 2006, 10:37:54 AM

Previous topic - Next topic

vennila

I am passing 2 integers from C program to 8086 assembly subroutine and i am doing division operation in the subroutine using DIV function. I dont know how to return the quotient and remainder values from the subroutine to the C Program

Help me

sluggy

This request is better - you are asking a specific question about a specific problem. But one more thing: don't spam the forums with basically the same question, we dislike spam.

To return just one value from an asm function, put the value in the (e)ax register. If you need to return multiple values from one call then you will need to pass in at least one pointer - this points to the variable used to hold the value, and is called passing by reference. There is a ton of info on this everywhere, so i will leave it up to you to research it more.