TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (386 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139932 times)
  2. FAT32 Library (72276 times)
  3. Network Ethernet Library (57458 times)
  4. USB Device Library (47768 times)
  5. Network WiFi Library (43396 times)
  6. FT800 Library (42724 times)
  7. GSM click (29985 times)
  8. mikroSDK (28506 times)
  9. PID Library (27001 times)
  10. microSD click (26408 times)
Libstock prefers package manager

Package Manager

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]

< Back
Library

Memory manipulation library

Rating:

5

Author: Istvan K

Last Updated: 2014-04-29

Package Version: 1.0.0.0

Category: Other Codes

Downloaded: 694 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).

No Abuse Reported

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".

  • Information
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Library Blog

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.

ALSO FROM THIS AUTHOR

My libraries 1 (more LCD, more Sw Uart)

5

They contain extremely simplified interface for -- max 2 LCD (write-only 4bit mode, 6 pins), -- max 2 LCD (using a HC595, 3 pins), -- max 4 Sw-Uart (1, 2 or 3 pins, CTS handshake) . Also some routines as Hex2out, Dec3out, CstrOut. A separated library for using them via funcptr. For now only for all PIC16 (PIC12). UPDATED.

[Learn More]

Multi-SwUart library

6

Updated Multi-SwUart library (v3.0). Same way usable (uniformized), as my new LCD libs. It allows you to handle 4 (four) independent software (bit-banging) Uart. Now also for all 8-bit PIC (pic12/16, pic12e/16e and pic18).

[Learn More]

Full LCD library set

11

Same way usable (uniformized) LCD libraries. 4- and 8-bit (and both with Busy-flag checking), 1-, 2- and 3-wire interface. Every library allows you to manage 4 LCD. For all 8-bit PIC (p16, p16e and p18).

[Learn More]