; PULSOUT port, pin, time
; Generates an output pulse in 10-cycle (10 us at 4 MHz) units,
; based on a 16-bit (1 to 65,535) value. The pulse is the reverse
; of the pin's state when pulsout is called. For instance,	if the
; specified pin is initially 1, Pulsout will invert it to make a
; negative-going pulse.

	device	pic16c55,xt_osc,wdt_off,protect_off

	org	8
TRISB_copy	ds	1

	org 	0
        mov     TRISB_copy,#11110000b   ; Make a copy of TRISB. 
        mov     !rb,TRISB_copy          ; Move copy into TRISB.
; >>TRISB now contains 11110000b. 
;        ...                     ; Other instructions. 
        XOR     TRISB_copy,#10000000b   ; Reverse bit 7 of copy. 
        mov     !rb, TRISB_copy         ; Move copy into TRISB. 
; >>TRISB now contains 01110000b.