From 0aad59dca9e08d1f2fb026b3322fe2d83432cd65 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Wed, 24 Jan 2024 21:32:18 -0500 Subject: [PATCH] remove iotest --- usr.bin/iotest/Makefile | 36 ------------------------ usr.bin/iotest/iotest.S | 62 ----------------------------------------- 2 files changed, 98 deletions(-) delete mode 100644 usr.bin/iotest/Makefile delete mode 100644 usr.bin/iotest/iotest.S diff --git a/usr.bin/iotest/Makefile b/usr.bin/iotest/Makefile deleted file mode 100644 index 3ab003b..0000000 --- a/usr.bin/iotest/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -CC := x86_64-elf-gcc -LD := x86_64-elf-ld - -OUT := iotest.elf -CSRC := -SSRC := iotest.S -OBJ := $(CSRC:.c=.o) $(SSRC:.S=.o) -DEP := $(OBJ:.o=.d) - -CFLAGS := -Wall -ffreestanding -mno-mmx -mno-sse2 -mno-sse -m64 -MMD -g -LDFLAGS := -nostdlib -static -m elf_x86_64 - -CURDIR := $(shell pwd | awk -F '/' '{print $$(NF-1),"/",$$NF}' | sed 's/ //g') - -$(OUT): $(OBJ) - @$(LD) $^ $(LDFLAGS) -o $@ - @echo " USR.LD $(CURDIR)/$@" - --include $(DEP) - -%.o: %.S - @$(CC) $(CFLAGS) -c $< -o $@ - @echo " USR.CC $(CURDIR)/$@" - -%.o: %.c - @$(CC) $(CFLAGS) -c $< -o $@ - @echo " USR.CC $(CURDIR)/$@" - -clean: - @rm -rf $(OUT) $(OBJ) $(DEP) - -install: $(OUT) - @cp $(OUT) ../../bin - @echo " INSTALL $(CURDIR)/$(OUT)" diff --git a/usr.bin/iotest/iotest.S b/usr.bin/iotest/iotest.S deleted file mode 100644 index db7e0fc..0000000 --- a/usr.bin/iotest/iotest.S +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -/* ftest/ftest.S - * - * Test the read and write system calls. - */ - -sys_read = 0 -sys_write = 1 -sys_exit = 60 - -STDIN_FILENO = 0 -STDOUT_FILENO = 1 - -.macro print text text_size - movl $sys_write, %eax - movl $STDOUT_FILENO, %edi - movq $\text, %rsi - movl $\text_size, %edx - int $0x80 -.endm - -.text -.global _start -_start: -_exit: - print entry_message entry_message_size - - movl $sys_read, %eax - movl $STDIN_FILENO, %edi - movq $buf, %rsi - movl $buf_size, %edx - int $0x80 - - movq %rax, %rdx - movl $sys_write, %eax - movl $STDOUT_FILENO, %edi - movq $buf, %rsi - int $0x80 - - movq %rax, %rdx - movl $sys_write, %eax - movl $STDOUT_FILENO, %edi - movq $buf, %rsi - int $0x80 - - movl $sys_exit, %eax - movl $0, %edi - int $0x80 -.data -entry_message: - .ascii "Please enter your text: " -entry_message_size = . - entry_message - -exit_message: - .ascii "Exiting successfully\n" -exit_message_size = . - exit_message - -.bss -buf: - .skip 1024 -buf_size = . - buf