Could you make for me compatible with both 32/64 bits this
asm code (now is x86 only), because I'm not familiar with Assembler
Delphi-Quellcode:
procedure ByteToHex(
const AValue: Byte; Buffer: PAnsiChar);
asm
JMP @@Convert
@@HexTable:
DB '
0123456789ABCDEF';
@@Convert:
PUSH ECX
// Invalid combination of opcode and operands
XOR ECX, ECX
MOV CL, AL
SHR CL, 4
MOV CL, @@HexTable.Byte[ECX]
// Assembler instruction requires a 32bit absolute address fixup which is invalid for 64bit
MOV BYTE PTR [EDX], CL
MOV CL, AL
AND CL, 0Fh
MOV CL, @@HexTable.Byte[ECX]
// Above error also here
MOV BYTE PTR [EDX+1], CL
POP ECX
end;