[Sdcc-user] Local variable in mixed asm/c vs compiler warning

2017-04-30 Thread Marco Peereboom
Consider the following snippet: // override getchar from stdlib int getchar(void) { __asm l1:in a,(I8251_STATUS)// get status and #I8251_S_RXRDY // check RxRDY bit jp z,l1// not ready, loop in a,(I8251_DATA)

[Sdcc-user] Compiling SDCC with MSYS2/MINGW

2017-04-30 Thread Stephen Whittle
Hello everybody, Running into a strange issue trying to compile SDCC with the msys2 environment. I've successfully downloaded gputils from source and compiled: $ gcc -v gcc version 6.3.0 (Rev2, Built by MSYS2 project) $ gpasm -v

Re: [Sdcc-user] Local variable in mixed asm/c vs compiler warning

2017-04-30 Thread Maarten Brock
> Consider the following snippet: > > // override getchar from stdlib > int > getchar(void) > { > __asm > l1:in a,(I8251_STATUS)// get status >and #I8251_S_RXRDY // check RxRDY bit >jp z,l1// not ready, loop >in a,(

Re: [Sdcc-user] Local variable in mixed asm/c vs compiler warning

2017-04-30 Thread Marco Peereboom
> > Maybe you can tell us what warning you get that you want to get rid of? I am sorry about. i8251.c:28: warning 59: function 'getchar' must return value > > That being said, when the complete function is written in asm you probably > want to use the __naked keyword to suppress the red tape.