Those first two warnings are not the same.
Code:
Message[302] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\LUMAYDELAY.ASM 23 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\LUMAYDELAY.ASM 24 : Register in operand not in bank 0. Ensure that bank bits are correct.
These warnings are to remind you to do your bank changes. They appear even if you have done the proper bank selects. They are not errors.
Code:
Error[173] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\LUMAYDELAY.ASM 82 : Source file path exceeds 62 characters
You still haven't done what I said previously. Shorten up the path to your project/source file. Do whatever it takes. Put it in the root directory if necessary. It isn't - I do it every day - mine are three levels down from root.
Do you understand computer file and directory heirarchy? I run across a lot of people who only use Windoze's stupid pretty pictures (icons) and have no clue how the underlying directory structure works. Maybe that's why you're not understanding this? You're allowed 62 characters for your full file path. No more!
That's your only error. Fix it and you're in business.
No. That wouldn't prevent assembly of the program.
Use the
banksel directive to switch banks. Here's a simple example:
Code:
org 0x0000
init
banksel OSCCON ;bank 1
movlw b'01110000' ;set 8MHz osc
movwf OSCCON
clrf TRISB
banksel PORTA ;bank 0
main bsf PORTB,0
call delay
bcf PORTB,0
You can't put a banksel in a line with a label on it (see the init label), as it's a directive, and not an actual instruction. No problem - just put it on the line after the label like I did above.
Just use banksel and the SFR that you plan to use next. Or memorize which ones do what (you only need to know two for most things) and use them that way. As you can see in the above source, I used "banksel PORTA", but I don't use PORTA. I use PORTB. Doesn't matter. They're both in bank 0.