add: ft_write
This commit is contained in:
parent
5bccb1efc6
commit
054e31a020
@ -1,7 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <aio.h>
|
||||
|
||||
char *ft_strcpy(char *dest, const char *src);
|
||||
size_t ft_strlen(const char *str);
|
||||
int ft_strcmp( const char *first, const char *second);
|
||||
ssize_t ft_write(int fd, const void *buf, size_t count);
|
8
src/ft_write.asm
Normal file
8
src/ft_write.asm
Normal file
@ -0,0 +1,8 @@
|
||||
section .note.GNU-stack noalloc noexec progbits
|
||||
section .text
|
||||
global ft_write
|
||||
|
||||
ft_write:
|
||||
mov rax, 1
|
||||
syscall
|
||||
ret
|
@ -76,4 +76,6 @@ int main()
|
||||
const char *strcpy_tests[] = {"yo", "", "bonjour", "co\0fgf", NULL};
|
||||
multiple_test_strcpy(ft_strcpy, strcpy_tests);
|
||||
printf("\n");
|
||||
|
||||
ft_write(1, "bozo\n", 5);
|
||||
}
|
Loading…
Reference in New Issue
Block a user