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 - SamTebbs33

Pages: [1] 2
1
Thanks guys! I will be sure to our these to good use

2
Oh no, I meant how would I send the numbers to the asm routine :p sorry for not being clear.

For example, would I set A to the number to rotate?

3
Thanks!

How would I input the numbers I want to rotate?

4
Aah, I see.

Does anyone know of an IDE that supports Axe and works on a mac?

5
(D and 255)->U.Getting the first 8 bits
(D and 65280)->V.Getting the last 8 bits
I fear those don't work since "and" is a 8-bit operation IIRC. To do a 16-bit operation you need the "." (which is somewhere in Catalog, not the "." you'd put between 3.14). But since you want to take the 8 first bits and the 8 last bits, you can also do {°D} and {°D+1}.

I have some axe code that works on my calculator (below), but it doesn't function the same in SC3 on Cemetech.net
That doesn't really surprise me. SC3 is pretty new and SC2 didn't support Axe. I suggest you to use TokenIDE instead.

Wow, I can't believe I forgot that and is an 8 bit operation! thanks!

I would use TokenIDE but it only works on Windows :/ I have a mac.

EDIT: What does the ° symbol do?

6

By "add them together", do you mean the arithmetic operation "add" or the combining of the two binary strings (concatenate) ? From what you're saying, you want each to be rotated individually in the absence of each other? If that's the case, then you'll want something completely different than what we've supplied.

What is it that you're trying to accomplish?

Yes, that's what I would like to do I'd like to rotate the first 8 bits of the two byte number by 1 bit and then rotate the last 8 bits of the two byte number (adding zeros for the first 8 bits) and then add (+) the two rotations together.

What I'm doing is making a remake of an old game from the 80's. This game used procedural generation to generate 8 galaxies and it got the generations seeds for each one by rotating each starting seed by one bit, on the 8th rotation it would return to the fist seed, hence sending you back t the first galaxy.
For clarification, the first value of 1 of the 3 seeds is 231114 and the first rotation will set it to 46228.

I have some axe code that works on my calculator (below), but it doesn't function the same in SC3 on Cemetech.net

Code: [Select]
.A
23114->A. Seed 1
584->B.Seed 2
46931->C.Seed 3

For(E,0,8)
ClrHome
A->D
sub(ROT).D is input, W is output
W->A
B->D
sub(ROT)
W->B
C->D
sub(ROT)
W->C
Disp A>Dec,[i],B>Dec,[i],C>Dec
Pause 10400
End
Return

Lbl ROT
(D and 255)->U.Getting the first 8 bits
(D and 65280)->V.Getting the last 8 bits
(2*U) or (U/e^(7))->W
(2*V) or (V/e^(15))+W->W
Return

7
Thanks for the input guys. @calc84maniac Sorry for not being clear, I would like to rotate each byte left and then add them together. So for example, using 1011011010010110, I'd like to rotate 0000000010010110 (255 and 1011011010010110), then rotate 1011011000000000 (65280 and 1011011010010110) and then add them together.

Is Asm(7D291F6F) still the correct routine for a left rotation?

Since I haven't learnt about asm yet (I'm planning to), what would I input to the routine and how?

Thanks!

8
Hi!

I would like to apply a bitwise left rotation to the each of the two bytes of a number and found that there was a command in asm that does this.

Is it possible to execute this command (RLC) from within the Axe syntax? If not, is there an asm program that I can execute to do this?

If none of the above are possible, does anyone have any knowledge of a routine that applies a left rotation to the first 8 bits ad then the last 8 bits of a two byte number?

Thanks!

9
The Axe Parser Project / Re: Setting Xmin, Xmax, Ymin et.c
« on: January 18, 2014, 02:00:48 pm »
Thanks guys! I didn't know that the screen dimensions were preset to exactly what I wanted them to be! :)

10
The Axe Parser Project / Re: Setting Xmin, Xmax, Ymin et.c
« on: January 18, 2014, 12:27:18 pm »
I'm trying to draw a shape using lines but I can't change the variables, so I'm stuck with very little space to draw with (-10 to 10)

11
The Axe Parser Project / Setting Xmin, Xmax, Ymin et.c
« on: January 18, 2014, 11:43:16 am »
Hi!

Is it at all possible to change Xmin, Xmax, Ymin, Ymax, Xscl and Yscl from within an Axe program? I have tried several methods such as GetCalc("varXmin") but none seem to be doing what I need, is it at all possible and if so, what am I doing wrong?

Thanks!

12
Axe / cos(, tan( and sin( return strange values
« on: January 16, 2014, 12:43:34 pm »
When using Disp {sin(90)}>Dec I get 8, why is that? If that is supposed to happen, could anyone guide me to somehow getting the proper value of sin(90)?

Thanks!

13
Thanks for the explanation, I think I need to investigate the assembly number system a bit more. The only real knowledge of binary that I have is bitwise operations and the basics (so I was very excited when I saw that the " and " et.c commands are bitwise operations in Axe :D, I had to write my own in TI-Basic).

Regarding my choice of data compression, I originally used that method to 'bypass' the dimension max of lists in Ti-Basic, it meant that I could store multiple numbers in just one list element. But I do understand that it uses large amounts of memory due to the decimals and imaginary numbers.

I'll put aside my games programming and just go back to basics to ensure that I understand the system fully (such as the r command et.c)

One last question for the moment, how would I recall the data that I stored to the memory by using [<hex code>]? Would I use a GDB pointer?

And randInt(A,B) would be rand^(B-A)+A in Axe.

Thanks! I'll keep that in mind.

14
Have you seen what Matrefeytontias is up to?
http://www.ticalc.org/archives/files/fileinfo/457/45784.html

Wow, that's some nice face culling

P.S. At the top of the CUBE source code, some hex values are enclosed in square brackets but not passed to any variables, what does this do?

15
Thanks for the quick reply!

I see, I guess I'm just going to have to get some intense practice...

Have you heard of a game called Elite? Well I am making a remake of said game but due to the limitations of Ti-Basic I scrapped the idea of including 3D graphics. However, as soon as I saw demos of Axe (the spinning cube really got me) I decided to give it a shot. The reason why I need to get the fraction and inter parts of a number is for data compression, since I need to generate stats for 2048 worlds and store it somehow (to be an accurate remake of the 1984 original). In Ti-Basic I was compressing 4 numbers into one by using the following formula: A+(B/10)+(C+(D/10))i
This would compress the following numbers: 12, 8, 23, 3 into 12.8+23.3i which allowed me to store masses of data.

Thank you for the explanation, but I am a little confused by your last paragraph, could you please recap how I would retrieve the integer and decimal parts of e.g. 20/8?

Thanks!

Pages: [1] 2