From: Ralph Ronnquist Date: Wed, 12 May 2021 03:37:41 +0000 (+1000) Subject: initial snap X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=b404f29caf2f82acc9fc4cd84e7247857878f7a8;p=rrq%2Frrqforth.git initial snap --- b404f29caf2f82acc9fc4cd84e7247857878f7a8 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 +