Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: nikitouzz on July 06, 2014, 05:41:35 pm
-
You can try to participe at this litle contest ! ;) http://tiplanet.org/forum/viewtopic.php?f=12&t=14945
enjoy ! :)
ps : if someone can translate my topic here in english... that's will be very cool ! :)
-
Here's my shot at a translation of the post.
Hello everyone, I have an Axe programming challenge! You must program a checkerboard (box of 8x8 size) infinity scrolling program using the arrow keys! It will leave the program with a [clear]. The program must be the smallest size possible! Watch out! The asm command is prohibited!
(https://i.imgur.com/qxFzRXo.gif)
My program, without optimization, is 418 bytes with the header! Send me the programs by PM. You do not have a time limit. Specify in the comments that you are attending and, if you wish, your current score, but do not give your code! I will update this post with scores! Good luck!
I'm not sure of one thing: Are we talking about source bytes or compiled bytes? The two are different.
-
I have
369 357 !
-
I'm not sure of one thing: Are we talking about source bytes or compiled bytes? The two are different.
I'd say "compiled" because there is no point comparing the sources (if you write Data(0001)Data(0001) it obviously takes more space than just [0101] for the same result) and because he said "with the header"... But which header ? Noshell ? Ion ? More ? And which name to the program ? Because it is also obvious that a program named AA is bigger than a program named A.
-
That's what I was thinking as well. One challenge is that noshell means including any libs that mos or DCS would just call, but using mos or DCS have header implications of their own as well.
-
I think that the most interesting is to compile as Noshell, because the size of the header is constant (not saying Ion header=DCS header but that the difference in size between two programs with the same header is the same whatever header they share) while the size of routines isn't.
So I compiled my program in Noshell and called it AA, it is 356 bytes :P
(http://tiplanet.org/forum/download/file.php?id=1503)
edit Got it down to 352.
(http://tiplanet.org/forum/download/file.php?id=1504)
edit I now have 348 but I am too lazy to make a screenshot :P
-
I am at 344 bytes with my try, without having it really optimized :P
I named the program TE and compiled in noshell.
No screen, cause it is always the same >< (and I am lazy)
EDIT : I am at 287 bytes if I made no mistake ><
EDIT2 : got it down to a 278 bytes crazy fast program. I hope there is no hidden bug like last time ;D
-
I have 341 now :p but very very slooowwww !!!!
-
I am at 344 bytes with my try, without having it really optimized :P
I named the program TE and compiled in noshell.
No screen, cause it is always the same >< (and I am lazy)
EDIT : I am at 287 bytes if I made no mistake ><
EDIT2 : got it down to a 278 bytes crazy fast program. I hope there is no hidden bug like last time ;D
Wow that sounds like an anorexic program on steroids. :P
-
303 now ! :) i need optimiz
-
Watch out guys, I found this topic. :P
-
Wait, what if, instead of the ASM() command we put the data as hex and jump to that memory address :P
-
Watch out guys, I found this topic. :P
Nuuuuuuu ! D:
Wait, what if, instead of the ASM() command we put the data as hex and jump to that memory address :P
Well, that's not the ASM() command so it's legit I guess.
/me runs
-
Watch out guys, I found this topic. :P
Lol, I was wondering how long you would let us brag about our programs before appearing :P
Wait, what if, instead of the ASM() command we put the data as hex and jump to that memory address :P
Yeah, but how do you jump to the right memory address ?
-
By using (address)() ? Or Goto address. :P
-
Watch out guys, I found this topic. :P
Lol, I was wondering how long you would let us brag about our programs before appearing :P
Wait, what if, instead of the ASM() command we put the data as hex and jump to that memory address :P
Yeah, but how do you jump to the right memory address ?
jup, goto address or soemthing, or something like DATA(\x18,PTR) (JR)
-
Well jr doesn't exist in Axe. And Goto doesn't allow relative jumps (or I missed something all this time O.O). So you can't do your trick without using Asm(), which defeats its purpose :P
-
But DATA() puts the bytes just like that in memory, right? and 18 followed by the pointer is jr pointer. Ok, actually you'd need to do like jr 1, because relativness
-
Data puts the data after the ret so it won't work. However, go ahead and read the labels and subroutines section in the docs. :P
-
You can indeed jump to/call arbitrary addresses in native Axe. But I'd propose that doing anything that results in running custom assembly code is against the sprit of the competition and shouldn't be allowed.
-
I got 408 :(
-
You can indeed jump to/call arbitrary addresses in native Axe. But I'd propose that doing anything that results in running custom assembly code is against the sprit of the competition and shouldn't be allowed.
Yeah, we figured out we could make
[the hex code we want to execute]→°Cheat
Goto (°Cheat)
But it's true that this is not the goal of the contest :P
-
So I optimized the whole thing further and I am at 262 bytes. It is like so fast that to test the correctness of the display I have to pause it O.O
However, I don't think I go any further this time, I mean the Dispgraph command is almsot 30% of is weight ><
-
292 tsss :banghead: :banghead:
-
Still better than my poor
305 296...
edit I have 282 with some cheating :P
No Asm involved, but some unclean code :P
-
Soooooo... I finally found other morar optimization.
I am at the ridiculous size of 253 bytes and without unclean code :P
Screen :
(http://i.imgur.com/LOwddtB.gif)
I have no doubt that Runer will beat this though ><
EDIT : I am now at 248 bytes :p
-
Aargh ! I have
271 265 ! :P
But yeah, superfast too, as is yours :P forget about that, Wabbitemu was set as 400% :trollface:
-
Actually, I think that the speed and the size come from the algorithm I use, cause I am no very good for size optimizing :P
I tried more optimization yesterday, but none of them work, so yeah, I think I am stuck at 248 bytes...