; ; FILE: prac3-1.asm ; ; Replace the lines ";<-YOUR CODE HERE->" with your code. ; ;****************************************************** .include "8515def.inc" rjmp RESET ; Reset Handler ;****************************************************** .def temp = r16 RESET: ; Initialise Stack Pointer ldi temp,low(RAMEND) out SPL,temp ldi temp,high(RAMEND) out SPH,temp ; Set PORT B direction to output ;<-YOUR CODE HERE-> ; Set PORT C direction to input ;<-YOUR CODE HERE-> mainloop: ; Input 8-bits of data from the PORT C pins into 'temp' ;<-YOUR CODE HERE-> ; Invert 'temp' ;<-YOUR CODE HERE-> ; Output the result to PORT B ;<-YOUR CODE HERE-> ; Run forever rjmp mainloop