Hi. I've been interested in calculator programming for a while now, but I haven't actually tried starting until now. I'm teaching myself ez80 assembly because I'm extremely interested in low level stuff, plus it seems easier to learn because I have background in C and x86_64 assembly and haven't worked much with BASIC in any capacity.
I wrote a simple ez80 assembly program and assembled it, but I've had issues sending it to CEmu for testing. I've clicked the "Resend" button but the transferred program does not appear when I click the "prgm" button. Is there something I'm missing? Also, is there any documentation on how to use CEmu more effectively aside from the wiki on GitHub?
In addition, is anyone aware of resources that document some of the OS-provided functions that I can see in ti84pce.inc? Has KermMartian's guide seen an update for the CE? All the best!
Could you share the code as well as the commands you're using to assemble it? It's possible that you're generating a binary but not a TI program, which won't transfer to the calculator.

For the most part, the OS functions behave the same as they do on the monochrome calculators, so you can use the TI-83 Plus SDK documentation or WikiTI as a reference. For functions that use the C ABI, you can also look at the headers for the function in the C toolchain.
I was under the impression that the TI84+CE could run flat binaries, is that not true (I guess I am aware of a program that does convert between the two by Kerm so that does prove me wrong; it is for the TI83 though)? My assembler is spasm-ng and I am using the command `spasm -E test.S`
Program (pretty sure the code looks fine even though I've never written any for the platform, it's not much though):


Code:
#include "../ti84pce.inc"
        call _homeup
        call _ClrScrnFull
        ld hl, programdata
        call _PutS
        call _GetKey
        call _ClrScrnFull
        ret

programdata:
        .db "Hi"
You need to include the identifying tokens in your binary and set the origin correctly. The example program that SourceCoder gives you is a minimal do-nothing program illustrating this:


Code:
.nolist
#include "ti84pce.inc"
.list

   .org UserMem-2
   .db tExtTok,tAsm84CeCmp
   ret

UserMem is the address at which the calculator loads code to run it, and the tExtTok sequence is the tokens that identify a program as a squished CE assembly program to the OS.

Edited: the binary also needs to be packed into an 8xp file, which is just the package for a program that is used by linking programs. Spasm can do that directly if you specify the name of the output file on the command line, as jacobly demonstrates below.
You can run spasm -E test.asm test.8xp to create a program file that can actually be transferred to your calc. Also, since it is asm you need to add the asm header to your program:
Code:
   .db   tExtTok, tAsm84CeCmp
   .org   userMem
Alright! That clears up that question. Thanks everybody!
If you are using the CE, fasmg is now the assembler you should be using. You can find it and assembly tutorials for the CE here: https://github.com/CE-Programming/asm-docs

Since you have background in C, have you considered using the CE C Toolchain, available here? https://ce-programming.github.io/toolchain/master/index.html
>If you are using the CE, fasmg is now the assembler you should be using
Is this a recent development in the calculator programming space? Previous searches hadn't revealed that flat had support for it.
I do intend to try the C toolchain at some point, however I want to play around with the bits and bytes with assembly before I try to build anything bigger.
It's been a few years now. So yes, recent, but not that much either :p
Quote:
Is this a recent development in the calculator programming space

Recent in like the past 3 years maybe? But yes, all new programs should be developed in fasmg, as it is actively being maintained, unlike spasm-ng.
Silly question, but the versions of fasmg provided here: https://github.com/CE-Programming/asm-docs/tree/master/programs are not custom versions that support the z80, correct (as in, this functionality is available in upstream fasmg)?
CavesUnderscore wrote:
Silly question, but the versions of fasmg provided here: https://github.com/CE-Programming/asm-docs/tree/master/programs are not custom versions that support the z80, correct (as in, this functionality is available in upstream fasmg)?

fasmg is a "macro" assembler and can have a wrapper to support pretty much any architecture -- it's not built into the program itself. This wrapper is provided in the download, and comes from jacobly's repo available here: https://github.com/jacobly0/fasmg-ez80
Interesting. Are there any syntactical differences between spasm-ng and fasmg-ez80 that I should know?
ez80 Heaven is still linked to and they recommend spasm-ng; hence my question.
yes
  
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