[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The Internet-enabled Contiki Desktop OS



It occurred to me that Adam Dunkels wrote in comp.sys.cbm:
> On Tue, 11 Mar 2003 18:59:54 +0000, Martijn van Buul wrote:
>>> Now *that* would be quite nice; it would make Contiki every a few
>>> years older :-) When was the PDP-11 released? 1975?
>> 
>> The PDP-11/20 and 11/15 saw their first light in 1970. The last model in
>> 1990...
> 
> Wow... would it be possible to squeeze something like Contiki into the
> 11/20 or the 11/15?

The 11/20 and 11/15 typically have only 12KW of core, that's probably going
to be a bit tight. Another issue is that you do want to run some kind of OS
too, and since most PDP11 OS'es are still covered by expensive licenses.
The only "usuable" free OS I know of is 2.11BSD, but that requires a more
modern CPU. (22-bit adressing, 512KW memory). It'll run happily on an
emulator, though.

> Does the PDP-11 C compiler have a 8-bit datatype? If not, uIP will not work.

Well, *this* compiler does - (unsigned) char comes to mind.

> 
>> For instance, the seemingly perfectly valid
>> 
>>     fseek(file_descriptor,0,SEEK_SET);
>> 
>> goes terribly wrong - but you won't get any warning or error from that. It'll
>> just bomb out during runtime. Instead, it should have been
>> 
>>     fseek(file_descriptor,0L,SEEK_SET);
>> 
>> In other words, "it compiles" is not the same as "it works", to put it 
>> mildly :(
> 
> Ok... that may be a problem. Does gcc notice problems of this kind
> when run with -pedantic or similar options?

No, since -pedantic forces strict ANSI compliance, and implicit typecasts
are perfectly valid in ANSI - especially when you're promoting datatypes, as
it's the case here. To make things worse, this phenomenon only occurs on
systems where ints don't have the same length as longs.

-- 
    Martijn van Buul -  Pino@dohd.org - http://www.stack.nl/~martijnb/
	 Geek code: G--  - Visit OuterSpace: mud.stack.nl 3333
  Research is what I'm doing when I don't know what I'm doing (W. von Braun)