[A89] Re: more questions (return value)


[Prev][Next][Index][Thread]

[A89] Re: more questions (return value)




TJ wrote:

>i got the books i just don't get how you get the hex codes from the opcodes
>in them, please show me an example of how to interpret the chart :/
>  
>

Look in the instuction listing. Every instruction description has at the 
top a fiels
"Instruction Format:"
this contains the bit-format for each instruction.
There is not like the z80 just one hexcode for each instruction, but it 
is based on bitfields in the opcode.

If you look at the normal move for example it is:

00<2 bits size><6 bits destination><6 bits source>

source and destination is <3 bits register><3 bits addressing mode>
then there is tables for each addressing mode..(An)+ is for ecample 011.
and just a Dn register is 000.
so

move.l (a7)+,d3   // Same as move.l (sp)+,d0

becomes:

00 10 000011 011000

which equals

0x20D8

in hex.

///Olle




Follow-Ups: References: