M
M
Matvey Nosurname2020-05-13 20:20:35
Informatics
Matvey Nosurname, 2020-05-13 20:20:35

How does the code access the operating system?

While studying programming, I came across the following question: "How does the code that I write access the system, its resources, connect to the Internet, and so on?" I understand that each programming language has its own function libraries and so on that access the system (invisibly from us). After all, this is the whole point of abstraction. But I want to understand such basic things. How can programs communicate with each other at all? They are simply loaded into the address space of the RAM. Please sort it all out for me.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-05-13
@matweykai

At the assembler level, you call a command according to a certain convention, write some value to registers or memory, and wait for some result according to the same convention.
Everything above is just a wrapper.
Probably worth starting from here
https://en.wikipedia.org/wiki/X86_calling_conventions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question