Normal quotes
This commit is contained in:
parent
5e10794a24
commit
18011c595a
352 changed files with 6040 additions and 6040 deletions
18
50-03.md
18
50-03.md
|
|
@ -5,7 +5,7 @@
|
|||
**LISTING 50.1 L50-1.ASM**
|
||||
|
||||
; Draws all pixels in the list of horizontal lines passed in, in
|
||||
; Mode X, the VGA’s undocumented 320x240 256-color mode. Clips to
|
||||
; Mode X, the VGA's undocumented 320x240 256-color mode. Clips to
|
||||
; the rectangle specified by (ClipMinX,ClipMinY),(ClipMaxX,ClipMaxY).
|
||||
; Draws to the page specified by CurrentPageBase.
|
||||
; C near-callable as:
|
||||
|
|
@ -50,9 +50,9 @@
|
|||
public _DrawHorizontalLineList
|
||||
align 2
|
||||
_DrawHorizontalLineList proc
|
||||
push bp ;preserve caller’s stack frame
|
||||
push bp ;preserve caller's stack frame
|
||||
mov bp,sp ;point to our stack frame
|
||||
push si ;preserve caller’s register variables
|
||||
push si ;preserve caller's register variables
|
||||
push di
|
||||
cld ;make string instructions inc pointers
|
||||
mov dx,SC_INDEX
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
mov cx,[si+YStart] ;first scan line to draw
|
||||
mov si,[si+Lngth] ;# of scan lines to draw
|
||||
cmp si,0 ;are there any lines to draw?
|
||||
jle ToFillDone ;no, so we’re done
|
||||
jle ToFillDone ;no, so we're done
|
||||
cmp cx,[_ClipMinY] ;clipped at top?
|
||||
jge MinYNotClipped ;no
|
||||
neg cx ;yes, discard however many lines are
|
||||
|
|
@ -122,8 +122,8 @@
|
|||
sub cx,dx
|
||||
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 dx,SC_INDEX+1 ;already points to the Map Mask reg
|
||||
|
|
@ -133,7 +133,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
|
||||
|
|
@ -154,9 +154,9 @@
|
|||
dec si ;count down lines
|
||||
jnz FillLoop
|
||||
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
|
||||
_DrawHorizontalLineList endp
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue