flat assembler
Message board for the users of flat assembler.
Index
> Main > 512b contest 2011? Goto page Previous 1, 2 |
512b 2011? | ||||||||||||||
|
||||||||||||||
Total Votes : 20 |
Author |
|
bitshifter 16 May 2011, 00:00
I have written a 512 byte bootable OS demo and refined it
over the last couple of years, maybe now is the time to share... |
|||
16 May 2011, 00:00 |
|
Tyler 16 May 2011, 03:32
ctl3d32 wrote:
If you expect that to make it easier to decide the winner, you may be surprised. All it takes is some knowledge about multivariable optimization problems to find the maximum 1/G, and give someone a definite target to work towards. A vote (of unspecified kind) is the easiest and fairest way to do it. I know at least I and MHajduk can find that maximum, and I'm sure there are others; I consider that an unfair advantage. You should probably consult MHajduk on the type of vote, he undoubtedly had to have encountered some fairness theory in getting a Master's in discrete math. |
|||
16 May 2011, 03:32 |
|
shoorick 16 May 2011, 04:37
Mike Gonta wrote: How about a 4K demo? i have some 2732 btw _________________ UNICODE forever! |
|||
16 May 2011, 04:37 |
|
ctl3d32 16 May 2011, 14:03
Tyler wrote:
There's no such a thing of multivariable optimization. You missed the point. I'm sure it's a misunderstanding. In the formula: - 3 is the weight for speed, 2 is the weight for size. This means that i'm giving more importance to speed than size. - I'm dividing (your prog speed)/(fastest contest entry speed) and (your prog size)/(smallest contest entry size) because they need to have the same unit. This allows me to compare speed and size. This is a problem of "weighted average". Got it? |
|||
16 May 2011, 14:03 |
|
ctl3d32 16 May 2011, 14:11
It's the same as the average of my grades were calculated at university. Let's suppose that a subject is evaluated by two exams, and the grades were: g1 = 7.5 and g2 = 6.0. The average (A) is
A = (2*7.5 + 3*6.0)/5 = 6.6 |
|||
16 May 2011, 14:11 |
|
Dex4u 16 May 2011, 15:09
ctl3d32 wrote:
But wheres the 'it does something useful' part of the equation ?. |
|||
16 May 2011, 15:09 |
|
ctl3d32 16 May 2011, 15:40
Dex4u wrote:
By "Something useful" i mean a code that could benefit lot's of users, like a library we can use and re-use. I can't think of anything right now. The winner code will be shared with all users. |
|||
16 May 2011, 15:40 |
|
ctl3d32 16 May 2011, 15:44
Let's think of a contest that that the goal is to search for a specific string inside a text file. No other rule. Those who get the best score using the formula i presented above is the winner. Simple as that.
To make it easier, all the search string code should be in a .dll file. The size of the .dll file and code execution speed will be evaluated. This way, you are free to make any GUI in an .exe that calls this .dll. |
|||
16 May 2011, 15:44 |
|
edfed 16 May 2011, 15:56
findstr is not enough interresting as a contest subject.
i'd prefer a contest with no subject, just rules, and maybe a theme (halloween, xmas, end of world...) it is up to the coder to imagine something to submit as an entry. if the code limit is too high, the results of the contest will be very various. i can't imagine somebody code a fully optimized 4096 bytes demo for a contest, even if he have time to do it, he will prefer to code something really small. but i agree with the size limit. let say, the win32 entries can be in 4096 bytes limit (because very minimal exe size i saw is 1024 bytes, to do nothing) DOS code in 512 bytes (because use of int21h) BOOT code in 1024....(because should implement some os services) something like variable geometry rules? |
|||
16 May 2011, 15:56 |
|
Dex4u 16 May 2011, 16:35
I like the idea that we code something useful, what about we define a Standard Driver Interface and a simple kernel as part of the compo.
Then you are free to code a driver and the winner is the best, most useful driver. Example this compo did a basic usb stack, see compo 28 http://www.fysnet.net/hugi/compoold.htm |
|||
16 May 2011, 16:35 |
|
ctl3d32 16 May 2011, 17:40
edfed wrote: findstr is not enough interresting as a contest subject. It was just an example. Any idea would be welcome. |
|||
16 May 2011, 17:40 |
|
YONG 17 May 2011, 13:57
I voted "yes". Just a little piece of advice: keep the rules as simple as possible!
|
|||
17 May 2011, 13:57 |
|
edfed 17 May 2011, 23:40
new proposition of rules:
1) code source should compile in less than or equal N bytes 2) the program should exit with a condition C 3) the program should work under windows98 for win32 compos 3) the program should work under DOS for DOS compos 3) the program should exit in real mode for boot compos 3) the program should work on ubuntu for linux compos 3) the program should work on X for Y compos. 4) the program should do something cool, if you enjoyed the writing and testing of a program, it certainly meet this rule, the fun then. F, comprised between 0 and 0FFh the difficulty is an estimation, and is D, between easy and hard N, F, X and Y are variables and are defined for each category of compos. for example, first compo, i'd like to see something in less than 16 bytes (one paragraph or SSE register), display the more beautyfull things as you can and exit on a free condition (keyboard, timer, etc) let says N = 16, F = 20h, D=mid level, X=Real Mode, Y=Boot/org 100h |
|||
17 May 2011, 23:40 |
|
edfed 15 Jun 2011, 12:46
here the link to the comcall.com test program for the compo.
http://board.flatassembler.net/topic.php?p=130654#130654 now that the comcall.com program works, we can start to define valid rules here. 1 every entry should be submitted within a comcall.zip archive by Private message to ME, as a new file included somewhere in some list, and linked to the first position of the main list. 2 the program can use all the memory until comcall.com mesure exactlly 65000 bytes 3 if your demo cannot feet within the spare bytes below 65000 bytes, it will be discalified. 4 if your demo, by a vote of only ME, is too long to be accepted, it will be rejected. 5 i invite you to don't use more than 4 kilobytes for your demo. >>>>means the recursive comcall should be deleted before the starting of the contest. 6 your code should run, and exit without problems, inside the comcall.com program. 7 the closing date is for haloween, and will bring us a compo manager application with only the compos from the contest, fasm users will then test the manager, and vote for their favorite demos. 8 the winner will receive at home for christmass(all over the world) a book about assembly programming in french (annoted in english by hand), and a serial RCD programmer with a pic 12f675 on a test board. are your ok with the rules? Last edited by edfed on 15 Jun 2011, 13:09; edited 1 time in total |
|||
15 Jun 2011, 12:46 |
|
Coty 15 Jun 2011, 13:03
I'm okay with them, now I just have to come up with something to do in 4kb... That is actually quite abit of code... I'll just watch some sci-fi and hope that I think of something.
|
|||
15 Jun 2011, 13:03 |
|
edfed 15 Jun 2011, 13:07
your code can be just 20 bytes if you want.
the final demo manager fits in less than 1000 bytes, then, it lets up to 64000 bytes to contain all the compos from participants. the first to submit his compo will have more memory than others. the last to submit will have less memory to compose. the source of the compo manager is there http://board.flatassembler.net/download.php?id=5468 |
|||
15 Jun 2011, 13:07 |
|
edfed 23 Jul 2011, 13:48
i have a better idea for the contest.
let say a function F that makes something from initial conditions I. then, F(I) is the goal of programming. F() is the code, and this code can be just a single instruction, or a real engine. I can be a single bit, or void, or a very huge quantity of datas. then, for every function F(I), we can say what it should (and shouldn't ) do exactlly, from there, the programmer will try to translate the idea in code. and the result will be verified with a test application or code. then, i'd like to see some contest based on function programming. a single function contest will cover only one function, and it's derivates. for example, put pixel, getpixel, xorpixel, andpixel, etc... are all the variations of the same function putpixel. a test program is the bloat needed to initialise the function context, display the result, and eventually iterate the I condition before to reloop. as a first function to make, i propose the get_asciiz_size function as in the topic about the most useless instruction here we still made some contest like this before, but it wasn't really contests, just some spontaneous optimisation discusion about some algorithms. theses discutions were really fun, all very interresting. these spontaneous discussions were really cool, and we need more of them, a lot more. and of course, it can be very interresting if a modo or admin can signal all these threads with something like [compo] tag. nd list them in another thread, letting fasm user find functions easy, and have a way to compare different algo for the same thing. binary to hexadecimal conversion is one of them, hexa to bin is another. but there are a lot of function needed when you program. just look a little to the funciton list of any hll, and you will see that there will never be any end to this contest. if we decide to open a contest about every single function in a langage like C, we will have some 'fun' for ages. then, don't imagine to dev something like C. just you have to submit a function to do. expose the action it should do. the initial conditions. propose something like a snippet test program. it can be as simple as a mode switch in org 100h, in order to test a cls function... or nothing. then, i propose as a first contest to do a function that counts the number of bytes in a string. before execution: gp registers have all random value. the string is at ds:esi and is zero terminated the only byte value used as a terminator is 0 the count is returned in ecx . the entries will be departed by: size of binary speed (number of execution in a one second (1s) loop, or time of execution of a 3M loop.) number of instructions (or lines of code) are you ok? |
|||
23 Jul 2011, 13:48 |
|
rain_storm 01 Aug 2011, 21:36
1KB opens the possibility for compression. So there should be some rules regarding the use of compression. Otherwise it just becomes a compo to see who can write the best decompressor.
|
|||
01 Aug 2011, 21:36 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.