Warmaster199
Mar 21st, 2001, 03:06 PM
Can someone please convert this to inline assembler(For use with BorlandC or C code? It's needed quite urgently.
public _setbxdx
.MODEL SMALL ;whatever
.CODE
set_struc struc
dw ? ;old bp
dd ? ;return addr (always far call)
p_bx dw ? ;reg bx value
p_dx dw ? ;reg dx value
set_struc ends
;HELP CONVERT THIS FUNCTION TO C/C++!!!
_setbxdx proc far ; must be FAR
push bp
mov bp,sp
mov bx,[bp]+p_bx
mov dx,[bp]+p_dx
pop bp
ret
_setbxdx endp
END
in C, the function prototype is "far setbxdx(int, int);"
I can get most of of the conversion, but I want it to work with the "REGS" structure. I've already posted this in the ASM forum, but it's in more depth here.
I need this urgently!
public _setbxdx
.MODEL SMALL ;whatever
.CODE
set_struc struc
dw ? ;old bp
dd ? ;return addr (always far call)
p_bx dw ? ;reg bx value
p_dx dw ? ;reg dx value
set_struc ends
;HELP CONVERT THIS FUNCTION TO C/C++!!!
_setbxdx proc far ; must be FAR
push bp
mov bp,sp
mov bx,[bp]+p_bx
mov dx,[bp]+p_dx
pop bp
ret
_setbxdx endp
END
in C, the function prototype is "far setbxdx(int, int);"
I can get most of of the conversion, but I want it to work with the "REGS" structure. I've already posted this in the ASM forum, but it's in more depth here.
I need this urgently!