Last active
April 1, 2020 03:43
-
-
Save subnomo/0dd1fc2853a9c0191e1492e0a6e8d2aa to your computer and use it in GitHub Desktop.
A power macro written in MASM
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
pow MACRO x, n | |
LOCAL start | |
push ebx | |
push ecx | |
push edx | |
mov eax, x | |
mov ebx, eax | |
mov ecx, n | |
dec ecx | |
start: | |
mul ebx | |
loop start | |
pop edx | |
pop ecx | |
pop ebx | |
ENDM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it's a good idea to put in the description who is the output variable