TI-BASIC:Asmprgm

From Learn @ Cemetech
Jump to navigationJump to search

ASMPRGM.GIF

Command Summary

This command must be the beginning of an assembly program.

Command Syntax

AsmPrgm

Menu Location

This command is only found in the catalog. Press:

  1. 2nd CATALOG to access the command catalog.
  2. Scroll down to AsmPrgm and press ENTER.

Calculator Compatibility

TI-83+/84+/SE/CSE/CE

(not available on the regular TI-83)

Token Size

2 bytes

This command denotes the start of an assembly program in hexadecimal form. The command must go at the beginning of a program.

Using AsmPrgm is the only built-in way to create assembly programs on the calculator, and it's not very convenient. To use it, after AsmPrgm itself, you must type in the hexadecimal values (using the numbers 0-9, and the letters A-F) of every byte of the assembly program. Even for assembly programmers, this is a complicated process: unless you've memorized the hexadecimal value of every assembly command (which is about as easy as memorizing the hexadecimal value of every TI-Basic token) you have to look every command up in a table.

In addition, it's easy to make a typo while doing this. For this reason, it's recommended not to use AsmPrgm to write assembly programs on the calculator, but instead write assembly programs on the computer. This also lets you use emulators and debuggers and such, as opposed to crashing your calculator (possibly permanently) every time you have a bug.

Just about the only use for AsmPrgm is to enter the hex codes for simple assembly routines that can be called from Basic programs or used for some other short task. For example, the following program will allow you to type in lowercase letters (by pressing ALPHA twice, you go into lowercase letter mode):

AsmPrgmFDCB24DEC9

To use this, create a program, and enter the code above into it. Then run the program using Asm(. Voila! Lowercase letters are now enabled.

More such short programs can be found here.

Related Commands

See Also