Hello Jason, I'm not too sure about the Microcode problem, (I use PBP 2.44/MPLAB IDE), but there are problems with the code. For instance, unless you've left out some code, the first thing that leaps out:-

if porta <> portaval then

You haven't initialised "portaval" with a value to compare to PORTA, so it will ALWAYS contain zero. If that is your intent, use:-

if PORTA>0 then

This is better practise. (You can't be sure that "portaval" will contain zero.)

Also, it's better to put your variable declarations and constant definitions at the beginning of the program, before any executable code. That would make it much easier to read.

I could go on, but I would suggest that you start with something a little simpler until you have more experience.

... Steve.