If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
obtain pointer to variable in assembler
5 posts
• Page 1 of 1
obtain pointer to variable in assembler
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.
- Attachments
-
- pointerToVariable.fsm
- (1.2 KiB) Downloaded 1289 times
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: obtain pointer to variable in assembler
Hey that's interesting. I wonder: is there an advantage over the MemAddress prim? If your new method proves more stable, then I can see some applications like a fast wave reader, fast lookup tables etc. Wonder if this would also work in poly?
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: obtain pointer to variable in assembler
In the new version this will be very easy to do and it works in poly so you can make fast wave readers.
- Attachments
-
- mem.jpg (62.35 KiB) Viewed 16497 times
- adamszabo
- Posts: 667
- Joined: Sun Jul 11, 2010 7:21 am
Re: obtain pointer to variable in assembler
x64 assembler!!!!! :drolling:
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: obtain pointer to variable in assembler
I'll buy it ten times.
- francoisreme
- Posts: 29
- Joined: Wed Feb 15, 2017 4:01 pm
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 16 guests