Full ASM OS?
My OS is:
Boot sector - 100% ASM (could anyone do it in other language?)
Bootloader (IRQs, INTs,etc) - 100% ASM
Drivers - 100% ASM - under development
Kernel - 60% Borland Pascal, 40% ASM
inflater
Boot sector - 100% ASM (could anyone do it in other language?)
Bootloader (IRQs, INTs,etc) - 100% ASM
Drivers - 100% ASM - under development
Kernel - 60% Borland Pascal, 40% ASM
inflater
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English )
Derrick operating system: http://derrick.xf.cz (Slovak and English )
I could start porting emacs to use lua if you wantedniteice wrote:My plan was to embed Lua in the kernel. One would be able to modify the entire kernel on-the-fly, uploading new code at any point. Insecure? Quite. It would be awesome to actually pull off thoughAlboin wrote:An internal scripting language for use in the OS sounds pretty cool....
(Actually, after finishing a basic "learning OS" I'm going to try something like that... kernel upgrades without rebooting!)
-
- Member
- Posts: 97
- Joined: Thu Mar 15, 2007 2:27 pm
Like patches? What if two programs try modify the same stuff.ehird wrote:I could start porting emacs to use lua if you wantedniteice wrote:My plan was to embed Lua in the kernel. One would be able to modify the entire kernel on-the-fly, uploading new code at any point. Insecure? Quite. It would be awesome to actually pull off thoughAlboin wrote:An internal scripting language for use in the OS sounds pretty cool....
(Actually, after finishing a basic "learning OS" I'm going to try something like that... kernel upgrades without rebooting!)
It's a hobby OS, and unless you plan for it to become more, it doesnt matter how secure it is. It's likely nobody but you will have any idea how exactly it works.Insecure? Quite.
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
I am working on a ARM port of my ASM OS, and i must say, that to port something in ASM, is not that hard. The hard part is doing anything the first time.
To get to the stage that taken me 1 year the first time (x86), took me about 1 month to port it to Arm. This is on top of leaning ARM way of doing things.
I remember the days i spend trying to compile simple C code, written for a differant C compiler, the error messages it did not seem too portable between differant C compilers, never mind prosesors
To get to the stage that taken me 1 year the first time (x86), took me about 1 month to port it to Arm. This is on top of leaning ARM way of doing things.
I remember the days i spend trying to compile simple C code, written for a differant C compiler, the error messages it did not seem too portable between differant C compilers, never mind prosesors
How is this? Doesn't the ARM architecture have different instructions, and all? Wouldn't you have to rewrite every instruction to fit the ARM set? Hm...Dex wrote:I am working on a ARM port of my ASM OS, and i must say, that to port something in ASM, is not that hard. The hard part is doing anything the first time.
To get to the stage that taken me 1 year the first time (x86), took me about 1 month to port it to Arm. This is on top of leaning ARM way of doing things.
C8H10N4O2 | #446691 | Trust the nodes.
Re: Full ASM OS?
Hi,
When I get to this point I'll want to write a interpretted "intermediate language" - a portable low level language that looks a bit like assembly. Then I'll write a NASM/YASM assembler in this language, followed by a compiler for the language (and then compile the assembler and compiler).
Once I've done this I'll extend the interpretter and compiler to handle a "BASIC like" language. Lastly, I'll write an IDE in this "BASIC like" language (possibly followed by support for other languages - PASCAL, C, etc).
This mostly makes me "100% assembly" for the next 5 years at least...
Cheers,
Brendan
My (long term) plan is to write the kernels, some device drivers and a few other pieces in 100% assembly until I've got an OS that can handle a development environment on a few of my computer/s (rough GUI, file systems, etc).~ wrote:How many people are developing their OSes fully in assembly (or at least the main kernel/drivers), and why?
When I get to this point I'll want to write a interpretted "intermediate language" - a portable low level language that looks a bit like assembly. Then I'll write a NASM/YASM assembler in this language, followed by a compiler for the language (and then compile the assembler and compiler).
Once I've done this I'll extend the interpretter and compiler to handle a "BASIC like" language. Lastly, I'll write an IDE in this "BASIC like" language (possibly followed by support for other languages - PASCAL, C, etc).
This mostly makes me "100% assembly" for the next 5 years at least...
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.
Sure, but when you come down to coding your OS, most of the time is spent finding how something works and how you do certain parts of your code, once you have a road map (the OS your porting) and know what parts you need to port your OS, its much easier, has you know how it basically works and the writting the coding bit is only about 5% of the work.Alboin wrote:How is this? Doesn't the ARM architecture have different instructions, and all? Wouldn't you have to rewrite every instruction to fit the ARM set? Hm...Dex wrote:I am working on a ARM port of my ASM OS, and i must say, that to port something in ASM, is not that hard. The hard part is doing anything the first time.
To get to the stage that taken me 1 year the first time (x86), took me about 1 month to port it to Arm. This is on top of leaning ARM way of doing things.
Here is a very easy example, anyone who know x86 asm OS Dev, will see the basic of porting there OS to say ARM
Code: Select all
:****************************************;
; ARM BootLoader. ;
;----------------------------------------;
; Prog by Dex. ;
; Coded with FasmARM. ;
; Part of the the x86 to ARM Dex4u port. ;
; C:\fasmarm ArmBoot.asm ArmBoot.bin ;
; ;
; C Bamford.2006(c) ;
;****************************************;
format binary
org 0 ; code starts at offset 0.
use32 ; use 32-bit code.
b reset ; This in x86 is the same as "jmp label"
b undefined_instruction ; jump label.
b software_interrupt ; jump label.
b prefetch_abort ; jump label.
b data_abort ; jump label.
b not_used ; jump label.
b irq ; jump label.
b fiq ; jump label.
align 4
;********************************;
; just Loop For Now ;) ;
;********************************;
reset: ;label
LetsLoop:
b LetsLoop ;just loop forever
;********************************;
; just Loop For Now ;) ;
;********************************;
undefined_instruction: ;label
software_interrupt: ;label
prefetch_abort: ;label
data_abort: ;label
not_used: ;label
irq: ;label
fiq: ;label
LetsLoopForNow:
b LetsLoopForNow ;just loop forever
times 20000- ($-0) db 0 ; just pack the file out with 0
Now with a little work leaning differant instructions, you should be able to set your int up no problem, this is just a example it the same for all the building blocks of the OS.
NOTE: You would put code to deal with int etc at the right label.
DexOS running on GBA/DS http://www.dex4u.com/images/gbademo.jpg
This is cool debugging your ported OS, with your own OS
http://www.dex4u.com/images/gp2x.jpg
Last edited by Dex on Sat Mar 31, 2007 12:32 pm, edited 1 time in total.
-
- Member
- Posts: 97
- Joined: Thu Mar 15, 2007 2:27 pm
Ask the lead dev, personally I don't know the specifics; and even putting aside the (arguable) speed gains, it's a modern, real time, self hosting, GUI operating system (w/ IP stack and all the features you'd expect) written completely in ASM (with the exception of a few ports, namely SDL and Doom, which were compiled with the sphinx compilier, it has REALLY bad optimization). It definitely demonstrates it's possible to write such a big project in ASM, and well.
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
What about ongoing maintenance? What you say may be true for the first time you re-write your OS for another architecture (it's rewriting, not porting, if you literally have to rewrite every line of code). But what happens if you've got 8 different versions of your OS for 8 different architectures, and have to deal with fixing bugs across all of them?Dex wrote:I am working on a ARM port of my ASM OS, and i must say, that to port something in ASM, is not that hard. The hard part is doing anything the first time.
This may not matter to you as a hobbyist, but if your OS is ever to gain wide-spread acceptance, you should expect to spend a lot of time maintaining and enhancing it. What happens when you want to add a new feature to the OS on all of the architectures you support? It would be a pain in the butt, IMO.
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
But that would be the same for say linux, you need to adapted your OS for differant architecture, so you are always going to need, differant team to bug fix and maintain the differant prosesor ver'sColonel Kernel wrote: This may not matter to you as a hobbyist, but if your OS is ever to gain wide-spread acceptance, you should expect to spend a lot of time maintaining and enhancing it. What happens when you want to add a new feature to the OS on all of the architectures you support? It would be a pain in the butt, IMO.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
At least as portable as any other VAXocentric language, certainly.
So what this for http://www.dslinux.org/bugs/
Do not get me wrong, i am not saying C is not portable, it's very portable, just like a tent is very portable, but tents make s**t home's .
Do not get me wrong, i am not saying C is not portable, it's very portable, just like a tent is very portable, but tents make s**t home's .