Once upon a time I used pic12c508's... Using the TRIS command was how it was done.. Incredibly I was using the tris command on the pic16f84... I think it was a macro for "ye olde programmers" to make it easier for them...
The baseline pics had no bank switching and therefore no tris or option registers. These were accessed with the two instructions TRIS and OPTION which move W to the two registers.
I know that but at one time i could do a
movlw b'xxxxxxxx'
movwf TRISC
The newer mplab-x .inc pops up now you can't
I think i had at one time copied a .inc from a older mplab or something.
You can't write a port like I have done it want's you to
use RC0 RC1 like
If you try a movwf PORTC it errors.
It want's you to set them one at a time.
The TRIS PORTC works.
Code I used before don't work now to do whole tris writes or port writes
Are you using the free version of XC8?, if so it deliberately adds loads of bogus (and useless) extra code, in order to make the file sizes much bigger and for it to run much slower - in order to try and convince you to pay the huge sum for the full version. It's not just 'less optimised', it deliberately cripples the result.
The FSR still can Throw a spanner in so the code above just clears the indirect address..
( I doubt I will ever use these chips ever again!! So who cares!! )
I just like messing with that chip i had a inc that let you use trisc i upgraded mplax x and now its gone lol been like 8 years since i used tris portc i had to read the data sheet . And then i remmbered it.
The thing thst gave me a loop was xc8 lets you write the trisc for i/0
Where as in asm there no trisc only each reg by bit.
Thanks i got it figured out how i did it before