-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A short manual, please #1
Comments
So, the tricky bit about Swizzle is that there's a value table (val) and a function table (iset). remap is effectively the only way to jam something into an instruction table slot, so that it gets directly executed, rather than just hitting ivar, idigit, inop, or an existing function. In most of the example programs, we took the results of a dlsym call into libc and inserted it into a function table slot so that we could effectively call useful c functions from swizzle code. The brainfuck interpreter (bf.swz) is a great example of remap, where we rebound the basic math functions to brainfuck symbols instead, effectively transforming the swizzle interpreter into an extended brainfuck interpreter at runtime. |
Hi, I am still trying to understand how Swizzle works. Some programs in the examples dir look like pure magic to me however. Wouter |
I just added your recursive Fibonacci example (with some slight modifications). I created swizzle functions for the DUP and SWAP. DUP is just Rob |
Hi,
I am investigating Swizzle, even extended it with a REPL and replaced the iset functions with clang's code blocks. Howerer I do not understand everything. Am I supposed to learn the language by reading the source code? Also: are recursive functions possible?
Maybe it's a good idea to extend the README a little bit.
Kind regards,
Wouter Boeke
The text was updated successfully, but these errors were encountered: