Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
So you want to program your TI-83 Plus or TI-84 Plus in z80 assembly (z80 ASM)? Despite what you may have heard, it's not that difficult of a language, although it does require more care and precision than other languages. Here at Cemetech, we often recommend that coders have a decent familiarity with TI-BASIC before beginning z80 ASM. If you are indeed competent with TI-BASIC, then you probably want to know exactly what sets BASIC and assembly apart:

  • BASIC is an interpreted language, which means that the OS reads your program command by command as it runs it, translating what each command means on-the-fly. Assembly is assembled, a process which takes place before your program is run. Assembly programs are therefore much, much faster.
  • TI-BASIC catches many of your errors for you, displaying error messages that help you debug your code. Errors in z80 ASM often cause your RAM to clear.
  • You can develop TI-BASIC programs entirely on your calculator. Because ASM source code tends to be long and complex, and few on-calculator ASM tools exist, it is recommended that you develop assembly programs on a computer. You can then use an emulator to test your programs and save needing to repeatedly send your program-in-progress to your real calculator.
  • TI-BASIC programs are great at working with floating-point (decimal) numbers. ASM programs are much, much faster at integer math, but are cumbersome for floating-point math.
  • z80 ASM can produce fancy graphics far faster than TI-BASIC programs, even compared to Hybrid BASIC.

The power of z80 assembly combined with how easy it is to make programs that clear your RAM turn many potential ASM coders away from the language. We hope that you will persevere.

What do I need? To get started programming in z80 assembly, you need a few things:

  • An assembler. We recommend the Doors CS SDK, which includes the Brass assembler by community member benryves. Despite the name, it can create nostub (shell-less), Ion, and MirageOS programs in addition to Doors CS ASM programs.
  • A text editor. We strongly recommend Notepad++ for Windows users. gvim/vim are great choices for Linux users.
  • An emulator. Not completely necessary, but makes debugging faster than sending each new program version to your calculator for testing. We recommend jsTIfied, Cemetech's online graphing calculator emulator webapp, or WabbitEmu.
  • A tutorial. Unlike TI-BASIC, which a smart individual could pick up by reading through lots of existing programs, z80 ASM has enough nuances that a tutorial is invaluable. The best option right now is Learn TI-83 Plus Assembly in 28 Days
No programmer should live in a vacuum. Don't hesitate to ask post a topic in this subforum and ask any questions, big or small. We can't wait to see what you create!
For Linux (and Windows) users, TilEm2 is also a very good emulator with nice debugging features. Spasm is also a nice assembler for Linux (and of course Windows) folks. (If you need help setting any of this up, please ask!)

Z80 assembly really isn't as difficult as it's made out to be. The hardest part tends to be getting your first program to assemble and run correctly, after that it's pan comido. While it's perfectly possible to write C-style code in assembly and get a playable game, you'll find that as you progress you'll start to figure out how the processor works and learn how to communicate more directly and efficiently with it and suddenly you can do much more complex things, things you never even thought possible (an FPS?! pinball?! a GB emulator?!). That's one of my favorite things about assembly, you know exactly what each command does and what's going on at all times.

Some things that can be helpful to understand to be able to start writing fun games quickly:
    -indirection
    -what buffers are and why/how to use them
    -direct input
    -tilemapping
    -how the LCD is mapped: 1 byte = 8 pixels. This complicates drawing individual pixels a bit but means your sprites will be much smaller in size.
    -bit shifting commands, absolutely necessary once you want to start making games that scroll smoothly and also very useful for optimizing
    -storing and accessing data in tables

A lot of the (z80) assembly programmers around today have been around for a long time and are really excited to see new faces eager to learn. I can't speak for everyone, but i think it's safe to say that for a lot of us it's a hobby that holds a special place, it's what got us interested in programming in general and was our first introduction to programming beyond (TI) BASIC. I personally love to see the asm community grow, so as Kerm says please do ask away!

EDIT: Added links
I think we need a new tutorial for the new calculators because they have different bcalls, ram areas, and the LCD is colored.
tmwilliamlin168 wrote:
I think we need a new tutorial for the new calculators because they have different bcalls, ram areas, and the LCD is colored.

I would love to create text and/or video tutorials if I knew enough. Razz I could do maybe a the first few sections/videos, but probably not all.

EDIT: I have an 84+ CE, BTW.
I strongly recommend that you guys consider joining us in improving ASM in 28 Days. We've been working on fixing its errors and making it clearer, and one of the primary goals we discussed was making it applicable to the color calculators. The bcalls() are actually pretty similar; the LCD, keyboard, and RAM areas are the primary things that have changed. Of course, teaching people to use 3-byte-word registers properly will also need to be added.
KermMartian wrote:
So you want to program your TI-83 Plus or TI-84 Plus in z80 assembly (z80 ASM)? Despite what you may have heard, it's not that difficult of a language, although it does require more care and precision than other languages. Here at Cemetech, we often recommend that coders have a decent familiarity with TI-BASIC before beginning z80 ASM. If you are indeed competent with TI-BASIC, then you probably want to know exactly what sets BASIC and assembly apart:

  • BASIC is an interpreted language, which means that the OS reads your program command by command as it runs it, translating what each command means on-the-fly. Assembly is assembled, a process which takes place before your program is run. Assembly programs are therefore much, much faster.
  • TI-BASIC catches many of your errors for you, displaying error messages that help you debug your code. Errors in z80 ASM often cause your RAM to clear.
  • You can develop TI-BASIC programs entirely on your calculator. Because ASM source code tends to be long and complex, and few on-calculator ASM tools exist, it is recommended that you develop assembly programs on a computer. You can then use an emulator to test your programs and save needing to repeatedly send your program-in-progress to your real calculator.
  • TI-BASIC programs are great at working with floating-point (decimal) numbers. ASM programs are much, much faster at integer math, but are cumbersome for floating-point math.
  • z80 ASM can produce fancy graphics far faster than TI-BASIC programs, even compared to Hybrid BASIC.

The power of z80 assembly combined with how easy it is to make programs that clear your RAM turn many potential ASM coders away from the language. We hope that you will persevere.

What do I need? To get started programming in z80 assembly, you need a few things:

  • An assembler. We recommend the Doors CS SDK, which includes the Brass assembler by community member benryves. Despite the name, it can create nostub (shell-less), Ion, and MirageOS programs in addition to Doors CS ASM programs.
  • A text editor. We strongly recommend Notepad++ for Windows users. gvim/vim are great choices for Linux users.
  • An emulator. Not completely necessary, but makes debugging faster than sending each new program version to your calculator for testing. We recommend jsTIfied, Cemetech's online graphing calculator emulator webapp, or WabbitEmu.
  • A tutorial. Unlike TI-BASIC, which a smart individual could pick up by reading through lots of existing programs, z80 ASM has enough nuances that a tutorial is invaluable. The best option right now is Learn TI-83 Plus Assembly in 28 Days
No programmer should live in a vacuum. Don't hesitate to ask post a topic in this subforum and ask any questions, big or small. We can't wait to see what you create!


Clearing RAM isn't the same as resetting/clearing memory, right? If not, what does it do? (I work with computers a lot, so I equate clearing RAM with a soft reset or reboot)
_iPhoenix_ wrote:
Clearing RAM isn't the same as resetting/clearing memory, right? If not, what does it do? (I work with computers a lot, so I equate clearing RAM with a soft reset or reboot)
As the name implies, clearing RAM will clear the RAM Razz. It is not the same as resetting/clearing all the memory. If you clear the memory, the flash memory and RAM will be cleared, but if you clear the RAM, then only the RAM is cleared. Putting something in the archive is kind of like clicking "save as" in a word document. If you did not save your document and you unplug your computer (effectively clearing the RAM, which is where the document was), then the document will be lost.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement