flat assembler
Message board for the users of flat assembler.
Index
> Linux > Linux console programs - What do they expect from the OS? |
Author |
|
JohnFound 06 May 2014, 22:21
Linux programs need only int 80h system calls. Nothing else. Using libraries is optional and only if you need function, you do not want to implement yourself.
|
|||
06 May 2014, 22:21 |
|
Endre 08 May 2014, 09:28
I guess, int 0x80 is also optional, but of course without it your program won't be too verbose . Nevertheless if you just want to write a beautiful infinite loop program (e.g. when testing the scheduler of the kernel) than you need even no system-calls. Or if you don't like infinite loops then you can exit your program for instance through an intentionally generated segmentation fault . This latter method is my favorite. Every developer uses it fairly often, of course not always intentionally, but it does not count .
|
|||
08 May 2014, 09:28 |
|
axlucas 11 Oct 2014, 04:12
Thank you, guys. I'm reviving this to ask basically the same question in a more specific way, now that I've been reading some more.
What I would like to do is compile a Linux kernel with a few more things, but without any library at all, that is, not even the GNU C Library. Then create my own command line interpreter. I understand that almost no GNU/Linux application will be able to run in an OS like that, but I can write programs that only use int 80h to access everything and these programs would be able to run on this bare system as well as on any Linux distro without the need of any dependencies. Am I right? One more thing. I could get the modular part of ALSA, for example, and add it to the kernel, but access it through int 80h, just the device, and leave out the ALSA library and I would have sound without needing the GLIBC. Am I right at this? Thanks in advance again! |
|||
11 Oct 2014, 04:12 |
|
gens 11 Oct 2014, 21:36
yes
but you would have to use alsa's kernel api it's not documented much, so gl |
|||
11 Oct 2014, 21:36 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.