I'm corrently working on changing examples from complex indirect addresssing mode into simple indirect addressing mode pieces. However, I've come across an example from the Based Mode, I'm unable to "transform".
Code:
move %eax, 28(%esp)
I've tried
addl $28, %esp
movl (%eax), %esp
This creates a segmentation fault; and I've no idea how else I should write it.
Another example, I've failed to "transform is
compl $4, 28(%esp)
-> into
addl $28, %esp
cmpl $4, %esp
However this is working, but it changes my output slightly, so it might not be correct as well.