Only answers to 6,7,8 needed Below is the code for openO system call in the user
ID: 3717124 • Letter: O
Question
Only answers to 6,7,8 needed
Below is the code for openO system call in the user program. open: push dword mode push dword flags push dword path mov push eax int eax, 5 80h 1. What is the purpose of the first threeinstructions (push)? 2. What is the significance of number 5? 3. What is the use of 80h? 4. Where will register eax be used? 5. How will register eax be used? 6. How does instruction int affect the mode? 7. What is the problem caused by the instruction int for VMM? 8. Why is the TLB entries not useful when the OS memory is virtualized?Explanation / Answer
Hey this very simple assembly program to understand i will provide u one by one answer to this problem..
ANS=
2) What is exactly eax register use in this program. So whenever system call execute at that time system already defined that what is the value of eax that represents the kernel work means
IF eax=1 then system call exit() will execute internally ok.
If eax=5 then system call open,truncate,create will execute internally
this type of code will use in file system design in linux programming.
Follow nasm instruction set or linux system call manual page on internet u will ubderstand whole things.
At the time of system call execution system check the value of eax register for now keep thsi in mind. ok.
3) Use of 80H means execute system call.
execute kernel mode system call whatever it is by setting value of eax register and other registers value also but mostly depend on eax register...
int 80 tell us that it is the system call instruction.
4) register use when system call execution time system check what is value og eax reg ang then kernel work according that.
5)same as 3 and 4
1) push mode means kernel mode or user mode push on stack for execution.
push dwords flags means ur pushing ALL flags on to stack which is used by ur program.
Program use system stack to execute whole instruction.
Thank You.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.