• Axe Q&A 5 5
Currently:  

Author Topic: Axe Q&A  (Read 599076 times)

0 Members and 2 Guests are viewing this topic.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Axe Q&A
« Reply #15 on: February 12, 2011, 04:39:47 pm »
Question 1: If you want to draw to the buffer, put a Fix 5 at the beginning of your program and a Fix 4 at the end :)
Question 2: Is the game over 8192 bytes? Nostub executables have to be under 8192 bytes, while MOS and DCS programs can have up to 8811 bytes of code and unlimited data. However, be warned that Axe doesn't guarantee that a MOS/DCS program will have all the data at the end. The safest way to get past the code limit once you're at 8811 is by compiling to an application which gives you 16384 bytes to work with.
« Last Edit: February 12, 2011, 04:44:12 pm by squidgetx »

Offline Elsewhere

  • LV2 Member (Next: 40)
  • **
  • Posts: 26
  • Rating: +5/-1
    • View Profile
Re: Axe Q&A
« Reply #16 on: February 12, 2011, 04:50:08 pm »
Oh, I see, that's the problem then. those commands push me right over 8192. Problem(s) solved, then!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Q&A
« Reply #17 on: February 12, 2011, 04:51:24 pm »
Oh, I see, that's the problem then. those commands push me right over 8192. Problem(s) solved, then!

Remember that you can still run from shells up to 8811 bytes, so just compile for MOS if you have to :)




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Q&A
« Reply #18 on: February 12, 2011, 07:37:24 pm »
<late>On a very off-topic note, welcome on the forums Elsewhere.</late>

Offline Elsewhere

  • LV2 Member (Next: 40)
  • **
  • Posts: 26
  • Rating: +5/-1
    • View Profile
Re: Axe Q&A
« Reply #19 on: February 12, 2011, 09:50:21 pm »
Hah, thanks. ;D

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Q&A
« Reply #20 on: February 12, 2011, 11:54:34 pm »
I've got one.  I was wondering if multiplying something by zero makes the product zero.
The idea is that something like 3*(B>C)+A→A would only increase A by 3 if B is greater than C, doing the same as If B>C:A+3→A:End .  Will this work? Also, would the parenthesis be necessary?
Another idea, does multiplying by -1 (negative 1) make the result the opposite?  Like, 6 * -1 = -6
« Last Edit: February 12, 2011, 11:56:34 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #21 on: February 12, 2011, 11:56:36 pm »
Yes, that would work. Although it would be more optimized as follows, because multiplying by 3 is an optimized calculation:

B>C*3+A→A


EDIT: And yes, multiplying by negative 1 negates the number as you would expect. Remember that the result is only treated as negative if you use a signed comparison or something else that uses signed numbers. Otherwise as far as the processor knows it's just a really big positive number. -6 is just 65530 interpreted differently.
« Last Edit: February 13, 2011, 12:00:06 am by Runer112 »

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Q&A
« Reply #22 on: February 13, 2011, 12:00:10 am »
Cool, this will help ;D
Thanks.
Vy'o'us pleorsdti thl'e gjaemue

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Q&A
« Reply #23 on: February 13, 2011, 01:16:17 am »
How large is your program?  Any Homescreen program that is over 8100 bytes will give an error, it sounds to me like you are very close to this value?

As for text, try putting a Fix 5 at the very start of your program

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Axe Q&A
« Reply #24 on: February 13, 2011, 10:12:31 am »
How large is your program?  Any Homescreen program that is over 8100 bytes will give an error, it sounds to me like you are very close to this value?

As for text, try putting a Fix 5 at the very start of your program

When using Fix 5 we always need a Fix 4 before ending, don't forget (I think you know that, though).


Also, how to get a number input in Axe like in Basic (Prompt A, or Input A)?

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Axe Q&A
« Reply #25 on: February 13, 2011, 10:31:04 am »
« Last Edit: February 13, 2011, 10:32:12 am by ztrumpet »

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Axe Q&A
« Reply #26 on: February 13, 2011, 10:36:38 am »
I believe this may be what you're looking for:
http://ourl.ca/4129/80803
http://ourl.ca/4129/81340
-- or this --
http://ourl.ca/4129/123530
http://ourl.ca/4129/125194

Code: [Select]
.NUMINP

0?F?B
Repeat F
0?K
Repeat K
Output(0,{E844B},'?'?Frac
getKey?K=9?F
End
K-1/10?A
4-A?A
If A=1
K^10-4*3+A?A
End
If A=2
K^10-6*3+A?A
End
If A=3
K-1^10-7*3+A?A
End
If K=33
0?A
End
If K?9
B*10+A?B?A
sub(A)
End
End
Return

Lbl A
[000000?Pic99
A?{Pic99}r
If {Pic99}r>9
1?{Pic99+2
End
If {Pic99}r>99
2?{Pic99+2
End
If {Pic99}r>999
3?{Pic99+2
End
If {Pic99}r>9999
4?{Pic99+2
End
For(A,0,{Pic99+2
Output(1+{Pic99+2}-A,{E844B},{Pic99}r^10+48?Frac
{Pic99}r/10?{Pic99}r
End

I see, there's no included command, I'd have to use these subroutines for example.

Thanks!

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Axe Q&A
« Reply #27 on: February 13, 2011, 12:41:58 pm »
How large is your program?  Any Homescreen program that is over 8100 bytes will give an error, it sounds to me like you are very close to this value?

As for text, try putting a Fix 5 at the very start of your program
Builderboy, I think you were ninja'd by 9 hours XD

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Q&A
« Reply #28 on: February 13, 2011, 12:47:56 pm »
How large is your program?  Any Homescreen program that is over 8100 bytes will give an error, it sounds to me like you are very close to this value?

As for text, try putting a Fix 5 at the very start of your program
Builderboy, I think you were ninja'd by 9 hours XD

Awwww I didn't realize there was a second page, haha silly me :P

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Q&A
« Reply #29 on: February 13, 2011, 12:57:41 pm »
Lol, I was wondering. I thought you were answering Darl181 in some 1337 way ;D