-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
55 lines (32 loc) · 1.31 KB
/
README
File metadata and controls
55 lines (32 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
BONES
=====
This is the development repository for BONES, a simple Scheme compiler
for x86_64 systems generating assembly code. BONES is developed on a
currently unreleased Scheme interpreter, but with some effort the
sources should be portable to most R5RS and R7RS Scheme systems.
BONES requires NASM (http://www.nasm.us/), a portable assembler for
x86 and x86_64 systems.
To build the system, download bones.tar.gz or bones.zip from
http://www.call-with-current-continuation.org/bones/
unpack the archive, build the compiler by running the following
commands in a shell:
(Linux)
nasm -f elf64 bones-x86_64-linux.s -o bones.o
gcc bones.o -o bones
If the gcc command above fails, try
gcc -no-pie bones.o -o bones
(Windows)
nasm -f win64 bones-x86_64-windows.s -o bones.obj
link bones.obj libcmt.lib /out:bones.exe
(Mac)
nasm -f macho64 bones-x86_64-mac.s -o bones.o
gcc bones.o -o bones
On Windows, bones.exe can also be built using the MINGW64
(http://www.mingw.org) toolchain:
gcc bones.obj -o bones.exe
You can now use the generated compiler to build a new version with
the latest changes in the development repository:
<path-to-bones>/bones bones.scm -o bones.s
See MANUAL.org for more information and a full description of the
differences and extensions to R5RS that BONES provides.
Enjoy.