From 23729438a2f52b37185e8f6fc883ed7f000d4b63 Mon Sep 17 00:00:00 2001 From: Igor M Date: Sun, 17 Mar 2024 21:31:42 +0200 Subject: [PATCH] added hello example --- Makefile | 5 +++++ examples/hello.S | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 examples/hello.S diff --git a/Makefile b/Makefile index 25d726e..2c11edd 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ CLANG_FORMAT_STYLE = '{ BasedOnStyle: Google, IndentWidth: 4 }' hbas: build/hbas example: build/example.hbf +hello: build/hello.hbf format: clang-format --style=${CLANG_FORMAT_STYLE} -i src/* @@ -24,6 +25,10 @@ build/example.hbf: build build/hbas examples/example.S ./build/hbas < examples/example.S > build/example.hbf xxd build/example.hbf +build/hello.hbf: build build/hbas examples/hello.S + ./build/hbas < examples/hello.S > build/hello.hbf + xxd build/hello.hbf + clean: rm -rf build diff --git a/examples/hello.S b/examples/hello.S new file mode 100644 index 0000000..0f7f952 --- /dev/null +++ b/examples/hello.S @@ -0,0 +1,8 @@ + li8 r1, 1 + li8 r2, 1 + lra16 r3, r0, hello_string + li8 r4, 0x11 + eca + tx +hello_string: + .db "Hello, AbleCorp!\n"