Commit fe9b8884 authored by Danilo Sabato's avatar Danilo Sabato Committed by Alessandro Rubini

arch-bare-i386: enable argc and argv

parent 2ce296a5
......@@ -7,5 +7,17 @@
.extern ppsi_main
call ppsi_clear_bss /* In C, lazy me */
/* inspired from uClib */
popl %ecx /* Store argc into %ecx */
movl %esp,%ebx /* Store argv into ebx */
movl %esp,%eax /* Store argv into eax as well*/
movl %ecx,%edx /* Stick argc into %edx so we can do some math in a sec */
leal 4(%eax,%edx,4),%eax
pushl %eax /* Environment pointer */
pushl %ebx /* Argument pointer */
pushl %ecx /* And the argument count */
call ppsi_main
.end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment