asm mov

This is a discussion on asm mov within the C++ Programming forums, part of the General Programming Boards category; hi, I use bloodshed dev c++ I tried to use the prog mouse.zip given in this website and i have ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    1

    Unhappy asm mov

    hi,
    I use bloodshed dev c++
    I tried to use the prog mouse.zip given in this website and i have got the error message : parse error before 'mov'
    exemple :
    void ReadMouse ()
    {
    asm mov ax, 0x3
    asm int 0x33
    asm mov MouseB, bx
    asm mov MouseX, cx
    asm mov MouseY, dx
    }

    //This procedure sets the mouse cursor to another location
    void SetMouseXY (unsigned int X, unsigned int Y)
    {
    asm mov ax, 0x4
    asm mov cx, X
    asm mov dx, Y
    asm int 0x33
    }
    ...
    what wrong ???

  2. #2
    zen
    zen is offline
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    I think the syntax for inline asm on Mingw is something like -

    __asm ("mov %ax,0x3" );

    however, I don't think you be able to use interupts. So if you want the code to work you'll need a dos compiler.
    Last edited by zen; 12-15-2001 at 01:07 PM.
    zen

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help calling function is asm
    By brietje698 in forum C++ Programming
    Replies: 24
    Last Post: 12-06-2007, 04:48 PM
  2. Inline asm
    By brietje698 in forum C++ Programming
    Replies: 5
    Last Post: 11-11-2007, 02:54 PM
  3. Getting position from game..
    By brietje698 in forum C++ Programming
    Replies: 1
    Last Post: 10-26-2007, 01:15 PM
  4. Assembly Tutorials
    By JoshR in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 06-11-2005, 10:56 AM
  5. My graphics library
    By stupid_mutt in forum C Programming
    Replies: 3
    Last Post: 11-26-2001, 06:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21