Fall 2013 CSCI 255 Homework 7

This assignment is due at lab or to my office assistant in RRO 215 by 10:00 AM on 23 October. You can also submit it at the HW7 moodle page.

Finish off the exam

Do Problems 10 and 11 from last year’s second exam.

And one more

Assume you have a PIC assembly program with the following definitions, taken from the Introducing MPLAB X & PIC assembly lab:

i:        .space    2
j:        .space    2
V:        .space    2*#vSize
x:        .space    2

Now write some PIC assembly code corresponding to the following short section of C/Java code. You should write your PIC so that it will work for any value of i and j from 10 to 90.

i = (i+j)/2 ;
V[i] = V[j] ;
V[16] = V[24] ;
V[++i] = V[j+=5] ;