I am trying to take input off the Port a and port C pins but its not working. Here is my code. May be someone can tell me what I am doing wrong. When I run this code it alawys jumps to A and B weather the pins are high or low?

Thanks for any help?

symbol PortA = 5
symbol PortC = 6
symbol TrisA = $85
symbol TrisB = $86
symbol TrisC = $87
poke trisc,225
poke Trisa,225

symbol cmcon=$1f
poke cmcon,7

symbol adcon0=$9f
poke adcon0,7
symbol adcon1=$9f
poke adcon1,7

start:
peek 5,B0
if bit0=0 then A
A:gosub C
peek 6,B1
if bit8=0 then B
B: gosub D
goto start

C: low 6: high 7: pause 500: low 7: pause 500:
return

D: low 4: high 5: pause 500: low 5: pause 500
return

end