This PIC configuration bits 0x3F58 should work. I think for the best result you should use a PIC with more pins so that you can use a crystal oscillator of 20Mhz. PIC16F876 should be fine.
@MGP, You are correct about the 16-bit calculation. But this was updated in release 4.3.0. Below is from the user manual:
UPDATED: Release 4.3.0
Variables can allocate 1,2,3 or 4 bytes. You can change size of variable by
double-clicking the variable name in the list at the bottom of the screen.
Variables are stored and processed in the two's complement form.
Bytes Types Range from to
1 signed int8 -2^7 = -128=0x80 2^7 -1= 127=0x7f
2 signed int16 -2^15= -32768=0x8000 2^15-1= 32767=0x7fff
3 signed int24 -2^23= -8388608=0x800000 2^23-1= 8388607=0x7fFFFF
4 signed int32 -2^31=-2147483648=0x80000000 2^31-1=2147483647=0x7fffFFFF
The decimal zero value (0) is represented as all zeros bits 00...000
The decimal value (-1) represented as all 11...111
Signed int8 variables are used for make the hex file smaller and faster.
Signed int24 and int32 types are used to upsize range of variables.
Sign extension for variables of different sizes are provided automatically.
Note: MUL, DIV, MOD instructions can't processed int32 variables.
The 99999 should be in the range of int24. I also did a simulation on LDmicro to verify
@Shreyash Sakhare confirm if it works as expected by you