[b][red]This message was edited by xkgdiam at 2003-11-21 19:12:53[/red][/b][hr]
i use new on the topic cause i edit the first message to this
i have some functions in assembly and try to call them from c++
my assembly file user .386 directive to have acces on 32 bit registers
First, when i pass the assembly file in Bcc
$(BCC) -3 -ms -M -li -l3 -lc ccall32.cpp call32.asm
in compiles my asm as 16 bit although -3 option,
i solve this using TASM32 to make my asm obj, ok.
Second, here is asm function :
pushStack ;macro so ebp point the 1st arg
;;; mov dx,ax ;;;;;;;;;;;;;;
popStack ;pop ebp
_ret ;if(__LARGE__) retf , if(__SMALL__) ret
is there any command to get MSWord of eax to dx
so return a long ?
Third, why my BCC uses 16 bit registers althought i use option -3
that supports 386 instructions.
And finaly BCC always act like that (16bit) or my macros will
fail in some other linking ?
(in push stack macro i add ebp 2bytes for IP and 2bytes for CS
if a large program, also i add the bp or ebp space)