mir ist bei diversen Tests aufgefallen, dass For/Next-Schleifen in BP recht langsam sind.
Hätte da evtl. jemand ein ASM-Beispiel wie man eine For/Next-Schleife in ASM umsetzen kann?
Da es in ASM ja vermutlich keine Loop-Befehle gibt (bilde ich mir zumindest mal ein), dürfte sowas in ASM dann ja vermutlich in etwa so ablaufen:
Code: Alles auswählen
StartWert = 1
EndWert = 2000000000
Schrittweite = 5
if Schrittweite = 0 then Goto EndForNextLabel
if Schrittweite > 0 and StartWert > EndWert then Goto EndForNextLabel
if Schrittweite < 0 and StartWert < EndWert then Goto EndForNextLabel
ForNextLoopLabel:
...
... diverser Code zwischen For/Next
...
StartWert + Schrittweite
if Schrittweite > 0 and StartWert <= EndWert then Goto ForNextLoopLabel
if Schrittweite < 0 and StartWert >= EndWert then Goto ForNextLoopLabel
EndForNextLabel:
ThanX und Gruß, PL.