I'm working on a very simple on-calc Z80 Assembler for the TI-84+CSE.

Basically my assembler will take what's written in a program file and then build an unsquished assembly program from it.

For example, if you create a new program named "EF" then write this inside:
Code:
LD A,*
DB 41
RST 28H
DW 44FB
RET


You can then run the assembler like this:

Code:
"EF":Asm(prgmZASM)


That will generate another program named "OUT" with this inside of it:

Code:
Asm84CPrgm
3E41EFFB44C9


If you want to squish it you can just use:

Code:
AsmComp(prgmOUT,prgmEFSQ)


This is basically how the syntax is going to work.
It's pretty simple because it mainly runs off a table.

Currently I'm working on adding labels and another table for BCalls (so instead of "DW 44FB" you can just use "DW PUTC".

This isn't like going to be anywhere near as good as Mimas or anything.
But I couldn't find any on-calc assemblers for the TI-84+CSE so I decided to try my hand at making one myself.
You can create a program to write a "C" on the screen like this:
Code:
LD A, *
DB 'C'
RST 28H
DB FBH
DB 44H
RET


The table it uses is copied from Zeda's Opcode Reference Chart. So anything on that first table will work.

Make sure to put an empty line at the end because some reason it doesn't read the last line (I'll fix this eventually).

You can compile it by running:

Code:
"PNAME":Asm(prgmZASM)


Obviously replace "PNAME" with the name of your program.
Doing this will generate a program named "OUT".
This is an unsquished Assembly program.
You might want to check this before finally compiling it so you don't crash your calc if it didn't work (it should work tho).

You can finish the compilation by running:

Code:
AsmComp(prgmOUT,prgmPNAMEC)
I've basically fixed some bugs (you don't need an extra line at the end anymore) and I added "DW".

So now you can do this to display a "1337" on the screen:
Code:
LD HL,*
DW 1337
RST 28H
DW 44FEH
RET


Also, spacing doesn't matter anymore. You can add all the indents and spacing you want and it's fine.
I removed the previous download links because there was a huge bug in them that could corrupt your OS.

I fixed it and here is a more updated version:
https://drive.google.com/file/d/0B4jc3uKzHHNXYWRQYlBLM0RmR2s/edit?usp=sharing

If anyone wants to test it out, that version is pretty stable.
I still haven't finished labels, but you can add them, they just won't do anything yet.

All 255 opcodes are there. Everything from NOP to RST 38H.
You can also use DW for both hex and base-10.
And you can use DB for hex, base-10, and char.
Excellent!
Is it written in ASM or TI-Basic ? Either way that will surely come in handy Very Happy
Interesting project. Got any screenshots of it in use with some form of UI?
I wrote one a few years ago for the 83, 83+, and 86.
http://www.ticalc.org/archives/files/fileinfo/422/42297.html

The only real limit is no relative jumping. Good luck with your project.
tifreak8x wrote:
Interesting project. Got any screenshots of it in use with some form of UI?


There is no UI. This compiles files written in the program menu.
The UI you use is the same one used for writing TI-BASIC programs.

matrefeytontias wrote:
Is it written in ASM or TI-Basic ? Either way that will surely come in handy Very Happy


Asm.

seklorean wrote:
I wrote one a few years ago for the 83, 83+, and 86.
http://www.ticalc.org/archives/files/fileinfo/422/42297.html

The only real limit is no relative jumping. Good luck with your project.


You should see if you can port that to the TI-84+CSE.
  
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 UTC - 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