Dark Bit Factory & Gravity
PROGRAMMING => Other languages => ASM => Topic started 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...)
-
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
-
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
Are you allowed to use 386 instructions (despite the fact this is real mode)?
yep
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,
-
You load x and y on to the fp stack twice. Try to avoid that.
Jim
-
ok but i need after to sub 160 and 100 to center the whole stuff
-
do that first! If that's not possible, put those contstants on the stack first.
Jim
-
@lemonparty: I think you could work first with your palette code, it's a *big* code to setup a 256 prod. palette.