The replacement libs are being updated continually and there's a web page about them (among other things). Please look for news there or at Libstock.
For the incoming version 3.00 of mP PRO I've prepared some refreshed and some new replacement libraries: - Strings library (__Lib_String)
- Conversions library (__Lib_Conversions)
- Floating-point math library (__Lib_MathDouble - two versions)
- internal EEPROM library (__Lib_EEPROM_256 and __Lib_EEPROM_1024)
- System library (__Lib_System)
These are all precompiled libs replacing official ones with the advantage of smaller and faster code for routines present in official libs, and many additional routines that should simplify programming and make it more
Pascal/Delphi-like. Hope you'll like them
In the Conversions lib replacement some routines perform similar task - that's because new routines work differently than those from official lib (in fact, the latter call the former and only then change the result). The official lib routines are there both for compatibility with older code and for other official libs that use them.
The Strings library has been expanded with new Delphi-like routines. For those that use Florin's Ethernet libs a small library was added that should be used instead of his Additional Strings Library (which cannot be used in parallel with the Conversions lib replacement). It contains just few routines that differ in naming from the Strings lib replacement and are needed by Ethernet libs. It's naturally called the same: pic_additional_string_library.mcl
Floating-point math library replacement has two versions - both produce smaller code than the official one and give more accurate calculation results by fixing problems that the official lib inherited from the original Microchip library, i.e.
- lack of 'unbiased' rounding,
- lack of rounding while converting to integer types,
- lack of big numbers 'rounding', i.e. conversion error reduction,
- max negative number reported as integer overflow,
- overflow not reported for division by zero (result=dividend),
– no protection against numbers with EXP=0 and significand<>0 that do not belong to Microchip format.
Both versions give access to floating-point operations' status byte. One of them may generate 'exceptions', i.e. allows to write code that contains provisions for calculation errors (like overflow, underflow, or division by zero).
There is also an additional lib, called FPmath, containing some useful routines. Some of them are replacements of official ones that either won't work properly with the new lib, or are less optimised. There are also conversion routines, between Microchip and IEEE 754 formats.
Internal EEPROM libraries contain some additional routines for block read/write.
The System lib replacement is aimed at demanding applications and for use by a bit more advanced programmers. Besides some marginal optimisation, the main change introduced concerns only indirect function calls, i.e. calls made using pointers. The original library uses Top Of Stack registers in such cases – which in turn requires blocking of interrupts for several assembly instructions. If this is undesirable, indirect function calls may be performed using PCLAT rather than TOS - and without the need to block interrupts.
Every lib has a description in pdf format (cost me some time and determination to write them, so please do be merciful in criticising them
Archived file with all replacement libs may be accessed here: http://www.cobir.com/mPPROrepl.rar
Please remember to save the official libs, or rename them before placing the replacement libs in the .../Uses/P18 directory.About later updates read here