Cosmos icon indicating copy to clipboard operation
Cosmos copied to clipboard

This would fix all my problems!

Open CorgiMasterEpic opened this issue 1 year ago • 3 comments

What is the usecase for this plug Just a plug to allow inline asm.

Complexity of plug Most likely easy but could get complicated.

Describe alternatives you've considered Not really.

Additional context I Love the work of the cosmos team but its really hard to do things complex without jumping around in memory and i was thinking about a program loader to load asm instructions into memory like modern OSes but id be nice to have inline asm; i don't know how plugs work and i don't know how to make one so can i like have more documentation then https://cosmosos.github.io/articles/Kernel/Plugs.html or like make one?

Thank you for your help!

CorgiMasterEpic avatar Jul 19 '25 02:07 CorgiMasterEpic

when creating a plug, you can use asm (like how delegate plug using asm code)

but, be aware that you can't run C# method on asm plug, or during the build steps it would stop (as it's evaluated on compiler level)

orr you can just use delegate pointer for running applications.

ADev531 avatar Jul 19 '25 03:07 ADev531

a sample on how to do it https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.Core_Asm/MemoryOperations/MemoryOperationsCopy128BlocksAsm.cs

zarlo avatar Jul 19 '25 04:07 zarlo

Thank you so much for your help!

CorgiMasterEpic avatar Jul 19 '25 13:07 CorgiMasterEpic