obtain pointer to variable in assembler
Posted: Sun Mar 04, 2018 1:07 am
I have found a way to obtain pointer to a variable in assembler code. Under normal circumstances, access to a local variable is restricted to the same ASM/code component and you can't pass it around. I have discovered a workaround that extracts the memory address (or a pointer) to any variable or array you choose.
This may come handy, expecially when you need to pass arrays between ASM components. It may also allow you to pass pointers to an array to a function from the ASM component - coupled with the machine code injection discovered by MyCo this could allow some pretty useful things. For example, one may execute FFT on various arrays, simply by having the FFT machine code in a string in ruby and calling it from ASM component.
This may come handy, expecially when you need to pass arrays between ASM components. It may also allow you to pass pointers to an array to a function from the ASM component - coupled with the machine code injection discovered by MyCo this could allow some pretty useful things. For example, one may execute FFT on various arrays, simply by having the FFT machine code in a string in ruby and calling it from ASM component.