OK, this code is written to wait for an interrupt, then clock out 784x512 bytes of data. The only chunk of the code shown is that which controls the clocking scheme. My question is if there is any way to execute time sensitive commands faster than the 1 usec instruction time. Thanks for all the help.

horizpulse var byte
vertpulse var byte

horizpulse = 1
vertpulse = 1
PORTB.0 = 0 ‘portb.0 is the Vphase1 clock
PORTB.1 = 0 ‘portb.1 is the Vphase2 clock
PORTB.2 = 1 ‘portb.2 is the Hphase1 clock
PORTB.3 = 0 ‘portb.3 is the Hphase2 clock
PORTB.4 = ‘portb.4 is the reset clock

buttonloop:
IF PushButtonOnPORTABIT2 = 1
THEN GOTO vertloop ‘waits for 5V that signals shutter is closed
ELSE GOTO buttonloop
vertloop:
horizpulse = 1
PORTB.0 = 1
PAUSEUS 139
PORTB.0 = 0
PORTB.1 = 1
PAUSEUS 139
PORTB.0 = 1
PORTB.1 = 0
PAUSEUS 139
PORTB.0 = 0
PAUSEUS 270
vertpulse = vertpulse + 1
IF vertpulse < 512
THEN GOTO horizloop
ELSE GOTO buttonloop
horizloop:
PORTB.2 = 0
PORTB.3 = 1
PAUSEUS 139
PORTB.3 = 0
PORTB.2 = 1
PAUSEUS 139
horizpulse = horizpulse + 1
IF horizpulse < 784
THEN GOTO horizloop
ELSE GOTO vertloop
END