init
authorDaniel Liu <mr.picklepinosaur@gmail.com>
Fri, 18 Jun 2021 17:21:19 +0000 (13:21 -0400)
committerDaniel Liu <mr.picklepinosaur@gmail.com>
Fri, 18 Jun 2021 17:21:19 +0000 (13:21 -0400)
README.md [new file with mode: 0644]
makefile [new file with mode: 0644]
sped.asm [new file with mode: 0644]

diff --git a/README.md b/README.md
new file mode 100644 (file)
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 (file)
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 (file)
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