Merge pull request #11 from m1el/example-hello

added hello example
This commit is contained in:
m1el 2024-03-17 21:32:27 +02:00 committed by GitHub
commit 3393d19cac
2 changed files with 13 additions and 0 deletions

View file

@ -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

8
examples/hello.S Normal file
View file

@ -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"