To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3147
3146  |  3148
Subject: 
Re: command framing as seen from kernel/program.lrkey_handler
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Sat, 1 Feb 2003 18:28:23 GMT
Viewed: 
3857 times
  
"Pat LaVarre" <ppaatt@aol.com> wrote in message
news:H9n64q.B2p@lugnet.com...
... brickos ...
Sorry to see the source less online than: http://lxr.linux.no/source/

Here's the link:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/brickos/brickos/kernel/

Cool, thanks.  No grep, right?

I dunno, haven't found one yet, though.

there's no fast way to execute
log2() on the H8 (i.e. no O(1) solution)

Mmmmm.  I am curious, if that's ok.

To get log2(xx) in O(1) time we could fetch (p[xx & -xx]) i.e. fetch our • choice
of the bytes at offset x 0 1 2 4 8 10 20 40 80 from some p we like.

Touché.  Yes, tables, overlooked that.

Merely standard C can't easily express that old idea without misleading • the
linker into wasting x81 - 9 bytes, which I gather would be considered • expensive
on an H8?

I think that smaller code size is preferable to faster execution speed
in this instance since this section of code would only get executed a
few dozen or so times per second (and then only when one is using
the remote).

Mark



Message has 1 Reply:
  Re: command framing as seen from kernel/program.lrkey_handler
 
(...) Just to be more certain we're understanding each other, if that's ok, I'll mention that ... 1) Newbie that I am, I have no clue how frequently brickos switches on bit masks. I wonder if only to decode xD2 RemoteCommand. 2) Using log2(xx & -xx) (...) (22 years ago, 2-Feb-03, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: command framing as seen from kernel/program.lrkey_handler
 
(...) Mmmmm. I am curious, if that's ok. To get log2(xx) in O(1) time we could fetch (p[xx & -xx]) i.e. fetch our choice of the bytes at offset x 0 1 2 4 8 10 20 40 80 from some p we like. Merely standard C can't easily express that old idea without (...) (22 years ago, 1-Feb-03, to lugnet.robotics.rcx.legos)

5 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR