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.
Greetings,
I am converting PortixOS to 32-bit protected mode. It will be programmed in pure ASM. As of I abandoned RSFS and put back FAT12/FAT16, I got an idea about self hosting. This reminded me of good ol' real mode and TextLiner OS. So, when my OS (in protected mode now!) will have self-hosting, what would you prefer for creating programs? A include file with call table, or a documentation about system interrupt, INT 30h? What is better? I am gonna ask professionals - YOU.
How would you do system calls with a call table in protected mode? Would you run everything in ring 0? Or are you talking about call gates or something...?
Top three reasons why my OS project died:
Too much overtime at work
Got married
My brain got stuck in an infinite loop while trying to design the memory manager
inflater wrote:Greetings,
I am converting PortixOS to 32-bit protected mode. It will be programmed in pure ASM. As of I abandoned RSFS and put back FAT12/FAT16, I got an idea about self hosting. This reminded me of good ol' real mode and TextLiner OS. So, when my OS (in protected mode now!) will have self-hosting, what would you prefer for creating programs? A include file with call table, or a documentation about system interrupt, INT 30h? What is better? I am gonna ask professionals - YOU.
inflater
In creating the call functions, they in turn call INT30 for you. It's by definition a wrapper, something that performs the same function but with less of a hassle about things you don't care about, and easier modification and setting of things you do care about.
Colonel Kernel wrote:How would you do system calls with a call table in protected mode? Would you run everything in ring 0? Or are you talking about call gates or something...?
Hi,
i don't know how to say it right,but I mean this as a call table in ASM:
This calltable is included in every FASM PortixOS program and loaded run-time.
Or you just prefer PDF or wiki or HTML or ...,documentation about the system INT? Like
AH=04h - print string in ES:ESI
AH=05h - reboot
?:-) What do you prefer more?
@Colonel: My system is singletasking at present...
I wrote that post using a mobile phone, small keyboard and GPRS connection. So I will explain it more to be understandable:
If you want to use "PortixOS API" (when programming in 32-bit ASM now!), you must insert following line:
include PortixOS.inc
into the code, and load the calltable to memory by using preddefined basic OS interrupt INT 40h, AH=(lets say) 0Ah. And then you can use something like this:
We will see the results of the vote. I am now working on the "PortixOS programming reference" in PDF that explains the INT 30h, the main sys interrupt. If the vote for interrupts will win in the next 5 days, i will cancel the call table.
Colonel Kernel wrote:How would you do system calls with a call table in protected mode? Would you run everything in ring 0? Or are you talking about call gates or something...?
Well I think it can be done by creating system task with many threads responsible for doing what was 'ordered' by user program. So program is calling system function which is telling system task to do something (for example read data from COM port). This way it's quite easy to do blocking and non blocking calls and there is no situation in which one task is taking all system time by constantly calling system functions.
crackers wrote:Well I think it can be done by creating system task with many threads responsible for doing what was 'ordered' by user program. So program is calling system function which is telling system task to do something (for example read data from COM port). This way it's quite easy to do blocking and non blocking calls and there is no situation in which one task is taking all system time by constantly calling system functions.
My question was based on the assumption that inflater was planning to use ring 3 for programs and ring 0 for the kernel. In that situation direct function calls between rings wouldn't be allowed (this is what I assumed "call table" meant). But since that's not the case, I guess just about any mechanism will do.
Top three reasons why my OS project died:
Too much overtime at work
Got married
My brain got stuck in an infinite loop while trying to design the memory manager