Hello Arne, I believe you can use a relative offset like this: mov A,(USB0ADR) jb (ACC+USBBUSY), .-2 ; . = address of this instruction
Or you can use reusable symbols below 100 (SDCC uses above 100) 2$: mov A,(USB0ADR) jb (ACC+USBBUSY), 2$ ; . = address of this instruction Have look in the amslnk.txt documentation 1.3.3 and 1.3.4. Maarten > Hi! > How can I jump within a macro in sdas8051? > > I do it like this now: > .macro USBp > mov A, (USB0ADR) > .byte 0x20 , 0xE7 , 0xFB ; jb (ACC+USBBUSY), {to start of macro} > .endm > > but it feels like there should be a different notation... :) > > Thx. > > Bye > Arne ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user