Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MGOS

Pages: 1 ... 19 20 [21] 22 23
301
Axe / Re: Axe Q&A
« on: November 16, 2011, 01:15:02 pm »
You need to get the picture as TI-OS-Picture-Variable (Pic0 - Pic9).

In your Axe program file you simply write:

Code: [Select]
[Pic#]->A .this puts your TI-OS-PIC# in the ram and stores the beginning address to a.

Copy(A,L6,768) .this copies the 768 bytes to the main buffer to display the picture.

302
The Axe Parser Project / Re: Command reference help
« on: November 07, 2011, 03:34:48 pm »
ooh I never knew about that :D
The command index? That's in my opinion the most important book you need as axe programmer...

303
The Axe Parser Project / Re: Features Wishlist
« on: November 05, 2011, 04:37:48 am »
And this also might be something useful: Auto-Backup not only for the main program, but also for all the other included not-archived sub programs.

304
Axe / Re: Mario?
« on: November 05, 2011, 04:29:03 am »
Yeah, when I was writing larger programs, it was quite annoying that you have to scroll through the whole code. The next time I made multiple sub programs, but due to the fact that axe only backs the main progam up, I lost them all in a crash caused by a little error in my sub program.  >:(
Now I'm archiving them before compiling... which is quite annoying too - maybe Quigibo will add that it in future.

305
Humour and Jokes / Re: Funny #omnimaga quotes (NSFW)
« on: November 04, 2011, 06:21:46 pm »
Not an omnimaga quote, but something funny I read recently on the C++ forums:

Translated from German:
Quote
Topic starter: I'm looking for a sensor that is found on almost every PC and I can read easily. It is for a sample application. It plays no role what sensor that is, the main thing is that it delivers values.
What sensors are there and how can I read it using C++?

Answer 1: I have here a type of plate with 105 tiny pressure sensors ...

Answer 2: Yes, I have that too. With the number of hold down pressure sensors you can measure how comfortable the cat lays on it.

306
The Axe Parser Project / Re: Features Wishlist
« on: November 04, 2011, 11:23:47 am »
I know this is quite difficult, but how about the text and the circle commands for the back-buffer and arbitary buffers?

307
Axe / Re: Some questions: Toggle button, Buffers, Appvars
« on: November 04, 2011, 11:19:41 am »
Yeah, you mean you cant use for(A):...:end
I'm not sure, but I think you cannot do that.

308
Axe / Re: Some questions: Toggle button, Buffers, Appvars
« on: November 04, 2011, 10:01:46 am »
Yeah, for(number) loops (number) times. But (number) has to be a constant.

309
Axe / Re: Some questions: Toggle button, Buffers, Appvars
« on: November 04, 2011, 08:48:01 am »
1. jacobly's solution is what I would do too.
I did that and it works quite good.


Quote from: Quigibo
2. You can do it even faster with the new speed loop: ;D
Code: [Select]
L₆
For(383)
 {➔A}ʳ﹢{A+L₃-L₆}ʳ➔{A}ʳ+2
End
I just realized that there is this cool new loop. It might be useful for something, but for my problem I found another way avoiding drawing two buffers over each other.


Quote from: Quigibo
3. If your saved data takes a standard form like "appvSAVE1", "appvSAVE2", "appvSAVE3", etc.  Then you can construct the first part of the string in some memory by doing copy("appvSAVE0",L1,7) and then make the string the Nth file by doing N+'0'➔{L1+5}.  Now all you have to do to load the file is just GetCalc(L1) which uses the string you just constructed.  If you want to list all the appvars on the calculator that start with your custom header and choose from those, you'll have to use memkit.
Due to the big program size I reached I think it's better to use a simple way, so I will just have some default save files the user can choose from. But still thanks Quigibo.

310
Axe / Re: Mario?
« on: November 03, 2011, 02:52:05 pm »
.... But it saves one or two bytes in your source.
I use a lot of the old syntax. Maybe 20 times, so it would save 40 bytes. Not much, but I'd rather optimize as much as I can.
Yeah, and it also makes your code esier to read I think. You cannot confuse the parameters and the subroutine name. The C++ syntax is the same so I got used to that.

311
Axe / Re: Mario?
« on: November 03, 2011, 02:40:45 pm »
better syntax: LABEL(parameter,parameter etc
??? is that new?
I think it came with 1.0.1 or so with these many updates.
Is it faster?
No, it's just another syntax form to do exact the same thing. But it saves one or two bytes in your source.

312
Axe / Re: Mario?
« on: November 03, 2011, 02:37:57 pm »
better syntax: LABEL(parameter,parameter etc
??? is that new?
I think it came with 1.0.1 or so with these many updates.
Edit: 1.0.0

313
The Axe Parser Project / Re: Features Wishlist
« on: November 03, 2011, 11:01:09 am »
I don't know which kind of routine is used. I once programmed a piston engine-simulation with sin and cos and that was pretty fast.

And if you do always the same calculation with the sin/cos values, I think it is better to use a LUT for only these 16 values.

314
The Axe Parser Project / Re: Features Wishlist
« on: November 03, 2011, 10:52:26 am »
sin(x) returns a value between -127 and 127, where x is between 0 and 255. So if you want to get the sine of 90°, you type sin(64) and get 127.
It's the same with the cosine function.
If you want to plot the points on a circle with radius 10, you think of a number you have to divide 127 to get 10, which is about 13.
You also have to add the Center coordinates.
Code: [Select]
For(I,0,255)
sin(I)//13+20->Y
cos(I)//13+20->X
Pxl-On(X,Y)
End

315
Axe / Re: Some questions: Toggle button, Buffers, Appvars
« on: October 31, 2011, 05:05:08 am »
[...] I calculated that the following loop runs about 40 times per second at 6MHz:

Code: [Select]
Repeat getKey(15)
For(A,0,383)
.That ﹢ symbol is the 16-bit OR operator
{A*2+L₆}ʳ﹢{A*2+L₃}ʳ→{A*2+L₆}ʳ
End
C+1→C
End

Yeah, I will try that.

3. Is there a short way of letting to user chose from a bunch of saved files (appvars) to reload or chose the file to save the data, without having that many If-statements?

You have two options - you can either use Memkit to get the names of all the appvars in memory, and then display them as a scrolling list, and have the user choose between them, or you can use or write a custom input function, like the one in Firefall, that one's pretty good.
I think I'm going to make a custom menu with limited amout of Appvars - that's enough for the beginning - maybe I canm fix that later if Axe has new features to do that more easily.

Thanks a lot, guys!

Pages: 1 ... 19 20 [21] 22 23