Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Freyaday on July 05, 2011, 05:00:15 am
-
Let's start a little game.
Let's see who can come up with the most brain-bending legal line of code in pure Axe that does not crash the calculator.
The winners are those whose code cannot be deciphered by anyone else.
-
I predict Runer will win this hands down...
-
Asm(barrage of hex)
-
Note: Pure Axe means without the use of Assembly
-
AWWWWWWWWWWWW D:
-
Okay, this compiles and doesn't crash:
{°A}+(X^3°port+9[30]#Realloc(°W){°r1*6,2[23]}+°Θport→{{A}r}
-
HOLD UP A SECOND
The winners are those whose code cannot be deciphered by anyone else.
Does this mean that you have to be able to decipher it yourself?
-
I would think so, yes.
-
Yes, it was confirmed: You must be able to decipher your code, because you have to be able to tell people if they are wrong.
-
It does, that way you can tell us if we get your code's function wrong.
Zippy beat me to it.
-
Okay, this compiles and doesn't crash:
{°A}+(X^3°port+9[30]#Realloc(°W){°r1*6,2[23]}+°Θport→{{A}r}
I give up. :P I can't even understand most other people's game codes, much less a messed up code that doesn't do much. :P
-
Okay, this compiles and doesn't crash:
{°A}+(X^3°port+9[30]#Realloc(°W){°r1*6,2[23]}+°Θport→{{A}r}
Stores the bottom 8 bits of A in HL, pushes HL, takes the value of X mod 3 and puts in HL, attempts to find the address of symbol port but resolves to nothing, adds 9, adds $30 to the .data section of the program, reallocated the standard variables so that A corresponds to W, B corresponds to X, etc., pushes HL, gets the address of the var r1*6, puts 2 in HL, adds $23 to the .data section of the program, pops HL, adds the address of the var theta, takes the state of the link port and stores to the byte pointed to by the short pointed to by the value of A. Whew :)
My turn my turn! :D
({{rand+nib{8/cos(SQRT(rand20)+8erandrand)16BITANDsin(->F)}}->{°Θ}r/{EFFFF xor L1))}16BITXOR{->{°C-4}rr°A+{Trand*85+rand^°C}}r}//{rand+L1}2)**{F} and {5max(,)5}
Edit: I'll admit when I wrote this I had no idea what °port would correspond to. My theory is that it basically would result to returning nothing, ignore the port and simply preserve HL, or even possibly returning the address of the embedded "port" function added to the .text portion of the program. With a quick test, I realized this wont even compile just because of those two tokens :P. So, without that, it's working code -- and I stick by everything else I described in function.
-
Ashbad what does having a comma in {} do? Qwerty's has that....
-
It'll basically apply the dereferencing of the { } to the equation on the left hand of the comma into HL, and the expression on the right is subsequently executed like normal. Therefore, {5,6} basically means {5}:6. Though, it doesn't seem to always compile :P. However, when you can get it to do so, that's what it'll represent.
Edit: it'll always compile though if you leave out the ending }, I found. {5,6: compiles consitantly and works like I described.
-
Interesting.....................................................Good to know!
-
Huh. Perhaps Axe is parsing the , as a }
-
Fixed the bug, it was simply skipping over it by mistake thinking it was }.
By the way, another syntax obfuscation you can do is that Axe doesn't usually differentiate between } and ) so you can sometimes use them interchangeably. Sometimes you can't though, especially with r modifiers. Try this: sin(5}
-
Good to hear, Quigibo! The first part is anyway. *.*
sqrt(X2+Y2->{{{ºD-I}r}+sin(5}}
-
O.O
good lord i dont stand a chance here...
-
Good to hear, Quigibo! The first part is anyway. *.*
sqrt(X2+Y2->{{{ºD-I}r}+sin(5}}
Taking a wild guess here:
Its taking the square root of X^2+Y^2 and storing it to the position of D-I, plus the sine of 5?
-
Interesting...an obfuscated Axe mini-contest would be cool to see, working similarly to the International Obfuscated C Contest (http://www0.us.ioccc.org/main.html)
-
Good to hear, Quigibo! The first part is anyway. *.*
sqrt(X2+Y2->{{{ºD-I}r}+sin(5}}
Taking a wild guess here:
Its taking the square root of X^2+Y^2 and storing it to the position of D-I, plus the sine of 5?
Not quite ;)
It's taking the square root of X squared + Y squared and loading it in the byte pointed to by the sine of 5 plus the byte pointed to by the short pointed to by the address of D minus the value of I. Close :)
No one is gonna try mine? :'(
-
All y'all are wrong about mine.
-
so it's not valid...
-
Oh, it's perfectly valid.
-
Oh, it's perfectly valid.
Well then I'm correct :P
-
Oh, it's perfectly valid.
Well then I'm correct :P
No. Remember that -> doesn't close all open parentheses in Axe. Remember where Axe closes open parentheses. Remember....
-
Then perhaps it does what Ashbad says, but it square roots everything last instead of first?
-
Then perhaps it does what Ashbad says, but it square roots everything last instead of first?
Still no.
-
({{rand+nib{8/cos(SQRT(rand20)+8erandrand)16BITANDsin(->F)}}->{°Θ}r/{EFFFF xor L1))}16BITXOR{->{°C-4}rr°A+{Trand*85+rand^°C}}r}//{rand+L1}2)**{F} and {5max(,)5}
This code is not valid Axe code. You have mismatched parentheses:
Depth: 0123 4 5 6 5 4 5 432 3 2 3 210
({{rand+nib{8/cos(SQRT(rand20)+8erandrand)16BITANDsin(->F)}}->{°Θ}r/{EFFFF xor L1))} continued below...
Depth: 1 2 1 2 10 -1
16BITXOR{->{°C-4}rr°A+{Trand*85+rand^°C}}r}//{rand+L1}2)**{F} and {5max(,)5}
sqrt(X2+Y2->{{{ºD-I}r}+sin(5}}
- Calculate (X2+Y)2, save value for later.
- Load the address of the D variable, and offset this address backwards in memory I bytes.
- Load the word pointed by the address above.
- Load the byte pointed to by the word above.
- Add to this byte Axe's approximation of 127 times the sine of 5 binary degrees, which is 19.
- Attempt to store the low byte of the previously calculated X2+Y2 to the byte pointed to by the address above. However, in the normal operational mode of the calculator, this address will point to flash so the write will fail.
- Calculate the square root of the value from 2 lines above, giving a final value of 4 to 16.
Alternatively, as one run-on sentence:
Attempt, but fail because flash is read-only, to store the low byte of x squared plus y, squared to the byte pointed to Axe's approximation of 127 times the sine of 5 binary degrees, which is 19, plus the byte pointed to the word pointed to the address of the D variable offset backwards in memory I bytes, and finally take the square root of the address to which x squared plus y, squared was attempted to be stored, giving a final value of 4 to 16.
-
Close, but you're forgetting Axe's order of operations
-
Well, it's (X2+Y)2, but I think Runer thought it was so obvious that he didn't mention it. ;)
-
Change anywhere I said "x squared plus y squared" to "x squared plus y, squared." The comma is important to include I guess.
-
Yes, commas are important.
-
The hardcore ASM discussions on #omnimaga have been making me feel stupid, but they are NOTHING compared to this. Seriously, what the.../me lies down
-
The hardcore ASM discussions on #omnimaga have been making me feel stupid, but they are NOTHING compared to this.
...but I love sitting in on those discussions and feeling stupid... :'(
-
The new rule should be that your code must perform something useful, perhaps in a roundabout or inefficient way. But it shouldn't just be a bunch of random garbage because there is no fun in trying to decipher something that has no meaning in the end.
-
What Quigibo said.
Quigibo, you know Axe best, can you be the judge of that?
-
I personally think that {°A}+(X^3°port+9[30]#Realloc(°W){°r1*6,2[23]}+°Θport→{{A}r} was hard enough for me :P But it was deciphered :)