In mplab 8.15 you can't use variable definitions like this
Code:
;***** VARIABLE DEFINITIONS
UDATA_SHR
sGPIO res 1 ; shadow copy of GPIO
dc1 res 1 ; delay loop counters
dc2 res 1
;*********************************************
RESET CODE 0x0000 ; processor reset vector
you get this errors
Error[149] C:\LEARNPICASS\PIC_MID_A_1\MA_L1-FLASH_LED-50P-INLINE.ASM 48 : Directive only allowed when generating an object file
Error[149] C:\LEARNPICASS\PIC_MID_A_1\MA_L1-FLASH_LED-50P-INLINE.ASM 55 : Directive only allowed when generating an object file
Ok i get it now. I added the 12f629.lkr to the first code and now it builds fine. I never used a linker file on the second code It also builds fine. I was trying to learn about timers
and interrupts and was reading Gooligum tutorials. I didn't start a 1 didn't read the part about adding a linker. I have all ways did it like the last part. but i like the way he code's
and wanted try it that way
Thanks all What i'm asking is the code I put up not the same it sure works the same the only thing is that the second one doesn't use a lkr and the first one does. Or am I wrong.
and the first one works better if you have a lot of code
Thanks all What i'm asking is the code I put up not the same it sure works the same the only thing is that the second one doesn't use a lkr and the first one does. Or am I wrong.
and the first one works better if you have a lot of code
The difference is that if you use a linker file, you are in charge of where to locate the code within the controller, where if you use the second one, you don't have to worry about it.
Yes, they will do the same thing, so for now, don't worry about using relocatable code. If you want to learn how to do that later, then check the elmer160 site.