MASM addLoop
- Include Irvine32.inc
- .data
- total byte "result : ",0dh,0ah,0
- sum dword 0
- .code
- main proc
- mov ecx, 5
- mov eax, 0
- mov ebx, 1
- L1:
- add eax, ebx
- add sum, eax
- call writeint
- call crlf
- Loop L1
- mov edx, offset total
- mov eax, sum
- call writeint
- exit
- main endp
- end main
留言
張貼留言