Darrel Johansen wrote: > [a whole bunch of useful information on MPASM 1.99.xx's new > bank-selecting directives, then...] > > You may want to use > ERRORLEVEL -302 > to suppress those MPASM messages that are distracting, or as Andy > also suggested, AND the operand to strip off the extra bits. Darrel: Actually, I recommended XORing the operand with 0x80; I did NOT recommend ANDing it with 0x7F. It's a small distinction, but I think it's important... While both methods will correctly clear the high bit from an operand that's in the range [0x80-0xFF], only the XOR method will cause the assembler to generate a warning if you accidentally try to mask the high bit of a register in the [0x00-0x7F] range. This behavior can be very helpful... For instance, say that you do this: TEMP EQU 0x90 ;TEMP is on register-page 1. .... BSF STATUS,RP0 ;Switch to register-page 1. MOVF 0x7F&TEMP,W ;Read TEMP, masking off the ;high-bit with an "AND". BCF STATUS,RP0 ;Switch back to register-page 0. Then you decide (for whatever reason) to move TEMP from register 0x90 to register 0x30, but forget to go through your code and remove the now-incorrect "BSF STATUS,RP0"/"BCF STATUS,RP0" lines from around your TEMP accesses. What happens? Well, the code no longer works... But MPASM still assembles it with no errors! Now... Let's say you used "0x80^" instead of "0x7F&". If you wrote your code assuming that TEMP was on one page, then moved TEMP to another page and tried to re-assemble, MPASM would have generated a Warning #302 every time it saw code that assumed that TEMP was still on the original page. The XOR method also checks for other errors... Like mistakenly guessing that TXSTA is on page 0 and RCSTA is on page 1, etc. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499 === For PICLIST help (including "unsubscribe" instructions), === put the single word "help" in the body of a message and === send it to: listserv@mitvma.mit.edu