Re: [Sdcc-user] Absolute addressing

2011-08-29 Thread Zafi Ramarosandratana
Hi Mario, It will put the segment code of file.c at the address 0x7ff0. On Tue, Aug 30, 2011 at 1:50 AM, Mario wrote: > Hey Zafi, What of my issues should that suggestion address? > > On Mon, Aug 29, 2011 at 8:23 PM, Zafi Ramarosandratana > wrote: >> Hi, >> >> You may try the following: >> to c

Re: [Sdcc-user] Absolute addressing

2011-08-29 Thread Mario
Hey Zafi, What of my issues should that suggestion address? On Mon, Aug 29, 2011 at 8:23 PM, Zafi Ramarosandratana wrote: > Hi, > > You may try the following: > to compile >  sdcc --codeseg SEGNAME -c file.c > and to link >  sdcc -Wl -bSEGNAME=0x7ff0 ... > > HTH, > Zafi. > > On Tue, Aug 30, 2011

Re: [Sdcc-user] Inline Assembler from a Macro

2011-08-29 Thread Mario
Even more strange. :/ Compiler won’t complain at all, but only the first one works. I never saw in the manual that semicolons were used for inline assembler code, but it does not fail also. lol On Mon, Aug 29, 2011 at 8:40 PM, Zafi Ramarosandratana wrote: > How about: > > #define SOMEASMHERE __as

Re: [Sdcc-user] Inline Assembler from a Macro

2011-08-29 Thread Zafi Ramarosandratana
How about: #define SOMEASMHERE __asm\ ASM INSTRUCTION; \ OTHER ONE; \ ETC; \ __endasm; Regards, Zafi. On Tue, Aug 30, 2011 at 12:51 AM, Mario wrote: > Hello, its me ...once again. > > I have tried to do the following. > > #define SOMEASMHERE __asm\ >    ASM INSTRUCTION\ >    OTHER O

Re: [Sdcc-user] Absolute addressing

2011-08-29 Thread Zafi Ramarosandratana
Hi, You may try the following: to compile sdcc --codeseg SEGNAME -c file.c and to link sdcc -Wl -bSEGNAME=0x7ff0 ... HTH, Zafi. On Tue, Aug 30, 2011 at 12:23 AM, Mario wrote: > Just as described at section 3.6. > I have managed to make it work partially, for example, I can decide > the addr

[Sdcc-user] Inline Assembler from a Macro

2011-08-29 Thread Mario
Hello, its me ...once again. I have tried to do the following. #define SOMEASMHERE __asm\ ASM INSTRUCTION\ OTHER ONE\ ETC\ __endasm; where “ASM INSTRUCTION”, “OTHER ONE”, “ETC”, are ...assembler instructions. SDCC does not complain at all but I get error code 256. from gpasm. Th

[Sdcc-user] W and PC Registers

2011-08-29 Thread Mario
When I try to assign a value to the W register, SDCC‘s compiler complains that it is a read only register. But I used to assign values to that one in other compilers. Is there some way to make it writable? I need it for some of my programs to correctly work. If there is not, it would be good to be

[Sdcc-user] BCF STATUS,RP0, BCF STATUS,RP1

2011-08-29 Thread Mario
I have an issue which is recurrent, happens in all my programs compiled with SDCC. Maybe all of you have experienced this also, there are tons of BCF STATUS,RP0 BCF STATUS,RP1 And such repeating over and over after most of the operations between the W register and some RAM (memory) one. Is

Re: [Sdcc-user] Absolute addressing

2011-08-29 Thread Mario
Just as described at section 3.6. I have managed to make it work partially, for example, I can decide the address in the RAM of variables only when they are globally defined. But I had to find out about this by myself, because the manual did not mention this. The way I had to do it: unsigned c

[Sdcc-user] assembler

2011-08-29 Thread Michael Marganelli
Please ignore that question. I see now how dumb it was. Michael -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than

[Sdcc-user] assembler

2011-08-29 Thread Michael Marganelli
New to SDCC, quite honestly struggling to make things go well. Can anyone suggest an assembler for the output.asm file produced by SDCC? I am on Ubuntu 11.04, running SDCC 3.0.0 and my target chip at the moment is PIC 16F84. Thanks for any help Michael -