have error
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F887 "as.asm" /l"as.lst" /e"as.err"
Error[126] D:\USERS\GH0STSHIFT\DOCUMENTS\STUDY\PROGRAM\CNTH\AS.ASM 4 : Argument out of range (not a valid config register address)
Message[302] D:\USERS\GH0STSHIFT\DOCUMENTS\STUDY\PROGRAM\CNTH\AS.ASM 14 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\USERS\GH0STSHIFT\DOCUMENTS\STUDY\PROGRAM\CNTH\AS.ASM 15 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\USERS\GH0STSHIFT\DOCUMENTS\STUDY\PROGRAM\CNTH\AS.ASM 16 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\USERS\GH0STSHIFT\DOCUMENTS\STUDY\PROGRAM\CNTH\AS.ASM 23 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\USERS\GH0STSHIFT\DOCUMENTS\STUDY\PROGRAM\CNTH\AS.ASM 34 : Register in operand not in bank 0. Ensure that bank bits are correct.
Halting build on first failure as requested.
Check the parameters in the __CONFIG are all valid. The number (14, 15, 16, 23, 34) are line numbers in the listing file so you can check what caused them.
"Message[302]" is just a warning, not an error. All it means is the register being used is not shared across all the banks so be careful to ensure the correct bank is selected. You can stop it being displayed if you want by adding the line "errorlevel -302" just after the #include line.
Another hint: "goto $-1" is not a good idea. It will work properly in your case but it stops the program being portable. The reason is that it tells the assembler to jump back one address from where it is at the moment ($ means the current address) which is fine on 16F processors but if you ever try it on 18F or other 16-bit PICs it will not work properly. On 16 bit processors each instruction uses two 8-bit addresses so using $-1 jumps back half an instruction! If you use labels instead it stops the problem because the assembler always works out where the 'goto' should really point to. there are some circumstances where "goto $-1" can be used safely but this isn't one of them.
Instead of :