.386
_DATA   SEGMENT PARA PUBLIC USE32 'DATA'
_DATA   ENDS
_TEXT           SEGMENT PARA PUBLIC USE32 'CODE'
                ASSUME CS:_TEXT, DS:_DATA

                PUBLIC RLE_Draw_
RLE_Draw_       PROC
                xor ecx,ecx
                cld
buc:            mov cl,[esi]
                mov al,[esi+1]
                not al
                or  cl,cl
                jz  end
                mov ebx,ecx
                mov ah,al
                shl eax,8
                mov al,ah
                shl eax,8
                mov al,ah
                shr ecx,2
                rep stosd
                mov ecx,ebx
                and ecx,3
                rep stosb
                inc esi
                inc esi
                jmp buc
end:
                ret
RLE_Draw_       ENDP

_TEXT           ENDS
                END
