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 / 2718
2717  |  2719
Subject: 
Re: anyone know how to check free space on RCX?
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 12 Jul 2002 18:58:23 GMT
Viewed: 
2371 times
  
#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 has 1 Reply:
  Re: anyone know how to check free space on RCX?
 
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 (...) (22 years ago, 12-Jul-02, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: anyone know how to check free space on RCX?
 
(...) This can't be right. I'm about 99% sure that all of the ints I've used with my legOS programs have been 2 bytes. When using LNP to send RCX ints to a PC, for example, you have to use short on the PC end of things to make it all work right. (...) (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

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