flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 29 Aug 2008, 07:59
ring0 wrote: Hello All, |
|||
![]() |
|
vid 29 Aug 2008, 08:03
First of all, if you are writing hobby OS now, why bother with 16 bit stuff? go 32 bit, and use all those hundreds of MBs of RAM above the first megabyte
|
|||
![]() |
|
revolution 29 Aug 2008, 08:12
vid wrote: First of all, if you are writing hobby OS now, why bother with 16 bit stuff? go 32 bit, and use all those hundreds of MBs of RAM above the first megabyte |
|||
![]() |
|
sinsi 29 Aug 2008, 08:23
Using UMB's means using V86 mode and paging - too hard imho.
If you're going to go that far you may as well use 32bit PM. The BIOS RAM thing is chipset/mobo specific, because if you can write to the BIOS code anything could happen. With the VESA LFB, I think you can still write to A0000 - it's like the first 64K of VRAM is still accessible...not sure about this though. |
|||
![]() |
|
tom tobias 29 Aug 2008, 09:48
Agree with vid and sinsi. revolution's point that one should start with easy tasks, before attempting something as complex as an operating system, is well made, however, in my opinion, it is far easier to "RUN" on the flat terrain that is 32 bit protected mode, without segments, i.e. with all segments set to same address, than to "walk" in the swamp of the 1970's programming environment, called "real mode". I believe it is simpler to skip the first megabyte, or even the first ten megabytes. There are hundreds of megabytes to choose from....
|
|||
![]() |
|
sinsi 29 Aug 2008, 10:23
tom tobias wrote: There are hundreds of megabytes to choose from.... Heh heh even though most of us only use the first couple (hey, my code works above the one megabyte limit. Now what do I do?) ![]() |
|||
![]() |
|
ring0 31 Aug 2008, 06:23
Thankyou everyone for the responses. I understand the arguments both for and against protected mode. My current OS is FRM but I intend to write 2 OS - one FRM and one PM. You will understand that in FRM every byte counts and hence my initial question.
For those who may have an interest in this area of programing please refer to this URL: http://www.uwe-sieber.de/umbpci_e.html Thanks. |
|||
![]() |
|
revolution 31 Aug 2008, 06:33
ring0 wrote: You will understand that in FRM every byte counts and hence my initial question. |
|||
![]() |
|
ring0 31 Aug 2008, 06:37
Quote:
NO I mean FRM. I have set FS & GS to 4G so code space (CS, DS) is still limited. |
|||
![]() |
|
sinsi 31 Aug 2008, 08:17
FRM=Flat Real Mode I guess?
ring0 wrote: You will understand that in FRM every byte counts With flat mode, it's only the code and stack that need to be <1MB. If you can write an OS that uses 640K for code, go for it. From your link, Quote: UMBPCI is chipset dependent and brings several restrictions Yes, like not working on my box...tried this a while ago. |
|||
![]() |
|
neville 03 Sep 2008, 10:09
Hi ring0
I've written a Memory Operating System in FRM which you can download here http://w17.easy-share.com/1701069287.html (bootable floppy) or at http://w13.easy-share.com/1701082584.html (bootable CD). As you will know, FRM is great because you can easily access all 4Gb of addressable RAM using 32-bit "offsets". The only limitation is that executing code must be 16-bit offsets in the first megabyte+64K up to FFFFh:FFFFh. All FAMOS kernel code resides in this area, but I put "user" application code and some FAMOS utilities in "32-bit" RAM space, but execute them in low RAM as required. Also it helps if all programs implement a kind of "harvard" structure, separating executable code and data. Then all data can remain in 32-bit RAM and accessed with DS=0 which leaves about 638K of executable code space (after taking out the IVT and BIOS data areas etc.) When you select any memory entry in FAMOS it will tell you its exact memory address range. I thought about re-mapping the UMB area for a little extra executable code space but decided against it because it is too chipset dependent and would make FAMOS less likely to boot successfully. There are already more than enough hardware differences to deal with ... Sinsi is right, even when VESA LFB mode is used, the A000 segment still maps to the first 64K of the LFB, in "parallel" with it. BTW, now I want to develop a 64-bit version of FAMOS, but unless a 64-bit FRM can be discovered it looks like it will have to be in PM "longmode". So it looks like I'll be writing a PM OS too, although I hate the thought of having to re-write all my favourite BIOS interrupts. I see you and sinsi are both from down under too, just over the ditch from me in fact. Say hi to Fred Dagg for me ... _________________ FAMOS - the first memory operating system |
|||
![]() |
|
ring0 05 Sep 2008, 08:19
Neville,
Thanks for the response. I have indeed downloaded FAMOS and was impressed with the amount of effort you have put into it. I will take the hint and give up on the UMB area for now. Do you have any plan to make FAMOS open source? Does FAMOS use a 32 bit segment data segment? Good luck with the long mode transition. I live in Cairns but was in Taranake recently for the MAARI hookup - cold & rough seas! |
|||
![]() |
|
sinsi 05 Sep 2008, 09:30
The trouble with 64-bit instructions is that they only work in long mode (not even in pmode) so there is no way of encoding a 64-bit address either directly or using a 64-bit register (there isn't a 64-bit address override).
As for a 64-bit long mode OS, once you set up your page tables to map all of the memory, you can leave it and use your OS just like a 32-bit PM OS. Just because you have to enable paging to get into long mode doesn't mean you need to use paging. |
|||
![]() |
|
neville 07 Sep 2008, 02:00
ring0 wrote:
Quote: Do you have any plan to make FAMOS open source? If there's enough interest in FAMOS to develop the Memory OS concept then yes, I would go the open source way. So I guess it depends on the response. It's early days yet, but so far the response hasn't exactly been overwhelming... Quote: Does FAMOS use a 32 bit segment data segment? Yes, I think (if I understand your question correctly). It runs Flat Real Mode, set up via a 32-bit R/W data descriptor in the GDT used for DS, ES, FS and GS intially. I visited Cairns in 2005 - warm enough even in July! Went north as far as Daintree when the tarseal ran out ![]() _________________ FAMOS - the first memory operating system |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.