Working on the OS FAQ [Mega-Tokyo Wiki]
Re:Working on the OS FAQ
Go ahead and edit the pages wherever you think information is outdated and missing! Your submissions will be peer-reviewed, but you don't need any up-front clearing to submit your knowledge.
Every good solution is obvious once you've found it.
Re:Working on the OS FAQ
I've added a section under the wiki regarding debuging with gdb and qemu.
Enjoy
Enjoy
Re:Working on the OS FAQ
There seems to be a flaw with Can I use some language other than C?
Is it me or does this rule out just about everything other than Assembly? Inline Assembly aside, Function Pointers don't really cut it for task switching.can you invoke code coming from raw data bytes with XYZ ? (that'll be mandatory for loading and running programs)
Re:Working on the OS FAQ
The page is indeed phrased a bit awkwardly. Even C cannot simply "jump to X and execute", unless the code at X is aware of the C function calling discipline. The point is that this discipline is what is considered "standard". So the question is as much "can you interface with C" as it is about "can you interface with ASM"...
I did two minor adjustments in phrasing; feel free to add / modify, I'm a bit busy atm...
I did two minor adjustments in phrasing; feel free to add / modify, I'm a bit busy atm...
Every good solution is obvious once you've found it.
Re:Working on the OS FAQ
Hiya,
I was poking around the OSFAQ and noticed the DMA page was buried in the wishlist section. Having way too much time on my hand's I heavily edited it and made a few additions.
The original text from Inglorion is still on the end of the page for the code examples.
I made reference to things that actually work on the DMA controller and the constraints that DMA programming has to deal with (only in first physical 16Mbytes , no more than 64k on 8bit transfers, 128k on 16 bit transfers etc.)....
A bit more work and more elaborate examples would flesh it out a bit and one day it might grow up to be in the main FAQ!
I was poking around the OSFAQ and noticed the DMA page was buried in the wishlist section. Having way too much time on my hand's I heavily edited it and made a few additions.
The original text from Inglorion is still on the end of the page for the code examples.
I made reference to things that actually work on the DMA controller and the constraints that DMA programming has to deal with (only in first physical 16Mbytes , no more than 64k on 8bit transfers, 128k on 16 bit transfers etc.)....
A bit more work and more elaborate examples would flesh it out a bit and one day it might grow up to be in the main FAQ!
Re:Working on the OS FAQ
Solar wrote: The page is indeed phrased a bit awkwardly. Even C cannot simply "jump to X and execute",
Code: Select all
(void (*X)())();
Re:Working on the OS FAQ
@Xardfir: Good work. I guess the text from Inglorion's page was just temporary. I tried to clean it up a bit..
Re:Working on the OS FAQ
I might be wrong, but that's a call, isn't it? I can't look up the standard right now, but is that guaranteed to not do anything fishy (i.e. implementation-defined) with the stack?Candy wrote:Solar wrote: The page is indeed phrased a bit awkwardly. Even C cannot simply "jump to X and execute",right?Code: Select all
(void (*X)())();
Every good solution is obvious once you've found it.
Re:Working on the OS FAQ
Well, yes, that would normally constitute a call which in a normal world should not change anything on the stack. However, as I can show (my OS is good at it), you can switch stacks within a C function. It can look kind of messy, but if you just don't return, nothing's going wrong whatever you do.Solar wrote:I might be wrong, but that's a call, isn't it? I can't look up the standard right now, but is that guaranteed to not do anything fishy (i.e. implementation-defined) with the stack?Candy wrote:Solar wrote: The page is indeed phrased a bit awkwardly. Even C cannot simply "jump to X and execute",right?Code: Select all
(void (*X)())();
In other words, that constitutes a jump to a location you just specify.
Re:Working on the OS FAQ
IMO this is redundant, because:If XYZ fits the other points and is an interpreted language then, can you invoke code coming from raw data bytes with XYZ, i.e. jump at a specific address and continue execution there?
"If XYZ fits the other points", among which is "interfacing with assembly", then you can jump and invoke and interface all you like, since you can do it in assembly!
so "interfacing with assembly" is a sufficient condition. IMO. (for being able to do things)
unless you can invoke every needed instruction without assembly, in which case your language IS assembly, or a superset of it
this is not so much about being able to build a RTL, but about being able to plug it into the language, and to get rid of the standard one. IMO.Are you able to build a self-sufficient run-time library to support language features you'll need ?
where does the _interpreter_ fit in this picutre? (or is it considered part of its runtime?)and is an interpreted language
you would need to port an interpreter AND runtime/whatever it needs to bare hardware. (unless a port already exists)
and if you are capable of running your stuff on bare hardware, then you don't need these things explained to you...
---
how's about:
-can your language interface with assembly, or otherwise accomplish everything that needs to be done? (specific memory layout, bits and bytes, registers, ports, etc.)
< can it do the job? >
-can programs in your language run on bare hardware? in case of interpreted languages, can the interpreter either run on bare hardware, or compile into assembly/binary that can?
< can you make it work in such environment? >
Re:Working on the OS FAQ
Hi,
How do you log into the Wiki, so it knows who's making changes? I tried using the same login details as this forum, but that doesn't seem to work...
BTW I added a new "Time and Date" page which will hopefully help (I saw it on the wishlist and was in the mood for starting it)...
http://www.osdev.org/osfaq2/index.php/TimeDate
BTW2 I also accidentally trashed the FloppyDriver page and then restored it to the previous/correct version. It's all fixed - I hope this won't matter or effect anything, and you all have my apologies in any case!
Cheers,
Brendan
How do you log into the Wiki, so it knows who's making changes? I tried using the same login details as this forum, but that doesn't seem to work...
BTW I added a new "Time and Date" page which will hopefully help (I saw it on the wishlist and was in the mood for starting it)...
http://www.osdev.org/osfaq2/index.php/TimeDate
BTW2 I also accidentally trashed the FloppyDriver page and then restored it to the previous/correct version. It's all fixed - I hope this won't matter or effect anything, and you all have my apologies in any case!
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re:Working on the OS FAQ
You need to create a page with a wiki-word for the name with which you intend to sign in. For example, you could create a page called BrendanTrotter, then use that name to sign in before making changes to the rest of the wiki. No password is required.Brendan wrote: Hi,
How do you log into the Wiki, so it knows who's making changes? I tried using the same login details as this forum, but that doesn't seem to work...
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
Re:Working on the OS FAQ
Hiya,
Completed the DMA page on the ToDo list, including improved code examples. I deliberately didn't put too many C examples in because the ASM examples are easily translated to outb() format.
Apart from any (unintentional) mispellings or wierd numbers it should be ready for the main FAQ.
Completed the DMA page on the ToDo list, including improved code examples. I deliberately didn't put too many C examples in because the ASM examples are easily translated to outb() format.
Apart from any (unintentional) mispellings or wierd numbers it should be ready for the main FAQ.
Re:Working on the OS FAQ
Hiya,
I just noticed a question about the 'A20 line' in the forum and noticed in the OSFAQ that there is no mention of the Pentium+ Fast A20 option in the 'Why can't I access all my memory?' page.
I have split the page into pre-pentium and post-pentium and added the code (all three lines of it!) to show how to switch the A20 line without bothering with the keyboard controller.
In additon I have added a shortened version of Dark Fiber's code based on info in The Undocumented PC.
There is an interesting page http://www.win.tue.nl/~aeb/linux/kbd/A20.html
dedicated to the A20 line and all it's wierdness, including BIOS routines that can switch A20 and a wierdism from Minix saying to send 0xFF of all things to the keyboard controller (0x64)! I have added the page link to the end of the A20 section and taken a copy for my own records.
I just noticed a question about the 'A20 line' in the forum and noticed in the OSFAQ that there is no mention of the Pentium+ Fast A20 option in the 'Why can't I access all my memory?' page.
I have split the page into pre-pentium and post-pentium and added the code (all three lines of it!) to show how to switch the A20 line without bothering with the keyboard controller.
In additon I have added a shortened version of Dark Fiber's code based on info in The Undocumented PC.
There is an interesting page http://www.win.tue.nl/~aeb/linux/kbd/A20.html
dedicated to the A20 line and all it's wierdness, including BIOS routines that can switch A20 and a wierdism from Minix saying to send 0xFF of all things to the keyboard controller (0x64)! I have added the page link to the end of the A20 section and taken a copy for my own records.
Re:Working on the OS FAQ
I would like to point out an error, serious depending on how much the reader knows, at http://www.osdev.org/osfaq2/index.php/BootSequence
After the subtitle "Master Boot Record" the addresses given are quite incorrect as is that of the checksum. The MBR/bootsector is usually loaded to addresses 0:7C00h or 7C0h:0, both addresses on the page have an *extra* zero. The code following is correct however. The 0AA55h checksum word is always located at offest 1FEh of the sector *regardless* of sector size, though another copy of it is allowed at the end of the sector too. I see no further errors.
Good luck guys and gals!
After the subtitle "Master Boot Record" the addresses given are quite incorrect as is that of the checksum. The MBR/bootsector is usually loaded to addresses 0:7C00h or 7C0h:0, both addresses on the page have an *extra* zero. The code following is correct however. The 0AA55h checksum word is always located at offest 1FEh of the sector *regardless* of sector size, though another copy of it is allowed at the end of the sector too. I see no further errors.
Good luck guys and gals!