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
03-10.md
10
03-10.md
|
|
@ -10,7 +10,7 @@ chapter: '03'
|
|||
pages: 070-073
|
||||
---
|
||||
|
||||
when declaring the timer routines **extern**, so that name-mangling
|
||||
when declaring the timer routines `extern`, so that name-mangling
|
||||
doesn't occur, and the linker can find the routines' C-style names.)
|
||||
|
||||
That's all it takes; after doing this, you'll be able to use the Zen
|
||||
|
|
@ -59,8 +59,8 @@ push cs
|
|||
call near ptr ReferenceZTimerOn
|
||||
```
|
||||
|
||||
(and likewise for **ReferenceZTimerOff** ), which works because
|
||||
**ReferenceZTimerOn** is in the same segment as the calling code. This
|
||||
(and likewise for `ReferenceZTimerOff` ), which works because
|
||||
`ReferenceZTimerOn` is in the same segment as the calling code. This
|
||||
is normally a great optimization, being both smaller and faster than a
|
||||
far call. However, it's not so great for the Zen
|
||||
|
||||
|
|
@ -68,12 +68,12 @@ far call. However, it's not so great for the Zen
|
|||
|
||||
timer, because our purpose in calling the reference timing code is to
|
||||
determine exactly how much time is taken by overhead code—including the
|
||||
far calls to **ZTimerOn** and **ZTimerOf**f! By converting the far calls
|
||||
far calls to `ZTimerOn` and `ZTimerOf`f! By converting the far calls
|
||||
to push/near call pairs within the Zen timer module, TASM makes it
|
||||
impossible to emulate exactly the overhead of the Zen timer, and makes
|
||||
timings slightly (about 16 cycles on a 386) less accurate.
|
||||
|
||||
What's the solution? Put the **NOSMART** directive at the start of the
|
||||
What's the solution? Put the `NOSMART` directive at the start of the
|
||||
Zen timer code. This directive instructs TASM to turn off all
|
||||
optimizations, including converting far calls to push/near call pairs.
|
||||
By the way, there is, to the best of my knowledge, no such problem with
|
||||
|
|
|
|||
Loading…
Reference in a new issue