Hi Lambert,
Welcome to the forum!
In MPASM SUITE, in your MICROCHIP directory, exists files named for each PIC supported, in this case named P16F873A.inc .
Open it in MCS and examine it, there you will find every register available. No ANSEL there, that's why it errors.
look at the list below for suggested changes.

TRISA = %00000011 'Set all bits even if port has access to only some
' Disable comparators !
' Disable analog functions on Ports A, C, capture compare , ADCON. . .