AGB  ·  Datenschutz  ·  Impressum  







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

Delphi Script and Inline ASM

Ein Thema von Ryzinski · begonnen am 13. Okt 2012 · letzter Beitrag vom 14. Okt 2012
Antwort Antwort
Ryzinski

Registriert seit: 2. Okt 2012
38 Beiträge
 
#1

Delphi Script and Inline ASM

  Alt 13. Okt 2012, 16:25
Hello!

I tried

- Pascal Script
- Fast Script
- Script Studio
- IdScript Engine

However none support inline ASM. Is there some library that DOES support it?
  Mit Zitat antworten Zitat
glotzer

Registriert seit: 15. Apr 2009
30 Beiträge
 
#2

AW: Delphi Script and Inline ASM

  Alt 13. Okt 2012, 16:29
You could try to use Free Pascal to compile your script with a little bit of glue code to pass parameters to it and get the result back. But thats probably not the easiest way.
  Mit Zitat antworten Zitat
Ryzinski

Registriert seit: 2. Okt 2012
38 Beiträge
 
#3

AW: Delphi Script and Inline ASM

  Alt 13. Okt 2012, 16:31
Maybe with NASM but would have to modify PascalScript?

EDIT: Would this be possible with .NET ?

Geändert von Ryzinski (13. Okt 2012 um 16:47 Uhr)
  Mit Zitat antworten Zitat
Benutzerbild von olee
olee

Registriert seit: 16. Feb 2008
Ort: Boppard
540 Beiträge
 
Turbo Delphi für Win32
 
#4

AW: Delphi Script and Inline ASM

  Alt 13. Okt 2012, 16:49
A script-engine with ASM is no script-engine!
What you want is a real leight-weight compiler to support injecting compiled code into your application or the like.
Björn Zeutzheim
Codename: Performancepumpe
  Mit Zitat antworten Zitat
Ryzinski

Registriert seit: 2. Okt 2012
38 Beiträge
 
#5

AW: Delphi Script and Inline ASM

  Alt 13. Okt 2012, 16:50
Yes however which compiler?
  Mit Zitat antworten Zitat
Medium

Registriert seit: 23. Jan 2008
3.686 Beiträge
 
Delphi 2007 Enterprise
 
#6

AW: Delphi Script and Inline ASM

  Alt 14. Okt 2012, 02:38
Since the only well developed and widely known (hence supported) Pascal compiler, with a license that would allow such things, is FreePascal, that would be your choice. However: It is not built for that purpose, and chances are, that you would need to make major adjustments to have it actually inject compiled stuff into a running process (which might even be noticed by AV programs).
An easier way would be, to use FPC to create a DLL with a predefined interface, and use that interface in your host application. But it still goes far further than scripting.

A great scripting tool that DOES on the fly compiling is Lua. The language then isn't pascal anymore, but since you mentioned .NET I gather that would not be an issue. There are at least two nice Lua bindings for Delphi that I have read about, so all to be done is defining the interface. The Lua runtime is free to ship with your program afaik, so it would provide you with all you need.

.NET would not be an easy option from what I know about it. The compiler is not free, so you'd at least need something that creates at least CL and has a fitting license. Having that CL injected into your process is a whole other story. I'd go for Lua. It's well established, well supported, and known as a tool many games even had made large time critical parts of them with it. And on top of that, the Lua language has some pretty neat features
"When one person suffers from a delusion, it is called insanity. When a million people suffer from a delusion, it is called religion." (Richard Dawkins)
  Mit Zitat antworten Zitat
Ryzinski

Registriert seit: 2. Okt 2012
38 Beiträge
 
#7

AW: Delphi Script and Inline ASM

  Alt 14. Okt 2012, 08:29
There is this for .NET => RemObjects Script 2.0 for .NET

And there is this code.google.com/p/managed-x86/

I guess you can execute asm then via .NET at runtime.
  Mit Zitat antworten Zitat
Benutzerbild von Sir Rufo
Sir Rufo

Registriert seit: 5. Jan 2005
Ort: Stadthagen
9.454 Beiträge
 
Delphi 10 Seattle Enterprise
 
#8

AW: Delphi Script and Inline ASM

  Alt 14. Okt 2012, 09:20
Crosspost http://stackoverflow.com/q/12873209/1744164
Kaum macht man's richtig - schon funktioniert's
Zertifikat: Sir Rufo (Fingerprint: ‎ea 0a 4c 14 0d b6 3a a4 c1 c5 b9 dc 90 9d f0 e9 de 13 da 60)
  Mit Zitat antworten Zitat
Antwort Antwort


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 05:13 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