If you want to write in assembly then do it. If you want to write in C++ then do that. Just because you CAN use SOME assembly in SOME compilers (GCC says specifically not to do this with their software) it doesn't mean you should.
10 C:\Dev-Cpp\lib\mouseexam.cpp `_AX' undeclared (first use this function)
11 C:\Dev-Cpp\lib\mouseexam.cpp `geninterrupt' undeclared (first use this function)
It won't be cross platform because what you are doing is telling the OS to act like the mouse has done something. Since every part of that from the sensing to the dispatch of the instruction would be handled by the OS, the code needs to be OS specific.
There are some clever things you can do to (f\m)ake this cross platform, but those are mostly preprocessor instructions and macros defining a torent of ifndefs to handle where instructions go and what globals are defined at run time. In my opinion since you end up writing everything twice it's not really worth the trouble.