Date: Tue, 15 Jan 2019 12:58:20 +0000 From: Lorenzo Salvadore <phascolarctos@protonmail.ch> To: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: if userland in asm, no need for libc? Message-ID: <J_qTow5gXx1lin3NNGlIU4Bls-dwLhlD0FkHcPmPy5e1Yq4iAX5DL46C70nUHfeIgin4sJV7BsP1ydXJOmxZbPotYLmBbxfPPNptBTdF3II=@protonmail.ch> In-Reply-To: <201901151224.x0FCOHbM016508@sdf.org> References: <201901151224.x0FCOHbM016508@sdf.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> in continuum to my previous mail about libc; > if the whole of userland and various other toolkits were written > in assembly language, would there be no need for libc, that is > if "c" were not needed to be supported at all? > do assembly language programs have the capacity to make kernel > calls directly? i.e., without going through any libraries? > pardon my naive questions, i don't have a background in computer > science nor enough self-training. Yes, you can make kernel calls directly. See here for example: https://www.freebsd.org/doc/en/books/developers-handbook/x86-system-calls.h= tml Still, I discourage you from using Assembly too much: it is not easy to wri= te in Assembly, don't use it if you can do what you want to do in a higher lev= el language. You should rather use Assembly only for low level interaction wit= h hardware or to optimize code when compilers do not already optimize enough for your tastes/needs. Lorenzo Salvadore.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?J_qTow5gXx1lin3NNGlIU4Bls-dwLhlD0FkHcPmPy5e1Yq4iAX5DL46C70nUHfeIgin4sJV7BsP1ydXJOmxZbPotYLmBbxfPPNptBTdF3II=>