That was just a segment of the whole wall racer code.

Here is a short piece written to test the hypothesis that the registers never get set. The blinkloop subroutines are simple blink ten times loops. And, yes, the blinker blink to their little hearts delight.

[QUOTE:]
symbol trigright = PORTB.0 ' Define output pin for Trigger pulse
symbol trigfront = PORTB.1 ' Define output pin for Trigger pulse

symbol echoright = PORTB.2 ' Define input pin for Echo pulse
symbol echofront = PORTB.3 ' Define input pin for Echo pulse

rangeright var word
rangefront var word
CNT VAR BYTE

main:
GOSUB blinkloop01
DEFINE PULSIN_MAX 65535
pulsout trigright,2
pulsin echoright,1,rangeright

pulsout trigfront,2
pulsin echofront,1,rangefront
pause 10 ' recharge period after ranging completes

'*****test for zeros******
IF rangeright = 0 then
gosub blinkloop45
endif
if rangefront = 0 then
gosub blinkloop67
endif
goto main: [QUOTE:]