Solved

'emit' syntax. MSVC 4.1

Posted on 1998-09-25
3
596 Views
Last Modified: 2008-01-16
I seem to remember there being an 'emit' command that could be used to get past the limitation of '_asm' which cannot do 'db' commands.

I want to create in-line assembler where I specify the hex values for the op-codes. Something like:-

emit {
  0x72
  0x01
}

Can anyone tell me the exact syntax?
0
Comment
Question by:icd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
plaroche earned 50 total points
ID: 1173759
The command is _emit and it can only define one hex value each time, to do what you want you will need:

__asm {
  _emit 0x72
  _emit 0x01
}

etc...

For more details you can check the doc under _emit
0
 
LVL 5

Author Comment

by:icd
ID: 1173760
Thanks for the (very) prompt reply. The reason I asked the question was that there appears to be no on-line help for _emit.
0
 
LVL 3

Expert Comment

by:plaroche
ID: 1173761
I found the help in the last delivery of MSDN (July 1998 I think) although it is up-to-date for VC 6.0 the _emit syntax did not change.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question