Change bold code snippets to inline code blocks
This commit is contained in:
parent
f658bfbb40
commit
3c76d884ef
185 changed files with 1772 additions and 1772 deletions
10
58-02.md
10
58-02.md
|
|
@ -63,11 +63,11 @@ NoExtraYAdvance:
|
|||
|
||||
Figure 58.2 shows why this cycling is necessary. In Mode X, the
|
||||
page-flipped 256-color mode of the VGA, each successive pixel across a
|
||||
scanline is stored in a different hardware plane, and an **OUT** to the
|
||||
scanline is stored in a different hardware plane, and an `OUT` to the
|
||||
VGA's hardware is needed to select the plane being drawn to. (See
|
||||
Chapters 47, 48, and 49 for details.) An **OUT** instruction *by itself*
|
||||
Chapters 47, 48, and 49 for details.) An `OUT` instruction *by itself*
|
||||
takes 16 cycles (and in the neighborhood of 30 cycles in virtual-86 or
|
||||
non-privileged protected mode), and an **ROL** takes 2 more, for a total
|
||||
non-privileged protected mode), and an `ROL` takes 2 more, for a total
|
||||
of 18 cycles, double John's 9 cycles, just to handle plane management.
|
||||
Clearly, getting plane control out of the inner loop was absolutely
|
||||
necessary.
|
||||
|
|
@ -118,9 +118,9 @@ between columns—outside the inner loop. A trivial change, not
|
|||
fundamental in any sense—and yet just that one change, plus unrolling
|
||||
the loop, reduced the inner loop to the 22-cycles-per-pixel version
|
||||
shown in Listing 58.2. That's exactly twice as fast as Listing 58.1—and
|
||||
given how incredibly slow most VGAs are at completing **OUT**s, the
|
||||
given how incredibly slow most VGAs are at completing `OUT`s, the
|
||||
real-world speedup should be considerably greater still. (The fastest
|
||||
byte **OUT** I've ever measured for a VGA is 29 cycles, the slowest more
|
||||
byte `OUT` I've ever measured for a VGA is 29 cycles, the slowest more
|
||||
than 60 cycles; in the latter case, Listing 58.2 would be on the order
|
||||
of *four* times faster than Listing 58.1.)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue