Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include 'win32a.inc'
- format MS COFF
- public _RGB as '__RGB@12'
- public _decomposition_RGB as '__decomposition_RGB@4'
- section '.text' code readable executable
- ;/////////////////////////////////////////////////////////////
- proc _RGB red, green, blue ;//
- mov eax , [green]
- mov ebx , [blue]
- shl eax , 8
- shl ebx , 16
- add eax , ebx
- add eax ,[red]
- ret
- endp
- ;/////////////////////////////////////////////////////////////
- proc _decomposition_RGB color ;//
- mov ebx, [color]
- mov eax, 0
- mov al, bl
- mov [arr + 4], eax ; Red
- shr ebx, 8
- mov al, bl
- mov [arr + 8], eax ; Green
- shr ebx, 8
- mov al, bl
- mov [arr + 12], eax ; Blue
- shr ebx, 8
- mov [arr], ebx ; То, что хранится в неиспользуемом байте
- mov eax , arr
- ret
- endp
- section '.data' data readable writeable
- ;------------------------------------------------------------- Создание переменных:
- arr dd 4 dup(333)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement