Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pt_a dd 200, 300
- pt_b dd 550, 350
- main:
- mov eax, dword pt_a ; this moves addy of pt_a to eax
- mov ebx, dword pt_b ; this moves addy of pt_a to eax
- ; this gets me my delta x
- sub ebx, [eax]
- move [delta_x], ebx
- xor ebx, ebx
- ; this moves array to the next set of points
- inc eax
- mov ebx, pt_b
- inc ebx
- ; this gets me my delta y
- sub ebx, eax
- mov [delta_y], ebx
- ;this squares delta x, moves to hypot
- mov eax, [delta_x]
- mul eax
- mov [hypot], eax
- ;this squares delta y, adds to hypot
- mov eax, [delta_y]
- mul eax
- add eax, [hypot]
- ; now eax should have the a^2 + b^2
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement