All mathematical operations are done with signed 32-bit values.
+
expr1 + expr2
expr1 plus expr2
–
expr1 - expr2
expr2 minus expr1
-expr
Negation of expr
*
expr1 * expr2
expr1 times expr2
/
expr1 / expr2
expr1 divided by expr2
%
expr1 % expr2
Remainder of expr1 divided by expr2
<<
expr1 << expr2
Logically shifts expr1 left expr2 times.
>>
expr1 >> expr2
Logically shifts expr1 right expr2 times.
~
~expr
One's complement of expr
=
expr1 = expr2
1 if expr1 is equal to expr2. 0
otherwise.
==
expr1 == expr2
Same as =
!=
expr1 != expr2
1 if expr1 is not equal to expr2. 0
otherwise.
<
expr1 < expr2
1 if expr1 is less than expr2. 0
otherwise.
>
expr1 > expr2
1 if expr1 is greater than expr2. 0
otherwise.
<=
expr1 <= expr2
1 if expr1 is less than or equal to expr2.
0 otherwise.
>=
expr1 >= expr2
1 if expr1 is greater than or equal to expr2.
0 otherwise.
&
expr1 & expr2
Bitwise AND of expr1 and expr2.
|
expr1 | expr2
Bitwise OR of expr1 and expr2.
^
expr1 ^ expr2
Bitwise XOR of expr1 and expr2.
Directives
\
Adds a newline to the source code, for putting multiple instructions on one line.
ADDINSTR
Defines an additional instruction. See TASMTABS.HTM.
.addinstr instr args opcode nbytes rule class shift binor
BLOCK
Advances the instruction pointer a specified number of bytes without assigning values to
the skipped over bytes.
.block expr
BYTE
Inserts a byte value or series of byte values.
.byte expr[,expr ... ]
CHK
Calculates a checksum from a specified address up to but not including the address of the
directive. The checksum is the least significant byte of the sum of all bytes.
See Day 3 for a full explanation of this directive.
FILL
Fills a number of bytes with one value. If the value is ommitted the default value of
255 is used.
.fill bytes[,value]
#IF
Assembles a block of code if the supplied expression evaluates as non-zero. Otherwise,
the block of code following the #ELSE directive (if there is one) is assembled.
#if expression
code
[#else
code]
#endif
#IFDEF
Assembles a block of code if the supplied macro has been defined. If the macro has not
been defined, then the block of code following the #ELSE directive (if there is one) is
assembled.
#ifdef macro_namecode
[#else
code]
#endif
#IFNDEF
Exactly the same as #IFDEF, except the block of code is assembled if
the supplied macro has not been defined.
#ifndef macro_namecode
[#else
code]
#endif
#INCLUDE
Reads the contents of the supplied file into the source file.
#include "filename"
LIST
Turns on output to the listing file.
.list
LOCALLABELCHAR
Defines the character used to designate a local label.
.locallabelchar "character"
LSFIRST
Defines byte order for the WORD directive to be little-endian.
.lsfirst
MODULE
See Day 3 for a full explanation of this directive.
MSFIRST
Defines byte order for the WORD directive to be big-endian.
.msfirst
NOLIST
Turns off output to the listing file.
.nolist
ORG
Sets the instruction pointer to the supplied value.
.org expression
SET
Changes the value of a manifest constant. This directive often results in "label value
misaligned" errors.
symbol .set expression
TEXT
Assigns a sequence of bytes values based on an ASCII string. A zero is automatically
added to the end.
.text "string"
WORD
Inserts a word value or series of word values.
.word expr[,expr ... ]
This is part of Learn TI-83 Plus Assembly In 28 Days
Copyright (c) 2002, 2003, 2004 Sean McLaughlin
See the file gfdl.html for copying conditions