Michael P67985

Current status: "Thank You for a terrific product. I've waited decades for affordable Delphi IDE with power. User since 1st version in early 90's." - 3 years ago
Member since: Tuesday, 16 October 2018
Last login: 3 years ago
Profile viewed: 306 views

No Rank
Points: 0

Michael P67985 thanked Remy Lebeau in topic Inline Assembly 3 years ago
Michael P67985 replied to the topic 'Inline Assembly' in the forum. 3 years ago

Remy:

Thanks for the reply.

When I step to lodsb I can see it is loading a bad value in al register.

It works with 32bit registers but not 64

When I launch Delphi it's 32bit and this function I wrote in the 90's works in Delphi Community.
When I change target platform to 64-bit Windows and change registers accordingly it doesn't work.

I'm sure there's an easier way but I enjoy assembler

Read More...

Michael P67985 created a new topic ' Inline Assembly' in the forum. 3 years ago

function X_Value (const TestString: ShortString): ShortString;
asm
cld
push rsi { Was ESI, Ditto for other registers.}
push rdi
mov rdi,rdx
mov rsi,rax
xor rax,rax
lodsb
stosb
...
...
pop rdi
pop rsi
end;


This works in 32 but not 64bit? Help Please
Thanks

Read More...

Thank You for a terrific product. I've waited decades for affordable Delphi IDE with power. User since 1st version in early 90's.