PDA

Click to See Complete Forum and Search --> : Inline ASM, and questions please help


deoblo1
Jun 2nd, 2001, 11:25 PM
Can someone help me out with inline asm in c++

1.) How do u work with paramiters?

void asmfunc(int x, int y)
{
asm
{
mov ax, x
mov dx,y
}
}

is that how you work with paramiters?

2.) How do you do return functions?

3.) if i were to just use if statments, and for loops, and write my own display functions ect...would it not use dos?

4.) how do I make a com file?

5.) how do i boot to the program i make, in other words how do i make a boot disk?

Thank you so much

ChimpFace9000
Jun 3rd, 2001, 12:15 AM
How about keeping it to one forum, and when you dont get an answer in that forum, post in another one.

Darkwraith
Jul 21st, 2003, 04:56 PM
The code that you posted (in this thread at least) will load your parameters into the AX and DX registers.

If your function returned an integer, the function will return what is in the EAX register (it might be different for your complier but this is true for MSVC++ 6.0)

Lastly (because I am uncertain of 3 and 4,) do a search for bootstrapping. That should give you the information you want.

Hope this helps.

Darkwraith
Jul 21st, 2003, 05:57 PM
Found a thread which might help:

http://www.vbforums.com/showthread.php?s=&threadid=237187

(Finally, hyperactive member status.)