What is the best way of doing repeating tasks?by Ben (no login)
By best, I mean fast.
What I mean is this:
For example, I have 50 stored integers somewhere in my memory. I need to add a certain number to all of them.
In QBasic it might look like:
for i=0 to 199
There is no way of doing this in one instruction as far as I know in assembly.
add [es:di],10;something like this
sub [var],1 ;or maybe dec instruction more approiate
there is also loop where i can do
push cx;I might need cx
and I think there are other options which I'm still not aware of.
So what is the best option here?
And those that use cx will have me push cx and that will add more instrucitons and slow it down.
|Response Title||Author and Date|
|Re: What is the best way of doing repeating tasks?||on Jul 2, 9:55 AM|
|OK, thanks||Ben on Jul 2, 1:31 PM|
|I like the 386 manual (*URL)||on Jul 6, 8:38 PM|
|Oh, I forgot...||on Jul 18, 6:13 PM|
|And don't forget the MMX instruction set...||on Jul 25, 4:59 AM|