Friday, November 26, 2021

Write a program that prints sum of first 10 odd numbers.

include irvine32.inc

.386

.stack 4096

Exitprocess proto,dwExitcode:dword

.data

sum dword ?

.code

main proc


mov eax,1

add eax,3

add eax,5

add eax,7

add eax,9

add eax,11

add eax,13

add eax,15

add eax,17

add eax,19

mov sum,eax

 

call dumpregs

invoke Exitprocess,0

main endp

end main 

No comments:

Post a Comment