Question

I was reading pascal source code when i met this procedure:

  procedure Copier_Bytewise (const source, target; const Count: word);
  (* $ IFDEF VirtualPascal *)
  assembler; (* $ Uses ESI, EDI, ECX *) (* $ Frame-*)
  asm
    mov esi, source
    mov edi, target
    mov ecx, Count
    cld
    rep movsb
  end;
  (* $ ELSE *)
  .
  (* $ ENDIF *)

This procedure is called wit these arguments :

Copier_Bytewise (Unpacked [WritePosition-Backwards], Unpacked [WritePosition], length);

So, What exactly is being copied?!

Was it helpful?

Solution

The source address is memory address of: Unpacked [WritePosition-Backwards]

The destination address is memory address of: Unpacked [WritePosition]

The copied content in bytes is: length

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top