Re: [Sdcc-user] Possible changes to inline assembler syntax

2022-07-14 Thread Ralph Doncaster
On Thu, Jul 14, 2022 at 8:40 AM Philipp Klaus Krause wrote: > > Am 14.07.22 um 13:24 schrieb Ralph Doncaster: > > It's used in a couple spots in ch554_sdcc > > https://github.com/Blinkinlabs/ch554_sdcc > > I've used it in a couple places in CMSIS_DAP > >

Re: [Sdcc-user] Possible changes to inline assembler syntax

2022-07-14 Thread Ralph Doncaster
It's used in a couple spots in ch554_sdcc https://github.com/Blinkinlabs/ch554_sdcc I've used it in a couple places in CMSIS_DAP https://github.com/nerdralph/ch554_sdcc/tree/master/examples/CMSIS_DAP It's a lot easier to use than gcc-style inline asm. The gcc inline asm rules with out: in: clobb

Re: [Sdcc-user] any way to get address of __sbit?

2021-03-06 Thread Ralph Doncaster
ddr >= 0x90 && pinaddr < 0x98) P1_MOD_OC &= ~(1 << (pinaddr - 0x90)); } On Sat, Mar 6, 2021 at 1:12 PM Maarten Brock wrote: > > Ralph Doncaster schreef op 2021-02-18 16:33: > > If I have an sbit defined as follows: > > __sbit __at (0x90) LED; > >

[Sdcc-user] any way to get address of __sbit?

2021-02-18 Thread Ralph Doncaster
If I have an sbit defined as follows: __sbit __at (0x90) LED; How can I get the address? When I try &LED, I get an error: error 35: '&' illegal operand, address of bit variable I need the address for a function that will configure the GPIO to push-pull mode. I can hack it with some inline assem

Re: [Sdcc-user] alignment directive?

2021-02-12 Thread Ralph Doncaster
After a more thorough reading of the docs, supposedly the linker doesn't respect the .even symbol. I'll do some more experiments using multiple object files. On Fri, Feb 12, 2021 at 4:34 PM Ralph Doncaster wrote: > The .even directive worked when I tried it. Was there a bug repor

Re: [Sdcc-user] alignment directive?

2021-02-12 Thread Ralph Doncaster
The .even directive worked when I tried it. Was there a bug report regarding the .even directive with as8051? On Fri, Feb 12, 2021, 14:44 Philipp Klaus Krause wrote: > Am 12.02.21 um 17:56 schrieb Ralph Doncaster: > > I'm using sdcc with a mcs51 target for which some ins

[Sdcc-user] alignment directive?

2021-02-12 Thread Ralph Doncaster
I'm using sdcc with a mcs51 target for which some instructions take longer when they are not word aligned. For timing-sensitive code, I can write it in asm and use the .even or .bndry directives. I couldn't find anything in the SDCC manual to restrict the alignment of a function or block of code.

Re: [Sdcc-user] Question about retargeting.

2020-11-12 Thread Ralph Doncaster
I found the code generators for libfirm/cparser a lot easier to follow than gcc. On Thu, Nov 12, 2020, 08:07 Philipp Klaus Krause wrote: > Am 11.11.20 um 23:50 schrieb Bill Gaylord: > > Yes. I have no special purpose registers that you can directly access. > > The stack top register you have to

[Sdcc-user] space created for unused string constant

2020-10-13 Thread Ralph Doncaster
The following program allocates code space for the string, even though it's only used at compile time by sizeof(). int main() { return sizeof("hello"); } Here's the asm: ; ../strsiz.c:4: return sizeof("hello"); mov dptr,#0x0006 ; ../strsiz.c:5: } ret .area CSEG(CODE) .

Re: [Sdcc-user] How useful would arbitrary-width integers be?

2020-10-12 Thread Ralph Doncaster
I'd like to see it, or even just int24 as avr-gcc supports. Doing 24-bit math is faster and takes fewer instructions than int32. On Mon, Oct 12, 2020, 12:39 Philipp Klaus Krause wrote: > I wonder how useful arbitrary-width integers would be for SDCC users. > > _ExtInt(N) would be an N-bit integ

[Sdcc-user] please add snapshot-latest link

2020-10-07 Thread Ralph Doncaster
For easier automation of sdcc installation for CI, could a snapshot-latest link be added for each target. i.e. sdcc-snapshot-amd64-unknown-linux2.5-latest.tar.bz2 -> sdcc-snapshot-amd64-unknown-linux2.5-20201007-11891.tar.bz2 ___ Sdcc-user mailing list S

[Sdcc-user] bit type no longer supported?

2020-07-27 Thread Ralph Doncaster
According to a few examples I found, and the SDCC manual section 1.5, page 10, SDCC is supposed to recognize the type "bit". However I get a syntax error when I try to declare a bit variable. I've tried SDCC 380, 400, & 403. If I change the declaration to "__bit", it is recognized properly. Is th

[Sdcc-user] replacement for --stack-loc?

2020-07-25 Thread Ralph Doncaster
I have been trying to change the default stack location for mcs51, with no luck. The .mem file shows no change to where the stack starts at when I use the --stack-loc option. I tried upgrading from 400 to 403, and now I get: at 1: warning 201: deprecated compiler option '--stack-loc' How can I se