aboutsummaryrefslogtreecommitdiff
path: root/newasm/slowcat.c
diff options
context:
space:
mode:
Diffstat (limited to 'newasm/slowcat.c')
-rw-r--r--newasm/slowcat.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/newasm/slowcat.c b/newasm/slowcat.c
new file mode 100644
index 0000000..e33f92a
--- /dev/null
+++ b/newasm/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(5000);
+ }
+ return 0;
+}