The Third 512-byte OS Contest!
-
- Member
- Posts: 566
- Joined: Tue Jun 20, 2006 9:17 am
Re: The Third 512-byte OS Contest!
Hi,
I might enter this time . I think its going to be fun
Regards
Shrek
I might enter this time . I think its going to be fun
Regards
Shrek
Re: The Third 512-byte OS Contest!
I think I'll give it a try, out of pure boredom. Can it use BIOS interrupts?
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: The Third 512-byte OS Contest!
Most certainly.
Re: The Third 512-byte OS Contest!
I think the best way to create a 512 byte OS is to use not assembler, but machine code. It has a few subtle advantages for size... such as every instruction is also a constant and also can be done mathematical things with..
Though, anyone that can code in x86 hex code is surely a madman..
Though, anyone that can code in x86 hex code is surely a madman..
Re: The Third 512-byte OS Contest!
@earlz:
I strongly disagree.
At first you can easy use db or other "insert raw data" instructions inside the assembler and still use the advantages of letting the assembler calculate jump points... etc.
And second if you use parts of the code as numbers you end up with pointing at there positions. But a pointer also is a number and therefor wasts space.
And you don't need to be a madman to know some basic x86 instruction numbers or bit patterns for the different registers in a instruction.
If you really run out of bytes you can perhaps use some polymorph code. But I think 512 byte is far enough to do some nice demos without memory squishing your code.
I strongly disagree.
At first you can easy use db or other "insert raw data" instructions inside the assembler and still use the advantages of letting the assembler calculate jump points... etc.
And second if you use parts of the code as numbers you end up with pointing at there positions. But a pointer also is a number and therefor wasts space.
And you don't need to be a madman to know some basic x86 instruction numbers or bit patterns for the different registers in a instruction.
If you really run out of bytes you can perhaps use some polymorph code. But I think 512 byte is far enough to do some nice demos without memory squishing your code.
- Masterkiller
- Member
- Posts: 153
- Joined: Sat May 05, 2007 6:20 pm
Re: The Third 512-byte OS Contest!
This is my first time I take part in such a competition. Last year I have programming only for web applications and it seems that there are a lot of stuff in assembly language I forgot.
So I took my old memory hex editor and make it fit in 512 (510) bytes, but it seems I was unable to fit editing part, so I end up with memory browser (I should remember how to work with processor registers ). At least now it works for all 4GB address space (in unreal mode).
Question: I use port 0x92 to enable A20; I tried to call the BIOS 0x2401/INT 15h - that works on bochs, but not in MSVrtualPC or real hardware; Anyway port 0x92 works everywhere I tested; Since that is not universal way (will not work everywhere) is that allowed in the competition?
So I took my old memory hex editor and make it fit in 512 (510) bytes, but it seems I was unable to fit editing part, so I end up with memory browser (I should remember how to work with processor registers ). At least now it works for all 4GB address space (in unreal mode).
Question: I use port 0x92 to enable A20; I tried to call the BIOS 0x2401/INT 15h - that works on bochs, but not in MSVrtualPC or real hardware; Anyway port 0x92 works everywhere I tested; Since that is not universal way (will not work everywhere) is that allowed in the competition?
- Attachments
-
- 512Program.rar
- About the competition
- (3.27 KiB) Downloaded 241 times
ALCA OS: Project temporarity suspended!
Current state: real-mode kernel-FS reader...
Current state: real-mode kernel-FS reader...
Re: The Third 512-byte OS Contest!
You are free to use it, but if someone test and it does not work, then they will not vote for it, so best to make it work on as many emulators or real pc as possable, but it only as far as giving you a better chance of winning.
Re: The Third 512-byte OS Contest!
My entry: a bootable etch-a-sketch.
- Attachments
-
- scribbler.asm
- (1.49 KiB) Downloaded 268 times
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: The Third 512-byte OS Contest!
Code: Select all
; TODO How do you do modulus in assembly?
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: The Third 512-byte OS Contest!
earlz wrote:I think the best way to create a 512 byte OS is to use not assembler, but machine code. It has a few subtle advantages for size... such as every instruction is also a constant and also can be done mathematical things with..
Though, anyone that can code in x86 hex code is surely a madman..
You know, assembly is just a fancy way of writing machine code. For example "INT 10H" will always end up as "CD10H" in memory, etc. There is absolutely no advantage (nor difference in functionality) and the whole reasons assemblers are used is so that no one needs to memorize machine code.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
- salil_bhagurkar
- Member
- Posts: 261
- Joined: Mon Feb 19, 2007 10:40 am
- Location: India
Re: The Third 512-byte OS Contest!
Heres my 512:
Porter, which allows you to send to or receive from I/O ports. You can reboot by sending 'FE' to 0064
Porter, which allows you to send to or receive from I/O ports. You can reboot by sending 'FE' to 0064
- Attachments
-
- porter.zip
- (1.68 KiB) Downloaded 254 times
Re: The Third 512-byte OS Contest!
Whoops, before I forget, here is my entry. It's a small PC Speaker and graphics demo under 512 bytes. Not as impressive as my Snake entry for the last contest, but it's still pretty good.
And if you're going to test this, DON'T use Bochs or Qemu because they don't emulate a PC speaker. Use something like Virtual PC or real hardware to try it out. Hope you like it.
BTW, the entry list sure seems more sparse than last time . But oh well, the entries that are there seem pretty great!
And if you're going to test this, DON'T use Bochs or Qemu because they don't emulate a PC speaker. Use something like Virtual PC or real hardware to try it out. Hope you like it.
BTW, the entry list sure seems more sparse than last time . But oh well, the entries that are there seem pretty great!
"Sufficiently advanced stupidity is indistinguishable from malice."
-
- Member
- Posts: 155
- Joined: Fri Oct 27, 2006 5:11 am
- Location: Oberbayern
- Contact:
Re: The Third 512-byte OS Contest!
Qemu, at least on Linux, does if you use:Zenith wrote:DON'T use Bochs or Qemu because they don't emulate a PC speaker.
Code: Select all
qemu -soundhw pcspk
MikeOS -- simple, well-documented x86 real-mode OS written in assembly language
http://mikeos.sourceforge.net
http://mikeos.sourceforge.net
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: The Third 512-byte OS Contest!
They both do.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: The Third 512-byte OS Contest!
lol, I got rick roll'd in Qemu, XD, sound worked fine in win. XP
My hero, is Mel.