Hello, could somebody tell me, how to call from a c++ prog a MASM-routine with parameter ?

public _huhu
v1 equ +8
v2 equ +6

_huhu PROC FAR
MOV BP, SP ;<-That does tha mean ?

_huhu ENDP

I want to call 2 string(string.h) parameter how does its work ?

Posted on 2003-04-10 18:54:48 by Forginforcer
i'm assuming you mean through a DLL? because if it's in-line assembly, you just have (ignoring my bad syntax... been using PHP and ASM too much):

function bleh(*lpszArg1,*lpszArg2) {
asm {
mov eax,lpszArg1
mov ebx,lpszArg2


if you want to call a DLL, Iczelion has a good tute on them (#17).
Posted on 2003-04-10 21:30:08 by jademtech
I guess you are using 16bit program.

To understand mov bp,sp you have to understand the usage of the stack. Sp is stack pointer while Bp is the pointer to the stack. It allows you to access the LOCAL variables and parameters even through you changed the address of esp (via push and pop).

Most probably, the parameter is a dword. so i suppose calling it would be invoke _huhu,eax (just an example).
Posted on 2003-04-10 21:45:22 by roticv
perhaps someone have an exxample.
Im nut realy sure how to get the parameters, its was just an try...
Posted on 2003-04-11 04:26:51 by Forginforcer