diff --git a/questions.txt b/questions.txt new file mode 100755 index 0000000000000000000000000000000000000000..9b0cb1573a06d05005c947861540c7c2a2fb5ecd --- /dev/null +++ b/questions.txt @@ -0,0 +1,16 @@ +1. What is the macro corresponding to the syscall number in this case? + +Since a wrapper will push 3 parameters to perform a systemcall, and the first is the number +of the systemcall refering to the macros in the pintos/src/lib/syscall-nr.h. From this we can tell that the number 9 +refers to the macro write. + +2.What is the second parameter related to and what does it mean in this case? + +The second parameter is 1 which is the number of the file descriptor and in this case it means standard output. + +3. What is the string that the third parameter refers to? +"You got it, use your debugging skills during the labs!\n" + +p f-> esp + 8, gives us the memory address of the string corresponding to parameter 4. +It is then given a new pointer name, in our case "$5". To print the content we can now use, +x/s (char**) * $5, and it gives us the output. \ No newline at end of file