From b404f29caf2f82acc9fc4cd84e7247857878f7a8 Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Wed, 12 May 2021 13:37:41 +1000 Subject: [PATCH 1/1] initial snap --- Makefile | 5 +++++ main.fasm | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Makefile create mode 100644 main.fasm diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..012248a --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +BINARY = rrqforth + +rrqforth: main.fasm + fasm $^ $@ + diff --git a/main.fasm b/main.fasm new file mode 100644 index 0000000..6bd525a --- /dev/null +++ b/main.fasm @@ -0,0 +1,21 @@ +; This is a program + format elf64 executable + entry main + + segment readable executable + msg db 'hello world.' + db 10 + length = $ - msg + +main: + lea rsi,[msg] ; address of message + mov edx,length ; length od trdting + mov edi,1 ; stdout + mov eax,1 ; sys_write + syscall + +fini: + xor edi,edi + mov eax,60 + syscall + -- 2.39.2