-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Are you using one of the above functions in the Z80 port?
If you're using strlen(), could you use strnlen() instead? If you're using strchr(), could you use memchr() instead? The Z80 has some instructions that can do relatively complex stuff. Using them usually yields large performance gains and sometimes a code size reduction. I noticed five C functions where such instructions could be used: memcpy() memmove() memchr() strnlen() strlen() I have just made memcpy() a builtin function using the ldir instruction. I've rewritten memmove() in assembler using ldir and lddr instructions. The other three could be implemented using the cpir instruction, if users are interested in it and I find the time. Unlike memcpy() and memmove() I rarely not use these functions in my own programs. Philipp -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklWgJ8ACgkQbtUV+xsoLpqK1wCdEDxJ5KoB9NygLB2LrbEn4aOq 3SYAoOoXJy0m10+O6ET00+HDR5sfYH5X =C5je -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user