          .include  "p24Hxxxx.inc"
          .global   __reset
          .equiv    vSize,100
          .bss
i:        .space    2
j:        .space    2
V:        .space    2*#vSize
x:        .space    2
ugh:      .space    2	
          .equ      initX,255
          .text
__reset:
;;; initialize V to the first 100 square numbers
          mov       #vSize,W5       ;; countdown
          mov       #V,W6           ;; pointer into the array
          clr       W7              ;; evolving square
          mov       #1,W8           ;; odd numbers
initloop:
          mov       W7,[W6++]       ;; moving W7 to elements of V
          add       W7,W8,W7        ;; W7 will be 0, 1, 4, 9, ...
          inc2      WREG8           ;; w8 will be 1, 3, 5, ....
          dec       WREG5           ;; W5 will count down from 100
          btss      SR,#Z           ;; skip next instruction when Z set
          bra       initloop

brkpnt:   mov       x               ;; just a place to put a break point

;;;     x = V[15] ;


;;;     V[17] = -17


;;;     i = 33
;;;     x = V[i]

;;;     j = 53
;;;     V[j] = -19

;;;     x = V[i+5]

;;;     V[i+j] = -23


bigloop:
          bra       bigloop
          .end



