Solved

How to interpret opcode documentation

Posted on 2009-05-03
1
717 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
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This is an explanation of a simple data model to help parse a JSON feed
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

856 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