summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile14
-rwxr-xr-xtests/a.outbin0 -> 12541 bytes
-rw-r--r--tests/hello_world.s18
3 files changed, 31 insertions, 1 deletions
diff --git a/tests/Makefile b/tests/Makefile
index fb77f34..6e83245 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -9,12 +9,24 @@ CFLAGS=-O
SRC=env.c ft.c hd.c sync.c compr.c ucomp.c ouch.c lines.c \
wc.c line2.c rand.c grab.c
OBJ=
-EXE=env ft hd sync compr ucomp ouch lines wc line2 rand grab
+EXE=env ft hd sync compr ucomp ouch lines wc line2 rand grab bcc-x86
LINK_FILES=cat chgrp chmod chown cp install ln mkdir mkfifo mknod mv rm
all: $(EXE)
+bcc-x86:
+ $(CC) -O -o bcc-x86 \
+ ../bcc/assign.c ../bcc/bcc-cc1.c ../bcc/codefrag.c \
+ ../bcc/dbnode.c ../bcc/debug.c ../bcc/declare.c \
+ ../bcc/express.c ../bcc/exptree.c ../bcc/floatop.c \
+ ../bcc/function.c ../bcc/gencode.c ../bcc/genloads.c \
+ ../bcc/glogcode.c ../bcc/hardop.c ../bcc/hashcmd.c \
+ ../bcc/input.c ../bcc/label.c ../bcc/loadexp.c \
+ ../bcc/longop.c ../bcc/output.c ../bcc/preproc.c \
+ ../bcc/preserve.c ../bcc/scan.c ../bcc/softop.c \
+ ../bcc/state.c ../bcc/table.c ../bcc/type.c
+
install:
echo Use real-install if you actually want to install these
diff --git a/tests/a.out b/tests/a.out
new file mode 100755
index 0000000..46f8688
--- /dev/null
+++ b/tests/a.out
Binary files differ
diff --git a/tests/hello_world.s b/tests/hello_world.s
new file mode 100644
index 0000000..8932287
--- /dev/null
+++ b/tests/hello_world.s
@@ -0,0 +1,18 @@
+
+.text
+entry start
+start:
+mov ax,#4
+mov bx,#1
+mov cx,#hello
+mov dx,#endhello-hello
+int $80
+
+mov bx,#0
+mov ax,#1
+int $80
+
+.data
+hello:
+ .ascii "Hello world!\n"
+endhello: