| CompOrg Fall 2003 Homework #4 FAQ | ||
| CompOrg Home | HW4 Description | ||
| Question: | Should it be possible to use your "/bin/ls" execing program/string just to test things out? |
| Answer: | Yes, the sample code that
execs ls should work, as long as the stack has room to handle the
stuff that program pushes on the stack (before issuing the call to
exec). So - you may need to move the stack pointer away from the
program ( |
|   |   |
| Question: |
|
| Answer: |
call 0x0812345 in your assembly code. You can use indirect call or jump
instructions (remember how a switch statement jumps to the right place
in a call table?). So get the right address in a register and you can
do this: |
|   |   |