 
;
; Just check out MPLAB

		.include "p24Hxxxx.inc"

            .global  __reset          ;The label for the first line of code.   

            .bss            ;unitialized data section
inNum:      .space   2
nibSum:     .space   2


;..............................................................................
;Code Section in Program Memory
;..............................................................................

            .text
__reset:
            mov      #__SP_init, w15       ;Initalize the Stack Pointer
            mov      #__SPLIM_init,W0   
            mov      W0, SPLIM             ;Initialize the stack limit register

		    .equ     numinit, 0xDA75       ; give a name for initial value

            mov      #numinit, w0          
            mov      wreg, inNum           ; inNum = initialValue

            and      w0, #0xF, w1          ; nibble 1
            lsr      w0, #4, w0            ; nibble 2
            and      w0, #0xF, w2
            add      w2, w1, w1
            lsr      w0, #4, w0            ; nibble 3
            and      w0, #0xF, w2
            add      w2, w1, w1
            lsr      w0, #4, w0            ; nibble 4
            and      w0, #0xF, w2
            add      w2, w1, w1

            mov      w1, nibSum 

done:
            goto     done

            .end       ;End of program code in this file
