Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I am trying to write to a register and want to be able to set the register as a variable. However, when I try to use inline assembly in order to set the register to a variable I get an error saying "Bad register name '%0'"
FunnyGuy9796 wrote:Arson my ignorance but wouldn’t ‘addr’ and ‘val’ translate to ‘%0’ and ‘%1’?
No. You need to pass them as inputs, and also mark clobbers. They are not associated with your arguments by default - and your arguments don't exist in registers by default in x86-32 anyway as they are passed on the stack. You need explicitly ask for them to be put into registers for use by the inline assembly.