added hello example
This commit is contained in:
parent
b745c4621c
commit
23729438a2
5
Makefile
5
Makefile
|
@ -7,6 +7,7 @@ CLANG_FORMAT_STYLE = '{ BasedOnStyle: Google, IndentWidth: 4 }'
|
||||||
|
|
||||||
hbas: build/hbas
|
hbas: build/hbas
|
||||||
example: build/example.hbf
|
example: build/example.hbf
|
||||||
|
hello: build/hello.hbf
|
||||||
|
|
||||||
format:
|
format:
|
||||||
clang-format --style=${CLANG_FORMAT_STYLE} -i src/*
|
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
|
./build/hbas < examples/example.S > build/example.hbf
|
||||||
xxd 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:
|
clean:
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
||||||
|
|
8
examples/hello.S
Normal file
8
examples/hello.S
Normal 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"
|
Loading…
Reference in a new issue