Hacker News new | ask | show | jobs
by zabzonk 2062 days ago
Any reason for not using C Standard Library functions such as (for example) strlen and isdigit?
1 comments

Not really, to be honest!

Originally, I had written a linker script that could generate really small ELF executables, using the information I found on this website: http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm...

That meant I had to implement functions for myself, including ‘write’ in x86 assembly.

As soon as I started storing function pointers, however, my program started to segfault, and I didn’t bother to figure out how to fix it. Do I stopped providing those builds on the website, and decided to start using other standard library functions, such as the time‐related functions.

Since I already had those functionalities there, I decided to keep them anyway. It would make sense to reuse the library functions, though, I agree!