[Sdcc-user] Using static inline function with assembly labels in SDCC (8051)

2016-07-04 Thread Sab V
Hi, I am trying to compile the following code: static inline void uart_tx(char c) { __asm jnb _EA,label1 setb _ea_hold label1: __endasm' } void anotherfunction() { uart_tx(c); } In this case SDCC keeps complaining : Error: multiple definitions error Error: phase error: la

Re: [Sdcc-user] Using static inline function with assembly labels in SDCC (8051)

2016-07-04 Thread Kustaa Nyholm
> If I replace the labels to 0001$ , then the errors dont exist anymore. Is > there any other way to use inline assembly with labels? What's wrong with 0001$ ? From SDCC manual: 3.11.4 Use of Labels within Inline Assembler SDCC allows the use of in-line assembler with a few restrictions rega

Re: [Sdcc-user] Using static inline function with assembly labels in SDCC (8051)

2016-07-04 Thread Sab V
>>What's wrong with 0001$ ? Nothing is wrong. I was just hoping to improve the readability. :-) On Mon, Jul 4, 2016 at 5:33 PM, Kustaa Nyholm wrote: > > If I replace the labels to 0001$ , then the errors dont exist anymore. > Is there any other way to use inline assembly with labels? > > What's