1 ; THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
2 ; SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
3 ; END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
4 ; ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
5 ; IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
6 ; SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
7 ; FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
8 ; CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
9 ; AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
10 ; COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
21 assume cs:_TEXT, ds:_DATA
23 _DATA segment dword public USE32 'DATA'
29 _TEXT segment dword public USE32 'CODE'
31 ; gr_winckpit_blt_span
32 ; blts a span region from source to dest buffer given a span
37 ; ESI = bm_data source at start of y
40 PUBLIC gr_winckpit_blt_span
45 inc ecx ; Better for counting and testing
48 mov al, [esi+ebx] ; else blt odd pixel then check right
59 ; gr_winckpit_blt_span_long
60 ; blts a span region from source to dest buffer given a span
62 ; This uses word optimization, and should be used for spans longer
63 ; than 10 pixels, and can't be used for spans of 3 pixels or less.
67 ; ESI = bm_data source at start of y
70 PUBLIC gr_winckpit_blt_span_long
71 gr_winckpit_blt_span_long:
73 ; EDX = right word boundary
77 inc ecx ; Better for counting and testing
78 mov edx, ecx ; Current right word boundary
80 test ebx, 1 ; is left boundary odd?
81 jz TestRightBound ; if even check right boundary.
83 mov al, [esi+ebx] ; else blt odd pixel then check right
87 ; Assured even left boundary and find right word boundary.
90 test ecx, 1 ; if even, then we have an even bound
92 dec edx ; if odd, force even boundary
96 ; This is a word only blt. No odd pixels.
100 mov [edi+ebx], ax ; straight out blt.
102 cmp ebx, edx ; do up to right word boundary
107 ; Blts word span and odd right byte is needed.
111 mov [edi+ebx], ax ; straight out blt.
113 cmp ebx, edx ; do up to right word boundary
115 mov al, [esi+ebx] ; blt right odd pixel.