Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .Data
- frequency DW 0, 260, 300, 330, 350, 390, 440, 500, 520, 590, 660, 700
- mov EAX, frequency
- mov ECX, 0 // as a counter
- mov ecx, 0 ; initialize counter
- mov edx, OFFSET frequency ; get address of the first element
- DoLoop:
- mov eax, DWORD PTR [edx] ; get value of the element
- ... ; do something with that value, now in the EAX register
- inc ecx ; increment counter by one
- add edx, 2 ; increment pointer by size of an element
- cmp ecx, 12 ; compare counter against 12 (total number of elements)
- jl DoLoop ; keep looping while less than 12
- cmp X, 700 ; where X is some register or memory location that you want to test
- jne BranchLabel ; where 'BranchLabel' is the label to jump to if X != 700
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement