diff options
author | Jacques Comeaux <jacquesrcomeaux@protonmail.com> | 2024-07-20 01:08:03 -0500 |
---|---|---|
committer | Jacques Comeaux <jacquesrcomeaux@protonmail.com> | 2024-07-20 01:08:03 -0500 |
commit | ce3ddfefd39e556f2dc81806fe8560455cf948b4 (patch) | |
tree | b41f29be6f948f0423650b8345ea872bd064e79a /better_assembler/slowcat.c | |
parent | c4bd010cf5f55ff7d12e0b9c5cc69e871d590e2c (diff) |
Add string functions for stage 3 editor
Diffstat (limited to 'better_assembler/slowcat.c')
-rw-r--r-- | better_assembler/slowcat.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/better_assembler/slowcat.c b/better_assembler/slowcat.c new file mode 100644 index 0000000..67725d4 --- /dev/null +++ b/better_assembler/slowcat.c @@ -0,0 +1,11 @@ +#include <unistd.h> +#include <stdint.h> + +int main() { + uint8_t byte; + while (read(STDIN_FILENO, &byte, 1)) { + write(STDOUT_FILENO, &byte, 1); + usleep(10000); + } + return 0; +} |