-
Notifications
You must be signed in to change notification settings - Fork 33
/
genbook.sh
executable file
·64 lines (48 loc) · 1.18 KB
/
genbook.sh
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
56
57
58
59
60
61
62
63
64
#!/bin/bash
# This shell scripts generates the top-level Markdown structure of the
# cl-6502 book.
#
# The authors list is automatically generated from Git history,
# ordered from most to least commits.
cat <<EOF
% cl-6502
% $(git log --pretty=format:%an | \
grep -v -e '^root$' | \
sort | uniq -c | sort -nr | sed 's/^[0-9 ]*//' | \
awk 'NR > 1 { printf("; ") } { printf("%s", $0) } END { print("") }')
# Introduction
$(cat ../intro.md)
# Addressing Modes
$(cat ../addressing.md)
$(cat obj/addressing.lisp.md)
# CPU
$(cat ../cpu.md)
$(cat obj/cpu.lisp.md)
# Opcode Emulation
$(cat ../opcodes.md)
$(cat obj/opcodes.lisp.md)
# Exceptional Conditions
$(cat ../conditions.md)
$(cat obj/conditions.lisp.md)
# Stepping and Execution
$(cat ../utils.md)
$(cat obj/utils.lisp.md)
# A Naive JIT
$(cat ../jit.md)
$(cat obj/jit.lisp.md)
# Taking Apart Old Code
$(cat ../disassemble.md)
$(cat obj/disassemble.lisp.md)
# Parsing Assembly
$(cat ../parser.md)
$(cat obj/parser.lisp.md)
# Creating New Code
$(cat ../assemble.md)
$(cat obj/assemble.lisp.md)
# Wrap it with a Bow
$(cat ../packages.md)
$(cat obj/packages.lisp.md)
$(cat ../lessons.md)
# Conclusion
$(cat ../outro.md)
EOF