Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
25 May, 2013, 11:28:38 *
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 [2] 3 4 ... 110   Go Down
  Print  
Author Topic: Axe Q&A -  (Read 59526 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
squidgetx
Food.
Coder Of Tomorrow
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 05:49:53
Date Registered: 30 May, 2010, 19:54:18
Location: eating somewhere
Posts: 1837


Topic starter
Total Post Ratings: +479

View Profile
« Reply #15 on: 12 February, 2011, 23:39:47 »
0

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 Smiley
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: 12 February, 2011, 23:44:12 by squidgetx » 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
Elsewhere
LV2 Member (Next: 40)
**
Offline Offline

Last Login: 17 February, 2012, 19:59:01
Date Registered: 10 February, 2011, 03:30:44
Posts: 26


Total Post Ratings: +4

View Profile
« Reply #16 on: 12 February, 2011, 23:50:08 »
0

Oh, I see, that's the problem then. those commands push me right over 8192. Problem(s) solved, then!
Logged
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 01:40:03
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #17 on: 12 February, 2011, 23:51:24 »
0

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 Smiley
Logged




DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 08:39:50
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50235


Total Post Ratings: +2615

View Profile WWW
« Reply #18 on: 13 February, 2011, 02:37:24 »
0

<late>On a very off-topic note, welcome on the forums Elsewhere.</late>
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
Elsewhere
LV2 Member (Next: 40)
**
Offline Offline

Last Login: 17 February, 2012, 19:59:01
Date Registered: 10 February, 2011, 03:30:44
Posts: 26


Total Post Ratings: +4

View Profile
« Reply #19 on: 13 February, 2011, 04:50:21 »
0

Hah, thanks. Grin
Logged
Darl181
Vy'o'us pleorsdtu tlh'e gjaemue.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: Today at 08:07:26
Date Registered: 10 June, 2010, 00:32:08
Location: {I*9+L₁+1},{I*9+L₁+3}
Posts: 3283


Total Post Ratings: +267

View Profile WWW
« Reply #20 on: 13 February, 2011, 06:54:34 »
0

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: 13 February, 2011, 06:56:34 by Darl181 » Logged




 
Spoiler for Stuff:



OS 2.43  Boot 1.02  Hardware Rev. B

OS 1.04.32

OS 3.1.0.392  Boot1 3.0.99  Boot2 3.10.16
Spoiler for Misc:
Quote
You'll understand / It's not a shame / To be always / Losing the game / Burma-Shave
"Dynamic userbars!"
Omnimaga radio
Interactive Omnimaga radio
Our World of Text
Draw on websites
Then blow them up
In-browser flight simulator
Haxball: MMO soccer/air hockey game
  Draw with sand.  Yay?
The Game
You just lost the game
Zombo.com
light post color is #dfefff
dark post color is #cae4ff
quote box color is #6699ff
transparent color is...transparent 0.o
Spoiler for Forum search alternative (bookmarklet):
https://www.squarefree.com/bookmarklets/search.html
javascript:q=""+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!q)q=prompt("No%20selected%20text;%20enter%20search%20term.").replace(/\s\+/g,"%252B");if(q!=null)location="http://www.google.com/search?q="+q.replace(/\s+/g,"+")+"+site:"+location.hostname;void(0);
Runer112
Anti-Riot Squad
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 07:49:03
Date Registered: 02 July, 2009, 06:38:05
Posts: 1680


Total Post Ratings: +493

View Profile
« Reply #21 on: 13 February, 2011, 06:56:36 »
+1

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: 13 February, 2011, 07:00:06 by Runer112 » Logged
Darl181
Vy'o'us pleorsdtu tlh'e gjaemue.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: Today at 08:07:26
Date Registered: 10 June, 2010, 00:32:08
Location: {I*9+L₁+1},{I*9+L₁+3}
Posts: 3283


Total Post Ratings: +267

View Profile WWW
« Reply #22 on: 13 February, 2011, 07:00:10 »
0

Cool, this will help Grin
Thanks.
Logged




 
Spoiler for Stuff:



OS 2.43  Boot 1.02  Hardware Rev. B

OS 1.04.32

OS 3.1.0.392  Boot1 3.0.99  Boot2 3.10.16
Spoiler for Misc:
Quote
You'll understand / It's not a shame / To be always / Losing the game / Burma-Shave
"Dynamic userbars!"
Omnimaga radio
Interactive Omnimaga radio
Our World of Text
Draw on websites
Then blow them up
In-browser flight simulator
Haxball: MMO soccer/air hockey game
  Draw with sand.  Yay?
The Game
You just lost the game
Zombo.com
light post color is #dfefff
dark post color is #cae4ff
quote box color is #6699ff
transparent color is...transparent 0.o
Spoiler for Forum search alternative (bookmarklet):
https://www.squarefree.com/bookmarklets/search.html
javascript:q=""+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!q)q=prompt("No%20selected%20text;%20enter%20search%20term.").replace(/\s\+/g,"%252B");if(q!=null)location="http://www.google.com/search?q="+q.replace(/\s+/g,"+")+"+site:"+location.hostname;void(0);
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 04:12:47
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5643


Total Post Ratings: +589

View Profile
« Reply #23 on: 13 February, 2011, 08:16:17 »
0

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
Logged

Munchor
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 21 May, 2013, 17:58:01
Date Registered: 16 October, 2010, 15:39:13
Location: Position
Posts: 6209


Total Post Ratings: +174

View Profile
« Reply #24 on: 13 February, 2011, 17:12:31 »
0

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)?
Logged
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 #25 on: 13 February, 2011, 17:31:04 »
0

I believe this may be what you're looking for:
http://www.omnimaga.org/index.php?topic=1532.msg26679#msg26679
http://www.omnimaga.org/index.php?topic=1532.msg27216#msg27216
-- or this --
http://www.omnimaga.org/index.php?topic=1532.msg69406#msg69406
http://www.omnimaga.org/index.php?topic=1532.msg71070#msg71070
« Last Edit: 13 February, 2011, 17:32:12 by ztrumpet » Logged

Munchor
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 21 May, 2013, 17:58:01
Date Registered: 16 October, 2010, 15:39:13
Location: Position
Posts: 6209


Total Post Ratings: +174

View Profile
« Reply #26 on: 13 February, 2011, 17:36:38 »
0



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
40
41
42
43
44
45
46
47
48
49
50
.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!
Logged
squidgetx
Food.
Coder Of Tomorrow
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 05:49:53
Date Registered: 30 May, 2010, 19:54:18
Location: eating somewhere
Posts: 1837


Topic starter
Total Post Ratings: +479

View Profile
« Reply #27 on: 13 February, 2011, 19:41:58 »
0

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 Big smile
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
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 04:12:47
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5643


Total Post Ratings: +589

View Profile
« Reply #28 on: 13 February, 2011, 19:47:56 »
0

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 Big smile

Awwww I didn't realize there was a second page, haha silly me Tongue
Logged

Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 01:40:03
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #29 on: 13 February, 2011, 19:57:41 »
0

Lol, I was wondering. I thought you were answering Darl181 in some 1337 way Grin
Logged




Pages: 1 [2] 3 4 ... 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 0.29 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.