0x85 mov opcode switch src/dest

Help
Chris
2009-03-21
2013-03-12
  • Chris
    Chris
    2009-03-21

    The SDCC compiler uses opcode 0x85 as "mov src ram, dest ram", but my 8051(mentor) as "mov dest, src".

    Keil's website shows this opcode to be used as mentor's IP does. But lots of website show it as SDCC uses it.

    So is there anyway to get SDCC to use my 8051's method..

    I am not sure if there is any other opcodes that are different my assumption if any other opcodes have not typical formation some IP's have fixed it.

    Two other examples:

    Atmel 8051 (0x85: mov dest_ram, src_ram) pg 34
    www.atmel.com/dyn/resources/prod_documents/doc0509.pdf
    MOV direct,direct
    Bytes: 3
    Cycles: 2
    Encoding: 1 0 0 0 0 1 0 1 dir. addr. (dest) dir. addr. (scr)
    Operation: MOV
    (direct) ← (direct)

    Philips 8051 (0x85 : mov src_ram, dest_ram) pg 39
    www.keil.com/dd/docs/datashts/philips/p51_pg.pdf
    MOV direct,direct
    Bytes: 3
    Cycles: 2
    Encoding: 1 0 0 0 0 1 0 1 dir. addr. (src) dir. addr. (dest)
    Operation: MOV
    (direct) ←  (direct)

     
    • Maarten Brock
      Maarten Brock
      2009-03-26

      Chris,

      Intel set this standard decades ago. If Keil and/or Mentor use it differently that is their fault. We are not going to change this.

      Maarten