look at this it will kill you problem ----- Original Message ----- From: "Samuel Ace Winchenbach" To: Sent: Tuesday, May 16, 2000 7:22 PM Subject: Learningssembly > Hello All. > > I have noticed that not many people are using PIC C.. so I have decided to > teach myself assembly. I have a number of very quick, small questions. > Here is the code I have come up with so far: > ;============================================ > list p=16f84 > TMR0 EQU 0x01 > OREG EQU 0x81 ->0x01 ; are in bank_1 > PORTA EQU 0x05 > TRISA EQU 0x85 ->0x05 ;are in bank_1 > STATUS EQU 0x03 > RP0 EQU 5 > W EQU 0 > > ORG 0x000 > BEGIN: > BSF STATUS, RP0 ;Bank 1 > MOVLW b'11011000' > MOVWF OREG ;Setup Option Register > MOVLW b'0000' ->00000 > MOVWF TRISA ;Make PORTA outputs > > > LOOP: ;Do loop stuff in here. > > GOTO LOOP > END > ;============================================ > When I compile this using MPLAB I get the following warnings: > > Message[302] C:\WINDOWS\DESKTOP\LED.ASM 14 : Register in operand not in bank > 0. Ensure that bank bits are correct. > Message[302] C:\WINDOWS\DESKTOP\LED.ASM 16 : Register in operand not in bank > 0. Ensure that bank bits are correct. > > My code sets the option register to bank 1... so why would I get these > warnings? > also.. how do you deal with registers that are in both banks? (STATUS, > INTCON, PCLATH,FSR) I just equated the STATUS register to the lowest HEX > value (0x03) > > and my final small question is this... which way is better to set a > variable, load a literal into W and then store it in "f" like I did in my > code, or like the following: > MOVF b'11011000',OREG > > Thanks for any and all help, sorry to be a pest. >