Use backtick code blocks for syntax highlighting

This commit is contained in:
James Gregory 2013-12-31 11:38:48 +11:00
commit f658bfbb40
203 changed files with 26546 additions and 25801 deletions

View file

@ -15,12 +15,13 @@ AT clone to verify the basic functionality of the timer by measuring the
performance of simple instruction sequences. I was cruising along with
no problems until I timed the following code:
mov cx,1000
call ZTimerOn
LoopTop:
loop LoopTop
call ZTimerOff
```nasm
mov cx,1000
call ZTimerOn
LoopTop:
loop LoopTop
call ZTimerOff
```
![**Figure 11.2**  *Word-aligned prefetching on the 286.*](images/11-02.jpg)
@ -39,12 +40,14 @@ resided at the start of the next word-aligned word.
One simple change brought the execution time down to a reasonable 12.5
cycles per loop:
mov cx,1000
call ZTimerOn
even
LoopTop:
loop LoopTop
call ZTimerOff
```nasm
mov cx,1000
call ZTimerOn
even
LoopTop:
loop LoopTop
call ZTimerOff
```
While word-aligning branch destinations can improve branching
performance, it's a nuisance and can increase code size a good deal, so
@ -60,9 +63,11 @@ branch destination.
I recommend that you only go out of your way to word-align the start
offsets of your subroutines, as in:
even
FindChar proc near
:
```nasm
even
FindChar proc near
:
```
In my experience, this simple practice is the one form of code alignment
that consistently provides a reasonable return for bytes and effort