flat assembler
Message board for the users of flat assembler.

Index > OS Construction > new contest of the contest of the new year?

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 30 Dec 2009, 21:46
hello dear fasm friends.

now, it's time to me to propose a contest.
and what sort of contest?

THE contest of 2010 year. ending in 2011

not only writing an os.

but writing many oses with a common platform.

simple and easy to understand.

one executable format common to every oses: .com.(org100H)
it is not a DOS contest.
it is an OS contest.

required stuff:

boot loader using partitions or not.
512 bytes loading a .com program that will be a kernel.
and this kernel loading .com code, executing it, and returning to the kernel with..
Code:
RET    


maybe, if you want, return with DOS int20h, but really not needed as the PSP have a far return inside.
psp calling .com code, .com code return with ret, and psp retunr with retf.

after:

any code from anybody useable( assume the original author is OK)

bring the code as GPL. OPEN SOURCE only!!!!!!!!!!!!!!!!!!!

keyboard int based on a bitmap to be compatible with every other oses.

mouse optional.

VGA, VESA. as you want.






the main thing to do is:

a set of applications to show how much your os can be usefull.

and of course, i don't participate, i just test entries on my machines, and your apps with my os.

i don't propose my FOOL os because i don't want to be boring.


now, i want replies to developpe the final rules.

and one thing, i want the participation of:

revolution
vid
borsuc
dex
bitrake
bitshifter
dosin
coddy41
dos386

and everybody who post more than 1 message a week.

this contest is not a commercial contest, just an extension of the browser challenge.

remember, this challenge, not dead, need an os to work.

then, the wining os will be the platform for this contest.

i don't want to see still made os.

i want a from scratch os, using a lib or not.

and if really you want to see my entry, i can do it.

THANKS and happy noël (joyeux christmas)

and if this contest die, i will ask for its autodestruction because this board is still full of junk.
Post 30 Dec 2009, 21:46
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20305
Location: In your JS exploiting you and your system
revolution 31 Dec 2009, 02:41
edfed: I won't be able to participate. I already have OSes for x86 and it would not be fair of me to simply post my pre-existing code and claim it was done for this contest.
Post 31 Dec 2009, 02:41
View user's profile Send private message Visit poster's website Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 31 Dec 2009, 04:29
Count me in Smile
Post 31 Dec 2009, 04:29
View user's profile Send private message Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias 31 Dec 2009, 15:12
edfed wrote:
hello dear fasm friends.
now, it's time to me to propose a contest.
and what sort of contest?
THE contest of 2010 year. ending in 2011
...
it is an OS contest.

required stuff:

boot loader using partitions or not.
512 bytes loading a .com program that will be a kernel.
and this kernel loading .com code, executing it, and returning to the kernel with..
Code:
RET    

...
VGA, VESA. as you want.

and one thing, i want the participation of:

revolution
vid
borsuc
dex
bitrake
bitshifter
dosin
coddy41
dos386

and everybody who post more than 1 message a week.
...
i want a from scratch os, using a lib or not.

and if really you want to see my entry, i can do it.
...
Yes, in my opinion, you should be a participant.

No, I don't think it is polite to insist on anyone submitting an entry, however, I am sure that you meant it not as a Napoleanic imperative, but rather, as a gentle hint to encourage those who may be a tad reluctant to reveal our ignorance.

Some other famous folks, not yet on your list:

MazeGen
Madis
Smiddy (retired, but here's his brilliant contribution: )
http://board.flatassembler.net/topic.php?t=5911
Bogdan
DOS386
Feryno
Matt86
baldr
Shoorick
F0dder
rugxulo
Artlav
DJ Mauretto
pfranz
comrade
Octavio
ManOfSteel
windwakr
mikegonta
neville

and of course, last, and certainly not least, Tomasz himself, who has been threatening to reveal his original operating system ?"Titan", for many years now....

I am quite confident that another dozen names of folks, who have contributed OS related code during the past half decade, could be added. Some of them may wish to serve as judges, if they will not have an opportunity to submit an entry!

Thanks for your idea, Edfed, well done! Happy New Year.
Smile
Post 31 Dec 2009, 15:12
View user's profile Send private message Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 31 Dec 2009, 17:38
Actually, it feels good to have had my name mentioned on that list Smile
Post 31 Dec 2009, 17:38
View user's profile Send private message Reply with quote
Coddy41



Joined: 18 Jan 2009
Posts: 384
Location: Ohio, USA
Coddy41 31 Dec 2009, 18:04
Well, I might be able to compete.. Sounds fun either way Very Happy

_________________
Want hosting for free for your asm project? You can PM me. (*.fasm4u.net)
Post 31 Dec 2009, 18:04
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 31 Dec 2009, 21:09
I think we need away for ASM Hobby OS Dev's to work together to make coding for these OS as easy as for C coded OS, its no good trying to work on one OS as we have differant design ideas.
So we should come up with a common API (to run in pmode,maybe later long mode) that users the same regs or structs and int number.

This way the same programs would run on all ASM OS, if we based the API on menuet32/KolibriOS we could even run the code in windows.
See here: http://board.kolibrios.org/viewtopic.php?f=23&t=1273
Post 31 Dec 2009, 21:09
View user's profile Send private message Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin 01 Jan 2010, 04:48
the contest would be fine.. I would be interested in helping..
Though I have a lot going on right now! Wink

but are you looking for realmode os or PM os?


Dex - That would be cool! Cool
If you what to start a project like this let me know!
Post 01 Jan 2010, 04:48
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 01 Jan 2010, 19:20
dosin wrote:

Dex - That would be cool! Cool
If you what to start a project like this let me know!


Sure but this is a different project than edfed, as edfed seem to be a realmode OS, i would use MiniDos, for this project, but rules say new code, but have so little time. Crying or Very sad .
Post 01 Jan 2010, 19:20
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 02 Jan 2010, 01:35
the first version of os proposed for this contest, as a starting point, would be able to do that:

show the list of demo from 256b demo archive, launch them, and return form them... and by the way, software multitasking in real mode can be interrresting.... Wink

the archive can be downloaded there
Post 02 Jan 2010, 01:35
View user's profile Send private message Visit poster's website Reply with quote
Coddy41



Joined: 18 Jan 2009
Posts: 384
Location: Ohio, USA
Coddy41 02 Jan 2010, 13:43
Oh, I have to use real mode... must have missed that >> In that case I cannot
compeat I just got to being able to use p-mode, and I do not want to leave it so soon
as I learned it how to get into it.I want to learn a bit more in P-mode before I go
back into real mode.
Post 02 Jan 2010, 13:43
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 02 Jan 2010, 14:07
the code from any real mode program can be executed in protected mode if set as 32 bit code.
use32 powa!!


one important thing is to deal with realmode.

boot is in real mode

a good bootloader should be only in realmode
no p mode switch inside
because of the need of nested boot possibility.

Code:

boot:
call whatisthismachine ;return machine geometry
load kernel ;somewhere in the machine
call kernel 
display bootlist ;when return from kernel, the boot is still there, with the boot menu, fast reboot possibility.
reboot
...

kernel:
call setenvironment ; load demos in ram, set pointers, etc...
there:
call environment
if exit, then, ret
jmp there

environment:
display 256bdemolist
choose 256bdemolist 
load 256bdemo as [demo]
call [demo] ;if demo =!0 only
ret
    

something simple like this can be done for pm and rm indiferentlly, but for pm, you need more code. like PM2RM switch, gdt, idt, pagedir,etc...
Post 02 Jan 2010, 14:07
View user's profile Send private message Visit poster's website Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 02 Jan 2010, 19:37
edfed wrote:
a good bootloader should be only in realmode
no p mode switch inside

I agree.
Let the kernel decide what mode it runs in.
Then a common boot-loader can be used for any kernel.
This way a good booter can be reused forever.

I use BOOTPROG BOOT12 for this.
It loads COM or MZ kernel.
It also fills in the BIOS parameter block during install.
This is good because i have non-standard floppy.
Where i have 128 bytes per block, and common is 512.

_________________
Coding a 3D game engine with fasm is like trying to eat an elephant,
you just have to keep focused and take it one 'byte' at a time.
Post 02 Jan 2010, 19:37
View user's profile Send private message Reply with quote
XanClic



Joined: 06 Sep 2009
Posts: 16
Location: Germany
XanClic 02 Jan 2010, 19:53
bitshifter wrote:
edfed wrote:
a good bootloader should be only in realmode
no p mode switch inside

I agree.

I don't. Very Happy
Because:
bitshifter wrote:
Then a common boot-loader can be used for any kernel.
This way a good booter can be reused forever.

See GRUB. Wink

GRUB is a really good and sophisticated bootloader. It's really not hard to make an existing kernel multiboot-compliant (except you make heavy use of BIOS interrupts) to use it with GRUB.

If you really need to use BIOS interrupts, you can still use VM86 to achieve that.
Post 02 Jan 2010, 19:53
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 02 Jan 2010, 23:41
see that GRUB is not a fasm code.

the more evident rule of this contest is:
only code compilable with fasm can be used.

then, you are free to write a fasm version of grub also.

Quote:
128bytes per block

does the bootsector (org7C00h) from this disk measure 128 bytes or 512bytes?
does the bios load 512 bytes or 128 bytes at bootup?
Post 02 Jan 2010, 23:41
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 03 Jan 2010, 00:39
at least:

EVERYBODY is invited to participate to this contest.
everybody means EVERYBODY, no distinction, and consequently, i will then participate too.

as a first entry for generic bootloader:

Code:
org 7c00h 
    

org it at 7c00h, do not use the mystic org 600h that will confuse a lot of beginers, and induce problems when accessing bootloader as an object located at linear [0000:7c00h]

Code:
copy the 512 bytes from 0000:7C00h at 0020h:7C00h
jump to 0020h:7C00h 
    

now our bootloader can reboot from any drive
Code:
load the first entry as a simple file system
    

ram oriented only, with 32 bits segmented pointers.
;first entry will be a 64kb .com code, then, devellopment on dos, with dos oriented or not code can be used.
Code:
call kernel as a .com program
    

of course, no linux, windows, or OS specific code allowed because of the dos ORG 100h compatibility.

remember, real mode code that load .com code. because bios is in real mode, boot is in real mode, every PC support real mode, every x86 compatible PC support real mode code, with VGA graphics and 32 bits registers.
bios is allowed of course, and you are invited to do your own set of hardware functions, to be bios independant, but your code SHOULD be PC compatible and FASM compilable.
then, you all see the only solution is to work on a REAL mode OS contest.
because it is the only mode that EVERYBODY can code for, and boot from.

i invite you to code in use16 fashion, but use of 32 registers allowed.
EAX, eBX, ECX, EDX, ESI, EDX, EBP, ESP, [ESI+EAX*8+23],; etc...

code optimisation from any topic in fasm can be used.

demo and applicatoins to expend the interest of your entry can be inspired from any program you know.

for exemple, pong, space invaders, tetris, mario, sonic, pacman(puckman), survivve, briks, tic tac toe,puzzle,,, as GAMES applications.

edit.com, fasm.com, partman.com, as system utilities.

the best is to load everything at bootup (with the bootloader) and play with it in RAM only.
no disk operations after this step,to be carefull!

everything must fit in the 1mega bytes of real mode ram.

then, you are very limited, and it is a good thing.
it is more easy for everybody to code something that's use only a defined amount of ram.

memory mapping:
from what i've tested, you can use real mode memory as beloww without any problem Very Happy

Code:
segment:
0000h IVT, BPB, BOOT,REBOOT, modify with care!!
1000h code/data
2000h code/data
3000h code/data
4000h code/data
5000h code/data
6000h code/data
7000h code/data
8000h code/data
9000h code/data or framebuffer (320*200 optional double buffering)
0A000h mode 13h screen memory (320*200)
0B000h mode 3h memory (text 80*25)
0C000h BIOS do not use
0D000h BIOS do not use
0E000h BIOS do not use
0F000h BIOS do not use
    


this dos approach have a limit: use the less dos based functions in the contest.
use the less disk as possible.

the memory map above means we have 9*64kbytes to play with.
enormous if it is executable code. made with fasm from scratch.

the stack will be a full 64kb segment, it is easyer to make.
for example, ss=05000h,eSP=0, 5 like S.

the screen will be in 320*200 because i don't like the text mode ar all.
but if you want to make the system user interface in text mode, it is allowed. every validated text and graphix 256b demos should work indiferentlly.

the boot loader don't display anythoing, it will only load a .com code, like a simple hello world program, and launch it.

contest.boot:
good luck for this bootloader contest.
if contest.boot = OK, then, contest.kenrel.




never overwrite the bootloader when it is at 0020h:7c00h with non boot code.



when kernel return to boot (with a ret), the bootlader at 0020h:7C00h will reload a bootsector from the desired drive, for exemple, BIOS 80h, at 0000h:7c00h, and execute it.
Post 03 Jan 2010, 00:39
View user's profile Send private message Visit poster's website Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 03 Jan 2010, 03:25
Yes it loads 512 bytes like normal...
I formatted the disk with windows utility then peeked at it to see that.
This is an old floppy from an old PC, maybe thats why its not standard 512?

Also, for BIOS compatability i think we should org at 0 and far jump to 0x07C0:0x0003.
Code:
org 0
jmp 0x07C0:start
start:
    

Then no matter where the BIOS starts us, we know CS=0x07C0 and IP=0x0005


Last edited by bitshifter on 23 Mar 2010, 11:20; edited 1 time in total
Post 03 Jan 2010, 03:25
View user's profile Send private message Reply with quote
XanClic



Joined: 06 Sep 2009
Posts: 16
Location: Germany
XanClic 03 Jan 2010, 11:50
edfed wrote:
see that GRUB is not a fasm code.

the more evident rule of this contest is:
only code compilable with fasm can be used.

then, you are free to write a fasm version of grub also.

I'm sorry, but my statement wasn't related to this contest, I justed wanted to clarify what's a good bootloader. Wink
Post 03 Jan 2010, 11:50
View user's profile Send private message Visit poster's website Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin 03 Jan 2010, 18:59
Quote:
I justed wanted to clarify what's a good bootloader.


yes grub is popular.. but would not be hard to recreate in Fasm...
I started one a little while ago and is almost finished..

would install and work simular to grub ...
Though its not based on any of there code...
Post 03 Jan 2010, 18:59
View user's profile Send private message Reply with quote
XanClic



Joined: 06 Sep 2009
Posts: 16
Location: Germany
XanClic 03 Jan 2010, 19:15
It's really similar? Can load ELFs, modules, gunzip everything, supports different filesystems such as FAT12, ext2 or iso9660? Cool Smile
Post 03 Jan 2010, 19:15
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.