Sophie

Sophie

distrib > Mandriva > 8.1 > i586 > by-pkgid > 19a87309ef88063715a222fd2623c2f9 > files > 6

nqc-2.3.r1-1mdk.i586.rpm

NQC Readme
----------

Please send bug reports to dbaum@enteract.com.  Be sure to include
details about what platform you are running nqc on and a sample
file that demonstrates the bug if possible.

For updates and additional documentation, visit the NQC Web Site:
http://www.enteract.com/~dbaum/nqc


Note to Windows Users
---------------------

NQC is a command line based tool - normally you run it by typing an
appropriate command into an MS-DOS window.  There is no GUI for it and
if you double-click the nqc.exe file an MS-DOS console will be created
for you, NQC will run within it, then since NQC finishes almost
immediately, the entire window will disappear.

Some people prefer command line based tools because they allow you to
use the text editor of your choice, etc. It also makes for identical
behavior under Windows, Mac, and Linux. In order to use the command line
version of NQC you'll need to do two things:

1) Use some sort of text editor (such as Notepad) to edit and save a
source file for NQC to compile.

2) From an MS-DOS window type the appropriate NQC command. Its usually
best to either put all of your programs and nqc.exe in the same
directory, or make sure the directory containing NQC is in your command
path. 

If any of the above seem either too confusing or too tedious, then you
may want to try the RCX Command Center (RcxCC) by Mark Overmars which
provides a familiar Windows style GUI on top of the standard NQC
compiler.  You can download RcxCC

from http://www.cs.uu.nl/~markov/lego/


Getting started
---------------

Download the appropriate compiler (nqc or nqc.exe) and put it where
your shell can find it as a command.

The IR tower should be connected to your modem port (macintosh) or COM1
(Win32/Linux). The IR tower should be set for "near" mode (small
triangle). The RCX should also be set for this mode, and firmware must
already be downloaded.

Compile and download the test file using the following command line:

nqc -d test.nqc

The test program assumes there's a motor on output A and a touch sensor
on input 1.  It turns on the motor and waits for the switch to be
pressed, then it turns off the motor and plays a sound.

If you want to use a different serial port, you can set the RCX_PORT
environment variable to the serial port name.  Here are some examples:

Mac/MPW printer port:
	set -e RCX_PORT b

Win32 COM2 port:
	set RCX_PORT=COM2

Linux:
	The syntax for setting environment variables is shell specific.  By
	default nqcc uses "/dev/ttyS0" as the device name for the serial
port.
	If you are using the second serial port, then "/dev/ttyS1" should
	work.  Other device drivers may or may not work depending on if they
	implement the expected ioctl's to setup the baud rate, parity, etc.


New Features
------------

This section provides a breif overview of major features that have been
recently added.  For more complete version information see history.txt.

* the "for" statement has been added

* rcx1.nqh and rcx2.nqh are no longer supplied in the distribution. 
Instead, they can be generated directly from NQC (which contains
ebmedded versions of these files).  The -api option will cause NQC to
emit the appropraite API file (normally the 2.0 api, unless 1.0
compatability mode has been selected):

	nqc -api

	nqc -1 -api

* Firmware download supports large files (such as the RCX 2.0 firmware).
 Also fixed a bug in fast firmware download.

* modulo operator (%) now supported for non-constant operands

* A good deal of RCX 2 support has been added.  See history.txt for
details.  In order to target RCX 2, use rcx2 as the target:

	nqc -Trcx2 -d text.nqc