NQC programming Language

NQC stands for the Not Quite C. It is a simple programming language for programming in several LEGO MINDSTORMS products. The features f NQC varies with the product. The products are use as the target for the NQC. NQC support the six different types of targets: RCX, RCX2, CyberMaster, Scout, Spybotics and Swan.

Programming using NQC is very simple each of the target have a byte code interpreter which can be used to execute programs. NQC is not a general purpose language there are many restrictions to the byte code interpreter.

What is LEGO mindstorms?

Lego mindstorms is used to create the small programmable robots. Lego Mindstorms kit contains the software and hardware to create the robots. It contains a programmable brick computer which used to control the: System, Modular sensors and motors and the other parts of the robots.

The mildstorms kit is also used for some educational tools and some small applications for projects. There are many programming languages used for Lego mindstorms.

Systems required to run NQC

  • System 7.1 or later
  • Color-Capable Macintosh (any Mac with a 68020, 68030, 68040 or PowerPC)
  • 4 MB RAM available
  • 2.5 MB Disk space available

Program structure

NQC program m is programmed by using code blocks and global variables. The types of code blocks used in the NQC programming are: tasks, inline functions and subroutines.

The example of the simple code of NQC is:

task name()
{
// the task's code is placed here
}

NQC programming Language Example

NQC programming Language

Reference
https://www.youtube.com/watch?v=EmfOziHzsoM
https://www.youtube.com/watch?v=5HsBl8fH0LI
http://bricxcc.sourceforge.net/nqc/doc/NQC_Guide.pdf
http://bricxcc.sourceforge.net/nqc/doc/NQC_Manual.pdf
http://archive.is/bQwT3