Solved

'emit' syntax. MSVC 4.1

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

863 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

22 Experts available now in Live!

Get 1:1 Help Now