PIR1 and PIE1, for example, have the same address (0x0C), just different SFR banks, so whatever disassembler you are using just doesn't know which bank you are in..
Usually you get a display more like:
BSF 0x0C, 0
What exactly are you looking at to see the lines you quote? What version of MPLAB?
Best regards, Spehro Pefhany
"it\'s the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
Didn't find your answer? Ask the community — no account required.
R
Russ_Verdon
Hi, can a PIC programming guru help me out please?
BSF STATUS,RP0 ;BANK1 BSF PIE1,0 ;ENABLING TIMER1 OVERFLOW FLAG BSF PIE1,2 ;ENABLING CCP1 INTERRUPT FLAG
I have the above lines of code in my program but when I assemble them in MPLAB I get the following BSF STATUS, 0x5 BSF PIR1, 0 BSF PIR1, 0x2
As you can see the PIE1 gets changed into a PIR1 !!!!! Does anyone know what is going on here?
Thanks Russell
R
Russ_Verdon
Thanks for the response Sphero, version is MPLAB 6.20.0.0 I started a project in MPLAB imported my asm file, selected the 16f628 device and did a "quickbuild". It assembled with no errors(after a few corrections naturally), then I did "menu view program memory" and found the above issue which was borne out when stepping through the code and watching the FSR view changing FSReg 0C.
As you said BSF 0x0C, 0 is what is shown in the :machine view of the program memory window, but the symbolic view shows the PIR (not PIE , this may be just an issue with their symbolic view, not taking banks into account). I stepped through again this morning and found that the correct Reg 8C was being changed, I swear it was 0C yesterday...
Oh well thanks for making me look more closely at what is going on. Have a good Christmas Regards Russell
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.