Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
26 May, 2013, 05:02:41 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 ... 58 59 [60] 61 62 ... 110   Go Down
  Print  
Author Topic: Axe Q&A -  (Read 59553 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Wellen
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 02 May, 2012, 11:56:34
Date Registered: 08 August, 2011, 11:00:09
Location: France
Posts: 118


Total Post Ratings: +5

View Profile
« Reply #885 on: 30 October, 2011, 13:05:53 »
0

I attached it below  Smiley

* A.8xp (2.12 KB - downloaded 23 times.)
Logged

-/...././/--./.-/--/.
I'm french, so please feel free to correct my bad english, it'd help me a lot Wink
Spoiler for Feat. Loulou54:
Spoiler for Projects:
Spoiler for Axe:
Ti-Lock : Lock your calc before turning it off               [XXXXXXXX--] 80%
Spoiler for Ti-Basic:
Spoiler for Soko-Ti, a sokoban game in Ti-Basic:

Spoiler for Memory:

Downloads here.
Freyaday
The One And Only Serial Time Killing Catboy-Loli-Ballerino
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 17:15:13
Date Registered: 24 February, 2011, 17:10:56
Location: ¿¿¿
Posts: 1890


Total Post Ratings: +110

View Profile WWW
« Reply #886 on: 30 October, 2011, 20:36:00 »
0

how do I find the square root of an 8.8 number?
Logged

In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


Beware the Bitulator! ,.,./`My Artwork!
jacobly
LV4 Regular (Next: 200)
****
Online Online

Last Login: Today at 04:50:52
Date Registered: 09 October, 2011, 01:53:09
Posts: 199

Total Post Ratings: +149

View Profile
« Reply #887 on: 30 October, 2011, 20:49:28 »
0

If you don't care too much about accuracy, you can do √(A)∗16.
Alternatively, I wrote an 8.8 square root routine in asm... If you can give me a token to use (not √( since Axe has dibs) I could make an Axiom.
Logged
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 01:17:04
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5644


Total Post Ratings: +589

View Profile
« Reply #888 on: 30 October, 2011, 20:54:37 »
0

I attached it below  Smiley


Ah this looks like a bug with Axe's peephole optimizer!  Dang it, here I was telling you to upgrade and it's not even a stable build x.x In the meantime, instead of selecting your program by pressing enter, press the Zoom button instead, and everything should work like it normally does.  
Logged

Freyaday
The One And Only Serial Time Killing Catboy-Loli-Ballerino
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 17:15:13
Date Registered: 24 February, 2011, 17:10:56
Location: ¿¿¿
Posts: 1890


Total Post Ratings: +110

View Profile WWW
« Reply #889 on: 30 October, 2011, 21:17:22 »
0

If you don't care too much about accuracy, you can do √(A)∗16.
Alternatively, I wrote an 8.8 square root routine in asm... If you can give me a token to use (not √( since Axe has dibs) I could make an Axiom.
that would be great. Axe has lots of unuesd tokens, and I believe you can even make your own token hook if you so desire.
Logged

In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


Beware the Bitulator! ,.,./`My Artwork!
jacobly
LV4 Regular (Next: 200)
****
Online Online

Last Login: Today at 04:50:52
Date Registered: 09 October, 2011, 01:53:09
Posts: 199

Total Post Ratings: +149

View Profile
« Reply #890 on: 30 October, 2011, 21:18:57 »
+3

I decided to use seq( since it has two letters in common with sqrt(. Tongue

Axiom SQRT:
  seq(a): returns the square root of the 8.8 number a in 8.8 format.
  seq(a)ʳ: returns the square root of the unsigned integer a in 8.8 format.

* sqrt.8xv (0.14 KB - downloaded 22 times.)
Logged
Wellen
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 02 May, 2012, 11:56:34
Date Registered: 08 August, 2011, 11:00:09
Location: France
Posts: 118


Total Post Ratings: +5

View Profile
« Reply #891 on: 31 October, 2011, 00:17:07 »
0

Ah this looks like a bug with Axe's peephole optimizer!  Dang it, here I was telling you to upgrade and it's not even a stable build x.x In the meantime, instead of selecting your program by pressing enter, press the Zoom button instead, and everything should work like it normally does. 

Doing this, it does the same as with 0.5.0/0.5.3 ...  Big frown
I wrote a little program that checks if the appvar really exists, also the same method as ATILOCK : I load it into an file, and display what it points to (actually the code)
What I do in this screenshot :
-I compile ATEST
-I "zoom" A(TILOCK)
-run Tilock : it's okay
-run Test : it finds the code, it's okay
-run Tilock : it asks for the code, ok
-run Test : finds the code, ok
-run Tilock : doesn't find the appvar Huh? or what else ?
(-I cry)


Also, what's "zooming" ?  Roll Eyes
« Last Edit: 31 October, 2011, 00:18:31 by Wellen » Logged

-/...././/--./.-/--/.
I'm french, so please feel free to correct my bad english, it'd help me a lot Wink
Spoiler for Feat. Loulou54:
Spoiler for Projects:
Spoiler for Axe:
Ti-Lock : Lock your calc before turning it off               [XXXXXXXX--] 80%
Spoiler for Ti-Basic:
Spoiler for Soko-Ti, a sokoban game in Ti-Basic:

Spoiler for Memory:

Downloads here.
squidgetx
Food.
Coder Of Tomorrow
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 04:18:22
Date Registered: 30 May, 2010, 19:54:18
Location: eating somewhere
Posts: 1838


Topic starter
Total Post Ratings: +478

View Profile
« Reply #892 on: 31 October, 2011, 04:03:00 »
0

I believe your screenshot is missing an End..

Also files are in general buggy; try copying the file data to an area in RAM and reading from there.
Logged

Read my webcomic! | My SoundCloud
Projects:

Check out the demo now!- Current progress: battle engine and stuff
Proud author of: Cuberunner | SpaceDash | The Psyche | XXEdit | AxeSynth | StickNinja | Gravity Guy | Embers:Phoenix | Zombie Gun
Axe: Need help optimizing?
User of Axe | zStart | TokenIDE | CalcGS | MirageOS
Wellen
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 02 May, 2012, 11:56:34
Date Registered: 08 August, 2011, 11:00:09
Location: France
Posts: 118


Total Post Ratings: +5

View Profile
« Reply #893 on: 31 October, 2011, 20:28:51 »
0

There is an 'End', I just didn't scroll a the bottom (you talk about ATEST's code ?)

I'll try another way if the files don't work, but I just wanna know why it doesn't work
« Last Edit: 31 October, 2011, 20:29:22 by Wellen » Logged

-/...././/--./.-/--/.
I'm french, so please feel free to correct my bad english, it'd help me a lot Wink
Spoiler for Feat. Loulou54:
Spoiler for Projects:
Spoiler for Axe:
Ti-Lock : Lock your calc before turning it off               [XXXXXXXX--] 80%
Spoiler for Ti-Basic:
Spoiler for Soko-Ti, a sokoban game in Ti-Basic:

Spoiler for Memory:

Downloads here.
epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 01:07:52
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2172


Total Post Ratings: +122

View Profile
« Reply #894 on: 04 November, 2011, 02:16:58 »
0

Will this work for load and save game?


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
:.Load game label
:Lbl L
:"appvMONEY"→Str0
:"appvLEVEL"→Str9
:Unarchive Str0
:Unarchive Str9
:!If GetCalc(Str9)→W or GetCalc(Str0)→E
:Goto N
:End
:{W}→G
:{E}→L
:Goto 1
:Lbl N
:. Im not sure what to put as the size
:GetCalc(Str0,64)→W
:GetCalc(Str9,32)→E
:0→{W}→{E}→G→L
:Lbl 1


:. At the end of the code...


:. The save subroutine
:Lbl SAVE
:Unarchive Str0
:Unarchive Str9
:G→{W)
:L→{E}
:Archive Str0
:Archive Str9
:Repeat getKey(9)
:ClrDraw
:Text(1,1,"Saved!")
:DispGraph
:End
:Return

« Last Edit: 04 November, 2011, 02:22:53 by epic7 » Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   35%         Active
?     C (ndless)   0%        Unconfirmed

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 01:17:04
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5644


Total Post Ratings: +589

View Profile
« Reply #895 on: 04 November, 2011, 02:24:17 »
0

Two things wrong with that code, but if fixed, your code does look like it will work.  Firstly:


1
:!If GetCalc(Str9)→W or GetCalc(Str0)→E

That does not do what you think it does, because again, Axe does not follow order of operations.  It is actually doing this:


1
:!If ((GetCalc(Str9)→W) or GetCalc(Str0))→E

Which is not what you want.  Adding some parenthesis in the right place can help fix this problem.  Secondly:


1
:0→{W}→{E}→G→L

This is a quirk of Axe, but when you do 0->{#}->A, A will now hold #, not 0.  Separating these lines will help this issue
Logged

epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 01:07:52
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2172


Total Post Ratings: +122

View Profile
« Reply #896 on: 04 November, 2011, 02:27:17 »
0

So use
:!If ((GetCalc(Str9)→W) or GetCalc(Str0))→E
Instead?


« Last Edit: 04 November, 2011, 02:30:24 by epic7 » Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   35%         Active
?     C (ndless)   0%        Unconfirmed

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 01:17:04
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5644


Total Post Ratings: +589

View Profile
« Reply #897 on: 04 November, 2011, 02:28:15 »
0

No, that was my example of what is actually happening.  You need to put parenthesis in different places in order to achieve the effect you desire.
Logged

epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 01:07:52
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2172


Total Post Ratings: +122

View Profile
« Reply #898 on: 04 November, 2011, 02:32:21 »
0

How would I do that then?

:!If (GetCalc(Str9)→W) or (GetCalc(Str0)→E)

or something?


Also, what is a good size to use for the appvars?
{W} will be up to several thousand
{E} will be up to 6
« Last Edit: 04 November, 2011, 02:32:37 by epic7 » Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   35%         Active
?     C (ndless)   0%        Unconfirmed

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
ztrumpet
The Rarely Active One
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 22 May, 2013, 03:10:30
Date Registered: 08 November, 2009, 21:10:12
Location: Michigan
Posts: 5687


Total Post Ratings: +360

View Profile
« Reply #899 on: 04 November, 2011, 03:10:18 »
0

Is there a way to Push and Pop in Axe without having to resort to Asm()?
Logged

Pages: 1 ... 58 59 [60] 61 62 ... 110   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 3.615 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.