Skip to content

Step 3 of 11

LIST and #include

Goal

Write the first two directives and build for the first time with no errors.

LIST P=18F4550 tells the assembler which MCU you use. #include brings in symbol names TRISB, LATB, PORTB, etc. Without the include, MPASM will not recognize those symbols.

For now the file ends with END — valid even though there is no program yet.

  1. Open guia-puertos.asm and clear everything in it.
  2. Type exactly the lines in Your file so far (LIST, #include, END).
  3. Production → Build Main Project (hammer icon).
  4. Output window must say BUILD SUCCESSFUL. On error, check caps and that include uses < >.
						        LIST    P=18F4550
        #include <P18F4550.INC>

        END
					
  • I have LIST and #include in the file.
  • Build finishes with no errors (BUILD SUCCESSFUL).