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

@ -16,11 +16,13 @@ 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
timer from C, as, for example, in:
ZTimerOn():
for (i=0, x=0; i<100; i++)
x += i;
ZTimerOff();
ZTimerReport();
```c
ZTimerOn():
for (i=0, x=0; i<100; i++)
x += i;
ZTimerOff();
ZTimerReport();
```
(I'm talking about the precision timer here. The long-period
timer—Listing 3.5—requires the same modifications, but to different
@ -46,12 +48,16 @@ One important safety tip when modifying the Zen timer for use with large
code model C code: Watch out for optimizing assemblers! TASM actually
replaces
call far ptr ReferenceZTimerOn
```nasm
call far ptr ReferenceZTimerOn
```
with
push cs
call near ptr ReferenceZTimerOn
```nasm
push cs
call near ptr ReferenceZTimerOn
```
(and likewise for **ReferenceZTimerOff** ), which works because
**ReferenceZTimerOn** is in the same segment as the calling code. This