Replace invalid characters with HTML entities

— with —
’ with ’
+ with +
× with x
ç with ç
“ with “
” with ”
‘ with ‘
• with •
– with -
µ with µ
† with †
Fix C++
θ with θ
Yen symbol instead of times
Fix broken apos
Bullet again
E-circumflex
This commit is contained in:
James Gregory 2013-12-30 12:50:32 +11:00
commit 500e7f5654
353 changed files with 5091 additions and 5091 deletions

View file

@ -39,12 +39,12 @@
<P><B>LISTING 41.3 L41-3.ASM</B></P>
<!-- CODE //-->
<PRE>
; Draws all pixels in list of horizontal lines passed in, in mode 13h, VGA&#146;s
; Draws all pixels in list of horizontal lines passed in, in mode 13h, VGA&rsquo;s
; 320x200 256-color mode. Uses REP STOS to fill each line.
; ******************************************************************
; NOTE: is able to reverse the X coords for a scan line, if necessary, to make
; XStart &lt; XEnd. Expects whichever edge is rightmost on any scan line to be in
; &#43;1 format; that is, XEnd is 1 greater than rightmost pixel to draw. If
; +1 format; that is, XEnd is 1 greater than rightmost pixel to draw. If
; XStart == XEnd, nothing is drawn on that scan line.
; ******************************************************************
; C near-callable as:
@ -75,31 +75,31 @@ Parms ends
public _DrawHorizontalLineList
align 2
_DrawHorizontalLineList proc
push bp ;preserve caller&#146;s stack frame
push bp ;preserve caller&rsquo;s stack frame
mov bp,sp ;point to our stack frame
push si ;preserve caller&#146;s register variables
push si ;preserve caller&rsquo;s register variables
push di
cld ;make string instructions inc pointers
mov ax,SCREEN_SEGMENT
mov es,ax ;point ES to display memory for REP STOS
mov si,[bp&#43;HLineListPtr] ;point to the line list
mov si,[bp+HLineListPtr] ;point to the line list
mov ax,SCREEN_WIDTH ;point to the start of the first scan
mul [si&#43;YStart] ; line in which to draw
mul [si+YStart] ; line in which to draw
mov dx,ax ;ES:DX points to first scan line to draw
mov bx,[si&#43;HLinePtr] ;point to the XStart/XEnd descriptor
mov bx,[si+HLinePtr] ;point to the XStart/XEnd descriptor
; for the first (top) horizontal line
mov si,[si&#43;Lngth] ;# of scan lines to draw
mov si,[si+Lngth] ;# of scan lines to draw
and si,si ;are there any lines to draw?
jz FillDone ;no, so we&#146;re done
mov al,byte ptr [bp&#43;Color] ;color with which to fill
jz FillDone ;no, so we&rsquo;re done
mov al,byte ptr [bp+Color] ;color with which to fill
mov ah,al ;duplicate color for STOSW
FillLoop:
mov di,[bx&#43;XStart] ;left edge of fill on this line
mov cx,[bx&#43;XEnd] ;right edge of fill
mov di,[bx+XStart] ;left edge of fill on this line
mov cx,[bx+XEnd] ;right edge of fill
cmp di,cx ;is XStart &gt; XEnd?
jle NoSwap ;no, we&#146;re all set
jle NoSwap ;no, we&rsquo;re all set
xchg di,cx ;yes, so swap edges
NoSwap:
sub cx,di ;width of fill on this line
@ -114,7 +114,7 @@ NoSwap:
MainFill:
shr cx,1 ;# of words in fill
rep stosw ;fill as many words as possible
adc cx,cx ;1 if there&#146;s an odd trailing byte to
adc cx,cx ;1 if there&rsquo;s an odd trailing byte to
; do, 0 otherwise
rep stosb ;fill any odd trailing byte
LineFillDone:
@ -123,15 +123,15 @@ LineFillDone:
dec si ;count off lines to fill
jnz FillLoop
FillDone:
pop di ;restore caller&#146;s register variables
pop di ;restore caller&rsquo;s register variables
pop si
pop bp ;restore caller&#146;s stack frame
pop bp ;restore caller&rsquo;s stack frame
ret
_DrawHorizontalLineList endp
end
</PRE>
<!-- END CODE //-->
<P>Listing 41.4 is almost identical to Listing 40.1 from Chapter 40. I&#146;ve modified Listing 40.1 to employ the vertical-monotone detection test we&#146;ve been talking about and use the fast vertical-monotone drawing code whenever possible; that&#146;s what Listing 41.4 is. Note well that Listing 40.5 from Chapter 40 is also required in order for this code to link. Listing 41.5 is an appropriately updated version of the POLYGON.H header file.
<P>Listing 41.4 is almost identical to Listing 40.1 from Chapter 40. I&rsquo;ve modified Listing 40.1 to employ the vertical-monotone detection test we&rsquo;ve been talking about and use the fast vertical-monotone drawing code whenever possible; that&rsquo;s what Listing 41.4 is. Note well that Listing 40.5 from Chapter 40 is also required in order for this code to link. Listing 41.5 is an appropriately updated version of the POLYGON.H header file.
</P><P><BR></P>
<CENTER>
<TABLE BORDER>