Page 2 of 5
Re: The Third 512-byte OS Contest!
Posted: Fri May 15, 2009 1:47 am
by DeletedAccount
Hi,
I might enter this time . I think its going to be fun
Regards
Shrek
Re: The Third 512-byte OS Contest!
Posted: Sat May 16, 2009 6:27 pm
by scgtrp
I think I'll give it a try, out of pure boredom. Can it use BIOS interrupts?
Re: The Third 512-byte OS Contest!
Posted: Sat May 16, 2009 6:41 pm
by Troy Martin
Most certainly.
Re: The Third 512-byte OS Contest!
Posted: Sun May 17, 2009 1:22 pm
by earlz
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..
Re: The Third 512-byte OS Contest!
Posted: Sun May 17, 2009 3:15 pm
by Osbios
@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.
Re: The Third 512-byte OS Contest!
Posted: Wed May 20, 2009 2:00 pm
by Masterkiller
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?
Re: The Third 512-byte OS Contest!
Posted: Wed May 20, 2009 8:46 pm
by Dex
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!
Posted: Fri May 22, 2009 1:33 pm
by scgtrp
My entry: a bootable etch-a-sketch.
Re: The Third 512-byte OS Contest!
Posted: Fri May 22, 2009 4:04 pm
by JohnnyTheDon
Code: Select all
; TODO How do you do modulus in assembly?
The div instruction gives you the remainder as well as the quotient.
Re: The Third 512-byte OS Contest!
Posted: Fri May 22, 2009 10:08 pm
by Love4Boobies
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.
Re: The Third 512-byte OS Contest!
Posted: Sat May 23, 2009 9:11 am
by salil_bhagurkar
Heres my 512:
Porter, which allows you to send to or receive from I/O ports. You can reboot by sending 'FE' to 0064
Re: The Third 512-byte OS Contest!
Posted: Sun May 24, 2009 5:57 pm
by Zenith
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!
Re: The Third 512-byte OS Contest!
Posted: Mon May 25, 2009 1:30 am
by M-Saunders
Zenith wrote:DON'T use Bochs or Qemu because they don't emulate a PC speaker.
Qemu, at least on Linux, does if you use:
M
Re: The Third 512-byte OS Contest!
Posted: Mon May 25, 2009 5:32 am
by Love4Boobies
They both do.
Re: The Third 512-byte OS Contest!
Posted: Mon May 25, 2009 8:11 am
by Coty
lol, I got rick roll'd in Qemu, XD, sound worked fine in win. XP