diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-08-31 23:46:58 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-08-31 23:46:58 -0700 |
commit | a413105a5dc4741ccd1c364cc82609d2aa25f6c5 (patch) | |
tree | d8b0015d9a61e52aaa10f9a32717a2844eb57fcb /subx/ex4 | |
parent | f1b3d7b96749165d771b279b56cc05447b7db3e0 (diff) | |
download | mu-a413105a5dc4741ccd1c364cc82609d2aa25f6c5.tar.gz |
4528 - commandline arguments working natively
Turns out I had totally the wrong idea. The stack at the start of the program doesn't contain 2 words, one for argc and a second for argv that must then be dereferenced to get to its contents (each a pointer to a string). It contains a word for argc, one for argv[0], another for argv[1], and so on. Many thanks to Jeremiah Orians and the #bootstrappable channel on freenode for showing me https://github.com/oriansj/mescc-tools/blob/master/test/test5/exec_enable_amd64.M1 which set me straight. I could just pop the args like that example does, but it seems slightly more elegant, given the current calling convention, to assume the imaginary caller handles the popping.
Diffstat (limited to 'subx/ex4')
0 files changed, 0 insertions, 0 deletions