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

Pages: [1] 2 3 ... 14
1
TI Calculators / Re: CEmu - A CE Emulator
« on: September 28, 2016, 03:15:38 pm »
Now that pimath's server is down, I created a buildbot for my server so there are now windows CEmu builds for 32-bit and 64-bit which are updated every time someone commits.

2
The Axe Parser Project / Re: Lenght string function in pixel
« on: September 10, 2016, 11:59:15 am »
If dansChaîne means inString, then you have the arguments in the wrong order.  It should be inData(BYTE,PTR).

Optimized, for fun:
Code: (Axe) [Select]
Lbl DimStr
  0
  While →r₃{r₁++-1}
    !If →r₂ xor ' '
      1
    ElseIf inData(r₂,"i.:!")
      2
    ElseIf inData(r₂,"flst()[],;")
      3
    ElseIf inData(r₂,"z&~")
      5
    ElseIf inData(r₂,"mw*π$#@")
      6
    Else
      4
    End
    +r₃
  End
  r₃
Return

3
The Axe Parser Project / Re: Degree symbol
« on: September 07, 2016, 03:07:06 am »
° in Axe is very much like & in C. EXP→X stores some value into some memory represented by "X". Where is this memory you ask? Why at the address °X. This means that EXP→X is actually the exact same thing as EXP→{°X}ʳ. In fact, X and {°X}ʳ are completely interchangeable for any access to the variable X.

One use for this is to sign extend a byte located in X. Axe has a signed{} command, but that requires an address to load from. The solution is to use signed{°X}.

Another use (which, oddly enough, I can't seem to find in Commands.html) is for creating named variables:

EXP→°AB creates a variable called AB which can be used just like variable A, etc, and is stored at the address EXP.

An example showing both uses is °A->°AA which creates a variable called AA which aliases (always contains the same value as) A.

4
The Axe Parser Project / Re: Bug Reports
« on: September 07, 2015, 03:43:06 am »
Code: (Axe) [Select]
Copy(,,∗{Y₁})
            ^
  ERROR
PARENTHESIS

It appears that the } is closing the Copy( command.  It seems that the operator has to be one that uses a subroutine, such as , ^, or /.

5
ASM / Re: DivAHLby10 Routine Check
« on: July 06, 2013, 06:53:35 am »
Just wrote a program to brute force check the algorithm and it works perfectly as is. :)

6
Humour and Jokes / Re: Weird/funny pictures thread
« on: July 04, 2013, 12:12:56 am »

Yo dawg, I herd u like touring ubuntu, so I put ubuntu tours in your ubuntu tours so you can tour ubuntu while you are touring ubuntu (in ubuntu).

7
Axe / Re: Two-Byte Tokens ?
« on: June 03, 2013, 05:43:21 pm »
Iff a byte is equal to ᴇ5C, ᴇ5D, ᴇ5E, ᴇ60, ᴇ61, ᴇ62, ᴇ63, ᴇ7E, ᴇBB, ᴇAA, or ᴇEF, then it is the first byte of a two byte token, and it can not be the second byte of a two byte token.

8
Axe / Re: Axe Programming
« on: May 18, 2013, 12:52:15 pm »
Just do float{GetCalc("varX")}→X and float{GetCalc("varY")}→Y and then you can use X and Y like normal Axe variables.

9
Computer Programming / Re: Some Java questions
« on: May 05, 2013, 11:59:03 pm »
All primitive types start with a lowercase letter, and as long as you follow Java naming conventions, all object types start with a capital letter.  You can actually do special things with many of the classes in the package java.lang.  For example, you can say Integer i = 5; and i would be an object.

10
Computer Programming / Re: Some Java questions
« on: May 04, 2013, 10:40:45 pm »
It appears so.

11
Computer Programming / Re: Some Java questions
« on: May 04, 2013, 10:08:35 pm »
What is the difference between an interface and an abstract class?
The only difference I can see is that all methods in an interface are abstract, while abstract class can contain both concrete and abstract methods.
Other than that and the syntax, the only real difference is that a class can implement any number of interfaces but can only extend one abstract/non-abstract class.

Can you define fields inside an interface or abstract class, and what would those be used for?
In Java you can only define static fields in an interface.  Any class that implements that interface then gets those fields "for free."  In an abstract class, you can define any field for the exact same reasons you define fields in normal classes.

What the heck does Encapsulation mean?
In OOP, this means that you don't/can't access the internal details (private, or otherwise restricted, fields and methods) of a class.  This is useful because whoever writes a class doesn't have to worry about someone else changing some fields incorrectly and putting it in an invalid state.  It's useful for whoever uses a class because they don't need to worry about changing some fields incorrectly and putting it in an invalid state.  Also, this allows someone to rewrite the class and implement it internally in a completely different way, without breaking compatibility with existing code.

What is the difference between a static method and a non-static method?
Non-static methods have access to a variable called "this" which means they can access all other methods and fields of that class.  Static methods do not have this variable, so they can only access static methods and fields of that class (unless they obtain an instance of that class).  The difference when calling them is:

ClassName.staticMethod();
ClassName objectReference = ...;
objectReference.nonStaticMethod();

Is this an example of an enhanced for loop?
Code: [Select]
String[] maga= {"you", "lost", "the", "game"};
for(String omni:maga}
     System.out.println(omni);
Yes, also known as a for each loop.

12
I have a question: What program do we submit if we're doing Axe? The compiled executable, or the source?
You'd have to give both.
I assume this applies to z80 assembly also?

So, my calculation of "300 per second" was off by quite a bit. I forgot to calculate in non-primes and the wasted cycles there :P I only get about 30 primes per second, but my algorithm could be better refined XD

(And this is at 6MHz)
According to my calculations, this is almost exactly the worst-case speed I am getting (29.78 pps). :o

Edit: Runer suggested that I don't post timings so as not to discourage anyone, so I'll just say that my program can get the 5953rd palprime in under an hour. ;)

13
TI-Nspire / Re: z80 emulator for Nspire
« on: April 22, 2013, 12:57:01 pm »
Hayleia: You have to save as a *.rom file, otherwise it creates a save file which won't work.

Edit: To clarify, click File -> Save, choose a file name that ends with .rom, and then rename the resulting file to .rom.tns.

14
TI-Nspire / Re: z80 emulator for Nspire
« on: April 20, 2013, 06:57:02 pm »
Fixed a sector erase bug, so Axe works now.

15
Axe / Re: [TUTO] How to make get rid of line clipping in Axe!
« on: April 17, 2013, 10:30:24 pm »
If you really need line clipping, you can use this 449 byte routine (not including the subroutines used).
The routine uses the full signed 16-bits of each parameter, however it fails for large |x2-x1| and/or large |y2-y1| due to overflow
Code: [Select]
:Lbl LineC
:If r4<<r2
:r1->r5:r3->r1:r5->r3
:r2->r6:r4->r2:r6->r4
:End
:ReturnIf r4<<0
:ReturnIf r2>=>=64
:r1-r3->r5
:r4-r2->r6
:If r2<<0
:r4*r5//r6+r3->r1:0->r2
:End
:If r4>=>=64
:r2-63*r5//r6+r1->r3:63->r4
:End
:If r3<<r1
:r1->r5:r3->r1:r5->r3
:r2->r6:r4->r2:r6->r4
:End
:ReturnIf r3<<0
:ReturnIf r1>=>=96
:r2-r4->r5
:r3-r1->r6
:If r1<<0
:r3*r5//r6+r4->r2:0->r1
:End
:If r3>=>=96
:r1-95*r5//r6+r2->r4:95->r3
:End
:Line(r1,r2,r3,r4)
:Return
Just sayin...

Pages: [1] 2 3 ... 14