so ginge es auch, wenn die high/low-DWords des Doubles in H und L stehen und die umgedrehten bytes nachher in den DWords H2, L2 stehen sollen:
Delphi-Quellcode:
asm
mov eax, H
bswap eax
mov edx, L
bswap edx
mov H2, edx
mov L2, eax
end;
und um die beiden einzelnen DWords des Doubles in die Variablen H und L zu bekommen, kannst du sowas hier nehmen:
Delphi-Quellcode:
var H, L: Integer;
D: Double;
PD: ^Integer;
begin
D := 1234;
PD := @D;
H := Integer(PD^);
Inc(PD);
L := Integer(PD^);
end;
p.s.: ungetestet!
edit: bswap vertauscht einfach die bytes des Arguments, also aus z.b. "$ABCD" wird "$DCBA"
See my shadow changing, stretching up and over me.
Soften this old armor. Hoping I can clear the way
By stepping through my shadow, coming out the other side.
Step into the shadow. Forty six and two are just ahead of me.