flat assembler
Message board for the users of flat assembler.

Index > Main > Cross-platform include files for C standard library function

Author
Thread Post new topic Reply to topic
leledumbo



Joined: 17 Sep 2010
Posts: 2
leledumbo 18 Sep 2010, 08:09
Is there any? I would like to be able to call C library functions from msvcrt.dll (Windows) and libc (Linux), before I made my own (you know how many functions are there), I hope somebody already creates it.
Post 18 Sep 2010, 08:09
View user's profile Send private message Send e-mail Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 841
Location: Jakarta, Indonesia
TmX 18 Sep 2010, 10:00
Post 18 Sep 2010, 10:00
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 19 Sep 2010, 13:26
That is not possible. Some things like "errno" or "stdin" are in reality a macro that expands to different things in different implementation of libc
Post 19 Sep 2010, 13:26
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
leledumbo



Joined: 17 Sep 2010
Posts: 2
leledumbo 23 Sep 2010, 11:14
Quote:

That is not possible. Some things like "errno" or "stdin" are in reality a macro that expands to different things in different implementation of libc

Hmm... maybe I could restrict not to use those macro aliased functions. I need to teach assembly and I guess calling OS C lib functions would be easier than calling kernel syscalls.
Post 23 Sep 2010, 11:14
View user's profile Send private message Send e-mail Reply with quote
janequorzar



Joined: 11 Sep 2010
Posts: 60
janequorzar 23 Sep 2010, 16:24
leledumbo wrote:
Quote:

That is not possible. Some things like "errno" or "stdin" are in reality a macro that expands to different things in different implementation of libc

Hmm... maybe I could restrict not to use those macro aliased functions. I need to teach assembly and I guess calling OS C lib functions would be easier than calling kernel syscalls.


As a teacher of how to make your own OS, one thing I have taught all my students.. DO it all in assembly first.. So that they KNOW what they are doing if and when they make the compiler for their OS. Once they know how everything works and they can get to the point of making a Kernel in assembly, then they understand fully how things work when it comes to the hardware. If you use C, its almost like they are taking a shortcut and will not truly see what its like to have full 100% control of the OS. Dont get me wrong, C is awesome and very powerful, but unless you go through a lot of code, which most students wont, they wont know whats going on behind the scenes.
Post 23 Sep 2010, 16:24
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 23 Sep 2010, 17:20
I too would prefer with showing them how to trace code with some nice visual debugger. That way it is much easier to "see result", and they see result of every instruction, unlike getting one output after doing many things related to calling output function they can't possibly understand yet.
Post 23 Sep 2010, 17:20
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.