Skip to content

Instantly share code, notes, and snippets.

@subnomo
Last active April 1, 2020 03:43
Show Gist options
  • Save subnomo/0dd1fc2853a9c0191e1492e0a6e8d2aa to your computer and use it in GitHub Desktop.
Save subnomo/0dd1fc2853a9c0191e1492e0a6e8d2aa to your computer and use it in GitHub Desktop.
A power macro written in MASM
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
@xvimnt
Copy link

xvimnt commented Apr 1, 2020

it's a good idea to put in the description who is the output variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment