Recently, I came across an interesting presentation discussing inline ASM generation in Javascript optimization. The presentation can be found at the following link: .
In another paper located here: https://sites.google.com/site/juliangamble/Home/Compilers%20Tutorial%202006-09-16.pdf?attredirects=0&d=1, there is a discussion on generating ASM in Scheme to be executed within a separate OS process.
But what if you want to generate and execute ASM within your current process without the need for separate steps of linking and executing?
I imagine this process involves generating the ASM, writing the bytes to a memory area (code as data), adding a function header and return (compatible with a C caller), converting that data pointer to a function pointer, and then calling it (from code as data to code as code).
My questions are:
(a) What is the terminology used for this inline code generation and execution?
(b) Is there a straightforward 'hello world' C example demonstrating this available?