I'm trying to find the 12-bit address in hex -- as well as the memory bank being used -- by the last instruction in the sequences listed below.
Before I list the sequences, it is my understanding that the 12-bit address used should be 00da ffff ffff, where d is either 1 (result stored back in register), or 0 (result stored in WREG), and a is either 1 (uses BSR), or 0 (ignores BSR). However, I've also read that the 12-bit address is comprised of the 4 BSR bits and 8 bits from the instruction..so which is it? Is the address being used 00da ffff ffff, or bbbb ffff ffff (where the b's indicate the bank)?
The first sequence is:
MOVLW H'08'
MOVWF BSR
MOVF H'10',W
Because I didn't include A (MOVF f,d,a), I believe this ignores the BSR, so I would say the address is 0000 0001 0000, or 0x010. This would be stored in Bank 0.
The next sequence is
MOVLW H'08'
MOVWF BSR
MOVF H'10',W,A
Since I included A here, this should use the BSR bits to determine the bank, meaning the instruction should use Bank 8. That being said, does this mean the address is 00da ffff ffff = 0001 0001 0000 = 0x110, or that the address is 1000 0001 0000 = 0x810?