Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#5

Re: [ASM] While-Schleife tut was sie will

  Alt 16. Feb 2007, 16:41
Zitat von glkgereon:
aber jetzt wird EDX regemäßig geleert :-/
Immer beim Aufruf von Rand...
Das hab ich auch grad festgestellt.. wahrscheinlich schreibt rand,bzw random was ins edx rein.. benutz doch mal ecx...

Bei mir siehts jetzt so aus:

Delphi-Quellcode:
procedure KA;
asm
         mov ecx,0
         cmp ecx,5
         je @end
  @loop: mov eax,2
         call rand
         cmp eax,1
         jne @loop
         inc ecx
         cmp ecx,5
         jne @loop
         mov eax,ecx
         call Add
  @end: ret
end;
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat