EliteOS (If I am going soemthing wrong, please let me know)

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.
OpteronELITE

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post by OpteronELITE »

I have found a memory manager online and have studied it's code. It was written by Frank Millea. :D 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.
TheChuckster

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post by TheChuckster »


// Saves RAM!!!
free();
free();
free();
free();


That's a classic!!! ;D ROFL
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post 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? ;)
OpteronELITE

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post 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. :)
OpteronELITE

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post 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. :)
Therx

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post 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!!!
Tim

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post 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... ;)
OpteronELITE

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post 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.
Intel Macintosh Man

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post 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.
Tim

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post 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.
VB6_Dude

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post 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.
VB6_Dude

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post by VB6_Dude »

I wrote an operating system in Visual Basic also, but it requires Windows 95 or higher.
Therx

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post 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
Tim

Re:EliteOS (If I am going soemthing wrong, please let me kno

Post 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.
Post Reply