This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
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..
@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.
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?
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.
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 ]
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.