agssim: implement argv passing to program
commitce6cfa7a1a7f0382f0d8abacaefdfd8095de642c
authorrofl0r <rofl0r@users.noreply.github.com>
Sat, 14 Dec 2019 03:44:53 +0000 (14 03:44 +0000)
committerrofl0r <rofl0r@users.noreply.github.com>
Sat, 14 Dec 2019 03:44:53 +0000 (14 03:44 +0000)
tree4f0c78766c27b5e0cc5db6b0d84fab3f6e9bc5b8
parentc9415e6735e9ec8b7a749566ca786091a0b13977
agssim: implement argv passing to program

command line options can now be passed to programs in the following
way:

    agssim -- options go here

or

    agssim file.s -- options go here

when program execution starts, register op contains a pointer to
an array of the following contents:
[argc]
[argv0]
...
[argvN]
[0]
[envvar0]
...
[envvar0]
[0]
[auxval0]
...
[auxvalN]
[0]

this is pretty much the same way x86_64 sysv abi does it.
the array contains pointer to strings, which are stored at the
beginning of the stack.
environment and aux are not yet implemented and always empty.
agssim.c