Why would you do that? Why don't you explain what you try to achieve. You should avoid as much as possible inline assembly. For instance, for the x64 platform, inline assembly in VC++ is no longer supported.
How can assembly become unsupported when it makes higher level languages
Everything that was previously supported may "become unsupported" if the developer chose to break the support...
And what could it have to do with the "higher" or "lower" level languages?
One of the major points to C++ is portability, and the second you include an _asm block, it becomes locked down to the x86 architecture, and as cilu said, the 64-bit version of MSVC does not support inline asm. You should instead stick to intrinsics.
The point of using inline assembly is to super-optimize a particular chunk of code---usually an inner loop. The idea is that 80% of the time is spent in 20% of the code, so you can focus your extreme optimizations on just a few places and see a significant benefit. Optimizing in the wrong place gives you almost no benefit for (potentially) a lot of work.
cin is a means of reading input from the console. Reading input is always slow, and cin often blocks waiting for user input. This is beyond slow---the program may actually stop for a while. There is thus absolutely no point in trying to write inline assembly that includes console input.
Agree that there is no sence to use cin in Assembly. Anyway, if you want to know how to use cin (or anything else) in Assembly, make C++ program and read its Assembly output.
Bookmarks