AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Simple asm from x86 to x64

Ein Thema von WojTec · begonnen am 11. Apr 2017 · letzter Beitrag vom 12. Apr 2017
 
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

Simple asm from x86 to x64

  Alt 11. Apr 2017, 17:56
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;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:23 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz