Solved

'emit' syntax. MSVC 4.1

Posted on 1998-09-25
3
589 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
  • 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
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 viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
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.

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now