From 4c9d6b68e0b493e23969b79e96457b68cfed8895 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Fri, 18 Jun 2021 13:21:19 -0400 Subject: [PATCH] init --- README.md | 1 + makefile | 13 +++++++++++++ sped.asm | 21 +++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 README.md create mode 100644 makefile create mode 100644 sped.asm diff --git a/README.md b/README.md new file mode 100644 index 0000000..13bcd24 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +## SPED - the stupidly pointless editor diff --git a/makefile b/makefile new file mode 100644 index 0000000..d83be28 --- /dev/null +++ b/makefile @@ -0,0 +1,13 @@ + +.PHONY: clean + +make: sped + +sped.o: sped.asm + nasm -f elf32 $^ -o $@ + +sped: sped.o + ld -m elf_i386 $^ -o $@ + +clean: + rm sped *.o diff --git a/sped.asm b/sped.asm new file mode 100644 index 0000000..6230c85 --- /dev/null +++ b/sped.asm @@ -0,0 +1,21 @@ + +%macro write_str 2 + mov eax, 4 + mov ebx, 1 + mov ecx, %1 + mov edx, %2 + int 0x80 +%endmacro + +section .data + msg db "SPED - the stupidly pointless editor", 0x0a + len equ $ - msg + +section .text +global _start +_start: + write_str msg, len + + mov eax, 1 + mov ebx, 42 + int 0x80 -- 2.20.1