Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- int _tmain(int argc, _TCHAR* argv[])
- {
- char sum = 0;
- char a[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
- _asm {
- LEA EBX, a
- MOV EDX, 0
- iter:
- MOV AL, BYTE PTR[EBX][EDX]
- ADD sum, AL
- INC EDX
- CMP EDX, 10
- JB iter
- }
- printf("sum=%d\n", sum);
- return 0;
- }
Add Comment
Please, Sign In to add comment