Reimplementation of standard libc functions in x86-64 assembly (Intel syntax, NASM).
Get familiar with assembly language by reimplementing low-level functions: string manipulation, syscalls, and error handling via errno.
- 64-bit code only, respect the x86-64 calling convention
- Intel syntax (not AT&T)
- Assembler: NASM only (
.sfiles) - No inline ASM
-no-pieflag is forbidden- Proper syscall error handling +
errnoupdate (__error/__errno_location)
| Function | Description |
|---|---|
ft_strlen |
String length |
ft_strcpy |
String copy |
ft_strcmp |
String comparison |
ft_write |
write syscall |
ft_read |
read syscall |
ft_strdup |
String duplication (malloc call allowed) |
make # build libasm.a
make clean # remove object files
make fclean # remove object files and libasm.a
make re # full rebuild
make main # build main for testTo test:
make && gcc main.c -L. -lasm -o test && ./test