Solved

inline assembler & opcodes

Posted on 2002-04-16
1
1,095 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
1 Comment
 
LVL 6

Accepted Solution

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

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

    }

}

0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Quicksort a dynamic deque 33 58
computer science syllabus 3 52
Arduino EDI - Programming language 3 62
Header of docx file 17 58
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

760 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

17 Experts available now in Live!

Get 1:1 Help Now