Einzelnen Beitrag anzeigen

jbg

Registriert seit: 12. Jun 2002
3.483 Beiträge
 
Delphi 10.1 Berlin Professional
 
#3

AW: Simple asm from x86 to x64

  Alt 11. Apr 2017, 19:25
You could try this code. It is even slightly faster than your assembler code if you activate the compiler's code optimization.

Delphi-Quellcode:
procedure ByteToHex(const AValue: Byte; Buffer: PAnsiChar);
const
  HexChars: array[0..15] of AnsiChar = '0123456789ABCDEF';
begin
  Buffer[0] := HexChars[AValue shr 4];
  Buffer[1] := HexChars[AValue and $F];
end;

Geändert von jbg (12. Apr 2017 um 12:04 Uhr)
  Mit Zitat antworten Zitat