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 / 21502
21501  |  21503
Subject: 
Re: More Speed? Re: Mindstorms 3.0 Wish List
Newsgroups: 
lugnet.robotics
Date: 
Wed, 5 Nov 2003 19:58:31 GMT
Viewed: 
2358 times
  
In lugnet.robotics, Jordan Bradford wrote:
In lugnet.robotics, Chris Phillips wrote:
This could be addressed on the existing hardware with a better programming
environment.  What I have in mind is a new NQC compiler that generates a
firmware file instead of a bytecode file.  So you would code in NQC (or
something like it) and get the speed, performance, and full memory range
available to BrickOS programmers.

I believe that is exactly what legOS does. It compiles your program and stores
it in the firmware area. legOS has no firmware, and it ignores the ROM code,
too. It accesses all the hardware directly.

That's my understanding, at least.

Your understanding is correct.  So why doesn't everybody use BrickOS?  There are
at least two reasons that I am aware of:

1. Many people, especially "non-programmers" find a full-blown C++
implementation to be intimidating and non-user-friendly.  Even some of us
hard-core programmers find that a simplified language like NQC can be much
faster to work in than a full-blown object-oriented programming language.

2. The toolset required to run BrickOS is notoriously difficult to install
properly.  I've been trying without success to get a working BrickOS
installation running since the days when it was still called LegOS, and I'd like
to think I'm a reasonably technical guy.

I can't resist an interesting programming challenge, that's why I do MindStorms
in the first place.  I've written assemblers, compilers, interpreters,
disassemblers, and debuggers before.  One day it occurred to me that if someone
were to create a compiler that was as easy to install and use as NQC, and as
powerful as BrickOS, everybody would want to use it.  So I started writing a
program to do just that.  First I wrote an H8 assembler/disassembler capable of
creating RCX-compatible firmware files.  I then wrote a simplified C-language
compiler, without all the nit-picky syntax requirements, and capable of
generating H8 assembly code.  I wrapped it all up with a firmware downloader
into one tiny executable, and voilla!  I have a program that is not unlike
NQC.EXE that creates firmware files instead of bytecode files.  If this single
executable is in your PATH, you can compile and download one of these programs
into your RCX without even having Spirit.ocx or any other LEGO software
installed.  The perfect marriage of simplicity and power!

To be sure, the compiler and assembler still have a few deficiencies and even
one or two outright bugs.  But the real thing holding me back is that I need to
create a runtime library that initializes the RCX and calls the proper entry
point in the user-defined program.

- Chris.



Message is in Reply To:
  Re: More Speed? Re: Mindstorms 3.0 Wish List
 
(...) I believe that is exactly what legOS does. It compiles your program and stores it in the firmware area. legOS has no firmware, and it ignores the ROM code, too. It accesses all the hardware directly. That's my understanding, at least. (21 years ago, 5-Nov-03, to lugnet.robotics)

44 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