I also use BRA in jump tables since I only have to shift the offset into the table over 1 bit instead of 1. BRA is also a "relative jump" instead of an absolute jump. I used to take advantage of this on MC6800 code to make relocatable code that worked anywhere you plugged in the ROM. Harold ---------- =?windows-1252?Q?Jan-erik_S=F6derholm_=28QAC=29?= writes: Another thing about BRA vs. GOTO... Consider these two examples : Ex1 DECFSZ counter BRA loop MOWLV ... Ex2 DECFSZ counter GOTO loop MOWLV ... If the skip is *not* performed, both examples execute in the same number of cycles. The BRA and GOTO to label "loop" takes the same number of cycles. If the skip *is* performed, Ex1 skips directly to the MOVLW instruction (since BRA is a one word instruction), but Ex2 skips to the second word of the GOTO, which is interpreted and executed as a NOP. So after a "skip" instruction that "skips", BRA is faster. Ex2 is as if Ex1 would have been written DECFSZ counter BRA loop NOP MOWLV ... Jan-Erik. -----Original Message----- From: Jan-erik Svderholm (QAC) Sent: den 27 januari 2003 22:16 To: 'pic microcontroller discussion list' Subject: RE: [pic]: pin high / low loop BRA : 1 program word, 2 program cycles GOTO : 2 program words, 2 program cycles So BRA = half thet program size but the same "speed". I you got a routine with a lot of "jumps", BRA could save a quite a bit of program size. Jan-Erik Svderholm. >Well I still do not know the real purpose of BRA or Do I >Even need to use BRA at all? > >Andre -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads ________________________________________________________________ Sign Up for Juno Platinum Internet Access Today Only $9.95 per month! Visit www.juno.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads