This project introduces x86-64 assembly language programming by reimplementing standard C library functions. It requires writing assembly code using the Intel syntax and compiling with NASM.
- Write assembly code in 64-bit architecture
- Use Intel syntax
- Compile with NASM
- Implementation of standard C library functions
- Understanding of low-level programming and CPU architecture
- Register management and calling conventions (System V AMD64 ABI)
- System calls in Linux
- Memory manipulation at assembly level
- Error handling with errno
ft_strlen · (man 3)
Returns the length of the string s.
size_t ft_strlen(const char *s);ft_strcpy · (man 3)
Copies the string from src to dest. Returns a pointer to dest.
char *ft_strcpy(char *dest, const char *src);ft_strcmp · (man 3)
Compares two strings s1 and s2.
int ft_strcmp(const char *s1, const char *s2);ft_write · (man 2)
Writes count bytes from the buffer buf to the file descriptor fd. On error, sets errno appropriately.
ssize_t ft_write(int fd, const void *buf, size_t count);ft_read · (man 2)
Reads count bytes from the file descriptor fd into the buffer buf. On error, sets errno appropriately.
ssize_t ft_read(int fd, void *buf, size_t count);ft_strdup · (man 3)
Duplicates the string s by allocating memory using malloc. Returns a pointer to the duplicated string.
char *ft_strdup(const char *s);The linked list functions will use the following structure:
typedef struct s_list {
void *data;
struct s_list *next;
} t_list;ft_atoi_base · (man 3)
Converts a string str to an integer using the specified base. Handles leading whitespace, optional sign, and validates the base format.
int ft_atoi_base(const char *str, const char *base);Push a new element at the beginning of the list.
void ft_list_push_front(t_list **begin_list, void *data);Returns the size of the list.
int ft_list_size(t_list *begin_list);Sorts the list in ascending order using the provided comparison function.
void ft_list_sort(t_list **begin_list, int (*cmp)());Removes elements from the list that match the reference data using the provided comparison function.
void ft_list_remove_if(t_list **begin_list, void *data_ref, int (*cmp)(), void (*free_fct)(void *));makemake runSee more details on libasm-tester