#include <xc.inc>

    GLOBAL powerup, start
    PSECT powerup,class=CODE,delta=1,reloc=2
powerup:
    nop        ; suggested Microchip errata workaround

    ; code added by the user
    ; RB1/2 must be set as soon as possible; other bits cleared
    clrf     TRISB
    movlw    0x06
    movwf    LATB
    ; end of user-added code

    ; transfer control to the runtime startup code
    ; and then on to main()
    goto    start
    END