Hello Unregistered ,
Originally Posted by BigWumpus No - the datasheet uses a bra $-2 too and Picbasic compiles: Code: 000C12 0003 M loop sleep 000C14 D7FE M bra loop the same way as Code: 03868 ClearMem _bTier,_lTier ;Tier-Buffer löschen 000F46 EE01 F042 M lfsr 0,_bTier 000F4A 0E20 M movlw _lTier 000F4C 6AEE M clrf POSTINC0 000F4E 2EE8 M decfsz WREG 000F50 D7FE M bra $-2 So, I think it will work for me... In the "sleep" example, the branch is going to the instruction immediately before the bra. In your macro, the bra needs to jump 2 instructions up to the clrf POSTINC0. So it will need to be -4.
000C12 0003 M loop sleep 000C14 D7FE M bra loop
03868 ClearMem _bTier,_lTier ;Tier-Buffer löschen 000F46 EE01 F042 M lfsr 0,_bTier 000F4A 0E20 M movlw _lTier 000F4C 6AEE M clrf POSTINC0 000F4E 2EE8 M decfsz WREG 000F50 D7FE M bra $-2
DT
S*it to late - to much wine
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
Forum Rules
Bookmarks