Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

'emit' syntax. MSVC 4.1

Posted on 1998-09-25
3
Medium Priority
?
597 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 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

730 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