

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Student Name:______________________________ Student ID: _______________
Problem 1 Write the equivalent C code for the assembly below using only one control structure. Assume first , second and third are local variables and that the X register is a stack frame pointer. Parentheses are the hard part here.
ldaa first,X cmpa #$ bne inner ldaa second,X cmpa #$ blt done ldaa third, X cmpa #$FF beq done inner: jsr do_something done: jsr do_something_else
Student Name:______________________________ Student ID: _______________
Problem 2
Write a configuration subroutine that will configure and enable the A2D to take continuous 8 bit samples on channels 2 and 3. No timing requirements included.