We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: Istvan K
Last Updated: 2014-04-29
Package Version: 1.0.0.0
Category: Other Codes
Downloaded: 690 times
Followed by: 1 user
License: MIT license
Memory manipulation (eg sprint-like) function-collection plus some simplified arithmetic and bit-handling routine in one library. For all 8-bit PIC (pic12/16, pic12e/16e and pic18).
Do you want to subscribe in order to receive notifications regarding "Memory manipulation library" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Memory manipulation library" changes.
Do you want to report abuse regarding "Memory manipulation library".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
1398775218_memory_manipulat_mikroc_pic.rar [45.25KB] | mikroC PRO for PIC |
|
Memory manipulation function set. In addition, some simplified arithmetic and bit-handling routines.
All in one library, named as "p*_Mem-Arithm.mcl".
For all 8-bit PIC (pic12/16, pic12e/16e and pic18): p* = p16, p16e or p18.
My goal was to create some simplified routines (not so universal but much smaller and faster as the
official libraries) to manipulate strings, bits and memory.
Optimized for speed, and to minimize the size, stack and ram usage, using family-specific inline asm.
The library contains a total of 45 function:
-- sprint-like common output routines. S..., Si... (string insert): no end sign:
SHex2 - SiHex2 - SHex4 - SiHex4 - SBcd - SiBcd - SDec2 - SiDec2 - SDec2_J
SiDec2_J - SDec3_J - SiDec3_J - SDec4_J - SiDec4_J - SDec5_J - SiDec5_J
-- string lenght (max 255):
RstrLen - CstrLen
-- string manipulations:
SpaceStr - iSpaces - AllSpaces - iChr - ChrApp - LefTrim - RighTrim
-- string/memory copying (from RAM to RAM):
RstrIns - RstrNins - RstrCpy - RstrNcpy - RstrApp - RstrNapp - RmemCpy
-- const string/code memory copying (to RAM):
CstrIns - CstrNins - CstrCpy - CstrNcpy - CstrApp - CstrNapp - CmemCpy
-- in addition, 4 simple 8-bit arithmetic functions:
Dec_Bcd - Bcd_Dec - DivMod10 - MiniMul_10
-- and two bitmask functions (for the attached "pic_BitMacros.h"):
R2BitMask - R2BitMaskW
------
Just for example, the 16e "LefTrim" function is 5.39 times faster (64 vs 341 cycles) and 2.9 times smaller (21 vs 61 bytes) than the original "Ltrim" routine, while working on the same, 8 chars lenght string with 5 leading blanks.
Detailed description and some example in the "MEM-ARITHM_DOC.H"
Istvan K.