Write programs for PICs in assembly language using a simple text editor and the command line on Linux

From Curuxa

If you like to write programs for PICs in assembly language on Linux using the most basic tools, these are the instructions:

System requirements

  • A working Linux installation
  • Text editor of your choice
  • gputils

Compilation

  1. Write your program in assembly language. gpasm is almost completely compatible with mpasm. Some Main Boards and Modules have some sample code you can use. If they don't have sample code in assembly language it's probably because the code is too complex for writing it in such a low-level language. You might want to use a higher level language, such as C
  2. Save it, for example, as MyProgram.asm
  3. On the command line, cd into the directory MyProgram.asm was stored
  4. Assemble it using the following command
gpasm MyProgram.asm

That's all! Now you've got a .hex file you can program/burn into the microcontroller.