AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

What's incorrect here

Ein Thema von mohfa · begonnen am 23. Jun 2009 · letzter Beitrag vom 23. Jun 2009
 
mohfa

Registriert seit: 11. Feb 2007
97 Beiträge
 
Delphi 7 Enterprise
 
#1

What's incorrect here

  Alt 23. Jun 2009, 20:38
Hi , Could someone correct me this Code :
I get the Compiler Error : Operand Size Mismatch in : LDS SI,Path

Delphi-Quellcode:
var
LFNError: word;

function ASCIZToString (ASCIZ: array of Char): String;
begin
ASCIZToString := StrPas (@ASCIZ);
end;
/////
function FindFirst (Path: String; Attr: word; var F: FindData): word;assembler;
asm
  mov LFNError, 0
  push ds
  LDS SI,Path // ----> Operand Size Mismatch
  mov dx, si
  inc dx
  mov cl, [si]

@@StringToPChar:
  inc si
  dec cl
  jnz @@StringToPChar

  inc si
  mov byte ptr [si], 0

  les di, F // ----> Operand Size Mismatch

  mov cx, Attr
  mov ax, 714Eh
  mov si, 1

  int 21h
  pop ds
  jnc @@NoCarry

  mov LFNError, ax
  jmp @@Exit

@@NoCarry:
cmp ax, 7100h
  jne @@Exit

  mov LFNError, ax

@@Exit:
end;

procedure FindNext (var F: FindData; FileFindHandle: word); assembler;
asm
  mov LFNError, 0
  mov ax, 714Fh
  mov si, 1
  mov bx, FileFindHandle
  les di, F// ----> Operand Size Mismatch

  int 21h

  jnc @@NoCarry

  mov LFNError, ax
  jmp @@Exit

@@NoCarry:
cmp ax, 7100h
  jne @@Exit

  mov LFNError, ax

@@Exit:
end;

procedure FindClose (FileFindHandle: word); assembler;
asm
  mov LFNError, 0

  mov ax, 71A1h
  mov bx, FileFindHandle

  int 21h

  jnc @@NoCarry

  mov LFNError, ax
  jmp @@Exit

@@NoCarry:
cmp ax, 7100h
  jne @@Exit

  mov LFNError, ax

@@Exit:
end;
and just wondering is this fast than using the Delphi TSearchRec ....

many thanks
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:04 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz