home *** CD-ROM | disk | FTP | other *** search
- ;Brighten.asm For A386
- ;Brighten Increment B G & R continuously until any =255
- ;NB BMP must be 24-bit.
- USE32
- long1 equ[ebp+8] ;->pic
- long2 equ[ebp+12] ;bmheight
- long3 equ[ebp+16] ;bmwidth
- long4 equ[ebp+20] ;spare
-
- push ebp ;Arrange for ebp to point to stack params
- mov ebp,esp
- push edi,esi,ebx
-
- ;Get picture box parameters
- mov esi,long1 ;ptr to pic1
- mov eax,long2 ;bmheight
- mov edx,long3 ;bmwidth
- mul edx ;total BGR sets
- mov ecx,eax
-
- start:
- mov al,[esi]
- cmp al,255
- je L1
- inc al
- mov [esi],al
- L1: inc esi
-
- mov al,[esi]
- cmp al,255
- je L2
- inc al
- mov [esi],al
- L2: inc esi
-
- mov al,[esi]
- cmp al,255
- je L3
- inc al
- mov [esi],al
- L3: inc esi
-
- dec ecx
- jnz start
- GETOUT:
- pop ebx,esi,edi
- mov esp,ebp
- pop ebp
- ret 16
- ;jmp GETOUT
-