about summary refs log tree commit diff stats
path: root/subx/test_layers
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-08-31 23:46:58 -0700
committerKartik Agaram <vc@akkartik.com>2018-08-31 23:46:58 -0700
commita413105a5dc4741ccd1c364cc82609d2aa25f6c5 (patch)
treed8b0015d9a61e52aaa10f9a32717a2844eb57fcb /subx/test_layers
parentf1b3d7b96749165d771b279b56cc05447b7db3e0 (diff)
downloadmu-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/test_layers')
0 files changed, 0 insertions, 0 deletions
b1a61c2fc75ab9fbee0'>^
45c08fea ^
e3092e7b ^

45c08fea ^
e3092e7b ^
45c08fea ^

e3092e7b ^


45c08fea ^
5497090a ^
45c08fea ^
e3092e7b ^

45c08fea ^
e3092e7b ^
45c08fea ^
e3092e7b ^
45c08fea ^


e3092e7b ^
45c08fea ^
5497090a ^
e3092e7b ^
45c08fea ^

e3092e7b ^
45c08fea ^
5497090a ^
45c08fea ^
e3092e7b ^
45c08fea ^
134dad7c ^
45c08fea ^

e3092e7b ^

c6c19a27 ^


45c08fea ^
e3092e7b ^
45c08fea ^













e3092e7b ^
f8c0ef3e ^


45c08fea ^
f8c0ef3e ^


45c08fea ^
cf9af278 ^
45c08fea ^

f8c0ef3e ^

f8c0ef3e ^


6a0f71b9 ^








5e9eff8c ^












1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115