Venom2 Release Notes
This is a detailed description of each release of Venom2, listed in reverse date order.
Important: See here for how to use this document and
in the current release.
2018 05 22
GraphicsLCD memory leak: The GraphicsLCD object no longer leaks a large block of
memory if the Make fails.
2017 09 10
SerialPort: RS-485 mode is now possible on serial port 1. We never
imagined any customer would want this, but one did.
SerialPort: UART RS-485 mode is more stable, also introduced
serial.Done message for testing completion of RS-485 output.
Send now returns a boolean success value: 1 on
sucessful sending; 0 if ARP resolution or routing failed.
Ethernet: fixed a problem associated with the process of assigning
a new MAC address to an Ethernet interface, which doesn't usually affect
customers as it is normally only done by Micro-Robotics during production.
2016 10 03
GraphicsLCD: Spurious debug output on serial 1 when making certain types of display.
2016 08 25
WiFiLink New built-in object controls a Wifi module providing
Wireless LAN connectivity similar to Ethernet. This version supports the
Gainspan GS2000 series running the Gainspan IP2WIFI application, in
particular the Micro-Robotics WiFi adapter (product code 5921) based on the Gainspan GS2100MIP.
Debug(0) Controls packet Logging to
terminal, and packet logging generally improved to give useful data.
Valid message returns 1 (true) if the link is working and usable, 0 (false) if not.
Status message returns different non-zero values to indicate reason
for lack of connection, such as IP address conflict or DHCP failure.
Ethernet: If the IP address offered by a DHCP server is found to conflict with an existing
device on the network, the VM2 sends a DHCPDECLINE message to the DHCP server and tries again, which
should result in the server offering a different address the next time.
ErrorAction active variable can be set to 1 to suppress run
time error if an address conflict results from a static IP address assignment. Instead, the new
version of the
Status message can be used to check for a conflict.
TCProt, HTTPServer, FTPClient: Optional buffer size parameters that
used to be documented are now ignored, and TCP sets its buffer sizes
automatically based on the hardware interface in use when a connection is
SerialPort CTS pull-up/pull-down control: two new flow control
(Handshake) values set hardware flow control with internal pullup or pulldown
to define behaviour for logic-level serial connections when a device is
GraphicsLCD: Timing pulses on VM2D and VM2-D2 have settable polarity. See Help file.
TCP/IP: Incoming packets are now checked for a valid destination IP
address and dropped if invalid.
RandomNumberGen: when seeded with a string, would cause heap corruption
resulting in erratic program behaviour.
FileSystem: Making, killing, then re-making a USB file system didn't
GraphicsLCD(6): Timing dependent bug in SPI code sometimes prevented update of last column on display.
Touchscreen: Default touch threshold value raised from 2 to 5.
2015 12 01
WiFiLink is now a keyword reserved for future use.
Status returned value includes a new bit to show
USB activity (useful to indicate when cable is disconnected or host has suspended device)
RealTimeClock.Timeout: The minimum low power sleep time has been increased to 2S.
eth.Address('S') (DHCP/DNS server mode) The limited DNS server provided in this mode now responds with approriate error replies to any unsupported request or a request for an unrecognised domain.
This mode also correctly processes domain pointer lookups using the pseudo-domain
d.c.b.a.in-addr.arpa where a.b.c.d is the IP address whose symbolic name is requested. This enables the standard ping program to respond much more quickly as it performs a symbolic name lookup by default.
Address('S') had several bugs in both the DHCP server and limited DNS server code, making this mode too unreliable to use
for many applications.
fs.Find("") returned 0 instead of 2 (representing root directory) and also left the file system locked.
HTTPServer: request for "/" converted it to an empty string, triggering
the file system bug described above. This effectively stopped all tasks but one of
a multithreaded web server, causing poor performance.
2015 09 01
New keywords Private, Protected, Public, Derived and Base have been added
to Venom2 and so may not be used as identifiers.
Deprecation: Three forms of message-sending syntax are now deprecated:
The functions of the first two forms have been replaced by the new keywords Derived and Base.
The third form has no replacement.
Removed: The 'Class-default' Initialise method. This was where
values in the parameters to New or Make were simply loaded, in turn, into each
member of the class.
Private, Protected, Public: these new keywords modify the
accessibility of members and methods in user-defined Classes to improve
object oriented code design. The default accessibility is Public.
Base and Derived: The keywords Base and Derived are used as the
object when specifying access to methods and members in a base or a
derived class. For example:
FTPServer and FTPClient both now support the APPE
(Append) command to append transferred data to an existing file.
GraphicsLCD.FontData: This message sent with no parameters clears
all registered fonts and defaults back to the internal fonts.
HTTPServer: File upload failed if file ended with sequence CR LF CR (13 10 13)
HTTPServerForm was rejected if Content-Type header had parameters such as Charset=utf8 after it.
2015 05 20
Flash File System: In
Make fs FileSystem("flash", cache) where
cache is less than 5k,
The filesystem is created with default (70k) cache size instead of
minimum cache size. This provides better compatibility when upgrading
Venom from versions before 2013 05 16, where this value was typically
set to 1 and used as a boolean "use cache" flag.
The default behaviour with no cache parameter is unchanged, which means most users are probably unaffected.
Serial Ports: Some format settings with parity enabled were not implemented correctly.
HTTPServer: Long delays if neither clock/calendar or internet time servers were available.
Value(float) did not skip whitespace.
Flash FileSystem: File system corruption and loss of data:
failed to recover properly on startup if system was stopped in the
middle of a flush operation.
2015 03 18
Anti-Aliased Fonts: Anti-aliased fonts are printed in a bounding
box that now includes the 'left bearing' of the first glyph in a
string. This may cause some strings to clip or wrap where they might
have just fit inside a TextBox before. On the other hand, padding used
to shift text away from the left hand edge of a TextBox border may now
be reduced or removed.
Keyword added: There is a new keyword
This may conflict with existing code if you have
Parameter as a name.
Ctrl-C Break and Try/Catch: Ctrl-C Break will not now be
caught by Try/Catch, but will always result in a 'runtime error'.
Parameter() allows you to access the parameters
of a procedure or method by number. The first parameter is
Parameter(1), the last
is given by
Edit cursor in GraphicsLCD: You can determine the position of
the Nth glyph printed to the GraphicsLCD after a TextBox command. This
can be useful for implementing an edit cursor. The Format(5) message
sets up glyph counting, and the Xpos and Ypos messages return the
position of the Nth glyph - or the position of the last glyph printed
fs.open with a third parameter value
of -3 will creat the directory path to that file if the directories
didn't previously exist
die(1) will destroy the
RAMDISK so it can't be recovered on a subsequent
New. This may be useful during Application development.
Font printing: Glyphs in the compressed font format were
deformed if they went over the top edge of the display, instead of
being clipped to fit.
Flash File System: If the cache control area became corrupted the system
could repeatedly reset without ever resuming normal operation.
2015 01 20
RAMdisk FileSystem: writing to a file no longer updates the
file size in the directory entry on every
Instead you can use
file.Update (see below) to
update the directory entry when needed.
Connect(2 [,port]) puts the filesystem
into a special file manager mode where it can be controlled via a
serial port. So far the only function available is uploading a file
to the VM2, but renaming, deletion, downloads and file listings are
future possibilities. A Windows command line program is available
to implement the controlling end of the link.
Update brings directory entry up to date
(file size, date and time information) on a single file without
having to close and re-open. This makes a permanent update on Flash
and RAMdisk file systems, and on all file systems it means that
return updated values for that file.
Find message can take an optional third
parameter to specify case-insensitive search.
Array of pointers: There was a bug in Arrays of pointers to
global variables that returned the wrong pointer values.
2014 12 09
GraphicsLCD: The default timings for TFT panels driven by the
Graphics LCD object have changed, and a new method of specifying the
detailed timings has been introduced. The new default timings are correct
for the standard QVGA device: other devices may need to use the new
method to specify the exact timings.
GraphicsLCD TFT timing: There is a new method for specifying exact timings for
TFT displays. Please see the Venom Help file for details.
GraphicsLCD cursor position: The GraphicsLCD object can now accept the messages
YPos, which read the position of the text cursor
relative to the current TextBox origin.
GraphicsLCD Fonts: The GraphicsLCD object can now register up to 256
GraphicsLCD Fonts: The GraphicsLCD object supports new "Type 8"
antialiased font. Type 8 fonts have the same headers and metrics as
type 7, but the bitmap data is run-length compressed, making files
much smaller, especially with large glyph sizes.
Is operator: The
Is operator can now work with internal Venom
classes, as well as user-defined classes.
HttpServer: SVG is added to the list of file types which the
server recognises and creates the correct "Content-Type:"
Debug(0, file) or
control logging of information about packets received and sent for
any IP-based protocol (TCP, UDP).
2014 10 08
Debug(2, file) or
Debug(3, file) controls packet or
event logging for the HTTP Server's TCP connection.
Put(f, 1) where
is a file allows the file to be sent without using chunked coding,
gaining a small speed increase.
The file must be the only response sent in that HTTP transaction.
Count(name) returns the
number of GET or POST variables matching a name.
Value(1, str) gets the "filename"
part of the resource requested i.e. everything in the path
following the last '/' character.
Value(name, x, n) and
Value(name, str, n) look for the nth
instance of a multiply-defined variable, such as from a form
<SELECT> element with the multiple attribute
Time with no parameters would incorrectly
give a "write protected" error if the file was opened read-only
Printf("%o", dt) where dt is a DateTime
object would sometimes print garbage.
- FileSystem: Attempting to grow a file when the file system
is full should generate a run time error; instead the result was erratic
behaviour such as a system reset.
2014 08 28
Ethernet: when configured in server mode, its hostname is
stored so it can be displayed by
Print eth or
GLCD supports a new type 7 antialised font. The font is in a .VAF
file like type 6, and lifts the 125 pixel height limit allowing much
larger glyphs to be generated. A new release of the bitmap workshop
package will include a version of ttf2vm2.exe that can
generate type 7 fonts from a Truetype font file.
Ethernet and SD card interaction: If separate tasks transferred
data simultaneously on the ethernet and SD card interfaces,
occasional data corruption would happen, resulting in crashes or
run time errors. This bug was introduced in release 2014-06-19.
2014 07 16
Debug(22): gave "locked too many times" error message.
Documentation: File system changes from previous version were
not in help file.
Unused pins: Unused pins are now pulled high instead of low as
pulling them low had undesirable side effects in some applications.
2014 06 19
Filesystem: The SD card driver can detect the presence or
absence of a card by attempting to read a card ID register,
instead of relying on
mechanical contacts to detect cards. This means we no
longer distinguish between "fixed" and "removable" SD cards and a
Status message will indicate if the card
is present for either type of hardware.
Buffer Find message: Now works for Buffer(Any), and in that
form has better functionality as it can perform a reverse find or
use a fast binary search on a sorted buffer. Any User defined
object can be in the buffer, as long as its class has a suitable
Find may have an optional
4th parameter to pass as a 3rd parameter to the object's
Compare method if needed.
Buffer(Any) Sort Message: optional extra parameter can be used,
and is passed on to the object's
Compare method as an optional
third parameter, enabling different types of comparison to be made for
nil can be used
instead of -1 as a startpos value meaning "use default".
Buffer Sort Message: The meaning of bit 1 in the
parameter was wrongly documented: it sets "ignore case", not
Timer.Done: message returned the opposite of what it should.
(bug only introduced in previous version)
2014 05 13
RealTimeClock Timeout message: The two-second lower limit on
sleeping using the real time clock alarm has been removed. This change
allows a one-second sleep/wake period. If you send the Timeout message with a
'wake time' that has already occurred then the VM2 will sleep for
up to 25 seconds before resetting on its internal watchdog.
You may have to adjust your sleep code to check that the alarm time
is not too close to the current time. See the Venom2 Help file.
Find can optionally take a character
(i.e. integer) parameter for the value to find, instead of a string
Mapping messages lets you change which ASCII
control character codes are mapped to two-byte escape sequences.
In previous versions PPP escaped ALL control characters and this
behaviour wasn't configurable. Now the default behaviour is to
escape XON and XOFF flow control characters only, but the
Mapping message allows this selection to be changed.
Count message enables different maximum
limits to be configured for number of configuration messages sent before
PPProt host mode can be configured to require authentication
by setting user names and passwords with the
Also in host mode,
a string object will copy the currently logged in user name to the string.
Debug works with different syntax from
that previously documented (which never worked anyway), enabling you
to specify any file for logging TCP packets sent and received, or for
general TCP event logging.
FileSystem: Files can be opened in a special non-cached
read-only mode. When streaming data from files likely to be larger
than the filesystem's cache, this improves performance by leaving
useful FAT and directory blocks in the cache, and usually enables
faster reading of the file by saving time searching the cache
for blocks that will never be there.
Debug now works (see "New Features" above)
2014 01 30
Find message with optional start position,
options for forward and reverse search, and binary search if the array
is sorted. String search has an "ignore case" option.
Sort will sort arrays of integer,
float and string types into ascending or descending order.
String sort has an "ignore case" option.
Sort message now works on all data types,
Buffer(Any) where the elements are any user-defined
class with a
HTTPserver: Fix run time error and possible crashes on
receiving POST request with unrecognised Content-Type.
Printing a text file to another text file would change CR LF
to CR CR LF. Also Printing a text file to a string or
buffer would copy the CR characters from the file, which it should
Sort didn't always sort perfectly,
sometimes leaving a few elements out of place.
TextAnalyser: Making and then killing a
object could in rare circumstances lead to data corruption in
2013 12 09
Filesystem: Flushing the cache for the Flash file system did not
write all the blocks that needed writing. This showed up mostly where
the cache was allocated on the heap intead of in non volatile memory,
e.g. creating a .vfu file with
Protect(4, ...) when a
flash file system did not currently exist would create a corrupted file.
2013 12 03
ProtAnalyser name change: This built-in type is now called
as this is a more accurate name.
FTPClient: now has
Timeout message which sets
and returns a timeout value applied to the control and data TCP
Timeout(1) set or returns the timeout for
retransmitting configure request messages during LCP and IPCP negotiation.
Default is 3 seconds, but some applications benefit from a longer
CRCGenerator: Both 16 bit CRC generators produced incorrect
CRCGenerator(16) output was was a bitwise inversion
of the CRC-16-CCITT value which it was supposed to provide;
CRCGenerator('M') for MODBUS CRC was incorrect for
unknown reasons, possibly because it was processing bits in reverse
order. The new algorithm has been verified in a third-party
Flash Filesystem: When upgrading from an older Venom version,
could sometimes create new FS on startup instead of keeping the
existing one, thereby losing files and making field upgrades
Filesystem: Does not now allow fetching directory entry >= 512 on
FAT12/FAT16 root directory. This has the side effect of enabling quick
and sane recovery when the file system attempts to check itself on a flash
memory that has been erased and not fully re-programmed, which can
happen under rare circumstances.
2013 10 03
Embedded Text: There is new syntax for embedding literal text of one
or more lines within Venom procedures or methods. The syntax looks like this:
where ID allows you to indicate what kind of text it is - e.g. HTML.
See the Help file for more information.
Ethernet Power Control: the ethernet chip power control
introduced in the previous release is now incorporated in the ethernet
Status(2) returns number of files open.
Also speed improvements when appending to large files.
PPP: Some support for host mode, which had never been ported
from the VM1 version.
Filesystem: doing a
fs.Free in one task while another task was writing to
the same filesystem caused a run time error.
FileSystem: Went wrong if root directory of a FAT32
filsystem was greatly extended, typically by adding hundreds of files.
Protanalyser: Memory leak if task was stopped while
ProtAnalyser was processing a
2013 07 25
Removal of deprecated feature: Class-Asserted message, e.g:
which has been deprecated since 2012 02 07, has been removed.
Name(2, filename) sets a filename
for downloading dynamically generated content as a file
http.Match(name, value) where the
value is a fixed string instead of a variable tests a POST or GET
variable for equality with a specific value, returning 1 for a match.
Redirect(url) generates the
appropriate response code, headers and content for a simple redirect
to another page. Typically this would be controlled by a POST or
GET variable received when the page is the target of an
HTML <form> element.
arbitrary http headers to be generated by printing them to the http
http.Output(1) switches to normal output mode
for sending the HTTP response entity (e.g. HTML text)
Array.Empty: A new message to Arrays, resets all the values
held in arrays to 0 or null.
Class member limit lifted: The restriction on Classes to a maximum of 256 members has been lifted.
control power to ethernet chip. For systems using a Micro-Robotics
application board but not requiring the ethernet connection, (or not
requiring it all the time), making the ethernet interface and then
switching it off will significantly reduce system power consumption.
Size message can take optional 2nd
parameter 'K', 'M' or 'G' to specify returned value units of
Kilobytes, Megabytes or Gigabytes. On an SDHC card, the combined
size of several files in bytes (the default) can exceed
the limit of 32 bits, and one of these options is necessary for a
FileSystem: When creating an SD card based file system,
adding $80 to the "unit" parameter sets a flag to suppress the
initial integrity check of the file system. This is dangerous, but
enables a much faster startup on a high capacity card with several
Gigabytes of files on it. Systems using this feature are recommended
to use the
fs.Valid message at some other convenient
time, if time permits.
Unsigned 16-bit Arrays: Arrays of 16-bit integers are by default
'signed' but they can now be specified as Unsigned by using the
Unsigned keyword. (Eight-bit arrays are always unsigned;
32-bit arrays are always signed).
T6963C Display driver: The GraphicsLCD object will support 128x64
displays based on the T6963C monchrome controller.
Filesystem: in a directory with hundreds of entries having similar
long names, adding a new file with a similar name could get very slow;
this process is now much quicker.
FileSystem: If a directory was filled with many files and those files then
deleted, many directory search operations were slow, as if the
directory was still full. Now the directory is shrunk
whenever possible as files are deleted.
FS.Free on FAT32 SD cards is now
Compiler: Tasks started inside a Class that referred to local Class
members and methods would fail due to a corrupt object pointer, in many cases.
Long strings: Quoted strings longer than ~256 bytes caused
unpredictable behaviour in procedure they were defined in.
Compiler: Empty parameter lists would cause a syntax error.
Compiler: Some errors in syntax, such as
x == y, were not detected
and would cause a runtime error due to badly generated code.
Compiler: in code edited using the new VenomIDE, the
parser could sometimes miss line breaks, causing the line following a
comment to be ignored.
MAKE with DNS and default gateway addresses
parameters didn't apply the DNS and gateway addresses.
2013 05 16
Make statement for flash filesystem,
the optional 2nd parameter is now requested cache size,
not just a true/false flag. In code which explicitly sets the parameter
to 1, this will result in a minimal 5k cache being allocated; while
this will work, applications which write large amounts of data
will benefit from changing this to a larger value or omitting it
whereupon it defaults to 70k.
Flash File System:
- A major improvement in data transfer
performance when using the flash file system via USB.
New cacheing scheme improves performance dramatically
when writing many files to a subdirectory, and also enables cache
size to be user-controlled.
FileSystem: Memory leak when killing a file system.
SPI: A number of bugs affecting the use of SPI and memory
cards together, especially when these interfaces are killed and
re-made in the context of switching the power on and off to those
Ethernet: A memory leak associated with killing the ethernet
interface when it is in DHCP server mode.
2013 03 12
Has: There is a new keyword
Has. This may conflict with existing code if you have
declared a variable with the name
Find could cause heap corruption,
especially in a multitasking program
ProtAnalyser and NumberReader: Negative float values were
not read correctly.
2013 01 10
HTTPServer: POST method can now accept data in form/multipart
encoding, meaning that a file can be uploaded to the VM2 from an HTML
Http.Name message returns name of uploaded file.
Ethernet: MAKE is quick and does no address configuration;
instead this is done the first time the interface is used for sending
Connect message waits up to 3 seconds for
link to come up and completes address configuration, returning true on
success. Also the ethernet interface will automatically reconfigure its
address any time the link changes from down to up (e.g. cable
unplugged and replaced)
PROGRAM command now stops all background tasks for cleaner downloads.
Task keyword returns the current task (an object).
State is a read-write property of Task
objects that can hold 'state' associated with a single task. It usually
makes sense to set a task's State to an instance of a user-defined Class.
State is initialised to Nil. It is not AutoDestructed when the task dies,
so you should take care of this using an AutoDestruct Local.
Task.Off, Task.On: The messages Off and On sent to the current task
will turn multitasking off and back on again.
Memory Card: SPI2 was left locked after attempting
initialisation with no card present.
File System: Slowed down when appending to very large files,
delay in proportion to file size started becoming noticeable over
@Global.name: Forming a pointer to an explicit
global variable did not work.
2012 12 05
File System: The
Adjust message now has no effect
on USB and memory card (e.g. SD card) file systems. There was no
pactical use for it on those systems anyway.
NumberReader: when the
Value message read a floating
point number it caused Venom2 to crash due to a bug in an internal
Printf: Conversion of
"%+g" where the result
would come out in exponent notation produced incorrect results.
Class redefinition: If a parent class was redefined, derived classes
were corrupted. The file dependency check indicated this as a warning,
rather than an error. Now, derived Classes are removed and an error is
issued if they are not re-defined.
User-Class Message Redirection: Didn't allow writes to redirected
Message to NIL: Messages to NIL and some error listings were not
handled correctly when there were more than 256 message names defined.
Custom date printing: The "YY" short year format printed a negative
year number for years before 2000.
Serial Port 3 RS-485 Mode crashed on MAKE.
Ethernet DHCP wouldn't work with some servers, because it expected a
broadcast response but didn't set the broadcast bit in outgoing packets to
indicate this. It now accepts unicast responses, which is the preferred
UDProt: memory dump to terminal after any over-long UDP
Get message gave runtime error if a directory was
requested; now it returns the directory as a request.
Buffer: Inserting into an empty buffer now works. Put with an empty
String (or other empty dataset) no longer crashes.
Printing to a file could sometimes fail if two formatting specifiers were not
present and correct.
SafeData.Get: when getting a Class this would crash.
2012 10 11
Ethernet: Address('S') sets VM2 up as a DHCP server, with option also
to be a DNS server for its own hostname only, simplifying access to a VM2
based web server or ftp server from a laptop with a single ethernet cable.
Older laptops may need an Ethernet crossover cable.
New LCD Driver: There is now a driver for the Electronic Assembly DOGL128-6
(128 x 64 monochrome) display, and similar. This display is driven via SPI Bus 1.
SerialPort.Die: The Die message now disables the port and frees up
any memory it took. The Tx channel is made an input and pulled high,
but states of the other I/O channels are not changed. If you
want to set them to a particular state or function then you must do this
I2CBus.Die: The Die message now disables the I2C Bus. The SDA and SCL
are made floating inputs. If you want to set them to a
different state or function then you must do this explicitly.
- Pull unused I/O: The new
System.Low message will find
all the VM2 I/0 channels that have not been explicitly set to an I/O state by
your code up to that point, and set them all to 'input pulled low'. This will
help to reduce the current consumed by the VM2, especially when you are using
low power 'STOP' mode (
Note: this will not touch I/O that have been explicitly set to 'Floating'. you
Debug(21) to list the states of all I/O channels to find those that
need to be set.
Memory Card FileSystems: By using multiple block writes where
possible, all memory card file systems now have greatly improved writing speed
and will create less card wear than before.
HTTPServer: Supports POST method for form data.
This works better than GET when there is a lot of data to
send, especially as GET has a limit of about 1000 characters
of query data. Note POST cannot be used for uploading
files yet: this requires a different encoding.
HTTPServer: Uses Etags for files, enabling some improvements in
Automatic handshake setting during download: When code is downloaded
via VenomIDE the VM2 will automatically adjust its serial handshake
setting to match VenomIDE. This allows you to set the serial handshake to
whatever setting your application requires (e.g. to None for serial debug
output), and not have to reset it when downloading your application.
Done value reported during a FileSystem
Adjust operation could be incorrect and show over 100%.
AlphaLCD: Bus edge speed settings have been corrected for the expansion bus.
Incorrect edge speed had led to some LCD devices not working correctly.
Print and Printf() could crash if handed infinite values. They now
detect these and also NaN ("not a number") values and generate "inf",
"-inf" "nan" and "-nan" as appropriate.
Certain numerical strings representing numbers outside the valid
range for floats would be accepted without a parse error.
2012 07 05
Protect(4,...) will create a combined
firmware update file (usually given the extension .VFU) that contains both
your application code and the version of Venom that runs it. It may be used
to program VM2s in production, or for remote firmware update.
'Compiled by' version:
Protect(6,1) returns the version
number of Venom that compiled the application currently in Flash. Returns -1 if no
application in flash.
fs.Valid(s), where s is a string or text buffer,
checks the string contains a valid file name - i.e. it is not empty and does not
contain illegal characters.
Format(4) sets the
number of pixels between tab positions. When a tab character is printed to
the display the cursor will be moved to the right, to the next tab
position. Tab positions are referenced from the LH side of the TextBox or
the last explicit cursor movement.
Ethernet: Detects IP address conflict on LAN if you attempt to assign
an IP address that is already in use either in
FileSystem: Listing a directory with PRINT can now take a
user-specified format string as the second colon operator. The format string
defines exactly what information about each directory entry is
displayed. The old format numbers still work, for compatibility with
Copy message copies files or directories
(including contents, recursively) from one location to another, in
the same file system or between file systems.
Done message returns estimate of
percentage complete of a
Adjust operation running in a separate task.
Find returns 1 for a plain file,
2 for a directory, and as before 0 if no file found matching the name given.
Cookie message fetches or creates a cookie
enabling session persistence.
Flashed app too big: Procedures with no locals or parameters took
indeterminate extra space in Flash.
FileSystem: in the file system's self test (on creation or fs.Valid(n))
an invalid entry in a subdirectory would result in the entire subdirectory
and its contents being removed. Now only the invalid entry is removed,
and the remainder of the directory remains intact.
RAM and Flash Filesystems: If you created a Flash file sytem at the
start of a program, and the VM2 had previously had a RAMdisk on it, the
memory previously used by the RAMdisk became unavailable, leaving the system
starved of memory.
FileSystem: on size limited files, updates the directory entry when
the first cluster changes; this may prevent occasional run time errors when
file system is used in certain ways.
Printf() conversion errors in
printf("%-0nd", ...) and
printf("%+07.3f", 0.0) where padding is not implemented correctly.
2012 05 09
True: The value of
True in Venom has changed from -1 to +1.
This affects both the value of the keyword
and expressions that result in a boolean (True/False) value, such as
x > y
In rare cases this change may break some code.
The most likely problems will be with code that mistakenly uses
Or as a logical operator, and also
(legitimately) relies on a non-zero value meaning 'true', for example:
If Buffer.Count And x > y ; Incorrect
If Buffer.Count AndAlso x > y ; Correct
There may also be a very small number of cases where code relies on
a True/False result having the numerical value 0 or -1, or
uses this result in a further mathematical operation.
Filesystem: An attempt to write to write protected file or media now
generates error 7 "Write to read-only item" instead of error 24
"File access error".
AlphaLCD: The 'Device not found' runtime error is no longer thrown when the
driver can't detect the display device is present.
Print: Default fieldwidths for printing integers and floats (of 6 and 13)
have been reinstated. They were removed in release 2011 09 14.
SerialPorts: The Rx (receive) inputs are now pulled high internally.
Date and Time formatting: You can now print dates and times from the
RealTimeClock objects using custom
date and time formatting codes, for example
Print clock : "h:mmaa <on> dddd <the> do MMMM yyyy"
will give something like
3:05pm on Wednesday the 11th April 2012
Also, the day and month names (long and abbreviated) and ordinal
suffixes (1st, 2nd, etc.) may be changed to suit the locale.
List Class will list all user defined classes in an inheritance tree.
FileSystem: When opening a file, if the optional 3rd parameter
(used to set a size limit) is set to -1, the file is opened in read-only
mode. The recently introduced prohibition of multiple opens on the same
file is relaxed when all the opens are read-only. Attempting to write
to or empty a file that has been opened in read-only mode will generate a
run time "Write Protected" error.
USB Host: MSD support for USB host hardware (such as on the
forthcoming VM2 Application Board 3) allows removeable file storage on
USB Flash Drives.
Fixed Memory Card: support for fixed memory cards (i.e. not expected
to be removed while a program is running), for example the micro-SD card
holder fitted to the VM2 Application Board 3. This driver does not expect
any I2C digital inputs for detecting card present or write protect switches,
nor for setting a "card busy" LED.
Put message accepts buffers of 8 bit
integers or text (256 elements maximum) and arrays of 8 bit integers,
in addition to single integers and strings.
HTTPServer: it was possible for multiple server threads to open the
same file simultaneously, generating a run time error. The new
"Open file read-only" feature described above is exploited to fix this.
Filesystem: If a file was open, a file system
Flush message would update the modification date/time in the
file's directory entry even if the file was unmodified. It now only does
this if the file has actually been modified.
AlphaLCD: Bus timings have been corrected for the expansion bus.
Incorrect signal timing had led to some LCD devices not working correctly.
2012 03 26
TextBlock: The default termination string for
can now have any case. E.g. you can use
Explicit termination strings remain case-sensitive.
PrintF: A new conversion operator has been added:
will show an integer value as an IP address in conventional
dotted-quad notation like 192.168.1.14.
User Class names are now available in Protected (i.e. 'ROMed'
or 'Flashed') applications.
Print CLS did not reset Format options for GraphicsLCD object;
it does now.
2012 03 14
Deprecation: the deprecated inheritance testing operator
Class obj : classname has been removed.
GraphicsLCD.Format: all format values are now reset on
the next TextBox, rather than the next CLS. This affects word wrapping,
mono-spaced printing, explicit CR depth and background rectangle padding.
I2CBus: the second I2CBus has been implemented.
System.Time(n) : returns the current value of a 32 bit counter
incremented every microsecond (n = 0) or every millisecond (n = 1) which
may be useful for measuring short time delays. Both counters start at 0
when the VM2 is reset or powered on.
Encrypter object can be connected to any object that accepts
Queue messages to
enable encryption of data in files or communication links.
Running from Flash/writing Flash files: running code from Flash memory, i.e.
using Protect(1), and at the same time writing to the Flash File System in different task could cause
the code in flash to be misread. This usually presents as an 'Illegal bytecode
error'. This bug was introduced in Release 2011 07 20.
PIDController: the Value message would read but not write.
Windows bitmaps: 24bbp Windows bitmaps plotted incorrectly
if the width was not a multiple of 4.
2012 02 23
Windows BMP files:
GraphicsLCD.Bitmap can now plot
Windows Bitmap format (.BMP) files directly from the Flash Filesystem. Only
the 24- and 32- bits-per-pixel formats are supported. The 32 bpp format has
an 'alpha channel' (i.e. multi-bit transparency), and so renders rounded
buttons, etc, more accurately. There are button-generating websites that
will generate PNG files for many button styles. These may be converted into
32-bit bitmap bitmap images with an alpha channel
(ARGB) using utilities such as Pixelformer.
GraphicsLCD: There is a new Driver for the VM2 (not VM2D) to drive
the MCT024D12TW240320PML display in portrait mode. This driver is not yet fully
optimised for screen update speed.
FileSystem: fixed data corruption when reading files if other
files are being written at the same time.
Unary Plus (e.g.
y := +x) no longer causes compilation errors.
GraphicsLCD: printing after text clipped at the right-hand
edge of a TextBox resulted in a runtime error.
2012 02 07
Class.Die: When you send
.Die to an instance of a
.Die message will now only be passed on to
sub-objects that have the
AutoDestruct attribute (see below).
Also, any parameters to
.Die are ignored.
Touchscreen Adjust: Because this now stores more information,
it will use an additional two bytes (now 12 bytes in total)
in the specified SafeData storage device (usually your EEPROM). This
could over write other data if you stored it in the device
immediately after the Touch calibration.
Globals in Classes: All global
variable names used within a class (ie. in its methods)
must be declared, either using a list at the top of the class, or by
Global lcd, touch ; List globals that are allowed, or use ALL.
; 'lcd' and 'touch' are declared Global above.
evt := touch.Event
; 'clock' is declared global here.
t := Global.clock.Time
Class Assertion: Class assertion has been
restricted. It may now only be used with
This.[BaseClass]msg, or when asserting 'Class-default'
Touchscreen Adjust: (This is used to calibrate the
touchscreen). It will now detect and compensate for when the X and Y
axes are swapped compared to the 'normal' orientation.
IP Address message: with a second parameter having the value 0,
this enforces parsing of the first parameter only as a dotted-quad numeric
IP address. Also number values greater than 255 are detected and like any
other invalid IP address string result in a run time error 26.
AutoDestruct attribute: the attribute
AutoDestruct may be
applied to members of Classes that refer to other objects. It means that
Die message should automatically pass on a
.Die message to this member.
MyList Any AutoDestruct ; Remove this on Die
Use base Class: A new version of the Class-assertion operator,
[^] means 'use the message in the inherited (base) class', so
you don't have to specify the class name explicity.
Count message is now synonymous with
Length message for Buffers and Arrays.
Error reports: Both runtime and 'compile time' (syntax) error
reports have been improved. In particular, runtime errors that occur
when sending messages give more information.
Recursive object removal: There is no longer a risk of
unlimited recursion when killing an object that holds other objects
AutoDestruct, etc.). This
used to happen when a Buffer of Any or an instance of a user-defined
Class held a 'circular' reference back to itself. Similarly, the
default PRINT for such an object will no longer risk unlimited
SELECT CASE: This now checks that the type of its argument is
Print jobs: Heap fragmentation has been reduced by retaining
old print jobs for re-use whenever possible.
2011 12 01
New keywords: There are some new keywords:
Global have been introduced. If you have used these
as variable names then you will need to ammend your code.
New name scoping rules mean that 'bare' system messages are no longer
sent to the system object by default. However, the following
messages retain the old behaviour for ease of use:
Debug, PrintF, Protect.
This section lists elements of the Venom Language that are no longer considered
current and so may be removed in a future release.
DECLARE: due for removal because it has been superceded
by the Code Analysis tool in VenomIDE.
Name scoping in Venom has changed. Names are now seen in
If you need to override this order you can use
- Local variables
- Member names of any enclosing Class definition
- Global names
or the new operator
Pre-defined Venom message names, such as
Put, Get, Reset, Count,
etc may now be used for variable names (local or global).
This is no longer required to refer
to a member of the Class. You can use the member name alone and
it will resolve to
This.membername. The keyword
This is now only necessary in these circumstances:
When you need to override a local with the same name
When you need to navigate inheritance using
When you want to specify the value of the current instance of the
The limit on the number of user-defined message names has been
removed. However, there is currently a maximum of 256 'visible'
members and methods in any Class.
START: you can now refer to local variables, parameters and
START. This feature allows powerful
constructions, including user-defined objects that run in their
Inheritance test: A new inheritance-testing operator,
IS, has been introduced.
IS will return
TRUE if the preceding expression either is, or
inherits, the named class. For example:
IF obj IS MyClass
TouchScreen: You can now use
Event together and they won't interfere.
PrintF: A Bug in the last release meant that PrintF sent to
the 'system' (explicitly or implicitly) didn't unlock the default
output stream leading to a runtime error.
Buffer.Flush: A long standing bug was found where flushing a
buffer with a Length of zero would fail at the point an internal datablock
2011 11 28
2011 11 03
Any have been introduced. If you have used these as
variable names then you will need to ammend your code.
'Buffer of Any' and Class members of type 'Any' now require use of
Nil was used before.
buffer_of_any := NEW Buffer(Any).
The new quoted string concatenation feature (see below) means that quoted strings
in consecutive parameters or array initialisers must be separated by commas or they
will be run together.
DELETE cannot now be used to remove macros. Use
Type names can be used as prototype values: Readability of
Venom code can now be improved by using the keywords
String in any
place where a 'prototype' value is required, for example when making
an Array or Buffer. The
Int keyword may be followed
with the qualifiers 8, 16 or 32 to indicate the size (in bits) of
the datatype being specified, e.g.
Int 16. The type
Int by itself is equivalent to
The type name
Any is used to indicate any type.
Quoted string concatenation: If quoted strings are separated
only by whitespace (spaces, tabs, newlines) or comments, then the
strings are concatenated into a single string. E.g. the lines of code
"This is a quoted string" ; Comment
"This is another"
are equivalent to this line
"This is a quoted stringThis is another"
TextBlock: This new construct allows you to embed large
blocks of text, e.g HTML or other scripts, in your Venom source
files. The text is completely literal - i.e. no escape characters
are needed. The text can also be large.
HTTPServer: Put message for a string or textblock can take an
optional 2nd parameter; if this parameter is non-zero, the text is
interpreted in the same way as a .vhtml file i.e. global variable names can
be embedded between backslashes in the text and will be substituted with
their values on output.
Macros: Two new macro commands have been added.
#UNDEF will remove an existing macro definition.
#REDEFINE does exactly the same as
#DEFINE, except that doesn't give a warning if the
definition has changed.
File System: An attempt to re-open an already-open file is now
detected, and results in a run time error.
New Features relating to Class
These features have been listed separately so that users who aren't
interested in Class can skip them.
Bitmaps may now be plotted with any portion of the bitmap falling
outside the overall display area, and clipping correctly.
Broadcast Address sending out any IP packet using a broadcast address
(either 255.255.255.255 or a subnet broadcast address like 192.168.1.255)
didn't work. Broadcasting is potentially useful with some UDP applications,
Ip.Time to see if a network is connected by trying to
get a response from any node.
SPI 1 Sending an SPI object on SPI bus 1 the
Off message caused a system crash.
fs.Valid(n) was leaving file system locked.
PRINT TO or
Put with a TCP
object was not causing a run time error when the connection was closed or in
the "listening" state.
2011 09 14
Several new keywords and message names have been defined; if your
existing code uses variables with these names then you will need to
change them. The new keywords and message names are
ParamCount, Initialise, AcceptPrintJob.
The default fieldwidth used when PRINT prints integers and floating
point numbers has changed from 6 (for integers) and 13 (for floats)
to 1 in both cases.
Classes: It is now possible to write new object classes in
Venom. This major new feature enables more sophistication in Venom
applications. Please refer to the Venom2 Tutorial and
Venom2 Help File for more information.
Optional parameters: All or part of the parameter list of a
Venom procedure may be declared as optional by enclosing it in
. The new keyword
ParamCount gives the number of parameters actually
Code Analysis: This tool now checks dependencies in your code
(i.e. macros and class inheritance) after each download. When you
compile just a part of your project, the code analysis tool
suggests further files that may need to be re-compiled (downloaded again) because they
depend on definitions in files that may have changed. To turn on
Code Analysis use the
Terminal>Settings dialogue in
eth.Address('A') is a synonym for
eth.Address("DHCP") (mnemonic: "Automatic")
PulseWidthIn on channels $10, $18, $36 could not cope with periods of greater than 65535.
Sending the Die message to a variable Array of Strings containing
string constants could cause a Heap Error and/or corrupt RAM.
File System: Run time errors (very rarely) or other misbehaviour
when subdirectories are used, especially on RAM disk.
Printf("%g", ...) were adding trailing
zeros to digits after the decimal point.
2011 07 20
Buffer Empty: when a Buffer of Any is emptied, any elements that were
objects are now killed by default. If you don't want to kill them
Array of Strings Die: when an Array of Strings is removed, any elements that were
String objects are now killed by default. If you don't want to kill them
Security: Protect(1) has some optional security flags to
prevent unauthorised access to the command line, or to Flash files
PRINT TO Buffer of Any: The most common use for a Buffer of
Any is to hold a set of String objects where each String object
holds a line of text. You can now easily convert text into such a
set of String objects by printing the text to a Buffer of Any. Each
line in the text will be placed in new String objects and each
String object is then Put into the Buffer of Any.
Line editor The operation of the saved command line feature
has been improved.
Sort Buffer of Strings: If a Buffer of Any holds only string
values, these can be sorted into alphabetical order with the Sort
Analogue: Analogue inputs for channels in the range $66 - $6A
are now avaiable to use. Note that these channels are not available
on the VM2D.
PID Controller: A new PID Controller object is available for
'beta' testing. Please contact Micro-Robotics if you are interested
'Active variable assignments', e.g.
:= 1 are now parsed with the correct precedence.
Some flash file system code was violating the 2ms task swap latency rule,
and could cause ethernet operations to timeout causing a run time error if
another task was writing to flash.
2011 06 13
.Value(n) message to TouchScreen has now been
replaced by two separate messages:
Internal fonts: The digit characters ['0'-'9'] in the
internal fonts (fonts 0, 1 & 2) have been modified so that they are
naturally monospaced (as is the convention for many popular
otherwise proportional fonts). This means that they will take up
slightly more width than before and so may break some existing
GraphicsLCD display layouts. However printing numbers
that overwrite each other, or that need to be aligned in columns, is
now much easier.
NumberReader: Due to an overhaul there is no longer any
'default text', Reset will always reset the buffer to "0", and PRINT
will not pad to the Width value (you can define a PRINT fieldwidth
with in the normal way). New features have also been added to make
NumberReader more flexible. See below.
SPI object: when made with 2nd parameter, this parameter is now the
required speed in kHz, instead of a divisor code. The object takes into
account the system clock speed when setting the SPI speed.
Graphical User Interfaces: There is a completely new way to
implement GUIs, based on the concept of Buttons attached to the
TouchScreen object. This new method simplifies the creation of
menus enormously. Please see the Venom2 Help File for details.
Pen message: There are two new variants on the Pen message:
Pen with no parameters resets the foreground and background pens to their default colours.
This was actually introduced in release 2010 11 09 but wasn't documented.
Pen with two parameters sets the foreground and background pens at the same time.
TouchScreen Calibration: There is now a much simpler method
for calibrating touchscreens. Please see the Venom2 Help File for
Locale: It is now possible to set some locale information:
you can set the decimal point character used in printing floating
point numbers to any character, and you can set the day of week and
month names to any strings. Look for Locale or
OperatingSystem.Debug in the Venom2 Help File.
Latin 1 character set: It's now much easier to use all the
characters in the Latin 1 character set (i.e. character codes in the
whole 8-bit range). This includes many accented characters from
European languages and a few useful symbols. These may may now be
used directly in literal (quoted) strings or in character constants
(single quotes). In order to print these characters on a Graphcics
LCD you will need to make sure the fonts you use contain the Latin 1
glyphs you want. The standard fonts provided with Venom don't have
these glyphs, but it's easy to include them in anti-aliased fonts
converted from TrueType. Example usage:
PRINT "© Café²"
SerialPort: For RS-485, new handshake mode 3 and
message enable automated control of RS-485 transceiver direction at end of
NumberReader: Messages have been added or altered:
Close: The next Put will clear existing buffer contents first.
Reset: Clear the buffer to "0", to be overwritten by next Put ('calculator style').
Empty: Completely empty the buffer.
Length: Return the number of characters in the buffer.
Output: Set a character that substitutes for the real
digits when the NumberReader is printed, to implement secret
number or 'PIN' entry.
Speed message sets or returns the SPI clock speed.
XMODEMlink object: implements the XMODEM protocol for file transfer
over any serial port.
Filesystem: file system check on reset or startup was removing all
Buffer of Any: AUTODESTRUCT of Buffer of Any no longer causes
corruption in a procedure's RETURN value.
GraphicsLCD text clipping: Font changes in clipped text
are now processed.
3D borders: Box/TextBox border $104 ('Groove') has been
improved so the border completely obscures the background, even at
Box border $100 has been made to be exactly the same as $102, which
means its border size has changed slightly. In future the
appearance of borders $100 and $101 may change slightly, but their
outside size will remain the same. We recommend that you use $102
and $103 for current designs.
Memory Card File System was slow because incorrect SPI clock
speed was used.
2011 04 13
Free now returns available space in kilobytes
(1 KB = 1024 bytes) to avoid 32 bit overflow with SD cards of capacity over 2GB.
SerialPort: The InputBuffer sub-object has been removed
because it was redundant. Any messages that were sent to it may now
be sent to the SerialPort object itself with the same effect.
Flush message is now called
Only the serial input buffer may be emptied.
GraphicsLCD text clipping: Text that crosses a text boundary
is clipped so that partial characters are now shown, giving a more
intuitive display than simply not printing any character or line
that touches an edge. The text boundaries are at the righthand
and bottom edges of a TextBox, and at the top of the
The top of a TextBox is not defined as a boundary - so that text may
rise above it. Cipping does not happen at the lefthand edge of a
TextBox because text can never start printing outside the lefthand
GraphicsLCD TextBox visible extent: if you use a negative number for the
border parameter then the text area is set at the edges of
the box rather than inside the border. This is intended for
development/debugging, where you might want to see the exact extent
of a TextBox that is normally invisible.
External analogue: The Analogue object now supports some
external analogue I/O devices: The AD7998, PCF9591 and MAX1236/8.
Other devices may be added to this list by request.
The Code Analysis tool introduced in the last release has been improved.
FileSystem support for higher capacity memory cards: The Filesystem
now works with FAT32 as well as FAT16 and FAT12, and the MMC/SD device
driver will work with SDHC cards. Both these changes are needed to
support cards of capacity greater tham 2GB.
Free message can take a size parameter in
kilobytes; if this is supplied and non-zero, the
returns TRUE (-1) if the file system's free space equal or exceeds the
value given, FALSE (0) otherwise. The useful side-effect of this is that
the free space computation can be much faster, as the counting of free
blocks stops as soon as a TRUE condition is reached. On large SD cards this
can save several seconds of time.
Valid message can optionally take a parameter
which makes it perform a consistency check on the file system, with a choice
between a quick check and a through check that can take some time on a
STOP and STOP ALL are now handled using the Runtime Error
system. When a task is stopped it is made to perform a special kind
of runtime error. One advantage of this is that the 'error' may be
CATCH, in which case
AUTODESTRUCT may be used to clean up dynamic objects
Lock(0) may be used to leave any objects in the
This means that
STOP ALL can
be used to stop tasks in your application cleanly, which was not
Lock(0): If a lock is not held by the current task,
Lock(0) will be ignored. (It used to wait for the Lock to
be released before doing nothing!) This new behaviour is useful in
handling exceptions, e.g.
SMSLink: this new object (similar to the SMS Protocol object in VM1)
handles the sending and receiving of text messages over mobile phone networks
using a standards compliant GPRS terminal connected to a serial port.
Extensive provision is made for text and binary message formats, including
limited support for 16 bit UCS-2 text.
Running code from Flash memory was not possible while the Flash was
being written to or erased, preventing writes to the Flash Filing
System (FFS) via the USB or in multitasking applications.
Certain combinations of values and format codes caused PRINT and PrintF
in exponential format to show incorrect results.
PrintF("%6.0e", 1.0e-9) is an example
Printing undefined fonts now results in font number 0 being substituted.
Multiple references to a constant Array caused a heap error on
re-downloading a code file.
Re-Making a filesystem when it already existed had some undesirable
consequences, including locking errors. This happened invisibly when
playing audio files from the flash filesystem. It is now possible to
re-make a filesystem without causing these problems.
2011 02 10
Ethernet: MAKE has a new parameter syntax, the main objective being
that in many cases no parameters are needed at all for standard hardware
and DHCP. When parameters are used, the hardware interface is defined by
only the first parameter instead of the first two.
All "MAKE ... Ethernet()" statements will have to
change with an upgrade to this version of Venom.
Ethernet: The IP address is no longer stored in the EEPROM. It must
be assigned by Venom code or by DHCP as described above.
Firmware updates (from files with extensions
.vex in the Flash Filing System) now require CRCs at
the end of the file data. These CRCs will be correctly set when you
produce the files using this version of Venom, or if you download
.vos files from our website.
Older versions of Venom will accept the new files because they
ignore the CRCs.
Clear Memory message: This now detects an application held in
Flash and asks if you would like to remove it.
It also asks for confirmation if you want to clear either the Flash or the
RAM. Any character other than 'Y' or 'y' for Yes is assumed to mean
The write protection state of the VM2 MCU's internal flash memory
can be set and read using
Debug(16). This may be
necessary when using the Remote Firmware Update feature,
Some internal bytecodes have been altered to allow more accurate
location of runtime errors and code excution points in LIST TASK and Ctrl-T.
When editing command lines in the terminal, the Home and End keys will now work.
A new Code Analysis tool lists errors and warnings about your code
after a download. This is switched on and off from within the
Terminal Settings dialogue in VenomIDE. It may also be invoked
directly using Debug(10).
GraphicsLCD: A new type of font can be loaded, with antialiasing to
make the edges of the characters look smoother. We also supply a program
that will run from the Windows command line and generate fonts in this
format to any size up to 125 pixels from any Truetype font file, and some
ready-made fonts produced this way. The conversion program is suitable for
running from a batch file.
FileSystem: With memory cards, the Status message
fs.Status(0)) sets an extra bit: bit
6 (with a value of 64) is set whenever a card is physically present in the the
slot. Thus a card of a type that the VM2 cannot read, such as an SDHC card,
will set this bit but not bit 0, enabling the Venom prgrammer to distinguish
between an invalid card and the absence of any card.
A very obscure bug, which may have caused random side-effects when the file
system was used in some builds, has been found and fixed.
Filesystem on memory cards now retries fewer times on a failed read
or write, resuilting in faster detection of a bad card
Filesystem no longer gives a misleading "device not found" error
when card is removed and re-inserted or new card inserted. You
should still not remove or change a card while any files are open.
2010 11 30
The master clock speed (set by
System.Speed, or just
Speed) is no longer non-volatile. The VM2 will now always
start up at 72MHz. If you want to run the controller at a lower speed
you must call
Speed in your application code. See the
Venom2 Help file for more details.
Dallas 1-Wire Bus has been implemented as the
OneWire object type.
PRINTing to the RealTimeClock and DateTime objects has been
relaxed: you can omit the seconds, minutes and/or hours values (they
will default to 00), and you can use any non-numeric single
character to delimit the elements of the date and time.
I2CBus now has
Reset message that is used to
re-initialise the peripheral, particularly if the system clock speed
FileSystem Adjust message compacts all file blocks to bottom of
memory, leaving all free space in one contiguous block. This ensures that
files subsequently added are allocated in one contiguous block each and
therefore work with
FileSystem Status(1) returns a value that indicates which media the
file system is on: 0 for RAM, 2 for memory card, 3 for flash.
I2C Bus: Very rapid I2C activity could result in unreliable data
transfers, etc; linked to Memory Card Filing System problems.
2010 11 09
File extensions .vex and .vos: These file extensions now have
special significance in the Flash Filing System (FFS). Any files with
either of these extensions present in the root directory of the FFS
will be interpretted as firmware update files and used to re-program
the OS or application code on startup in Program Mode. You are
advised not to use these extensions for any other purpose.
System.Mapping message for reserving memory for
Flash File System and RAM disk. This is no longer necessary as non-volatile
memory is now reserved when the objects are created. However, the
new method requires that if you need both RAM disk and Flash File System,
you must create the RAM disk first.
Flash Memory: The area where applications are stored in on-board flash
is now fixed at 1MB and its size cannot be changed.
File Name message works differently. Instead of returning a string
value it must be passed a string variable into which the file name is copied.
File System write cacheing: on memory cards and the flash filesystem,
the cache is no longer flushed automatically when all files have been closed.
The only exception is the flash file system when the USB connection is
active, in which case the cache is flushed after a short idle period.
This means you will have to use the FileSystem
on memory cards before the card is removed or power disconnected. The best
choice of when to do this is entirely application-dependent.
Printf and PRINT could crash with value of 0.0 in some format options,
and there were several instances of incorrectly formatted output for floats.
Also the precision specification was not implemented at all for strings,
and not always correctly for floats.
Using a variable Array of strings without any explicit initialisers caused a system crash
when unitialised string pointers accessed illegal memory areas.
Array: Syntax errors in a constant Array definition could cause a reset.
Could not use the INDEX0 from a containing loop within a TRY construct.
AS type change operator wrongly gave a runtime error when converting a Float to a Float.
Startup failure: A VM2 could sometimes fail to start in Program
Mode. Bug introduced with USB 'Production Programming' feature.
2010 09 20
HTTPServer Value message: In addition to now behaving as documented,
this also returns the prototype numerical value as a default if the named
was not defined in the query string. Also Value(0, s) sets s to the 'path'
part of the request. There is no valid form of the
message that returns a fixed string: a string variable must be used.
#IF: You can now do conditional compilation using the
directives #IF, #ELSE, #ELIF and #ENDIF to hide lines of code
from the compiler depending on the value of expressions.
GraphicsLCD Extended Fonts: You can now use the upper
half of the 8-bit character range for printing characters on the
GraphicsLCD. This most often used for printing Western European
accented characters, though it may be used for any characters if
you create a font with those characters in it.
Printable characters for the GraphicsLCD now lie in the range $20
to $FF. To use the full range you will have to install fonts that
have characters in the new part of the range. The system fonts
don't currently define these characters.
You can enter these characters into VenomIDE by copying and
pasting from Windows' Character Map utility, or by holding the Alt
key down and typing a four digit decimal number for the character
you want; e.g. the copyright symbol '©' is entered using
I2CBus Send Message: This new message allows you to build
up a packet of individual data bytes more easily than with the Put
TCProt, HTTPServer, UDProt and PPProt did not support Printf
HTTPServer.Value message did not behave as documented.
2010 09 01
Buffer of Any: The Die message now removes all objects
referred to by the Buffer, by default. You can get the old behaviour
by using Die(1). This change should not break most existing
Venom code. Note that AUTODESTRUCT uses the default Die.
USB flash file system behaviour change in program mode:
File system link can be started by attaching USB any time while
"Clear Memory ?" prompt is being displayed and disconnects when prompt
SerialPort: the Look message now removes a character from
the input buffer if there is one. This was the documented
behaviour, so this is actually a bug fix, but it may break
applications that relied on previous behaviour.
Touchscreen: driver was not debounced well.
Look message didn't remove characters from input buffer.
2nd MAKE on existing port would not change data format settings (parity and word length).
When using 7 bit + parity data format the parity bit was left in the MSB
of the received data.
GraphicsLCD: wordwrap got into an endless loop if the TextBox was
less than one character wide.
Also, the '\' character was corrupt in FONT 0.
Keypad: There was an unreported bug in the autorepeat algorithm in
the Keypad object.
TCP could hang in SYN_RECEIVED state if there was a physical disconnection
or remote system crash at the critical time.
2010 04 28
GraphicsLCD: Major changes have been made to this object. The
Window sub-object has been removed entirely and all text and graphics
are now sent directly to the GraphicsLCD object.
The new TextBox entity is used to define the extent of
printed text. Please see the Venom2 Help file and the Graphical User Interface
for more information on this new, central feature.
The existing embedded fonts have been replaced by a more consistent set. A
font conversion utility is available to convert .FNT files to
Venom font formats.
The Box message now uses relative coordinates to indicate the
size of the box.
Touchscreen: The Key message takes parameters similar to
Textbox and Box to define a Key's position and size.
RealTimeClock/Datetime: RealTimeClock and DateTime objects
now expect ISO format when you 'PRINT TO' them. For exampe
PRINT TO clock, "2010-04-27 16:05:32"
CANBus: The Window message, which sets up message filters, is now
RealTimeClock: The Adjust clock calibration value is set to
the midpoint (64) the first time Time is set. Also,
clock.GetLast gives the time the clock was last set, and
clock.Element gives access to non-volatile backup domain
Keypad: The Matrix keypad driver returns a special code to
indicate when more than one key is pressed.
DateTime: MAKE now takes an optional initial time value.
Flash File System: A file System with all the same
properties as the memory card and RAM disk based file systems is
now available for the on-board 8MB flash memory.
USB: The Flash file system is accessible as a standard USB Mass
Storage Device, appearing to host systems as a removable disk with full
In memory based file systems, the file
returns the address of the start of the file's data if it is all in
Email: The SMTPSender and POP3Mailbox object implement sending
and receiving of emails when the VM2 is connected to a network.
Macros redefined by adding text to the end of the orginal macro
were not being seen as new.
2010 01 07
There has been a major re-write of the error and exception
The new system is much easier to understand and use. Please read
the Tutorial or Help file for how to use the new system. If you
have used any of the keywords listed above then your code will
need some modification.
A new keyword TRY has been introduced
The keywords THROW and REGION have been removed
The keywords CATCH and EXIT have changed in their function
Some error numbers have changed in value
Format numbers for the RealTimeClock and DateTime objects have
changed. This takes into account the ISO standard for printing
dates and times.
The default format is now the full ISO date and time:
Format numbers 0 - 2 now represent different forms of the ISO format.
The previous formats are still availble at numbers 10 - 12.
Note: printing the date and time to a clock, etc, doesn't currently
accept the ISO time format.
FileSystem: Directory listing format is changed. There are now
just 4 different listing styles, plus bitmapped flags for recursive
listing of directories and display for full path name of file. File dates
are shown in ISO format (yyyy-mm-dd)
HTTPServer Get message must always take a string variable parameter.
The form which returned a string value is no longer supported.
TCP.Get(0) no longer returns a string, but tcp.Get(s) where s is a
string variable does the same thing in a safer way.
ProtAnalyser Get modes which were included for
compatibility with the older VM1 Protanalyser have now been dropped.
Specifically, the following replacements apply:
Also when creating a Protanalyser, its source object is passed directly,
not as a pointer.
|'s'||Use a string variable instead|
|'d', 'h' ||Use 10 and 16 instead|
|'e', 'f'||Use a float prototype instead|
The Networking objects have a separate object name each which replaces
the VM1's "Protocol": PPProt, IProt, TCProt, UDProt, Ethernet, HTTPServer,
PPP has a different setup mechanism from the VM1 version, using
PRINT TO ppp for modem commands and ppp.Name for user name and password
setting. Other networking objects have changed slightly too.
PPP and Ethernet interfaces for TCP/IP networking are operational,
as are the IP-related protocols: ARP, DHCP, ICMP echo/request, UDP, DNS,
NTP (time), FTP and HTTP.
The CANBus object has been implemented.
The TouchScreen object has been implemented.
The SafeData object has been implemented for storing data
in I2C EEPROM.
The SPI object has been implemented in a basic form.
Line editor: The Venom2 command line now has a line editing
function. You can edit anywhere in the line using the Left-Right
Cursor, Backspace and Delete keys.
Also, the 'Command line Recall' function has been extended to
store multiple lines. You can recall previous command lines
using the Up-Down Cursor keys on the PC keyboard.
System Mapping message defines usage of non-volatile RAM for RAM
Disk and will in future also define NV RAM usage for Flash File System.
Use of RAMdisk file system would randomly corrupt memory causing
program crashes and errors.
PRINT TO file sometimes added spurious NUL characters to file.
I2C bus could get stuck or very slow
Compiler failure on array of strings where string length was more than
Several minor or obscure bugs.
2009 10 01
Macros can take parameters.
GraphicsLCD object can drive colour and monochrome displays.
PulseWidthOut, PulseWidthIn, PulseCounter and Shaft objects are
The task/resource locking system has much improved sharing of highly contended resources.
FileSystem is now working, for both RAM disk and SD/MMC memory card
PPProt, TCProt, UDProt and IProt objects are implemented. They have had
only light testing so far.
RandomNumberGen is now implemented. It uses the same high quality 32 bit
generator as the VM1's 32 bit generator, but we are not going to implement
a 16 bit random number source at all.
Fixed: glitches on the I2C Bus signals could make the bus stop working.
Fixed bugs in startup sequence code.
WAIT t will now wait at least t mS. Previously it waited at least
Supplying a negative time to WAIT will now not wait at all.
Previously it would have waited for a very long time.
Fixed: Printing floating point numbers sometimes failed (colon character
in the print) - especially when printing an exact multiple of 10.0.
Fixed: Get message with a string object parameter set string length
incorrectly, in serial, TCP, File and Protanalyser.
Fixed: ARRAY (const) failed for large arrays of strings.
2009 06 10
First major release. Many objects are supported with most of their functionality.
Many objects are not yet supported fully.
This release note is a reverse history of each formal release of the
Venom2 Language. Each release is listed by date, e.g. 2010
11 09, and further divided into three sections:
This section lists changes to the language syntax or operation
that mean you may have to alter your source code. We will only
make changes of this kind where there is an overwhelming
advantage to doing so. Check all the Major Changes between the
version you have been using and version you want to use. If any
of them apply to you, please make sure your application code is
changed to suit.
This section lists features added to the language or objects.
This section lists bugs fixed where the bug may have significantly
affected use of the system.