Results 1 to 4 of 4

Thread: Inline ASM, and questions please help

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    313

    Inline ASM, and questions please help

    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

  2. #2
    ChimpFace9000
    Guest
    How about keeping it to one forum, and when you dont get an answer in that forum, post in another one.

  3. #3
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    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.
    "Can't" and "shouldn't" are two totally separate things.

    All questions should be answered. All answers should be true. That is why I post.

  4. #4
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    Found a thread which might help:

    http://www.vbforums.com/showthread.p...hreadid=237187

    (Finally, hyperactive member status.)
    "Can't" and "shouldn't" are two totally separate things.

    All questions should be answered. All answers should be true. That is why I post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width