PGMFI Logo
Library> A5 Destinations: Home | Library | Change Log | Index
Search | Go

A5h (opcode 'A5' in hexidecimal) is the "reserved" opcode of the 8051 instruction set. This means it is NOT a valid instruction to a pure 8051 microcontroller. In the 8052 and many other 8051 derivatives, the A5 opcode is used to signal that something special is going to happen, like an extended opcode instruction. A5 can also be used in conjunction with an invalid opcode handler as a odd sort of interrupt. Unfortunately, in the Oki 8XC154 Microcontrollers, A5h is used in a somewhat unique way. I say unfortunately because the peculiar implementation of the A5 opcode used by oki makes it minorly incompatible with all standard 8051 disassemblers.

A5h as used by oki is a 3 byte instruction: A5 XX YY

  • A5 = MOV (two bit address arguments)
  • XX = bit address of source
  • YY = bit address of destination

C. Favreau experimentally verified this using a test board where he experimented with register states using the A5 instruction. It moves bits, and takes bit addresses (see a 8051 tutorial) as arguments.

Johnathan Wong said that he was able to replace A5 successfully with:

;:MOV C , SRCBIT (XX above) ;:MOV DSTBIT, C (YY above)

Initially, it was thought that this approach would not work because the state of C had tobe maintained - in fact JW claims that the state of C must be altered in order for the car to work right.

It has been confirmed that instances of A5h can be replaced with MOV C, SRCBIT MOV DSTBIT, C in order to get honda ROMs to run on "standard" 8051 chips.

Dave Blundell modified d51 to support Oki's non-standard use of A5. Chris Favreau compiled some windows binaries for it. You can download the source and linux/win binaries of Pgmfi D51.

Revision: r1.1 - 05 Mar 2004 - 19:37 GMT - blundar { Edit | Attach | History | More }
Copyright © 2002-present by the contributing authors. All material on this collaboration platform is the property of the
contributing authors, and is covered by the Non-Commercial Share-Alike License unless explicitly stated otherwise.
Ideas, requests, problems regarding the PGMFI TWiki?? E-Mail the WikiAdmin
Site Designed By: Digital Fusion   Need a website?