From 2b0ed9aa12e2e85ca20bf538029bb224debfae0a Mon Sep 17 00:00:00 2001 From: James Gregory Date: Sun, 5 Jan 2014 17:28:05 +1100 Subject: [PATCH] Newlines at the end of each file to help concatenation --- 01.md | 2 +- 02.md | 2 +- 03.md | 2 +- 04.md | 2 +- 05.md | 2 +- 06.md | 2 +- 07.md | 2 +- 08.md | 2 +- 09.md | 2 +- 10.md | 2 +- 11.md | 2 +- 12.md | 2 +- 13.md | 2 +- 14.md | 2 +- 15.md | 2 +- 16.md | 2 +- 17.md | 2 +- 18.md | 2 +- make-epub.sh | 4 ++++ 19 files changed, 22 insertions(+), 18 deletions(-) create mode 100755 make-epub.sh diff --git a/01.md b/01.md index 65ef0ae..adf6147 100644 --- a/01.md +++ b/01.md @@ -838,4 +838,4 @@ be sped up. I'm going to focus on specific ways to create high-performance code from now on. In Chapter 5, we'll continue to look at restartable blocks and internal buffering, in the form of a program that searches files for -text strings. \ No newline at end of file +text strings. diff --git a/02.md b/02.md index f48e157..071f9fe 100644 --- a/02.md +++ b/02.md @@ -325,4 +325,4 @@ With that in mind, what should the first step be? Development of the flexible mind is an obvious step. Still, the flexible mind is no better than the knowledge at its disposal. The first step in the journey toward mastering optimization at that exalted level, then, would seem to be -learning how to learn. \ No newline at end of file +learning how to learn. diff --git a/03.md b/03.md index 93a64a8..fd1f370 100644 --- a/03.md +++ b/03.md @@ -2263,4 +2263,4 @@ periods. Imperfections notwithstanding, the Zen timer is a good tool for exploring C code and x86 family assembly language, and it's a tool we'll -use frequently for the remainder of this book. \ No newline at end of file +use frequently for the remainder of this book. diff --git a/04.md b/04.md index 309bd6e..e1aaacb 100644 --- a/04.md +++ b/04.md @@ -1462,4 +1462,4 @@ cycle-eaters vary in importance on later x86-family processors, with some cycle-eaters vanishing altogether and new ones appearing, the concept that understanding these obscure gremlins is a key to performance remains unchanged, as we'll see again and again in later -chapters. \ No newline at end of file +chapters. diff --git a/05.md b/05.md index b9a06e9..243ff93 100644 --- a/05.md +++ b/05.md @@ -552,4 +552,4 @@ itself with greatly improved performance. And when speed is *not* an issue, of course, or in code that's not time-critical, you wouldn't dream of wasting your time on optimization. -Would you? \ No newline at end of file +Would you? diff --git a/06.md b/06.md index ac5e878..71804fe 100644 --- a/06.md +++ b/06.md @@ -321,4 +321,4 @@ cycles is a pretty neat trick, even though it works only on a 386 or I'd like to extend my thanks to Duane Strong of Metagraphics for his help in brainstorming uses for the 386 version of `LEA` and for -pointing out the complications of 486 instruction timings. \ No newline at end of file +pointing out the complications of 486 instruction timings. diff --git a/07.md b/07.md index 4e46816..dd7b4ca 100644 --- a/07.md +++ b/07.md @@ -685,4 +685,4 @@ ADD AX,1 ADC DX,0 ``` -As always, pay attention! \ No newline at end of file +As always, pay attention! diff --git a/08.md b/08.md index 3351c8e..25e2e2a 100644 --- a/08.md +++ b/08.md @@ -809,4 +809,4 @@ the low end, resulting in critical code that runs just about as fast as the hardware permits. The only software that can do that is located north of your sternum and slightly aft of your nose. Dust it off and put it to work—and your code will never again be confused with anything by -Hamilton, Joe, Frank, eynolds or Bo Donaldson and the Heywoods. \ No newline at end of file +Hamilton, Joe, Frank, eynolds or Bo Donaldson and the Heywoods. diff --git a/09.md b/09.md index 877dba3..dcb80d9 100644 --- a/09.md +++ b/09.md @@ -993,4 +993,4 @@ Be warned, though, that I've found `OR`, `AND`, `ADD`, and the like to be a cycle slower than `MOV` when working with immediate operands on the 386 under some circumstances, for reasons that thus far escape me. This just reinforces the first rule of optimization: Measure your code in -action, and place not your trust in documented cycle times. \ No newline at end of file +action, and place not your trust in documented cycle times. diff --git a/10.md b/10.md index 0307d4d..da88efb 100644 --- a/10.md +++ b/10.md @@ -558,4 +558,4 @@ breakthroughs. Stop, look, listen—and think. Not only will you find that it's a more productive and creative way to program—but you'll also find that it's more fun. -And think what you could do with all those extra computer years! \ No newline at end of file +And think what you could do with all those extra computer years! diff --git a/11.md b/11.md index 9efdf50..21d6d64 100644 --- a/11.md +++ b/11.md @@ -1100,4 +1100,4 @@ it occurs.) And now you know the nature of and the workaround for the `POPF` bug. Whether you ever need the workaround or not, it's a neatly packaged -example of the tremendous flexibility of the x86 instruction set. \ No newline at end of file +example of the tremendous flexibility of the x86 instruction set. diff --git a/12.md b/12.md index 0806a88..d54e61d 100644 --- a/12.md +++ b/12.md @@ -638,4 +638,4 @@ staggeringly fast that carefully crafted 486 code can do more than twice as much per cycle as the best 386 code—which makes it perhaps 50 times as fast as optimized code for the original PC. -Sometimes it *is* hard to believe we're still in Kansas! \ No newline at end of file +Sometimes it *is* hard to believe we're still in Kansas! diff --git a/13.md b/13.md index 4b4887a..903d64d 100644 --- a/13.md +++ b/13.md @@ -467,4 +467,4 @@ capabilities of the Mod-R/M byte, and there's nothing to be done about it, but it's at least worth noting that ESP-based, non-indexed addressing makes for instructions that are a byte larger than other non-indexed addressing (but not any slower; there's no 1-cycle penalty -for using ESP as a base register) on the 486. \ No newline at end of file +for using ESP as a base register) on the 486. diff --git a/14.md b/14.md index 03a19c4..4e27889 100644 --- a/14.md +++ b/14.md @@ -807,4 +807,4 @@ Everything we needed was sitting there all along; we just needed to think to look at it. As Yogi Berra might put it, "You don't know what you know until you know -it." \ No newline at end of file +it." diff --git a/15.md b/15.md index 7ef2e43..7fdadef 100644 --- a/15.md +++ b/15.md @@ -656,4 +656,4 @@ around: ja save Before I end this chapter, let me say that I get a lot of feedback from my readers, and it's much appreciated. Keep those cards, letters, and email messages coming. And if any of you know Jeannie Schweigert, have -her drop me a line and let me know how she's doing these days.... \ No newline at end of file +her drop me a line and let me know how she's doing these days.... diff --git a/16.md b/16.md index 52d38c8..b8979ba 100644 --- a/16.md +++ b/16.md @@ -1252,4 +1252,4 @@ that calculates the theoretical maximum performance of native 386 word-counting code at 5.5 cycles/byte, which would be significantly faster than David's code. Terry, alas, didn't bother to implement his design, but maybe I'll take a shot at it someday. It'd be fun, for -sure—but jeez, I've got *real* work to do! \ No newline at end of file +sure—but jeez, I've got *real* work to do! diff --git a/17.md b/17.md index 095965d..04615ca 100644 --- a/17.md +++ b/17.md @@ -1288,4 +1288,4 @@ for adherence to the rules, read, compiled, linked, run, and judged. I learned a lot—about a lot of things, not the least of which was the process (or maybe the wisdom) of laying down challenges to readers. -Who won? What did I learn? To find out, read on. \ No newline at end of file +Who won? What did I learn? To find out, read on. diff --git a/18.md b/18.md index 093804e..1a06065 100644 --- a/18.md +++ b/18.md @@ -1018,4 +1018,4 @@ my pleasure to meet, who, after looking over David's and Peter's entries, said, "This has been an eye-opening experience for me. I honestly thought I had the fastest possible approach." TANSTATFC. -There Ain't No Such Thing As the Fastest Code. \ No newline at end of file +There Ain't No Such Thing As the Fastest Code. diff --git a/make-epub.sh b/make-epub.sh new file mode 100755 index 0000000..6f3eb64 --- /dev/null +++ b/make-epub.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +pandoc -S -o main.epub index.md intro.md about.md about_author.md \ + 01.md 02.md 03.md 04.md 05.md 06.md 07.md 08.md 09.md 10.md