I have been pondering on should I program for the TI-84p CE, I was told assembly works wonders on TI Calculates with color. I know that there is alot of benefits when you learn Assembly but really is it worth it. I have seen alot with TI-BASIC. I have also seen Assembly programs. In my opinion, I say you can do alot of stuff with TI-BASIC and Assembly. Should I really learn Assembly? I have directed myself to this resources and I am not satisfied,
Assmebly language: 64k Programming
It's a rather personal decision. I have personally avoided Assembly for a few reasons:
- The documentation for color calcs is poor compared to grayscale Assembly
- Assembly is much more complex than TI-Basic
- If I code in Assembly, I might as well be coding on a smartphone or other device
Basically, I like TI-Basic because it is weird and cool and challenging all at the same time. Assembly feels too much like computer coding made unnecessarily difficult because it's on a calculator. And beside, I don't own a grayscale calc anymore so I'd have a bit harder time actually using Assembly.
That's not to say there are not valid reasons to pick Assembly:
- Assembly is vastly more powerful than TI-Basic
- Assembly has more potential
- Assembly can make some cool stuff
Just look at some of the Flash games out there. The stories of Mario and Pokemon and Doom being ported onto calculators are achieved by coding in Assembly/C; TI-Basic simply doesn't have the power or graphics capabilities to compare. And, Assembly can utilize more "machine-level" commands to create faster and potentially more unique code.
An actual Assembly expert could give your more details and direct you to guides, but there are already many linked on our ASM info pages.
The solution to a complex problem is often a simple answer.
Could you link to them I am having a surprisingly hard time finding it?
4920616D204261746D616E
Hewwo, my name is Achak Claw. I was formerly BioHazard.
I have tried using this one, but I have had some trouble understanding it. It sounded like you were saying that there were more linked on this website, since you said "but there are already many linked on our ASM info pages". I would think that they should be listed on the resources page.
4920616D204261746D616E
The page on assembly gives references at the bottom, and says:
For more on assembly, visit z80 Heaven and WikiTI.
ICE Compiler is a great alternative that is easier to pick up than ASM. You might think of it as the Axe Parser for CE.
Nah, just learn C. You can compile C for the TI-84+, SE, CSE, and CE, and coding in C will make it much easier to build much larger projects. It also makes it easy to port, or even cross-compile, code with the calculators and PC so you aren't just stuck with a calculator program that may never even get used.
You won't see much of a speed difference in C and assembly because C compilers typically are a lot smarter than you are. You really only want to use C or assembly if you want (1) really fast speeds, and/or (2) more control over the hardware.
Also, if you have a CE, don't follow Z80 tutorials. The CE is not a Z80 machine, it's an eZ80 machine. There are eZ80-specific tutorials with the TI-84+CE in mind, which I'd recommend following those instead. There are minor differences but those differences can cause certain example programs to simply not work on the CE if they were not written for the CE.
What do you mean "C"? Like C++?
Hewwo, my name is Achak Claw. I was formerly BioHazard.
C++ came after C. C is a procedural programming language and C++ is an object-oriented programming language. You can usually compile C code within a C++ compiler but you can't do it the other way around, because C++ has objects and classes while C does not.
C is much easier than assembly but will get you about the same speed.
For example, here's a simple C program that will print out the first 14 fibonacci numbers:
uint8 fibonacci(uint8 n) {
if (n == 0) return 0;
else if (n == 1) return 1;
else return fibonacci(n - 1) + fibonacci(n - 2);
}
void main() {
uint8 i;
for (i = 0; i < 14; i++)
printf("%i: %i", i, fibonacci(i));
}
In assembly, you might write something like this:
fibonacci:
cp 0
jr nz, fibonacci0
ld a, 0
ret
fibonacci0:
cp 1
jr nz, fibonacci1
ld a, 1
ret
fibonacci1:
dec a
push af
call fibonnaci
ld b, a
pop af
push bc
dec a
call fibonacci
pop bc
add a, b
ret
main:
ld c, 0
for_start:
ld a, c
cp 14
jr c, for_end
push bc
call fibonnaci
pop bc
ld hl, printf_str
push hl
push bc
push af
call printf
ld a, c
inc c
jr for_start
for_end:
printf_string:
.db "%i: %i"
As you can probably tell, the C code is much neater, much more compact, and requires much less thinking to actually write it. C compilers are usually smarter than you are so they often will make performance improvements for you in your code.
Due to C code being much neater, easier to read, much more compact, etc, it is much better for very large projects.