Dark Bit Factory & Gravity

PROGRAMMING => Other languages => ASM => Topic started by: lemonparty on January 12, 2007

Title: help me release my 256b intro!
Post by: lemonparty on January 12, 2007
Hi guys, i'm new to asm and just started a 256b demo, I need some tips about optimizing and need to raise the exe size to 256 bytes (now it takes 292). Any ideas?
(it compiles with nasm)
(note that a few lines are missing since it not really finished, in the end it look a LOT better than that...)
Title: Re: help me release my 256b intro!
Post by: Jim on January 12, 2007
Hi lemonparty, welcome to the forum!

You've got quite a prob there, 21 bytes to be precise!!

Are you allowed to use 386 instructions (despite the fact this is real mode)?

Top of my head --- Is it possible to pre-load dist and/or ang outside your main loop?

Is this demo going for a release somewhere?

Jim
Title: Re: help me release my 256b intro!
Post by: lemonparty on January 12, 2007
Thx for ur fast reply!

this demo will go on pouet, like my previous one (http://www.pouet.net/prod.php?which=25703), but wont be released in a party

Quote
Are you allowed to use 386 instructions (despite the fact this is real mode)?
yep

Quote
Top of my head --- Is it possible to pre-load dist and/or ang outside your main loop?

no i dont think so, for each (x,y) point I calculate dist from the center which is diff for every points,



Title: Re: help me release my 256b intro!
Post by: Jim on January 12, 2007
You load x and y on to the fp stack twice.  Try to avoid that.

Jim
Title: Re: help me release my 256b intro!
Post by: lemonparty on January 12, 2007
ok but i need after to sub 160 and 100 to center the whole stuff
Title: Re: help me release my 256b intro!
Post by: Jim on January 12, 2007
do that first!  If that's not possible, put those contstants on the stack first.

Jim
Title: Re: help me release my 256b intro!
Post by: Rbz on January 15, 2007
@lemonparty: I think you could work first with your palette code, it's a *big* code to setup a 256 prod. palette.