Normal quotes

This commit is contained in:
James Gregory 2013-12-30 18:34:31 +11:00
commit 18011c595a
352 changed files with 6040 additions and 6040 deletions

View file

@ -39,9 +39,9 @@
.code
public _FillRectangleX
_FillRectangleX proc near
push bp ;preserve caller’s stack frame
push bp ;preserve caller's stack frame
mov bp,sp ;point to local stack frame
push si ;preserve caller’s register variables
push si ;preserve caller's register variables
push di
cld
@ -54,7 +54,7 @@
add di,[bp+PageBase] ;offset of first rectangle pixel in
; display memory
mov ax,SCREEN_SEG ;point ES:DI to the first rectangle
mov es,ax ; pixel’s address
mov es,ax ; pixel's address
mov dx,SC_INDEX ;set the Sequence Controller Index to
mov al,MAP_MASK ; point to the Map Mask register
out dx,al
@ -75,15 +75,15 @@
sub cx,si
shr cx,1
shr cx,1 ;# of addresses across rectangle to fill - 1
jnz MasksSet ;there’s more than one byte to draw
and bh,bl ;there’s only one byte, so combine the left-
jnz MasksSet ;there's more than one byte to draw
and bh,bl ;there's only one byte, so combine the left-
; and right-edge clip masks
MasksSet:
mov si,[bp+EndY]
sub si,[bp+StartY] ;BX = height of rectangle
jle FillDone ;skip if 0 or negative height
mov ah,byte ptr [bp+Color] ;color with which to fill
mov bp,SCREEN_WIDTH ;stack frame isn’t needed any more
mov bp,SCREEN_WIDTH ;stack frame isn't needed any more
sub bp,cx ;distance from end of one scan line to start
dec bp ; of next
FillRowsLoop:
@ -93,7 +93,7 @@
mov al,ah ;put color in AL
stosb ;draw the left edge
dec cx ;count off left edge byte
js FillLoopBottom ;that’s the only byte
js FillLoopBottom ;that's the only byte
jz DoRightEdge ;there are only two bytes
mov al,00fh ;middle addresses are drawn 4 pixels at a pop
out dx,al ;set the middle pixel mask to no clip
@ -111,19 +111,19 @@
dec si ;count down scan lines
jnz FillRowsLoop
FillDone:
pop di ;restore caller’s register variables
pop di ;restore caller's register variables
pop si
pop bp ;restore caller’s stack frame
pop bp ;restore caller's stack frame
ret
_FillRectangleX endp
end
Just so you can see Mode X in action, Listing 47.7 is a sample program
that selects Mode X and draws a number of rectangles. Listing 47.7 links
to any of the rectangle fill routines I’ve presented.
to any of the rectangle fill routines I've presented.
And now, I hope, you’re beginning to see why I’m so fond of Mode X. In
the next chapter, we’ll continue with Mode X by exploring the wonders
And now, I hope, you're beginning to see why I'm so fond of Mode X. In
the next chapter, we'll continue with Mode X by exploring the wonders
that the latches and parallel plane hardware can work on scrolls,
copies, blits, and pattern fills.