Solved

How to interpret opcode documentation

Posted on 2009-05-03
1
718 Views
Last Modified: 2013-12-13
Hi!
I'm trying to write some code using the opcode I found in the x86 processor opcode documentation I found on Intels homepage (link: http://developer.intel.com/design/PentiumII/manuals/243191.htm) and the opcode reference found in the masm32 install package. I have succesfuly made some simple stuff like this: B801000000C3H which stores 01H in eax and then returns.

However I don't understand how to read most of the documentation for the different opcodes. For example I would like to implement the CALLF instruktion.

The documentation in masm32 says:
9A cp CALL ptr16:32 Call far, absolute, address given in operand

So I thought that to call a function at address 00C40000H would be
9A0000C400H however that crashes.

Anyone know how it should be?

Thanks.
0
Comment
Question by:monoceres
[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
 

Accepted Solution

by:
monoceres earned 0 total points
ID: 24291676
I guess this one can be closed early. I found info on this site:
http://coding.derkeiler.com/Archive/Assembler/comp.lang.asm.x86/2006-11/msg00207.html
That said that the 9A instruction couldn't be used, so the E8 instruction should be used instead.
So I calculated the difference between my function pointer and the next byte to be executed and voíla.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Difference between List and Array in Python 5 117
Getting Variable not defined error in Python 1 45
Java array 10 65
Java Inheritance super keyword use 8 40
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

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