Add metadata to each page
This commit is contained in:
parent
efd73dca38
commit
a9626d4001
362 changed files with 4334 additions and 0 deletions
12
01-01.md
12
01-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '01'
|
||||
pages: 004-007
|
||||
---
|
||||
|
||||
*Part I* {align="center"}
|
||||
--------
|
||||
|
||||
|
|
|
|||
12
01-02.md
12
01-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '01'
|
||||
pages: 007-009
|
||||
---
|
||||
|
||||
### Rules for Building High-Performance Code {#Heading5}
|
||||
|
||||
We've got the following rules for creating high-performance software:
|
||||
|
|
|
|||
12
01-03.md
12
01-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '01'
|
||||
pages: 010-013
|
||||
---
|
||||
|
||||
* * * * *
|
||||
|
||||
Listing
|
||||
|
|
|
|||
12
01-04.md
12
01-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '01'
|
||||
pages: 013-015
|
||||
---
|
||||
|
||||
------------------- --------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
 *Make sure you understand what really goes on when you insert a seemingly-innocuous function call into the time-critical portions of your code.*
|
||||
------------------- --------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
|||
12
01-05.md
12
01-05.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '01'
|
||||
pages: 015-017
|
||||
---
|
||||
|
||||
The third reason is often fallacious. C library functions are not always
|
||||
written in assembly, nor are they always particularly well-optimized.
|
||||
(In fact, they're often written for *portability*, which has nothing to
|
||||
|
|
|
|||
12
01-06.md
12
01-06.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '01'
|
||||
pages: 018-019
|
||||
---
|
||||
|
||||
**LISTING 1.7 L1-7.ASM**
|
||||
|
||||
; Assembler subroutine to perform a 16-bit checksum on a block of
|
||||
|
|
|
|||
12
02-01.md
12
02-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '02'
|
||||
pages: 021-025
|
||||
---
|
||||
|
||||
Chapter 2\
|
||||
A World Apart {#Heading1}
|
||||
--------------
|
||||
|
|
|
|||
12
02-02.md
12
02-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '02'
|
||||
pages: 025-028
|
||||
---
|
||||
|
||||
#### Transformation Inefficiencies {#Heading5}
|
||||
|
||||
No matter how well an implementation is derived from the corresponding
|
||||
|
|
|
|||
12
02-03.md
12
02-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '02'
|
||||
pages: 028-030
|
||||
---
|
||||
|
||||
### The Flexible Mind {#Heading8}
|
||||
|
||||
Is the never-ending collection of information all there is to the
|
||||
|
|
|
|||
12
03-01.md
12
03-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '03'
|
||||
pages: 031-035
|
||||
---
|
||||
|
||||
Chapter 3\
|
||||
Assume Nothing {#Heading1}
|
||||
---------------
|
||||
|
|
|
|||
12
03-02.md
12
03-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '03'
|
||||
pages: 035-042
|
||||
---
|
||||
|
||||
**LISTING 3.1 PZTIMER.ASM**
|
||||
|
||||
; The precision Zen timer (PZTIMER.ASM)
|
||||
|
|
|
|||
12
03-03.md
12
03-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '03'
|
||||
pages: 042-045
|
||||
---
|
||||
|
||||
#### The Zen Timer Is a Means, Not an End {#Heading5}
|
||||
|
||||
We're going to spend the rest of this chapter seeing what the Zen timer
|
||||
|
|
|
|||
12
03-04.md
12
03-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '03'
|
||||
pages: 045-048
|
||||
---
|
||||
|
||||
In fact, the Zen timer shown in Listing 3.1 can only time intervals of
|
||||
up to about 54 ms in length, since that is the period of time that can
|
||||
be measured by timer 0 before its count turns over and repeats.
|
||||
|
|
|
|||
12
03-05.md
12
03-05.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '03'
|
||||
pages: 048-050
|
||||
---
|
||||
|
||||
### Notes on the Zen Timer {#Heading10}
|
||||
|
||||
The Zen timer subroutines are designed to be near-called from assembly
|
||||
|
|
|
|||
12
03-06.md
12
03-06.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '03'
|
||||
pages: 051-053
|
||||
---
|
||||
|
||||
Listing 3.3 is used by naming it TESTCODE, assembling both Listing 3.2
|
||||
(which includes TESTCODE) and Listing 3.1 with TASM or MASM, and linking
|
||||
the two resulting OBJ files together by way of the Borland orMicrosoft
|
||||
|
|
|
|||
12
03-07.md
12
03-07.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '03'
|
||||
pages: 053-065
|
||||
---
|
||||
|
||||
While permitting the timer interrupt to occur allows long intervals to
|
||||
be timed, that same interrupt makes the long-period Zen timer less
|
||||
accurate than the precision Zen timer, since the time the BIOS spends
|
||||
|
|
|
|||
12
03-08.md
12
03-08.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '03'
|
||||
pages: 065-067
|
||||
---
|
||||
|
||||
Moreover, because it uses an undocumented feature, the timer-stop
|
||||
approach could conceivably cause erratic 8253 operation, which could in
|
||||
turn seriously affect your computer's operation until the next reboot.
|
||||
|
|
|
|||
12
03-09.md
12
03-09.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '03'
|
||||
pages: 067-070
|
||||
---
|
||||
|
||||
**LISTING 3.7 LZTIME.BAT**
|
||||
|
||||
echo off
|
||||
|
|
|
|||
12
03-10.md
12
03-10.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '03'
|
||||
pages: 070-073
|
||||
---
|
||||
|
||||
when declaring the timer routines **extern**, so that name-mangling
|
||||
doesn't occur, and the linker can find the routines' C-style names.)
|
||||
|
||||
|
|
|
|||
12
04-01.md
12
04-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '04'
|
||||
pages: 075-080
|
||||
---
|
||||
|
||||
Chapter 4\
|
||||
In the Lair of the Cycle-Eaters {#Heading1}
|
||||
--------------------------------
|
||||
|
|
|
|||
12
04-02.md
12
04-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '04'
|
||||
pages: 080-084
|
||||
---
|
||||
|
||||
\
|
||||
**Figure 4.1** *The location of the major cycle-eaters in the IBM PC.*
|
||||
|
||||
|
|
|
|||
12
04-03.md
12
04-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '04'
|
||||
pages: 084-087
|
||||
---
|
||||
|
||||
Back to the 8-bit bus cycle-eater. As I've said, in 8088 work you should
|
||||
strive to use byte-sized memory variables whenever possible. That does
|
||||
*not* mean that you should use 2 byte-sized memory accesses to
|
||||
|
|
|
|||
12
04-04.md
12
04-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '04'
|
||||
pages: 087-090
|
||||
---
|
||||
|
||||
#### Official Execution Times Are Only Part of the Story {#Heading10}
|
||||
|
||||
The sequence of 5 **SHR** instructions in the last example is 10 bytes
|
||||
|
|
|
|||
12
04-05.md
12
04-05.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '04'
|
||||
pages: 090-093
|
||||
---
|
||||
|
||||
Clearly, either instruction fetch time *or* Execution Unit execution
|
||||
time—or even a mix of the two, if an instruction is partially
|
||||
prefetched—can determine code performance. Some people operate under a
|
||||
|
|
|
|||
12
04-06.md
12
04-06.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '04'
|
||||
pages: 094-097
|
||||
---
|
||||
|
||||
More than anything, the above rules mean using the registers as heavily
|
||||
as possible, both because register-only instructions are short and
|
||||
because they don't perform memory accesses to read or write operands.
|
||||
|
|
|
|||
12
04-07.md
12
04-07.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '04'
|
||||
pages: 097-099
|
||||
---
|
||||
|
||||
#### The Impact of DRAM Refresh {#Heading17}
|
||||
|
||||
Let's look at examples from opposite ends of the spectrum in terms of
|
||||
|
|
|
|||
12
04-08.md
12
04-08.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '04'
|
||||
pages: 099-104
|
||||
---
|
||||
|
||||
Wait states exist because the CPU must to be able to coexist with any
|
||||
adapter, no matter how slow (within reason). The 8088 expects to be able
|
||||
to complete each bus access—a memory or I/O read or write—in 4 cycles,
|
||||
|
|
|
|||
12
04-09.md
12
04-09.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '4'
|
||||
pages: 104-106
|
||||
---
|
||||
|
||||
The answer varies considerably depending on what display adapter and
|
||||
what display mode we're talking about. The display adapter cycle-eater
|
||||
is worst with the Enhanced Graphics Adapter (EGA) and the original Video
|
||||
|
|
|
|||
12
04-10.md
12
04-10.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '04'
|
||||
pages: 106-109
|
||||
---
|
||||
|
||||
------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
 *A line-drawing subroutine, which executes perhaps a dozen instructions for each display memory access, generally loses less performance to the display adapter cycle-eater than does a block-copy or scrolling subroutine that uses **REP MOVS** instructions. Scaled and three-dimensional graphics, which spend a great deal of time performing calculations (often using very slow floating-point arithmetic), tend to suffer less.*
|
||||
------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
|||
12
05-01.md
12
05-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '05'
|
||||
pages: 111-115
|
||||
---
|
||||
|
||||
Chapter 5\
|
||||
Crossing the Border {#Heading1}
|
||||
--------------------
|
||||
|
|
|
|||
12
05-02.md
12
05-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '05'
|
||||
pages: 115-118
|
||||
---
|
||||
|
||||
We could put a zero byte at the end of our buffer to allow **strstr()**
|
||||
to work, but why bother? The **strstr()** function must spend time
|
||||
either checking for the end of the string being searched or determining
|
||||
|
|
|
|||
12
05-03.md
12
05-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '05'
|
||||
pages: 118-121
|
||||
---
|
||||
|
||||
**LISTING 5.1 SEARCH.C**
|
||||
|
||||
/* Program to search the file specified by the first command-line
|
||||
|
|
|
|||
12
05-04.md
12
05-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '05'
|
||||
pages: 121-122
|
||||
---
|
||||
|
||||
### Interpreting Where the Cycles Go {#Heading8}
|
||||
|
||||
To boost the overall performance of Listing 5.1, I would normally
|
||||
|
|
|
|||
12
05-05.md
12
05-05.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '05'
|
||||
pages: 122-123
|
||||
---
|
||||
|
||||
It might also be worth converting the search engine to assembly for
|
||||
searches performed entirely in memory; with the overhead of file access
|
||||
eliminated, improvements in search-engine performance would translate
|
||||
|
|
|
|||
12
06-01.md
12
06-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '06'
|
||||
pages: 125-129
|
||||
---
|
||||
|
||||
Chapter 6\
|
||||
Looking Past Face Value {#Heading1}
|
||||
------------------------
|
||||
|
|
|
|||
12
06-02.md
12
06-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '06'
|
||||
pages: 129-133
|
||||
---
|
||||
|
||||
The two approaches are functionally interchangeable but *not* equivalent
|
||||
from a performance standpoint, and which is better depends on the
|
||||
particular context. If it's a one-shot memory access, it's best to let
|
||||
|
|
|
|||
12
07-01.md
12
07-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '07'
|
||||
pages: 136-139
|
||||
---
|
||||
|
||||
Chapter 7\
|
||||
Local Optimization {#Heading1}
|
||||
-------------------
|
||||
|
|
|
|||
12
07-02.md
12
07-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '07'
|
||||
pages: 139-141
|
||||
---
|
||||
|
||||
By the way, don't fall victim to the lures of **JCXZ** and do something
|
||||
like this:
|
||||
|
||||
|
|
|
|||
12
07-03.md
12
07-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '07'
|
||||
pages: 141-143
|
||||
---
|
||||
|
||||
**LISTING 7.1 L7-1.ASM**
|
||||
|
||||
; Program to illustrate searching through a buffer of a specified
|
||||
|
|
|
|||
12
07-04.md
12
07-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '07'
|
||||
pages: 143-145
|
||||
---
|
||||
|
||||
**LISTING 7.2 L7-2.ASM**
|
||||
|
||||
; Program to illustrate searching through a buffer of a specified
|
||||
|
|
|
|||
12
07-05.md
12
07-05.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '07'
|
||||
pages: 145-148
|
||||
---
|
||||
|
||||
#### Rotating and Shifting with Tables {#Heading8}
|
||||
|
||||
As another example of local optimization, consider the matter of
|
||||
|
|
|
|||
12
08-01.md
12
08-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: 08
|
||||
pages: 149-153
|
||||
---
|
||||
|
||||
Chapter 8\
|
||||
Speeding Up C with Assembly Language {#Heading1}
|
||||
-------------------------------------
|
||||
|
|
|
|||
12
08-02.md
12
08-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: 08
|
||||
pages: 153-156
|
||||
---
|
||||
|
||||
### Stack Frames Slow So Much {#Heading5}
|
||||
|
||||
C compilers work within the stack frame model, whereby variables reside
|
||||
|
|
|
|||
12
08-03.md
12
08-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: 08
|
||||
pages: 156-160
|
||||
---
|
||||
|
||||
**LISTING 8.1 L8-1.C**
|
||||
|
||||
/* Program to search an array spanning a linked list of variable-
|
||||
|
|
|
|||
12
08-04.md
12
08-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: 08
|
||||
pages: 160-163
|
||||
---
|
||||
|
||||
It's hard to squeeze much more performance from this code by tweaking
|
||||
it, as exemplified by Listing 8.3, a fine-tuned assembly version of
|
||||
**FindIDAverage** that was produced by looking at the assembly output of
|
||||
|
|
|
|||
12
08-05.md
12
08-05.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: 08
|
||||
pages: 163-166
|
||||
---
|
||||
|
||||
Listings 8.5 and 8.6 together go the final step and change the rules in
|
||||
favor of assembly language. Listing 8.5 creates the same list of linked
|
||||
blocks as Listing 8.1. However, instead of storing an array of
|
||||
|
|
|
|||
12
09-01.md
12
09-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: 09
|
||||
pages: 167-172
|
||||
---
|
||||
|
||||
Chapter 9\
|
||||
Hints My Readers Gave Me {#Heading1}
|
||||
-------------------------
|
||||
|
|
|
|||
12
09-02.md
12
09-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: 09
|
||||
pages: 172-175
|
||||
---
|
||||
|
||||
However, it generally is. Sure, if the length is odd, John's approach
|
||||
incurs a penalty approximately equal to the **REP** startup time for
|
||||
**MOVSB**. However, if the length is even, John's approach doesn't
|
||||
|
|
|
|||
12
09-03.md
12
09-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: 09
|
||||
pages: 175-178
|
||||
---
|
||||
|
||||
Listing 9.1 implements the scan-on-first-character approach. Listing 9.2
|
||||
scans for whatever character the caller specifies. Listing 9.3 is a test
|
||||
program used to compare the two approaches. How much difference does
|
||||
|
|
|
|||
12
09-04.md
12
09-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: 09
|
||||
pages: 178-180
|
||||
---
|
||||
|
||||
**LISTING 9.2 L9-2.ASM**
|
||||
|
||||
; Searches a text buffer for a text string. Uses REPNZ SCASB to scan
|
||||
|
|
|
|||
12
09-05.md
12
09-05.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: 09
|
||||
pages: 180-182
|
||||
---
|
||||
|
||||
You'll notice that in Listing 9.2 I didn't use a table of character
|
||||
frequencies in English text to determine the character for which to
|
||||
scan, but rather let the caller make that choice. Each buffer of bytes
|
||||
|
|
|
|||
12
09-06.md
12
09-06.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: 09
|
||||
pages: 182-185
|
||||
---
|
||||
|
||||
**LISTING 9.5 L9-5.ASM**
|
||||
|
||||
; Divides an arbitrarily long unsigned dividend by a 16-bit unsigned
|
||||
|
|
|
|||
12
09-07.md
12
09-07.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: 09
|
||||
pages: 185-188
|
||||
---
|
||||
|
||||
#### Hard-Core Cycle Counting {#Heading10}
|
||||
|
||||
Next, we come to an item that cycle counters will love, especially since
|
||||
|
|
|
|||
12
10-01.md
12
10-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '10'
|
||||
pages: 190-193
|
||||
---
|
||||
|
||||
Chapter 10\
|
||||
Patient Coding, Faster Code {#Heading1}
|
||||
----------------------------
|
||||
|
|
|
|||
12
10-02.md
12
10-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '10'
|
||||
pages: 193-196
|
||||
---
|
||||
|
||||
Not so nowadays, though. Computers love boring work; they're very
|
||||
patient and disciplined, and, besides, one human year = seven dog years
|
||||
= two zillion computer years. So when we're faced with a problem that
|
||||
|
|
|
|||
12
10-03.md
12
10-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '10'
|
||||
pages: 196-200
|
||||
---
|
||||
|
||||
Listing 10.2 repeatedly subtracts iS from iL until iL becomes less than
|
||||
or equal to iS. If iL becomes equal to iS, then that's the GCD;
|
||||
alternatively, if iL becomes *less* than iS, iL and iS switch values,
|
||||
|
|
|
|||
12
10-04.md
12
10-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '10'
|
||||
pages: 200-203
|
||||
---
|
||||
|
||||
**LISTING 10.5 L10-5.ASM**
|
||||
|
||||
; Finds and returns the greatest common divisor of two integers.
|
||||
|
|
|
|||
12
11-01.md
12
11-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '11'
|
||||
pages: 205-210
|
||||
---
|
||||
|
||||
Chapter 11\
|
||||
Pushing the 286 and 386 {#Heading1}
|
||||
------------------------
|
||||
|
|
|
|||
12
11-02.md
12
11-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '11'
|
||||
pages: 210-212
|
||||
---
|
||||
|
||||
You might think that the elimination of the 8-bit bus cycle-eater would
|
||||
mean that the prefetch queue cycle-eater would also vanish, since on the
|
||||
8088 the prefetch queue cycle-eater is a side effect of the 8-bit bus.
|
||||
|
|
|
|||
12
11-03.md
12
11-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '11'
|
||||
pages: 212-216
|
||||
---
|
||||
|
||||
In short, a close relative of our old friend the 8-bit bus
|
||||
cycle-eater—the system memory wait state cycle-eater—haunts us still on
|
||||
all but zero-wait-state 286 and 386 computers, and that means that the
|
||||
|
|
|
|||
12
11-04.md
12
11-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '11'
|
||||
pages: 216-220
|
||||
---
|
||||
|
||||
When I was developing the Zen timer, I used my trusty 10 MHz 286-based
|
||||
AT clone to verify the basic functionality of the timer by measuring the
|
||||
performance of simple instruction sequences. I was cruising along with
|
||||
|
|
|
|||
12
11-05.md
12
11-05.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '11'
|
||||
pages: 220-222
|
||||
---
|
||||
|
||||
Under ideal conditions, a 286 can access memory much, much faster than
|
||||
an 8088. A 10 MHz 286 is capable of accessing a word of system memory
|
||||
every 0.20 ms with **REP MOVSW**, dwarfing the 1 byte every 1.31 µs that
|
||||
|
|
|
|||
12
11-06.md
12
11-06.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '11'
|
||||
pages: 222-224
|
||||
---
|
||||
|
||||
Finally, it's possible in real mode to use the 386's new addressing
|
||||
modes, in which *any* 32-bit general-purpose register or pair of
|
||||
registers can be used to address memory. What's more, multiplication of
|
||||
|
|
|
|||
12
11-07.md
12
11-07.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '11'
|
||||
pages: 224-226
|
||||
---
|
||||
|
||||
**LISTING 11.5 L11-5.ASM**
|
||||
|
||||
;
|
||||
|
|
|
|||
12
11-08.md
12
11-08.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '11'
|
||||
pages: 226-231
|
||||
---
|
||||
|
||||
Well, there's only one instruction other than **POPF** that loads the
|
||||
FLAGS register directly from the stack, and that's **IRET**, which loads
|
||||
the FLAGS register from the stack as it branches, as shown in Figure
|
||||
|
|
|
|||
12
12-01.md
12
12-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '12'
|
||||
pages: 233-237
|
||||
---
|
||||
|
||||
Chapter 12\
|
||||
Pushing the 486 {#Heading1}
|
||||
----------------
|
||||
|
|
|
|||
12
12-02.md
12
12-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '12'
|
||||
pages: 237-241
|
||||
---
|
||||
|
||||
which calculates the same sum and leaves the registers in the same state
|
||||
as the first example, but avoids indexed addressing.
|
||||
|
||||
|
|
|
|||
12
12-03.md
12
12-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '12'
|
||||
pages: 241-243
|
||||
---
|
||||
|
||||
There is, of course, no guarantee that I'm entirely correct about the
|
||||
optimizations discussed in this chapter. Without knowing the internals
|
||||
of the 486, all I can do is time code and make inferences from the
|
||||
|
|
|
|||
12
12-04.md
12
12-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '12'
|
||||
pages: 243-246
|
||||
---
|
||||
|
||||
You don't need to understand every corner of the 486 universe unless
|
||||
you're a diehard ASMhead who does this stuff for fun. Just learn enough
|
||||
to be able to speed up the key portions of your programs, and spend the
|
||||
|
|
|
|||
12
13-01.md
12
13-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '13'
|
||||
pages: 248-251
|
||||
---
|
||||
|
||||
Chapter 13\
|
||||
Aiming the 486 {#Heading1}
|
||||
---------------
|
||||
|
|
|
|||
12
13-02.md
12
13-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '13'
|
||||
pages: 252-254
|
||||
---
|
||||
|
||||
"When I looked closely as this, I realized that the two cycles for the
|
||||
final **ADD** is just the sum of 1 cycle to load the data from memory,
|
||||
and 1 cycle to add it to DX, so the code could just as well have been
|
||||
|
|
|
|||
12
13-03.md
12
13-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '13'
|
||||
pages: 254-256
|
||||
---
|
||||
|
||||
On the 386, **ROR** was the only way to split a 32-bit register into two
|
||||
16-bit registers. On the 486, however, **BSWAP** can not only do the
|
||||
job, but can do it better, because **BSWAP** executes in just one cycle.
|
||||
|
|
|
|||
12
13-04.md
12
13-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '13'
|
||||
pages: 256-258
|
||||
---
|
||||
|
||||
### 32-Bit Addressing Modes {#Heading7}
|
||||
|
||||
The 386 and 486 both support 32-bit addressing modes, in which any
|
||||
|
|
|
|||
12
14-01.md
12
14-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '14'
|
||||
pages: 260-263
|
||||
---
|
||||
|
||||
Chapter 14\
|
||||
Boyer-Moore String Searching {#Heading1}
|
||||
-----------------------------
|
||||
|
|
|
|||
12
14-02.md
12
14-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '14'
|
||||
pages: 263-267
|
||||
---
|
||||
|
||||
### The Boyer-Moore Algorithm {#Heading4}
|
||||
|
||||
All our *a priori* knowledge of string searching is stated above, but
|
||||
|
|
|
|||
12
14-03.md
12
14-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '14'
|
||||
pages: 267-268
|
||||
---
|
||||
|
||||
How fast *is* Boyer-Moore? Listing 14.1 is a C implementation of
|
||||
Boyer-Moore searching; Listing 14.2 is a test-bed program that searches
|
||||
up to the first 32K of a file for a pattern. Table 14.1 (all times
|
||||
|
|
|
|||
12
14-04.md
12
14-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '14'
|
||||
pages: 268-271
|
||||
---
|
||||
|
||||
**LISTING 14.1 L14-1.C**
|
||||
|
||||
/* Searches a buffer for a specified pattern. In case of a mismatch,
|
||||
|
|
|
|||
12
14-05.md
12
14-05.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '14'
|
||||
pages: 271-274
|
||||
---
|
||||
|
||||
**LISTING 14.3 L14-3.ASM**
|
||||
|
||||
; Searches a buffer for a specified pattern. In case of a mismatch,
|
||||
|
|
|
|||
12
14-06.md
12
14-06.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '14'
|
||||
pages: 274-277
|
||||
---
|
||||
|
||||
Table 14.1 represents a limited and decidedly unscientific comparison of
|
||||
searching techniques. Nonetheless, the overall trend is clear: For all
|
||||
but the shortest patterns, well-implemented Boyer-Moore is generally as
|
||||
|
|
|
|||
12
15-01.md
12
15-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '15'
|
||||
pages: 279-284
|
||||
---
|
||||
|
||||
Chapter 15\
|
||||
Linked Lists and plain Unintended Challenges {#Heading1}
|
||||
---------------------------------------------
|
||||
|
|
|
|||
12
15-02.md
12
15-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '15'
|
||||
pages: 284-287
|
||||
---
|
||||
|
||||
**LISTING 15.1 L15-1.C**
|
||||
|
||||
/* Deletes the node in a linked list that follows the indicated node.
|
||||
|
|
|
|||
12
15-03.md
12
15-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '15'
|
||||
pages: 287-290
|
||||
---
|
||||
|
||||
**LISTING 15.5 L15-5.C**
|
||||
|
||||
/* Finds the first node in a value-sorted linked list that
|
||||
|
|
|
|||
12
15-04.md
12
15-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '15'
|
||||
pages: 290-293
|
||||
---
|
||||
|
||||
**LISTING 15.7 L15-7.ASM**
|
||||
|
||||
; C near-callable assembly function for inserting a new node in a
|
||||
|
|
|
|||
12
16-01.md
12
16-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '16'
|
||||
pages: 295-300
|
||||
---
|
||||
|
||||
Chapter 16\
|
||||
There Ain't No Such Thing as the Fastest Code {#Heading1}
|
||||
----------------------------------------------
|
||||
|
|
|
|||
12
16-02.md
12
16-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '16'
|
||||
pages: 300-303
|
||||
---
|
||||
|
||||
Listing 16.2 is Listing 16.1 modified to call a function that scans each
|
||||
block for words, and Listing 16.3 contains an assembly function that
|
||||
counts words. Used together, Listings 16.2 and 16.3 are just about twice
|
||||
|
|
|
|||
12
16-03.md
12
16-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '16'
|
||||
pages: 303-305
|
||||
---
|
||||
|
||||
**LISTING 16.4 L16-4.ASM**
|
||||
|
||||
; Assembly subroutine for Listing 16.2. Scans through Buffer, of
|
||||
|
|
|
|||
12
16-04.md
12
16-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '16'
|
||||
pages: 305-308
|
||||
---
|
||||
|
||||
Truth to tell, I didn't expect a three-times speedup; around two times
|
||||
was what I had in mind. Which just goes to show that any code can be
|
||||
made faster than you'd expect, if you think about it long enough and
|
||||
|
|
|
|||
12
16-05.md
12
16-05.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '16'
|
||||
pages: 308-311
|
||||
---
|
||||
|
||||
Table 16.2 has two times for each entry listed: the first value is the
|
||||
overall counting time, including time spent in the main program, disk
|
||||
I/O, and everything else; the second value is the time actually spent
|
||||
|
|
|
|||
12
16-06.md
12
16-06.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '16'
|
||||
pages: 311-313
|
||||
---
|
||||
|
||||
### Levels of Optimization {#Heading9}
|
||||
|
||||
Three levels of optimization were evident in the word-counting entries I
|
||||
|
|
|
|||
12
16-07.md
12
16-07.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '16'
|
||||
pages: 313-316
|
||||
---
|
||||
|
||||
**Listing 16.6 OPT2.ASM**
|
||||
|
||||
;
|
||||
|
|
|
|||
12
16-08.md
12
16-08.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '16'
|
||||
pages: 316-319
|
||||
---
|
||||
|
||||
**Listing 16.7 L16-7.ASM**
|
||||
|
||||
ScanLoop:
|
||||
|
|
|
|||
12
17-01.md
12
17-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '17'
|
||||
pages: 322-325
|
||||
---
|
||||
|
||||
Chapter 17\
|
||||
The Game of Life {#Heading1}
|
||||
-----------------
|
||||
|
|
|
|||
12
17-02.md
12
17-02.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '17'
|
||||
pages: 325-329
|
||||
---
|
||||
|
||||
**LISTING 17.1 L17-1.CPP**
|
||||
|
||||
/* C++ Game of Life implementation for any mode for which mode set
|
||||
|
|
|
|||
12
17-03.md
12
17-03.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '17'
|
||||
pages: 329-331
|
||||
---
|
||||
|
||||
### Where Does the Time Go? {#Heading5}
|
||||
|
||||
How slow is Listing 17.1? Table 17.1 shows that even on a 486, Listing
|
||||
|
|
|
|||
12
17-04.md
12
17-04.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '17'
|
||||
pages: 331-334
|
||||
---
|
||||
|
||||
There's a kicker here, though, and that's the counting of neighbors for
|
||||
cells at the edge of the cellmap. When cellmap wrapping is enabled (so
|
||||
that the cellmap becomes essentially a toroid, with each edge joined
|
||||
|
|
|
|||
12
17-05.md
12
17-05.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '17'
|
||||
pages: 335-338
|
||||
---
|
||||
|
||||
In Listing 17.3, note the padded cellmap edges, and the alteration of
|
||||
the member functions to compensate for the padding. Also note that the
|
||||
width now has to be a multiple of eight, to facilitate the process of
|
||||
|
|
|
|||
12
17-06.md
12
17-06.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '17'
|
||||
pages: 338-340
|
||||
---
|
||||
|
||||
We're still not ready for assembly, though; what we need is a new
|
||||
perspective that lends itself to vastly better performance in C++. The
|
||||
Life program in the next section is *three to seven times* faster than
|
||||
|
|
|
|||
12
17-07.md
12
17-07.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '17'
|
||||
pages: 340-345
|
||||
---
|
||||
|
||||
**LISTING 17.5 L17-5.CPP**
|
||||
|
||||
/* C++ Game of Life implementation for any mode for which mode set
|
||||
|
|
|
|||
12
17-08.md
12
17-08.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '17'
|
||||
pages: 345-346
|
||||
---
|
||||
|
||||
The large model is actually not necessary for the 96x96 cellmap in
|
||||
Listing 17.5. However, I was actually more interested in seeing a fast
|
||||
200x200 cellmap, and two 200x200 cellmaps can't fit in a single segment.
|
||||
|
|
|
|||
12
18-01.md
12
18-01.md
|
|
@ -1,3 +1,15 @@
|
|||
---
|
||||
title: Michael Abrash's Graphics Programming Black Book, Special Edition
|
||||
author: Michael Abrash
|
||||
date: '1997-07-01'
|
||||
isbn: '1576101746'
|
||||
publisher: The Coriolis Group
|
||||
category: 'Web and Software Development: Game Development,Web and Software Development:
|
||||
Graphics and Multimedia Development'
|
||||
chapter: '18'
|
||||
pages: 347-351
|
||||
---
|
||||
|
||||
Chapter 18\
|
||||
It's a plain Wonderful Life {#Heading1}
|
||||
----------------------------
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue