Multiple Language Programming on Ti-Calculator

自作多情 提交于 2019-12-14 01:23:48

问题


I am interested into programming with different languages besides Ti-Basic (like Java, C, and Python) on my Ti-84 plus calculator. Does my calculator support this, and if not, are there any calculators on the market that would be able to do this? Thanks in advance!

(The idea is that when I don't have access to my computer at home, I could just pull out my pocket calculator and start programming and testing out some algorithms on the go that come in mind.)

It doesn't have to be a calculator, just something cheap and programmable and something I can carry around in my hand.


回答1:


TI's calculators let you program them in z80 assembly! Unfortunately, TI didn't include a way to program in it on-calc using mnemonics (there are ways to, though. More on that later). You can, however, type machine code directly into the TI-BASIC program editor by starting a program with the AsmPrgm (or Asm84CPrgm, or Asm84CEPrgm, depending on the calc you have) token, then typing a series of opcodes that correspond to assembly instructions. For instance, here's a do-nothing program:

AsmPrgm
00
C9

Which translates directly (disregarding the necessary preprocessor directives) into:

NOP    ;no-op
RET    ;return to the OS. If this is omitted, the program will remain in execution forever, requiring a RAM clear to exit

This page has a bit more info on that, but note that "hex codes" is a misnomer, since "hex" has nothing specifically to do with z80 assembly.


If you have a monochrome (not the C Silver Edition or CE) calculator, though, I'd strongly recommend downloading Mimas, an on-calc assembly editor-- actual assembly, meaning it uses mnemonics! And it contains the OS include file, which assigns keywords to all the important system memory locations and "b_call()s" (which TI placed at rst 0x28), which are system routines TI put in the OS to make life easier.

There also exists a C compiler for the new 84 Plus CE calculator, if you happen to have that model. It's a computer program, though, so again (sadly) no on-calc C programming.




回答2:


After a little research, I found some some hand-held "pocket" devices. The Palm m500 has a JVM to program java on. There apparently was a website that had an SDK for C, but the website was removed.

In regards to calculators:

  • TI-82, 83, 84, 85, 86, and related models all support TI-BASIC and z80 ASM.
  • TI-92, Voyage 200, TI-89, and related models all support TI-BASIC, C, and 68000 ASM.
  • TI-nspire supports TI-BASIC and Lua.
  • HP 50g supports RPL (User and System), ARM ASM, Saturn ASM, and C.
  • HP 49, 48G, or 48S, which support Saturn ASM and RPL.



回答3:


You would need a compiler that will translate whatever language you're writing in (in the case of Java, an implementation of the JVM as well) to the assembly used by the calculator's CPU, it's probably not likely you will find an easy to use solution as calculators like the TI-84 are pretty archaic.



来源:https://stackoverflow.com/questions/30993221/multiple-language-programming-on-ti-calculator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!