🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.basm
4 messages
4 total messages Started by chris jones Fri, 13 Sep 2002 14:41
question about 'rep movsd'
#156
Author: chris jones
Date: Fri, 13 Sep 2002 14:41
6 lines
969 bytes
Do i need to check ecx > 0 before using 'rep movsd', or does it just do
nothing when ecx <= 0.

thanks,

chris
Re: question about 'rep movsd'
#157
Author: Per Larsen
Date: Fri, 13 Sep 2002 15:16
17 lines
1390 bytes
If ECX is exactly zero, rep movsd does nothing.
It treats the content of ECX as an unsigned value, however, so if it's
really a negative integer you'll get a *lot* of data moved<g>.

- Per

"chris jones" <flak@clara.co.uk> wrote in message
news:3d81f93f$1@newsgroups.borland.com...
> Do i need to check ecx > 0 before using 'rep movsd', or does it just
do
> nothing when ecx <= 0.
>
> thanks,
>
> chris
>
>
Re: question about 'rep movsd'
#168
Author: Pierre Maurette
Date: Sun, 15 Sep 2002 18:25
12 lines
1502 bytes
"Per Larsen" <perl_NOSPAM@turbopower.com> a �crit dans le message de news:
3d8201b5$1@newsgroups.borland.com...
> If ECX is exactly zero, rep movsd does nothing.
> It treats the content of ECX as an unsigned value, however, so if it's
> really a negative integer you'll get a *lot* of data moved<g>.

I was not sure for REP (but you are right).
But for LOOP, when ECX is zero, you iniate a very very
big loop ! (the whole turn on 32 bits).
For this, you have JECXZ and JCXZ instructions.
Pierre
Re: question about 'rep movsd'
#169
Author: Pierre Maurette
Date: Sun, 15 Sep 2002 18:25
12 lines
1471 bytes
"Per Larsen" <perl_NOSPAM@turbopower.com> a �crit dans le message de news:
3d8201b5$1@newsgroups.borland.com...
> If ECX is exactly zero, rep movsd does nothing.
> It treats the content of ECX as an unsigned value, however, so if it's
> really a negative integer you'll get a *lot* of data moved<g>.

I was not sure for REP (but you are right).
But for LOOP, when ECX is zero, you iniate a very very
big loop ! (the whole turn on 32 bits).
For this, you have JECXZ and JCXZ instructions.
Pierre
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads