I translated the following PicBasic Code to ProBasic Pro. Could any one please check whether my translation is 100% correct since it does compile without an error but the actual circuit doesn't work. [The circuit does work with the code compiled from PicBasic].

--------------------------------------------------------------------------
'PicBasic
symbol porta = 5
symbol trisa = 133
symbol portb = 6
symbol trisb = 134
poke trisa, 255
poke trisb, 240
start:
peek portb, b0
if bit4 = 0 then trigger
goto start
trigger:
pause 500
peek portb, b0
if bit5 = 1 then send
goto start
send:
peek porta, b0
if bit4 = 1 then eleven
poke portb, b0
goto start
eleven:
if bit0 = 0 then ten
poke portb, 11
goto start
ten:
poke portb, 10
goto start
end
--------------------------------------------------------------------------

--------------------------------------------------------------------------
'PicBasic Pro
trisa = 255
trisb = 240
p var byte
start:
p = portb
if p.4 = 0 then trigger
goto start
trigger:
pause 500
p = portb
if p.5 = 1 then send
goto start
send:
p = porta
if p.4 = 1 then eleven
portb = p
goto start
eleven:
if p.0 = 0 then ten
portb = 11
goto start
ten:
portb = 10
goto start
end
--------------------------------------------------------------------------