Probably a crazy question, in an area where I have no experience, but I figure I'll ask anyway...
Is there any way to write snippets of assembly in VO?
I need to do a bit of 64 bit arithmetic on some FILETIME structures (https://docs.microsoft.com/en-us/window ... e-filetime). Every forum post I read for C++ says that the C++ runtime has long contained support for 64 bit calculations on a 32 bit process. As far as I'm aware VO uses the C++ runtime (at least we ship it with our app), so I'm wondering if I might be able to directly access some of those instructions.
I know C++ has some support for embedding assembly (https://en.cppreference.com/w/cpp/language/asm), I don't suppose VO has some hidden feature to allow that, without essentially writing a virus?
I'll probably just end up providing the 64 bit arithmetic functions via a C++ DLL taking _WINULARGE_INTEGER structures as parameters. My first thought was to write a 64 bit adder in VO. I figured this might still be an interesting question to have answered, however.
Any other suggestions?
Cheers.
Assembly in VO
Assembly in VO
Hi Robert,
of course you can write a DLL in VO to use in X# or C#.
But be aware that VO is 32 bit only, so this limits your X# application to 32 bit too.
The only possibility to overcome this bitness gap is to build a COM module in VO and use that in X#.
But IMHO the .NET framework has much more possibilities than VO.
Wolfgang
of course you can write a DLL in VO to use in X# or C#.
But be aware that VO is 32 bit only, so this limits your X# application to 32 bit too.
The only possibility to overcome this bitness gap is to build a COM module in VO and use that in X#.
But IMHO the .NET framework has much more possibilities than VO.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
-
- Posts: 12
- Joined: Tue May 02, 2017 6:14 am
Assembly in VO
Hi Wolfgang.
I need it to work the other way around. I'm planning to write a DLL in C++ or some other language to be able to perform arithmetic on 64bit numbers while in a 32 bit world. The C++ runtime apparently supports that. VO will call the DLL to perform any operations on the 64bit numbers.
C++ 64bit subtract for example:
VO will interface using the _WINULARGE_INTEGER structure, but can only see it as 2xDWORD values.
Although I'm going with the DLL approach, I was still curious if I could somehow write assembly directly in the VO IDE.
Cheers.
I need it to work the other way around. I'm planning to write a DLL in C++ or some other language to be able to perform arithmetic on 64bit numbers while in a 32 bit world. The C++ runtime apparently supports that. VO will call the DLL to perform any operations on the 64bit numbers.
C++ 64bit subtract for example:
Code: Select all
PCPP_API void sub64(ULARGE_INTEGER &num1, ULARGE_INTEGER &num2, ULARGE_INTEGER &result)
{
result.QuadPart = num1.QuadPart - num2.QuadPart;
}
Although I'm going with the DLL approach, I was still curious if I could somehow write assembly directly in the VO IDE.
Cheers.
Assembly in VO
Hi Robert,
as long as there is the possibility to call a C/C++ API, you can do that of course also in VO and don't need to write a C++ DLL.
On the VO side you have to deal with the structure as AFAIK there is no datatype for 64 bit numbers - or you can put that in a class and work with that one.
Wolfgang
as long as there is the possibility to call a C/C++ API, you can do that of course also in VO and don't need to write a C++ DLL.
On the VO side you have to deal with the structure as AFAIK there is no datatype for 64 bit numbers - or you can put that in a class and work with that one.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Assembly in VO
Robert,
This allowed you to store assembly source code in your VO repository and link the assembled code with your VO EXE/DLL.
Maybe you can find information about that in old conference notes or on the web.
Robert
A long time ago there was a project call NASM (Nantucket Assembler) . This was something that Ralf Saborowski did.robert.pope wrote:Hi Wolfgang.
Although I'm going with the DLL approach, I was still curious if I could somehow write assembly directly in the VO IDE.
This allowed you to store assembly source code in your VO repository and link the assembled code with your VO EXE/DLL.
Maybe you can find information about that in old conference notes or on the web.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Assembly in VO
IIRC, that should have been at Devcon 98. Was rather cool, it was enough to add a "NASM" in front of you method deklaration...
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
Assembly in VO
Guys,
in the SDT 04/1999 there´s an article from SABO about NASM.
If anyone is interested, take a look at Frans Wauters VO site and search for filenames like 'NASM'.
https://vo.wautersit.com/pubcavo
btw. There are even patches available for VO 1.0
regards
Karl-Heinz
in the SDT 04/1999 there´s an article from SABO about NASM.
If anyone is interested, take a look at Frans Wauters VO site and search for filenames like 'NASM'.
https://vo.wautersit.com/pubcavo
btw. There are even patches available for VO 1.0
regards
Karl-Heinz
Assembly in VO
Hi Robert and anyone else that is interested,
Attached is a version of NASM for VO 2.8 from Frans de Witt (found in my extensive archives).
And no, I have never tried to use it myself.
Good luck
Don
Attached is a version of NASM for VO 2.8 from Frans de Witt (found in my extensive archives).
And no, I have never tried to use it myself.
Good luck
Don
- Attachments
-
- TS_NASM28.zip
- (7.31 MiB) Downloaded 77 times