Assembler/Disassembler Info


When writing programs for PIC® microcontrollers, a text editor is often used to create source code. The source code is in a customary format containing English-like labels, instructions, and data.

Before source code can be used by a programmer, emulator, or other development tools, it must be converted into hex code. Hex code is the "machine-readable" version of source code that contains instructions and data in the form of hexadecimal data; which can be executed by the microcontroller.

An assembler is the software that converts source code into hex code. Microchip has a very reliable assembler called MPASM that is free.


A disassembler is a program that attempts to disassemble the object code microcontroller from the hex file format back to assembly. The code may disassemble perfect and may require debugging and modifications to the code. Most compilers come with a disassembler that will take a valid hex file as input and produce the assembly code as output.