Help please - first programme won't assemble

Status
Not open for further replies.

ljcox

Well-Known Member
I have been attempting to assemble my first programme based on one taken from a book. After some work, I have been able to eliminate all of the errors but one. Here is an extract from the .LST file generated after a programme was assembled.

The PIC is the 16F84.

0001 0185 00021 Init clrf porta ; resets inputs & outputs
0002 0186 00022 clrf portb ; ditto
00023
0003 1683 00024 BSF STATUS ,5 ;selects BANK 1
0004 3000 00025 MOVLW 00 ;W = 00
0005 0085 00026 MOVWF PORTA ;SET RA0:4 O/P
0006 301F 00027 MOVLW 1F ;W = 1F
0007 0086 00028 MOVWF PORTB ;SET RB0:7 AS I/P
00029
0008 3007 00030 movlw b'00000111' ;sets up timing reg
Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.
0009 0081 00031 movwf OPTION_REG ;
00032
000A 1283 00033 bcf STATUS,5 ;selects bank 0
000B 018B 00034 clrf INTCON ;clears interrupts file reg

Can someone please tell me what is wrong. As far as I can see, I selected Bank1 at 00024. So why the error?

Len
 
It's not an error, it's just a warning, consult the MPASM helpfile for details, particularly the ErrorLevel directive which you can use to prevent the message.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…