Salut Michel,
NIB 3 should be DIG 3 in PBP, refer to section 4.17.7 of your manual

PORTB (rb0,rb1,rb2 and rb3) to output and ascii number all together.
TRISB=0 ' all PORTB i/o = output
'
'
'
'
PORTB=YourVariable ' use with care

Refer to section 10 for PIcBasic VS Stamp difference.