Re: [Sdcc-user] Access to local variables from inline assembly (PIC14)

2017-08-07 Thread Erlo Haugen
On 2017-08-07 18:20, Augusto Fraga Giachero wrote: > PIC microcontrollers (PIC12/PIC14/PIC16) doesn't have a general purpose > stack (it has a hardware stack used only to sub-routines and interrupts > return). I don't known how the sdcc implements local variables for these > targets (may be a softw

Re: [Sdcc-user] Access to local variables from inline assembly (PIC14)

2017-08-07 Thread Augusto Fraga Giachero
PIC microcontrollers (PIC12/PIC14/PIC16) doesn't have a general purpose stack (it has a hardware stack used only to sub-routines and interrupts return). I don't known how the sdcc implements local variables for these targets (may be a software stack or fixed allocation). Augusto On 08/06/2017

Re: [Sdcc-user] Access to local variables from inline assembly (PIC14)

2017-08-06 Thread Maarten Brock
> Access to global variable is no problem, just use _varname, but how can > I access local variables? Is there no other way than using the > compiler-generated names (which may change if the code is changed)? > > BR > Erlo This highly depends on the target and compiler options. Local variables on

Re: [Sdcc-user] Access to local variables from inline assembly (PIC14)

2017-08-06 Thread Gál Zsolt
Hello, I think that is the only way using global variables if you want to use inline assembly. Better solution is writing time critical function in assembly and compile source codes into object files and linking them. There is some help in the sdcc manual how is it working and how can you give p

[Sdcc-user] Access to local variables from inline assembly (PIC14)

2017-08-06 Thread Erlo Haugen
Access to global variable is no problem, just use _varname, but how can I access local variables? Is there no other way than using the compiler-generated names (which may change if the code is changed)? BR Erlo -- Check o