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 / 2720
2719  |  2721
Subject: 
Re: anyone know how to check free space on RCX?
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 12 Jul 2002 20:50:11 GMT
Viewed: 
2446 times
  
John A. Tamplin, Jason Clark, Jochen Hoenicke and Michael J Ash:

Thank you all for addressing these issues!  It all make sense after reading
the preceeding messages.

I appologize for causing confusion.  I am glad, however, to get it straight.

??So should program.c continue to use lcd_int to display the value in
decimal?  Wouldn't it be better to just display the hex and be done with
it??

// Joe


"Michael Obenland" <obenland@t-online.de> wrote in message
news:Gz5Gq1.ABE@lugnet.com...

#define MM_HEADER_SIZE 2   //!< 2 words header: pid, size

Why would the memory manager use all ints when 32bit math is so much
slower on an h8? I feel like i'm missing something.

This is another reason why 32-bit ints make no sense; int is almost • never
a size that isn't native to the processor. So either you misread the
header or... I guess I don't quite understand. Any comments on that?

The header is ok, but int is 2 bytes = 16 bit. You can check this with • this
highly optimized program:

#include <conio.h>

int main(int argc, char *argv[])
{
   lcd_int( sizeof( int ) );
   for(;;)
      ;
   return 0;
}

And in the kernel sources, mm.c says the following:

//
// memory block structure:
// 0 1       : pid of owner (0=empty)
// 2 3       : size of data block >> 1
// 4 ... 4+2n: data
//

pid and size are 2 byte values.

Regards,

Michael




Message is in Reply To:
  Re: anyone know how to check free space on RCX?
 
(...) The header is ok, but int is 2 bytes = 16 bit. You can check this with this highly optimized program: #include <conio.h> int main(int argc, char *argv[]) { lcd_int( sizeof( int ) ); for(;;) ; return 0; } And in the kernel sources, mm.c says (...) (22 years ago, 12-Jul-02, to lugnet.robotics.rcx.legos)

13 Messages in This Thread:



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

Custom Search

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