Mike M wrote: > x=10 > > 20: > BSF x > return > > ????? > > but see a "10" how will it know what port, what pin in that port, etc. i cant think of a simple way to do this. > i am very very good at programming so u dont have to explain things to me like i know nothing, however this concept puzzles me and my team. (no were not pro' s : ) You're the programmer, so you make the decisions as to what the data stored in EEPROM means. As far as I know there is no standard. It's what makes most sense to you. For example '20' means make a port pin high. Say there are 2 ports on the target chip. Upper nibble of next byte = 0 = PortA, if = 1 = PortB. Lower nibble of this byte = bit number to set. Eg 0 - 7. So the basic instruction 'High PortA 0' would be tokenised as 20 07 You have already decoded the '20' which jumps to a BSF routine. Your software knows that it needs one more byte from the next address in EEPROM to complete the instruction so it fetches it and returns with 07. A simple way to decode that token is... Do_High movlw 5h ; token entry = 20 movwf fsr ; preset for porta call EEPROM_Read ; get next token movwf Temp andlw 0xF0 ; if upper nibble = 0 = porta btfss status,z incf fsr ; not 0, so = portb movf Temp,w ; get token data again call BitMask ; returns with bit mask for port pin iorwf indf ; set bit goto Basic_Loop ; done BitMask andlw 7h addwf pcl retlw b'00000001' retlw b'00000010' retlw b'00000100' retlw b'00001000' retlw b'00010000' retlw b'00100000' retlw b'01000000' retlw b'10000000' I have no doubt there are more compact ways to do this. -- Best regards Tony http://www.picnpoke.com Email sales@picnpoke.com