Subject:
|
Re: legOS & C
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Wed, 3 Feb 1999 13:48:26 GMT
|
Original-From:
|
Alex Howansky <alex@!StopSpammers!wankwood.com>
|
Viewed:
|
1357 times
|
| |
| |
> > ... but that's hardly the best solution. Anyone have an idea?
>
> What compiler are you using? I was unable to duplicate this behavior
> with egcs-1.1 -- for static integer arrays it outputs .word pseudo-ops
> and for automatic arrays that small it generates inline code to initialize
> each element.
I'm using Gavin's gcc package from
http://www.beesknees.freeserve.co.uk/lego/index.html
> I actually use a stripped down libc, which includes an implementation of
> memcpy (as well as all the str functions, etc).
That sounds great -- the string functions would be very nice to have. Do
you have a URL for reference, or do I have to build it myself?
> void *memcpy(void *dest,const void *src,unsigned n) {
> unsigned char *d,*s;
>
> d=(unsigned char *)dest;
> s=(unsigned char *)src;
> while(n) {
> *d++ = *s++;
> n--;
> }
> return dest;
> }
Great, thanks.
--
Alex Howansky
Wankwood Associates
http://www.wankwood.com
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics
|
|
Message is in Reply To:
| | Re: legOS & C
|
| (...) What compiler are you using? I was unable to duplicate this behavior with egcs-1.1 -- for static integer arrays it outputs .word pseudo-ops and for automatic arrays that small it generates inline code to initialize each element. In any case, (...) (26 years ago, 3-Feb-99, to lugnet.robotics)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|