Jump to content

Assembly in delphi

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
untitled_1

untitled_1

    Learning Programmer

  • Members
  • PipPipPip
  • 89 posts
Is there any way to embed assembly into Delphi?

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts

untitled_1 said:

Is there any way to embed assembly into Delphi?
On Win32 there is an inline assembly option, much like GCC in its own format.
var
  ByteVar: Byte;
  WordVar: Word;
  IntVar: Integer;
       .
       .
       .
asm
  MOV AL,ByteVar
  MOV BX,WordVar
  MOV ECX,IntVar
end;

Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.