Inline Assembler in Oxygene?

Hello Dudes,

My question for you is, is it possible to use an assembler embedded in oxygene code, like it was possible in the object-pascal times?

Would be really great to know! :slight_smile:

Best regards,

PS. And when its not, is it possible to get somehow a workaround to get it workking in oxygene?

Shpend

Island supports it (But in a limited way)

see https://github.com/remobjects/IslandRTL/blob/master/Source/PosixHelpers.pas

(movq)

Is it somewhere documented How limited the ASM-Keywords are?

BTW: Is it limited because of internal issues or just that there were no need to add more asm-stuff to the functions possibility?

It’s essentially a 1:1 mapping of clang/gcc extended inline asm as documented here:

https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html

The reason we call it limited is that there’s almost no error handling and the syntax is bothersome.

What are you trying to accomplish exactly? The LLVM optimizer is hard to beat with manual asm code, unless you want to do something that’s not supported by it of course.

1 Like

Actually, Carlo, I am currently working with thise guy here, www.handmadehero.org

He is trying to develop a complete action-adventure-game in raw and minimalistic C - totally from scratch! No Engine, No renderer, no soundengine, no input, EVERYTHING FROM SCRATCH :smiley: :smiley:

So my goal is it, to write this in minimalistic oxygene - code, like he does in C, just in oxygene. And in some of its videos he says, that he will use at a certain point asmbler-code to speed up the code, so I just wanted to know if oxygene could make use of asm and luckly it does :sweat_smile: :sweat_smile:

And I am not sure, If I can totally ignore asm-statements when he actually makes use of it.

Yes should work fine. Presuming they use clang or gcc already, the asm statements should be easy to port.

Whom do you mean with “they”?

the code he uses. I thought you were going to port it.

If not, there’s rarely a need to resort to asm.

Aha, you mean the handmadehero-guy.

Im a not sure what you mean with “port”, while he is devleoping the stuff, I listen to his videos and write the stuff on my own in oxygene, simoultanesly.

Sry when I missunderstood you^^