Einzelnen Beitrag anzeigen

inflames

Registriert seit: 5. Okt 2011
3 Beiträge
 
#1

Problem mit Assem

  Alt 10. Mär 2014, 10:43
Hallo,

ich hab ein kleines Problem, wir steigen grad von Delphi5 auf Delphi 7 um und bei folgender Function bringt er einen "Inline Assembler Syntaxfehler" in der Zeile "cmp ecx,dword ptr[dw]" ich kann leider keine Assembler, vllt könnt Ihr mir da helfen.

Vielen Dank im vorraus!

Delphi-Quellcode:
function createAk(var ss:TAllowKeys):TAllowKeys;
var
 stp: pointer; // stZugr
 ssp: pointer; // allowkeys
 dw: dword; // anzahl
begin
 stp:=@stZugr[1];
 ssp:=@ssAllk;
 dw:=14;
 asm
        push bp
        push esi
        push edi
        mov edi,stp // stZugr
        mov esi,ssp // ssAllk
        mov word ptr[esi],0 // leer
        xor ecx,ecx
@@1: mov eax,esi // ssAllk[0]
        cmp ecx,8
        jl @@2
        inc eax // ssAllk[1]
@@2: mov ebx,eax // ssAllk
        xor eax,eax
        mov al,byte ptr[ebx] // byte->al
        cmp byte ptr[edi+ecx],'0'    // st.offen?
        jne @@4
        mov al,byte ptr[ebx]
        or eax,edx
        mov byte ptr[ebx],al
@@4: inc ecx // weiter
        cmp ecx,dword ptr[dw] // 14-st?
        jge @@e
        imul edx,2
        cmp edx,256
        jb @@1
        mov edx,1
        jmp @@1
@@e: pop edi
        pop esi
        pop bp
 end;
 result:=ss;
end;
Florian
  Mit Zitat antworten Zitat