Yes. Use retlw. Watch out for program memory page breaks though. I'm not 100% shure you can use addwf on PCL, but some of the others will point that out if not. select_seq: ; subroutine bcf STATUS, C addwf PCL, f retlw seq1 retlw seq2 retlw seq3 -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Andrei B. Sent: woensdag 13 februari 2002 7:44 To: PICLIST@MITVMA.MIT.EDU Subject: [PIC]:Program memory subroutine tables In a LED flasher project I did a while ago I used something like this : -a sequence variable held which sequence the PIC should play then : select_seq: ; subroutine bcf STATUS, C rlf seq, w addwf PCL, f call seq1 return call seq2 return call seq3 return ... Is there a more compact way to do something like this? (less program memory used? Here I need 2*sequences for this). ===== ing. Andrei Boros Centrul pt. Tehnologia Informatiei Societatea Romana de Radiodifuziune __________________________________________________ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.