throbscottle
Well-Known Member
Quick question about PIC assembly
If I've got FSR pointing at a variable in bank1, and I need to (for example) copy the contents of INDF to a variable in bank2...
Does FSR get around bank switching?
so do I need
or can I get away with
I'm really hoping it's the latter because I've got a lot of bank switching otherwise can't get round it because the banks are right to avoid it in most of the code.
If I've got FSR pointing at a variable in bank1, and I need to (for example) copy the contents of INDF to a variable in bank2...
Does FSR get around bank switching?
so do I need
Code:
banksel bank2var
... do stuff in bank2
bansksel INDF ; value is in a bank1 variable
movfw INDF
bankssel bank2var
movwf bank2var
banksel bank1var
... do stuff in bank1
or can I get away with
Code:
banksel bank2var
... do stuff in bank2
movfw INDF ; value is in a bank1 variable but INDF is /magical/
movwf bank2var
banksel bank1var
... do stuff in bank1
I'm really hoping it's the latter because I've got a lot of bank switching otherwise can't get round it because the banks are right to avoid it in most of the code.