Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

inline assembler & opcodes

Posted on 2002-04-16
1
Medium Priority
?
1,121 Views
Last Modified: 2012-06-27
my assembler reference tells me, that the line

db 8Eh, 0D8h

should resemble

mov ds, ax

...the problem: the VC++ inline assembler doesn't accept this line...
If I change it to

db 0x8Eh, 0xD8h

or

db 0x8ED8

it still doesn't work...Error:

E:\cpp\myProject\source.cpp(211) : error C2400: inline assembler syntax error in 'opcode'; found 'constant'

So: how do I user opcodes in VC++ inline assembler ?

thx a lot :)

Ben Utzer
0
Comment
Question by:benutzername
[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
1 Comment
 
LVL 6

Accepted Solution

by:
thienpnguyen earned 800 total points
ID: 6946081
void Test()
{
    __asm
    {

        // first way
        mov  ds, ax
       
        // second way
        _emit  0x8E
        _emit  0xD8

    }

}

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
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.
Suggested Courses

618 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