Skip to content

Commit a160ce6

Browse files
committed
add missing -ldl, add mingle example
1 parent 8801986 commit a160ce6

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ x86-32_engine_asm.o: x86-32_engine_asm.s
1414
nasm -felf32 -g -o x86-32_engine_asm.o x86-32_engine_asm.s
1515

1616
execute-exe: mcp_forth.h mcp_forth.c global.h execute-exe.c runtime_io.c runtime_time.c runtime_string.c runtime_process.c runtime_file.c runtime_assert.c vm_engine.c x86-32_engine.c x86-32_engine_asm.o
17-
gcc $(NO_FLAGS) -m32 -Wall -fsanitize=address -g mcp_forth.c execute-exe.c runtime_io.c runtime_time.c runtime_string.c runtime_process.c runtime_file.c runtime_assert.c runtime_threadutil.c vm_engine.c x86-32_engine.c x86-32_engine_asm.o -lpthread -o execute-exe
17+
gcc $(NO_FLAGS) -m32 -Wall -fsanitize=address -g mcp_forth.c execute-exe.c runtime_io.c runtime_time.c runtime_string.c runtime_process.c runtime_file.c runtime_assert.c runtime_threadutil.c vm_engine.c x86-32_engine.c x86-32_engine_asm.o -lpthread -ldl -o execute-exe
1818

1919
test-simple: all
2020
find forth_programs/simple -maxdepth 1 -type f | xargs -I{} ./compile-and-run.sh vm {}

forth_programs/simple/mingle.fs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
: mingle
2+
0x55555555
3+
tuck
4+
and
5+
>r
6+
invert
7+
and
8+
r>
9+
or
10+
;
11+
12+
7 7 3 lshift mingle . cr
13+

0 commit comments

Comments
 (0)