To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 14560
14559  |  14561
Subject: 
RE: How big is too big? OR How the RCX Firmware Stores Manages Program Memory
Newsgroups: 
lugnet.robotics
Date: 
Thu, 1 Mar 2001 17:39:22 GMT
Original-From: 
Dick Swan <D.SWAN@WORLDNETstopspammers.ATT.NET>
Reply-To: 
<D.SWAN@stopspamWORLDNET.ATT.NET>
Viewed: 
650 times
  
Tom's understanding is correct. All RCX programs are allocated from the same
memory space.

The RCX firmware provides "garbage collection" on this memory space so that
whenever a program or subroutine is deleted, all programs/subroutines in
higher memory locations are shifted downwards to remove the "hole" from the
recently deleted code.

There is no need to download a very small program in each of the slots to
ensure maximum space is available for a program. You simply need to ensure
that a "delete all tasks" opcode [0x40] is sent for each program slot. And
you should also send a "delete all subroutines" opcode [0x70] for each
program slot as well; the "delete all tasks" opcode does not remove
subroutines. For maximum program memory space the datalog should be set to
have zero entries [opcode 0x52].

Internal Firware Details:
------------------------
Internally the RCX firmware has a 40 element static array for subroutines [8
subroutines per program x 5 programs] and a 50 element static array
containing the memory start addresses for tasks [10 tasks per program x 5
program slots]. These arrays are stored in consecutive memory locations. The
start address of the datalog is in the next location.

A NULL task takes no memory. The end address of task 'N' is one less than
the start address of task 'N+1'. Before executing each opcode, the RCX
firmware does a range check to make sure an opcode's address is lower than
the start address of the next task, if not the task is stopped.

A NULL subroutine takes one byte of memory. The RCX automatically adds a
"return from subroutine" opcode to the end of every subroutine, even for
NULL subroutines. The same upper 'range' check described above is also used
although in this case it has less validity because it is possible through
faulty programming to jump beyond the end of a subroutine and still pass the
range check.



-----Original Message-----
From: Eggers Tom W Civ USAFA/DFCS [mailto:Tom.Eggers@usafa.af.mil]
Sent: Monday, February 26, 2001 1:02 PM
To: 'Ahui Herrera'; lego-robotics@crynwr.com
Subject: RE: How big is too big?


My understanding, perhaps faulty, is that the different RCX programs (1-5)
compete against each other for the available program space. So loading a
tiny program into four of the five will leave the most possible room for the
last one.

I have a program called "tiny" which does absolutely nothing, but compiles
and downloads (4 times) and thereby makes space for one large program.

twe

<<snip>>



1 Message 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