Last active
March 2, 2017 00:14
-
-
Save Guevara-chan/7c4904f0a7314ba90a560801ea14d944 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Procedure RGB2Gray(RGB) | |
! MOVZX EAX, byte [p.v_RGB] | |
! MOVZX EBX, byte [p.v_RGB+1] | |
! MOVZX ECX, byte [p.v_RGB+2] | |
! XOR DX, DX | |
! ADD AX, BX | |
! ADD AX, CX | |
! MOV CX, 3 | |
! DIV CX | |
ProcedureReturn | |
EndProcedure | |
Procedure Gray2RGB(Level.a) | |
!XOR EAX, EAX | |
!MOV byte AH, [p.v_Level] | |
!MOV byte AL, AH | |
!SHL EAX, 8 | |
!MOV AL, AH | |
ProcedureReturn | |
EndProcedure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment