![QRP Labs U4B Ultimate4 Operating Manual Download Page 22](http://html1.mh-extra.com/html/qrp-labs/u4b-ultimate4/u4b-ultimate4_operating-manual_3285244022.webp)
4.
U4B BASIC
The U4B implements a simple yet powerful Operating System called QDOS (
Q
RP Labs
D
isk
O
perating
S
ystem). compiled very simple virtual machine as the flight computer. The virtual
machine runs compiled BASIC programs that are stored in a simple file system implemented on a
128K EEPROM. All the hardware functions of U4B are accessible from the BASIC commands.
There are BASIC commands to transmit WSPR and other digital communication protocols, as well
as control I/O pins (read or write), or read sensors attached to the I2C bus.
The simple BASIC programming language is very easy to use and learn, and plenty powerful
enough for this application.
Compiled BASIC programs are very compact. You can therefore fit quite large programs in the
available EEPROM space!
When the U4B is powered up, one program whose name is specified in the Configuration
application (default name “TRACKER”) starts executing automatically.
4.1 QDOS BASIC programs
QDOS BASIC programs run in a 32-bit Virtual Machine in the processor of the U4B. The BASIC is
simple but yet powerful and flexible enough to permit a lot of experimentation and different flight
tracking and data collection scenarios.
BASIC programs are stored on the 128K disk drive which is implemented on a 128K EEPROM
chip for persistent storage when the power is off.
BASIC programs may be a maximum of 5,000 characters of text due to limited RAM capacity in
the microcontroller chip of the U4B. However, a BASIC program may run a different program using
the RUN command. So practically if an enormous BASIC program is required, it may be split up
into lots of smaller pieces, each of which is under 5,000 characters of text and can be in a
separate file and tested etc separately.
QDOS contains a full screen text editor which communicates with the user via a PC terminal
program and the standard USB-micro cable to the U4B. BASIC programs are compiled within the
text editor. Only compiled programs can be run. Compiled programs are smaller than their un-
compiled text equivalent; therefore even if your program is 5K of text, when compiled it will occupy
a considerably smaller space on the disk.
The editor also contains a debugger which may be used to step through the code one line at a
time.
Some useful tips follow.
Line numbers:
BASIC programs can contain line numbers, but do not have to.
10 FOR I = 1 to 10
20
PRINT I
30 NEXT
and
U4B operating manual Rev 1.00
22