@rem
@rem        File: EXAM.BAT
@rem
@rem    Used to compile the MPLINK example.
@rem
@rem


mpasm /o+ example.asm /q+
mpasm /o+ example2.asm /q+
copy example.err+example2.err /A  
@rem    The line above concatenates any error files generated by MPASM
@rem     into a single file.
mplink -o example.out -m example.map example.o example2.o 16F84.lkr 
@pause

@rem
@rem   MPLAB v3.3x projects do not yet have the capability of dealing directly
@rem    with MPLINK projects.  Until MPLAB gets better integrated with MPLINK
@rem    you can set up projects like this:
@rem      1. Start a new project.  In this case, call it EXAMPLE.PJT
@rem      2. Add the main file for the project, EXAMPLE.ASM
@rem      3. Go to "Project>Add/Modify Compiler" and add a new assembler 
@rem          called EXAM.BAT (he name of this batch file).
@rem      4. Execute "Project>Build All" and this batch file will execute and
@rem          assemble and link EXAMPLE.ASM, EXAMPLE2.ASM using the linker
@rem          script 16F84.LKR.  This example also needs the 16F84 header 
@rem          file, P16F84.ASM.
@rem 
@rem    Note that as long as the ".out" file name matches the name of the
@rem     file in the project (in this case EXAMPLE.*), MPLAB will download 
@rem     the corresponding .hex file and use the .cod file for debugging.
@rem
@rem	TIP: If you are using Win 95, you can edit the properties of EXAM.BAT
@rem     to make it "close on exit".  Then you don't have to manually close
@rem     the DOS windows after this batch file executes.
