your favorite function

Programming, for all ages and all languages.
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

your favorite function

Post by VolTeK »

what is your favorite function, whether its in C C++ assembly, or whether u made it. the function you use the most that your os or any of your development could not live without. or a function that you use alot. leave a name, but NO SOURCE CODE to that function. (duh) but if you want, tell what it does.


my favorite is the 16 bit assembly made print function, the first function i ever used the most



(Sorry if this is a pointless thread)
Last edited by VolTeK on Sat Nov 14, 2009 5:49 pm, edited 1 time in total.
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: your favorite function

Post by neon »

BlpDisplayString. Its basically printf() and works the same way but using the BIOS. Without it some of the libraries in my system would have been far more harder to debug. Other then that my io_services(), which is like a protected mode int86() routine that my boot programs use.

(This seems kind of a pointless thread...)
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Wolf9466
Posts: 12
Joined: Sun Jun 28, 2009 11:17 pm

Re: your favorite function

Post by Wolf9466 »

My favorite function is probably the WinSock connect() function.
User avatar
yemista
Member
Member
Posts: 299
Joined: Fri Dec 26, 2008 12:31 pm
Location: Boston
Contact:

Re: your favorite function

Post by yemista »

i like my cli function. i made it real efficient
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Re: your favorite function

Post by piranha »

get_next_task() :)

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: your favorite function

Post by 01000101 »

hack_the_gibson() 8)

On a more serious note, probably memclr().
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: your favorite function

Post by pcmattman »

TcpManager::receive - handler for all incoming TCP packets. It may not be perfect, but I still love reading it :)
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: your favorite function

Post by Brynet-Inc »

kitchen_sink()
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Re: your favorite function

Post by piranha »

Brynet-Inc wrote:kitchen_sink()
More like kitchen_sync()! Ahahahahaha!

More seriously though...I have changed my mind. Instead, it is oh_noes()! <--is my debug function.

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re: your favorite function

Post by Colonel Kernel »

objc_msgSend(), because so much relies on it.
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

Re: your favorite function

Post by thepowersgang »

I'd go for something like VFS_Open()
It is a thing of beauty (until you see it's helpers :D)
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
User avatar
zity
Member
Member
Posts: 99
Joined: Mon Jul 13, 2009 5:52 am
Location: Denmark

Re: your favorite function

Post by zity »

Mine is definitely printf(), couldn't imagine debugging without it :)
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: your favorite function

Post by Firestryke31 »

operator<<() because it's awesome. It can be like printf++.

display << "Hello World " << worldNumber << "!";

worldNumber can be an int, float, short, or class that implements it's own operator<< and changing between them is as easy as changing the declaration and making sure there's an operator<< for the type you want. You don't have to go through and change every %i to %f or whatever and risk changing the wrong one.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
User avatar
gravaera
Member
Member
Posts: 737
Joined: Tue Jun 02, 2009 4:35 pm
Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.

Re: your favorite function

Post by gravaera »

I don't mean to make a pointless post, but I really want to say:

Firestryke31++;

Nothing better than being able to transparently handle output on a variety of user-defined classes without anything more than a simple operator overload.

Apart from that:
memoryTrib::memoryTrib();

Because my memory manager was the absolute most challenging thing in my OS, and having almost perfectly completed it, I get a sense of accomplishment knowing I did it without following any tutorials, or copying code from anywhere. *Shrug*. And it's completely SMP safe :D

That's the best part.
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
dak91
Member
Member
Posts: 43
Joined: Thu Mar 12, 2009 3:27 am
Location: Sardegna (IT)

Re: your favorite function

Post by dak91 »

void *mm_alloc(size_t size);

I cannot imagine my os without this
Post Reply