Mail Archives: djgpp/1996/11/24/01:57:10
Listen, I apologize if this is sort of a beginner question. I need to
find out how to return a value from an asm procedure. I'm using o2c (the
obj to coff converter), so this is for tasm.
Also, how do I set up the prototype in my c++ program? Can I return
structs etcetera, or only pointers to them? Here is a sample:
p386
ideal
model flat,c
extern malloc: proc
virt dd ?
public makevirt
proc makevirt
push 64000
push 0
call malloc
pop virt
;I want to return virt to the c++ program
ret
endp makevirt
end
/* C++ program */
void main ()
{ unsigned char * virtscreen = makevirt ();
}
So my question is, what do I add to make this compile?
All help greatly appreciated,
Chris Gouldie
- Raw text -