Kernel library and user applications

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Locked
User avatar
i586coder
Member
Member
Posts: 143
Joined: Sat Sep 20, 2008 6:43 am

Kernel library and user applications

Post by i586coder »

HI,

How you doin fellows 8)

today i want to share with you some techniques about OS libraries
first i completely finished the my KERNEL LIBRARY its contain
  • FAT 12,16,32 driver
    open,close,read,write,seek,mkdir,mkfile,rmdir,rm,dir,cp,mv
    new FLAT-mode memory manager
    new device driver: ps/2 keyboard and mouse
    SVGA 24bit color-depth
    dynamic multi-tasking scheduler
and so good at this moment the library behave as expected but its size about 200KB and it's static library

so KERNEL ready, now i'm trying to write some application for my kernel but the question is

1. what is the best memory model for user application small,large,...,please notice the kernel it self is in small memory model
2. and how user application use system call , is by interrupt call like this(asm int 0x44 ;print text)
or via kernel library it self(the static 200K)


any advice :idea:

CheerS,
a.T.d
Last edited by Combuster on Wed Jul 15, 2009 11:32 am, edited 1 time in total.
Reason: ALL CAPS STINKS
Distance doesn't make you any smaller,
but it does make you part of a larger picture.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: KERNEL LIBRARY AND USER APPLICATION

Post by Solar »

i586coder wrote:2. and how user application use system call , is by interrupt call like this(asm int 0x44 ;print text)
You can do int / iretd, SYSENTER / SYSEXIT, SYSCALL / SYSRETURN, whatever the CPU and your OS supports. Each has its advantages and disadvantages.
...or via kernel library it self(the static 200K).
That's only possible if your OS doesn't do memory protection, i.e. the application itself is running in ring 0...
Every good solution is obvious once you've found it.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: KERNEL LIBRARY AND USER APPLICATION

Post by Love4Boobies »

i586coder wrote:1. what is the best memory model for user application small,large,...,please notice the kernel it self is in small memory model
The memory model you're talking about sound an awful lot like the ones used in Windows/DOS. If you have your own definition, would you mind sharing it with us?
2. and how user application use system call , is by interrupt call like this(asm int 0x44 ;print text)
or via kernel library it self(the static 200K)
The most elegant way to do it is to provide userland libraries (like the ones defined by POSIX, or Windows' DLLs) and have those use the actual trap mechanism. The trap itself can use the best option it has, checking what is implemented for that CPU beforehand. This way applications would have greater performance and the trap mechanism will be transparent to them.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: KERNEL LIBRARY AND USER APPLICATION

Post by Combuster »

First off: DO NOT SHOUT IN TOPIC TITLES

Also, I have a nagging suspicion its a 16 bit OS...
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
i586coder
Member
Member
Posts: 143
Joined: Sat Sep 20, 2008 6:43 am

Re: KERNEL LIBRARY AND USER APPLICATION

Post by i586coder »

Combuster wrote:First off: DO NOT SHOUT IN TOPIC TITLES

Also, I have a nagging suspicion its a 16 bit OS...
ARE you always like this :x , first i'm not shouting at all Combuster ,
you specially misunderstand me for all my posts so what is that man :!: :!: :!: :!: ,
i meant from title to make reader understand what is the post subject before
reading, and remember i'm not waiting for you to help me i said share some ideas only
second ,yap it's 16bit BORLAND C++ compiler whatever and it's not shame for that :evil:

finally you told me before this
If you have criticism, please let it be constructive rather than this kind of derogatory remarks, thanks.
ARE YOU REMEMBER :twisted:
Distance doesn't make you any smaller,
but it does make you part of a larger picture.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: KERNEL LIBRARY AND USER APPLICATION

Post by Combuster »

i586coder wrote: finally you told me before this
If you have criticism, please let it be constructive rather than this kind of derogatory remarks, thanks.
ARE YOU REMEMBER :twisted:
Ok, thread locked for
- not sticking to the smart questions rule (shouting, withholding information)
- insulting fellow forum users
- trolling by deliberately denying your actions
Apparently, your response conveys that you prefer giving up this thread for inflammatory reasons than getting an answer.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: Kernel library and user applications

Post by JamesM »

I agree with combuster and would like to add one thought:

A 16-bit DOS-style small memory model allows 64K of accessible memory. How have you managed to create a 200K compiled static library using that small memory model?
Locked