Page 2 of 2
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 8:36 am
by OpteronELITE
I have found a memory manager online and have studied it's code. It was written by Frank Millea.
Now I just need to get it to run when my kernel starts. How do I get mem.c to load? I am a n00b.
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 8:43 am
by TheChuckster
// Saves RAM!!!
free();
free();
free();
free();
That's a classic!!! ;D ROFL
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 9:04 am
by Pype.Clicker
OpteronELITE wrote:
Now I just need to get it to run when my kernel starts. How do I get mem.c to load? I am a n00b.
just link mem.o with your kernel, and voil?
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 9:34 am
by OpteronELITE
Okay, you mean like I did when I made my boiler plate? Problem is, I do not know how to initialize memo.o in C. Only in Assembly.
But hnx for responding, Pype.Clicker.
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 11:44 am
by OpteronELITE
UPDATE: I have integreated the memory manager into kernel.c
Now that i Have doen that, next I am integrating multi-tasking support. Are there any documents to help with this? By the way, I am not just cutting and pasting. I am examining teh code very careful make sure I understand exactly how it works.
When I create my next operating system (after I finish this one), I plan to code it without cutting & pasting at all.
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 1:06 pm
by Therx
Stuff on software multitasking is at:-
[0]
http://therx.sf.net/osdev/
Search for multitasking (one word)
[0]
http://my.execpc.com/~geezer/osd
Under multi tasking, take a look at the coop code using longjmp and setjmp
Pete
EDIT : Just seen function posted by Intel Mac Man at top. What the hell? a 930GB array. And random malloc and free calls. I hope for your sake you're just joking or are a bit drunk and didn't seriously think it would work!!!
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 1:54 pm
by Tim
I think we've been taken in by Intel Macintosh Man's ironic post:
For one thing your printf function needs rewritten to perl/glibcc standards.
Apparently his function conforms to perl/glibcc coding standards...
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 2:43 pm
by OpteronELITE
Thansk for the replies.
I just discovered a way of crashing Internet Explorer...
http://www.freewebs.com/prochat/site/ If IE loads an HTML file contianing only "<input type crash>" it will crash IE.
Also in XP, and maybe other versions, if you save a .htm file containing the data "<input type crash>" and double click it, it will crash Windows Explorer. I just thought I would let everyone know about this aweful problem with IE.
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 3:11 pm
by Intel Macintosh Man
Oh I forgot the malloc and free functions. No wonder it wouldn't compile. Also, make sure you have the LATEST version of QBasic.
Private Sub malloc(*mempointer)
Dim Memory[999999999] As Char
Memory == *mempointer++
End Sub
Private Sub free()
Dim Memory[9999999] As Char
Memory = "";
End Sub
Virtual address support will be added shortly.
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 3:41 pm
by Tim
Remember you can't call these QBasic subs directly from your OS code. You will need to use system("qbasic /run malloc") to make them work. Remember to use one free for every malloc, so try system("qbasic /run malloc free") if you have problems.
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 3:45 pm
by VB6_Dude
Here is a virtual memory manager written in Visual Basic...
uses Code.vbs
SimulateKeyPress("Ctrl-A")
SimulateKeyPress("Ctrl-C")
MousePos = 120, 90 'Right over RichTextBox
SimulateMouseClick()
SimulateKeyPress("Ctrl-V")
ClipBoard.Clear
ExeName = ForgroundWindow.ExeName
SendMessage(kill Forground window)
RichTextMemo.Text.SaveToFile("C:\pagefile.sys")
RichTextMemo.Clear
procedure SwapToRAM.OnClick
RichTextMemo.Text.LoadFromFile("C:\pagefile.sys")
MousePos = 120, 90 'Right over RichTextBox
SimulateMouseClick()
SimulateKeyPress("Ctrl-A")
SimulateKeyPress("Ctrl-C")
Shell(ExeName)
SimulateKeyPress("Ctrl-V")
RichTextMemo.Clear
Clipboard.Clear
I hope this helps!
Note: Requires Visual Basic to compile
Memory manager requires VB runtimes and Windows 95 or higher. Only works with programs similar to Microsoft Works or Notepad.
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 3:50 pm
by VB6_Dude
I wrote an operating system in Visual Basic also, but it requires Windows 95 or higher.
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 4:41 pm
by Therx
Is it me or isn't an 'OS' in VB a shell as it requires windows. I suppose if you were desperate to write a full OS in Basic you could first implement a Basic interpreter and the basic system functions and then use basic on top. Would be slow though.
Just a thought:-
When 32bit came about MS wrote windows on top of dos but as it changed mode etc. it was really an OS not a shell. When they do a 64bit OS for P4s will they write it on top of windows and if they did would that be a 'proper' OS
Re:EliteOS (If I am going soemthing wrong, please let me kno
Posted: Thu Jul 17, 2003 5:15 pm
by Tim
Depends whether you consider DOS to be an OS. The BIOS provided some of the device drivers, DOS provided the file system, and Windows provided the multi-tasking, the rest of the device drivers, and the GUI. Later versions of 16-bit Windows gave more control to the Windows core and less to DOS; hence we had 32-bit VxDs and 32-bit disk and file access. The Windows 95 Virtual Machine Manager (VMM) ran almost entirely in 32-bit mode but retained the capability to use DOS if needed (e.g. in safe mode).
Of course, the Windows NT range (NT, 2000, XP) never have been and never will be dependent on DOS. The only 16-bit code in these operating systems is in the boot loader and DOS emulator.