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
12
44-04.md
12
44-04.md
|
|
@ -85,9 +85,9 @@ will change the first 4 pixels on the screen (the left nibble of the
|
|||
byte at offset 0 in display memory) to blue, and will leave the next 4
|
||||
pixels (the right nibble of the byte at offset 0) unchanged.
|
||||
|
||||
Using one **MOV** to read from display memory and another to write to
|
||||
Using one `MOV` to read from display memory and another to write to
|
||||
display memory is not particularly efficient on some processors. In
|
||||
Listing 44.2, I instead use **XCHG**, which reads and then writes a
|
||||
Listing 44.2, I instead use `XCHG`, which reads and then writes a
|
||||
memory location in a single operation, as in:
|
||||
|
||||
```nasm
|
||||
|
|
@ -98,7 +98,7 @@ xchg es:[0],al
|
|||
```
|
||||
|
||||
Again, the actual value that's read is irrelevant. In general, the
|
||||
**XCHG** approach is more compact than two **MOV**s, and is faster on
|
||||
`XCHG` approach is more compact than two `MOV`s, and is faster on
|
||||
386 and earlier processors, but slower on 486s and Pentiums.
|
||||
|
||||
If all pixels in a byte of display memory are to be drawn in a single
|
||||
|
|
@ -117,11 +117,11 @@ mov byte ptr es:[di],0ffh
|
|||
> If you're familiar with VGA programming, you're no doubt aware that
|
||||
> everything that can be done with write mode 3 can also be accomplished
|
||||
> in write mode 0 or write mode 2 by using the Bit Mask register. However,
|
||||
> setting the Bit Mask register requires at least one **OUT** per byte
|
||||
> setting the Bit Mask register requires at least one `OUT` per byte
|
||||
> written, in addition to the read and write of display memory, and
|
||||
> **OUT**s are often slower than display memory accesses, especially on
|
||||
> `OUT`s are often slower than display memory accesses, especially on
|
||||
> 386s and 486s. One of the great virtues of write mode 3 is that it
|
||||
> requires virtually no **OUT**s and is therefore substantially faster for
|
||||
> requires virtually no `OUT`s and is therefore substantially faster for
|
||||
> masking than the other write modes.
|
||||
|
||||
In short, write mode 3 is a good choice for single-color drawing that
|
||||
|
|
|
|||
Loading…
Reference in a new issue