Graeme Geldenhuys wrote:
2009/9/29 Vincent Snijders :
I never thought that
mov ax, bx (8086 assembler)
would clear the register after the move.
If you put it like that, it never (for some strange reason) confused
be either. :-) I guess that's probably because everything in assembler
c
Graeme Geldenhuys schrieb:
> 2009/9/29 Florian Klaempfl :
>> Indeed, the serious answer is:
>> move handles overlapping memory blocks correctly (so the data might not
>> existing anymore at the old location), memcpy doesn't do this and screws
>> things up when handling overlapping blocks. This is w
2009/9/29 Vincent Snijders :
>
> I never thought that
> mov ax, bx (8086 assembler)
> would clear the register after the move.
If you put it like that, it never (for some strange reason) confused
be either. :-) I guess that's probably because everything in assembler
confused me, so nothing stood o
2009/9/29 Graeme Geldenhuys :
>
> Could this "alias" procedure be applied somewhere in FPC? This was
> done before - the case of AssignFile() vs Assign()
>
> procedure MemCopy(src, dest: pointer; size: SizeInt);
> begin
> Move(src^, dest^, size);
> end;
here is an improved MemCopy(), with the s
Marco van de Voort schreef:
In our previous episode, Graeme Geldenhuys said:
No.
So why is the function called MOVE instead of COPY? :-)
Historical reasons apparantly.
I never thought that
mov ax, bx (8086 assembler)
would clear the register after the move.
So I never thought that mo
2009/9/29 Florian Klaempfl :
>
> Indeed, the serious answer is:
> move handles overlapping memory blocks correctly (so the data might not
> existing anymore at the old location), memcpy doesn't do this and screws
> things up when handling overlapping blocks. This is why e.g. C++ has
> memmove as we
Jonas Maebe schrieb:
>
> On 29 Sep 2009, at 15:46, Graeme Geldenhuys wrote:
>
>> Windows has 'memcpy()', not 'memcopy()' ;-)
>
> memcpy() is from the C library. And the C library also has memmove(),
> for that matter.
>
> The difference between memcpy() and memmove() is that memcpy() has
> un
Graeme Geldenhuys schrieb:
> 2009/9/29 Florian Klaempfl :
>> Because it doesn't copy your ram modules ;)
>
> Well, if I move something (no matter what it is), it doesn't exist in
> the original location any more. Hence my confusion about the Move()
> procedure.
Indeed, the serious answer is:
move
In our previous episode, Graeme Geldenhuys said:
> > No.
> So why is the function called MOVE instead of COPY? :-)
Historical reasons apparantly.
> I grep searched the *full* FPC source and found a implementation of
> MemCopy() in the packages/pasjpeg/* directory... So it seems to
> confirm
On 29 Sep 2009, at 15:46, Graeme Geldenhuys wrote:
Windows has 'memcpy()', not 'memcopy()' ;-)
memcpy() is from the C library. And the C library also has memmove(),
for that matter.
The difference between memcpy() and memmove() is that memcpy() has
undefined behaviour if the source an
2009/9/29 Florian Klaempfl :
>
> Because it doesn't copy your ram modules ;)
Well, if I move something (no matter what it is), it doesn't exist in
the original location any more. Hence my confusion about the Move()
procedure.
Regards,
- Graeme -
__
2009/9/29 Michael Van Canneyt :
>
> Because move predates memcopy. memcopy is a windows function.
> Move existed in the system unit of TP even before windows existed.
Windows has 'memcpy()', not 'memcopy()' ;-)
As for the origins of Move(), I can't comment except to say that
the original au
Graeme Geldenhuys schrieb:
> 2009/9/29 Marco van de Voort :
>> No.
>
>
> So why is the function called MOVE instead of COPY? :-)
Because it doesn't copy your ram modules ;)
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.free
On Tue, 29 Sep 2009, Graeme Geldenhuys wrote:
2009/9/29 Marco van de Voort :
No.
So why is the function called MOVE instead of COPY? :-)
Because move predates memcopy. memcopy is a windows function.
Move existed in the system unit of TP even before windows existed.
Michael.
_
2009/9/29 Marco van de Voort :
>
> No.
So why is the function called MOVE instead of COPY? :-)
I grep searched the *full* FPC source and found a implementation of
MemCopy() in the packages/pasjpeg/* directory... So it seems to
confirm what you (Marco) said. MOVE = MEMCOPY.It that case, M
In our previous episode, Graeme Geldenhuys said:
> I'm still porting code from SpeedSoft's Pascal compiler. The code I am
> porting often uses MemCopy(), but Free Pascal doesn't seem to have
> such an implementation. So I looked at the next best thing... Move()
>
> But as the name suggests (...Mov
Hi,
I'm still porting code from SpeedSoft's Pascal compiler. The code I am
porting often uses MemCopy(), but Free Pascal doesn't seem to have
such an implementation. So I looked at the next best thing... Move()
But as the name suggests (...Move()...), I would have expected it to
actually move the
17 matches
Mail list logo