thanks pommie i understand that bit now.ive moved on to the next project now which is to flash an led on and off,ive loaded the hex into the chip and tried to simulate it using proteus simulator but it doesnt seem to flash,also i cant understand why gp3 is high as i thought this is input only for 12c508a can someone have a look at the asm below and tell me what the problem might be,i would like to get this working so then i could change the values ie time delays so i could then understand how they work,thanks
FlashLED1 BSF 03h,5 ;select page1
MOVLW 3e ;to make gp0 output
MOVWF 06
BCF 03h,5 ;select page0
Loop1 BSF 06,0 ;select bit0 high
CALL Delay1
BCF 06,0 ;make bit0 low
MOVLW 09 ;put 9 in w
MOVWF 0C ;oc is the loop file
AA1 CALL Delay1
DECFSZ 0C
GOTO AA1
GOTO Loop1
Delay1 MOVLW 82h ;130 loops
MOVWF 1A
DelX DECFSZ 1B ;256 decrements
GOTO DelX ;2uS instruction
DECFSZ 1A
GOTO DelX
RETLW 00
END
this program turns on led for 0.1s (delay1 routine) then off for 0.9s by calling delay1 nine times.