Re: [Sdcc-user] Programming a DMA in Big Endian

2009-01-07 Thread Hynek Sladky
ture); Hynek Sladky ronnym...@aol.com wrote: > I am programming the TI CC1110 RF transceiver with an 8051 core using > SDCC 2.8. > The chip has eight consecutive bytes that program an internal DMA > controller. For some reason, the bitfields for these eight bytes are > se

[Sdcc-user] SDCC Z80 wrong assembly code

2009-03-09 Thread Hynek Sladky
I have function for caseless compare: int strnicmp (const char *s1, const char *s2, int maxlen) { char c1, c2; do { c1=*s1++; if (c1>='a' && c1<='z') c1&=0xDF; c2=*s2++; if (c2>='a' && c2<='z') c2&=0xDF; // problematic code if (c1==c2) maxlen--; } while (maxlen && c1

Re: [Sdcc-user] SDCC Z80 wrong assembly code

2009-03-09 Thread Hynek Sladky
Thanks for Your message. I tried to look for such bug fix in changelog but not succeeded. I will try newer version now. Hynek Sladky Philipp Klaus Krause wrote: > I just tried with sdcc 2.8.9 #5392. I compiled your function using sdcc > -mz80 test.c. I could not reproduce the bug. I g

Re: [Sdcc-user] quesiton about z80

2009-03-29 Thread Hynek Sladky
o look for break address in stack space. Hynek Sladky bodr...@mail.dm.unipi.it wrote: > loadhlpc: > pop hl > push hl > ret -- ___ Sdcc-

Re: [Sdcc-user] overflow in supposed to be unsigned long

2011-05-04 Thread Hynek Sladky
Hi, I would use something like: for (i=0; i<4; i++) char_counter[i] = ((unsigned char*)&long_counter)[i]; for (i=0; i<4; i++) ((unsigned char*)&long_counter)[i] = char_counter[i]; Hynek Dne 4.5.2011 4:08, stof...@skulp.net napsal(a): Hi, I have to transmit an unsigned long as four bytes

[Sdcc-user] Z180 sample project

2013-03-19 Thread Hynek Sladky
Hello, I want to start project with Z180 but I can't find some answers: - I get "ASlink-Warning-No definition of area HOME" but I don't know why - the code in .IHX file is placed at address 0x0020 (not 0x) - there is not default crt0 linked (i.e. SP setup etc.) - how to write bigger applicat

Re: [Sdcc-user] Z180 sample project

2013-03-21 Thread Hynek Sladky
Thanks for Your reply. after some more time of testing I got finally correct result. There was missing option for linker, so Z80 objects were linked as if they were for i51. It is probably also the cause for not linking crt0 and offset 0x0020 in IHX output (it was really 0x0020, not 0x0200; se

[Sdcc-user] SDCC and TI-86

2014-09-10 Thread Hynek Sladky
p;highlight=&sid=f1ba1a8256631e31c9ee57e5385d0525 but I don't know what to do next: application can compile, after downloading to calculator it can be run but does nothing - no text output at all... If anybody could send me example application for SDCC I would be gratefu

[Sdcc-user] Z80: function in RAM

2014-11-10 Thread Hynek Sladky
e to have my own start-up routine so I used crt0.s as template. Unfortunately it can't be compiled unless .globl is added for l__INITIALIZE* and s__INITIALIZE* values. Does it work differently when using standard crt0.s? Thank

Re: [Sdcc-user] Z80: function in RAM

2014-11-14 Thread Hynek Sladky
Thanks for Your reply. I am not sure if I understand it correctly. When I need to compile source, code should be in INITIALIZED section to get correct addresses; INITIALIZER section will contain .ds with correct size just to make place for initialization data after special utility is executed -

[Sdcc-user] Z80 code in RAM

2015-09-04 Thread Hynek Sladky
Hello, I need to run assembly code in RAM. Is there any way how to write such source code? I need the compiler to produce "initialization" data in ROM which will contain the code with all addresses calculated for RAM placement, so the code can be a part of initialized data... Thanks, Hynek -

Re: [Sdcc-user] Z80 code in RAM

2015-09-06 Thread Hynek Sladky
Thank You all for hints how to do this. The purpose is bank switching code for Z180; RAM is common area which has to be always mapped (stack, common variables), so this code has to be placed there. Hynek --

Re: [Sdcc-user] A bit of guidance... (PIC)

2017-02-01 Thread Hynek Sladky
Hi Richard, PICprog connection for PIC16F526 needs 5 pins: Vdd, Vss, MCLR, ICSPCLK, ICSPDAT. You can also do programming out of Your device (ZIF socket - if You have one - connected to PICkit), so You don't necessarily need ISCP pins in Your design. But is is quite convenient to instantly down

Re: [Sdcc-user] eZ80 support

2017-05-23 Thread Hynek Sladky
Hello, I succesfully used compiler/linker from ZDS on linux (ZDS is now free; makefile based project; exe called through wine). I don't know another possibility for eZ80 compiler. I played a bit with flashing/debugging (https://hackaday.io/project/9483-ez80-open-source-programmer) but unfortu

[Sdcc-user] sdasz80: define from command line?

2018-01-12 Thread Hynek Sladky
Hello everybody, is there any possibility to control assembler through define entered from command line? With sdcc, I can used -D, but I don't see such possibility for sdasz80. It is quite inconvenient to edit source for various compile options... instead of running makefile with selected

Re: [Sdcc-user] Another question about interrupts on STM8

2020-11-19 Thread Hynek Sladky
Would it be possible to add common IRS function for all unused vectors? This will reserve all vectors to be possibly modified later. Hynek Sladky Dne 20.11.2020 v 07:48 Karsten Langeloh napsal(a): And the second is that for the system in general the vector table flash should be empty to be

[Sdcc-user] Z80 and bitfields

2007-07-20 Thread Hynek Sladky
gt; ld hl,#_CSD >> ... printf ("CCC=%03X\n", CSD.CCC); >> ld bc,#_CSD + 1 >> ld l,c >> ld h,b >> ld a,(hl) >> ld c,a >> inc hl >> ld a,(hl) >> and a,#0x0F It seems that second par

Re: [Sdcc-user] Z80 and bitfields

2007-07-20 Thread Hynek Sladky
But it is sometimes used for such purposes (defining e.g. HW register content - and I adopted it as well) so I don't understand why it is used such way if it is not guaranted... Is there correct way for it? BTW - my structure works in all other compilers I have used. Thanks, Hynek S

Re: [Sdcc-user] Z80 and bitfields

2007-07-20 Thread Hynek Sladky
me way shouldn't it? Unfortunately I need the second version... :-( Hynek Sladky - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse01207

Re: [Sdcc-user] Z80 and bitfields

2007-07-20 Thread Hynek Sladky
The last note: if bitfield in SDCC for the first time crosses byte boundary, it always starts at bit zero. The strange thing is that second example produces 3 byte long structure (no 4 bytes long) so second byte-boundary crossing seems working correctly. // correct struct { unsigned int bit1