Difference between revisions of "Example 1"
Jump to navigation
Jump to search
Line 32: | Line 32: | ||
</pre> | </pre> | ||
[[Category: | [[Category: Assembly Examples]] |
Revision as of 19:29, 12 March 2007
Assembly Language Tutorial | |
---|---|
Please choose a tutorial page:
|
mov eax, 3 mov esi, ecx xor ecx, ecx Top: movsx edx, byte ptr [ecx+esi] sub edx, 30h lea edi, [eax+eax] xor edx, edi add eax, edx inc ecx cmp ecx, 0Ch jl short Top xor edx, edx mov ecx, 0Ah div ecx movsx eax, byte ptr [esi+0Ch] add edx, 30h cmp eax, edx jnz bottom mov eax, 1 ret bottom: xor eax, eax ret