How to load pointer...

Hier könnt ihr sowohl zur x86 Architektur als auch zu Win32ASM Fragen stellen.

Moderatoren: crack, Krüsty, Marwin

Antworten
Ignat
Alter Hase
Beiträge: 80
Registriert: Samstag 2. August 2003, 11:13
Kontaktdaten:

Beitrag von Ignat » Dienstag 12. August 2003, 16:29

Hi! people!
I want to find the fastest way
to load the pointer from stack to ds:di!
What do you think?

--------------------------------------------------------------------------------------
Rußland
If the ship don't know where to go - it has no fair wind...

Benutzeravatar
Marwin
Moderator
Beiträge: 307
Registriert: Donnerstag 8. Mai 2003, 21:19
Wohnort: Seelow, Deutschland
Kontaktdaten:

Beitrag von Marwin » Dienstag 12. August 2003, 20:52

also SS:SP =] DS:DI?

Ich würde es folgendermaßen machen:

4 Bytes:

Code: Alles auswählen

lea di, sp; 1 clock cycle
push ss; 3 clock cycles
pop ds; 3 clock cycles
Marwin

Ignat
Alter Hase
Beiträge: 80
Registriert: Samstag 2. August 2003, 11:13
Kontaktdaten:

Beitrag von Ignat » Mittwoch 13. August 2003, 00:12

Well, I do it nearly so, but my friend said that
I should use shl, shr for it.
I think shl isnt so fast and have a lot of probelm, isnt it?
Do you know another way to load it?

--------------------------------------------------------------------------------------------
Rußland
If the ship don't know where to go - it has no fair wind...

Benutzeravatar
Marwin
Moderator
Beiträge: 307
Registriert: Donnerstag 8. Mai 2003, 21:19
Wohnort: Seelow, Deutschland
Kontaktdaten:

Beitrag von Marwin » Mittwoch 13. August 2003, 10:02

Nein, ich glaube das ist der schnellste Weg.

Aber wie soll man das mit SHL, SHR machen?

Marwin

Ignat
Alter Hase
Beiträge: 80
Registriert: Samstag 2. August 2003, 11:13
Kontaktdaten:

Beitrag von Ignat » Mittwoch 13. August 2003, 11:16

To be honest, I dont know... [_[
I dont ask my friend to show me.
May be he loads from stack to register full element and than...
When I ask him Ill show his "method" :)...

---------------------------------------------------------------------------------------
Rußland
If the ship don't know where to go - it has no fair wind...

Antworten