View Single Post
  #4   Spotlight this post!  
Unread 30-08-2007, 07:59
funkstar funkstar is offline
Registered User
no team
 
Join Date: Aug 2007
Location: sweden
Posts: 4
funkstar is an unknown quantity at this point
Re: simple MPLAB quest

I have googled alot..
The "LINK" command does not seams to work..
Maybe I should post some code here to clarify things:
My first file: agraal08.asm

;************************************************* *
list p=16f819 ; list directive to define processor
#include <p16F819.inc> ; processor specific variable definition
#include <test.asm>
errorlevel -302 ; suppress message 302 from list file
__CONFIG _CP_OFF & _WRT_ENABLE_OFF & _CPD_OFF & _CCP1_RB2 & _DEBUG_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_ON & _WDT_OFF & _PWRTE_ON & _INTRC_IO

;************************************************* *********************
; RESET VEKTOR
;************************************************* *********************
ORG 0x0000 ;här ska vi börja vid reset.
goto Init ; go to beginning of program

Init ORG 0x0005
call Sub_Test
clrf PORTA
goto Init
END ; directive 'end of program'
;***********************************


and my second file with the subrotine: test.asm

;******************************************
list p=16f819 ; list directive to define processor
#include <p16F819.inc> ; processor specific variable definitions
Sub_Test
movlw .99
movwf PORTA
return
END
;********************************************

I am using MPLAB 7.30.00.00 and have no C compiler (and would preferably keep it this way).

If you could modify the code so that this works (one way or the other) I would be off with a smile.

Thanks
Per