From: Daniel Liu Date: Fri, 18 Jun 2021 17:21:19 +0000 (-0400) Subject: init X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=4c9d6b68e0b493e23969b79e96457b68cfed8895;p=sped.git init --- 4c9d6b68e0b493e23969b79e96457b68cfed8895 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