Annoyed by the lack of a plain text editor on the PC, I wrote this program a few months ago. I've been tweaking it ever since. Since I got all of the tokens from this site, I figure I'd give it to you. You're free to modify, use, and distribute this code for whatever you want.
INSTRUCTIONS:
This program is written in Python. You'll need that to run this.
1) Get Python from python.org
2) Save these two files in the same directory
3) Open IDLE (it comes with Python)
4) Open parse8xp.py
5) Run it
6) Type into the command window, to compile or decompile:
decompile('COMPLETE/FILE/PATH/OF/FILE.8xp', 'COMPLETE/FILE/PATH/OF/FILE/YOU/WANT/TO/SAVE/THIS/AS')
recompile('COMPLETE/FILE/PATH/OF/SOURCE', 'COMPLETE/FILE/PATH/OF/FILE/YOU/WANT/TO/MAKE.8xp')
You can also get help on anything by typing
gethelp('COMMAND YOU WANT HELP ON')
Basically, the point of this is so you can use any text editor to modify your programs. So, without further ado, the code:
parse8xp.py
# A simple script to convert TI83/84 program files (.8xp) to raw text and back.
import dict_source
__author__ = "Spork Interactive"
__version__ = "$Revision: 1.3 $"
__date__ = "$Date: 2009/09/22 $"
__copyright__ = "Copyright (c) 2009 Spork Interactive"
__license__ = "GNU"
def loadDict (dictType = "compile", options = dict_source.index()):
ki=0 # ki is the key index
vi=0 # vi is the value index
(ki, vi) = {"compile":(1, 0), "decompile":(0, 1), "help":(1, 2)}[dictType]
d = {}
# load optional items first
for item in options:
# load each optional group
try:
m = [(t, "&%s%s" % (item, s.replace("&", "")), h) for (t, s, h) in getattr(dict_source, item)()]
# We need to correct the dictionary.
for li in m:
d[li[ki]] = li[vi]
except AttributeError:
print "%s does not exist!" % item
for li in dict_source.base():
#Get the base values
d[li[ki]] = li[vi]
return d
def longestKey(dictionary):
return max([len(k) for k, v in dictionary.items()])
def twoByte(number):
return "%s%s" % (chr(number%256), chr((number//256)%256), )
def decompile(source8xp, destination):
"""Decompile a .8xp file, save that to destination file"""
tDict = loadDict(dictType="decompile")
maxKeyLen = longestKey(tDict)
try:
readFile=open(source8xp, "r")
try:
writeFile=open(destination, "w")
try:
# Load program name, protection type, and comment
readFile.seek(11, 0)
comment = readFile.read(42)
readFile.seek(59, 0)
protect = readFile.read(1) == "\x05" and "not " or ""
name = readFile.read(8)
writeFile.write("%s\n%sprotected\n%s\n" % (name, protect, comment))
print "Loading %s..." % name
print "Program is %sprotected" % protect
print comment
# Find data's end
readFile.seek(-3, 2)
fileLength = readFile.tell()
# Read program meat
readFile.seek(74, 0)
while readFile.tell() <= fileLength: # Ignore the last 2 bytes (checksum)
readLen = 1 + fileLength - readFile.tell()
readLen = min([maxKeyLen, readLen])
current = readFile.read(readLen)
# Try each possible key for the next few characters
while (readLen > 1 and not tDict.has_key(current)):
readFile.seek(-1*readLen, 1)
readLen -= 1
current = readFile.read(readLen)
if tDict.has_key(current):
writeFile.write(tDict[current])
#print tDict[current]
else:
writeFile.write("&@%s" % current)
print "character %s not found!" % hex(ord(current))
print "%s successfully decompiled as %s" % (source8xp, destination)
except IOError:
print "A file error occurred during translation"
finally:
writeFile.close()
except IOError:
print "Error creating %s!" % destination
finally:
readFile.close()
except IOError:
print "Error loading %s!" % source8xp
def recompile(source, destination8xp):
"""Open a text file, compile it as an 8xp.
The first line should contain the 8 character program name,
and the second should contain "protected" or "not protected",
and the third should contain a 42 character comment."""
tDict = loadDict(dictType="compile")
maxKeyLen = longestKey(tDict)
try:
readFile=open(source, "r")
try:
writeFile=open(destination8xp, "w")
try:
# NOTE: we cannot simply write to file.
# We have to find the checksum & other crap later
writeBuffer = []
# Learn program length
readFile.seek(-1, 2)
fileLength = readFile.tell()
# Skip program name & protection value for now
readFile.seek(0, 0)
readFile.readline()
readFile.readline()
readFile.readline()
# Write the opening code
writeFile.write("**TI83F*\x1a\x0a\x00")
# Read program meat
lineNum = 4 # line numbers started from 1, and there were 3 lines beforehand.
while readFile.tell() <= fileLength: # Ignore the last 2 bytes (checksum)
readLen = 1 + fileLength - readFile.tell()
readLen = min([maxKeyLen, readLen])
current = readFile.read(readLen)
# Try each possible key for the next few characters
while (readLen > 1 and not tDict.has_key(current)):
readFile.seek(-1*readLen, 1)
readLen -= 1
current = readFile.read(readLen)
if tDict.has_key(current):
writeBuffer.append(tDict[current])
if (current == "\n") or (current == "\r\n"):
lineNum += 1
# count line numbers
elif current == "&":
# The ampersand is the escape sequence character.
# If we got here, then:
# A) This is the escape sequence &@, indicating that
# the next character should be translated literally.
readFile.seek(-1, 1)
current = readFile.read(2)
if current == "&@":
current = readFile.read(1)
writeBuffer.append(current)
# B) This is an invalid escape sequence. Let's announce that.
else:
print "%s is an invalid escape sequence on line %s" % (current, lineNum)
writeBuffer.append("ERROR %s" % current)
else:
# A character is unreadable!
print "%s not found on line &s" % (current, lineNum)
writeBuffer.append("ERROR %s" % current)
programMeat="".join(writeBuffer)
# Comment Code
readFile.seek(0, 0)
readFile.readline()
readFile.readline()
writeFile.write(readFile.readline().replace("\n", "").replace("\r", "").ljust(42)[:42])
# After the comment comes the length of program + 19 in two bytes.
# Note that this would crash if the program were longer than
# 65536 characters. However, that's more than twice the TI84+ SILVER's
# memory. Should the limit be exceeded, we've got MUCH BIGGER problems.
writeFile.write(twoByte(len(programMeat) + 19))
# Two more unknown characters
writeFile.write("\x0d\x00")
# Another length for... some... reason...
writeFile.write(twoByte(len(programMeat) + 2))
# Now the protection code
# Protected means it can't be edited once on the calculator
readFile.seek(0, 0)
readFile.readline()
writeFile.write(readFile.readline().replace("\n", "").replace("\r", "")=="protected\n" and "\x06" or "\x05")
# Now the name
readFile.seek(0, 0)
writeFile.write(readFile.readline().replace("\n", "").replace("\r", "").ljust(8)[:8])
# Two nulls
writeFile.write("\x00\x00")
# The length again... same as a few bytes before
writeFile.write(twoByte(len(programMeat) + 2))
# And... a different way to write the length of the program.
writeFile.write(twoByte(len(programMeat)))
# Now the program
writeFile.write(programMeat)
# Checksum - sum of all characters in program
writeFile.write(twoByte(sum([ord(c) for c in programMeat])))
print "%s successfully compiled as %s" % (source, destination8xp)
except IOError:
print "A file error occurred during translation"
finally:
writeFile.close()
except IOError:
print "Error creating %s!" % destination
finally:
readFile.close()
except IOError:
print "Error loading %s!" % source8xp
def spellcheck(filename):
"""This function will perform a spell check operation on the indicated file,
reporting any possible errors. Example: instead of "sin(": sin, SIN("""
rawize = lambda s: "".join([c for c in s.lower() if ord(c) > 47])
tDict = loadDict(dictType="help")
raw = {}
for k in tDict:
if len(rawize(k)) > 1:
raw[rawize(k)] = k
#This creates a spelling dictionary.
maxKeyLen = longestKey(tDict)
try:
readFile = open(filename, 'r')
try:
# This will listize the whole program, then move through it slowly.
writeBuffer = []
readFile.seek(-1, 2)
fileLength = readFile.tell()
readFile.seek(0, 0)
readFile.readline()
readFile.readline()
readFile.readline()
lineNum = 4 # line numbers started from 1, and there were 3 lines beforehand.
while readFile.tell() <= fileLength: # Ignore the last 2 bytes (checksum)
readLen = 1 + fileLength - readFile.tell()
readLen = min([maxKeyLen, readLen])
current = readFile.read(readLen)
# Try each possible key for the next few characters
while (readLen > 1 and not tDict.has_key(current)):
readFile.seek(-1*readLen, 1)
readLen -= 1
current = readFile.read(readLen)
if tDict.has_key(current):
writeBuffer.append((current, lineNum))
if (current == "\n") or (current == "\r\n"):
lineNum += 1
# count line numbers
elif current == "&":
# The ampersand is the escape sequence character.
# If we got here, then:
# A) Someone has used the escape sequence &#, indicating
# that the next character should be translated literally
readFile.seek(-1, 1)
current = readFile.read(2)
if current == "&#":
current = readFile.read(1)
writeBuffer.append((current, lineNum))
# B) This is an invalid escape sequence. Let's announce that.
else:
print "%s is an invalid escape sequence on line %s" % (current, lineNum)
writeBuffer.append((current, lineNum))
else:
# A character is unreadable!
writeBuffer.append((current, lineNum))
## currentraw = rawize(current)
## # Try each possible key for the next few characters
## while readLen > 1 and not raw.has_key(rawize(current)):
## readFile.seek(-1*readLen, 1)
## readLen -= 1
## current = readFile.read(readLen)
## currentraw = rawize(current)
## if tDict.has_key(current) and ((current == "\n") or (current == "\r\n")):
## lineNum += 1
## if raw.has_key(currentraw) and len(current) <= len(raw[currentraw]) and (not tDict.has_key(current)) and (not raw[currentraw] == current):
## #This is the definition of a spelling error...
## print "%s '%s'? found on line %s" % (current, raw[rawize(current)], lineNum)
print "File loaded. Analyzing..."
for item in writeBuffer:
if rawize(item[0]):
i = writeBuffer.index(item)
current = ""
original = ""
#(current, line) = item
#full_list = [current, ]
# Step 1: Create a chunk
while i < len(writeBuffer) and len(current) < maxKeyLen:
current = "%s%s" % (current, writeBuffer[i][0])
i+=1
#full_list.append(current)
#print current
# Step 2: Reduce the chunk
original = current
while current and not raw.has_key(current):
current = current[:-1]
# Step 3: Report.
if raw.has_key(rawize(current)) and original[:len(raw[rawize(current)])] != raw[rawize(current)] and not tDict.has_key(current):
# A spelling error is a word found misspelled
print "%s (Line %4d): '%s'" % (original.replace("\n", " ").replace("\r", "").ljust(maxKeyLen)[:maxKeyLen], item[1], raw[rawize(current)])
except IOError:
print "A file error occurred during translation"
finally:
readFile.close()
except IOError:
print "Error loading %s!" % filename
def gethelp(command, results=20):
"""Print help with a command to terminal"""
tDict = loadDict(dictType="help")
if tDict.has_key(command):
print tDict[command] or "No help available"
else:
print "%s not found" % command
rawize = lambda s: "".join([c for c in s.lower() if ord(c) > 47])
raw = rawize(command)
partmatch = lambda s:command in s # Partial match function
if raw:
partmatch = lambda s:(raw in rawize(s)) or (command in s)
matches = 0 # Count the number of matches made so far
for k, v in tDict.items():
if partmatch(k):
matches += 1
if matches <= results:
print " %s: %s" % (k, v or "No help available")
if matches > results:
print " *** %s results omitted" % (matches - results)
#if __name__ == "__main__":
#def test():
#decompile('/Users/cjdd01071/Documents/Analog Clock.8xp', '/Users/cjdd01071/Documents/Clock.txt')
#decompile('/Users/cjdd01071/Documents/MATHADOR_8.05.06.8xp', '/Users/cjdd01071/Documents/Math.txt')
#recompile('/Users/cjdd01071/Documents/Math.txt', '/Users/cjdd01071/Documents/Mathtest.8xp')
#spellcheck('/Users/cjdd01071/Documents/Math.txt')
dict_source.py
def index():
return ('stat', 'finance', 'ti84plus')
def base(): #Base TI84 language
return [
('', '&null', 'Use &null to tell the compiler to break up the next statement'),
('\x01', '>DMS', 'Angle>DMS (Displays Angle in degrees/minutes/seconds format)'),
('\x02', '>DEC', 'Value>DEC (Displays Value in decimal format)'),
('\x03', '>FRAC', 'Value>FRAC (Displays Value as a Fraction in simplest terms)'),
('\x04', '->', 'Value->Variable (Assigns Value to Variable)'),
('\x05', 'Boxplot', ''),
('\x06', '[', ''),
('\x07', ']', ''),
('\x08', '{', ''),
('\x09', '}', ''),
('\x0a', '&rad', 'Angle&rad (Interprets Angle in radians)'),
('\x0b', '°', 'Angle° (Interprets Angle in degrees)'),
('\x0c', '&^-1', 'Value^-1 (Returns the inverse of Value)'),
('\x0d', '&^2', 'Value^2 (Returns Value squared)'),
('\x0e', '&transpose', 'Matrix&transpose (Transpose: Returns (row,column)¸(column,row))'),
('\x0f', '&^3', 'Value^3 (Returns Value cubed)'),
('\x10', '(', ''),
('\x11', ')', ''),
('\x12', 'round(', 'round(Value[,#Decimals]) (Returns Value rounded to #Decimals. Default=0)'),
('\x13', 'pxl-Test(', 'pxl-Test(Row,Column) (Returns 1 if pixel is On, 0 if pixel is Off)'),
('\x14', 'augment(', 'augment(ListA,ListB) (Returns ListB Concatenated to the end of ListA)'),
('\x15', 'rowSwap(', 'rowSwap(Matrix,RowA,RowB) (Returns RowA swapped with RowB)'),
('\x16', 'row+(', 'row+(Matrix,RowA,RowB) (Returns RowA added to RowB, stored in RowB'),
('\x17', '*row(', '*row(Value,Matrix,Row) (Returns Row multiplied by Value, stored in Row)'),
('\x18', '*row+(', '*row+(Value,Matrix,RowA,RowB) (Returns RowA*Value+RowB, stored in RowB)'),
('\x19', 'max(', 'max(ValueA,ValueB) max(List) max(ListA,ListB) max(Value,List) (Rtn high val of each pair)'),
('\x1a', 'min(', 'min(ValueA,ValueB) min(List) min(ListA,ListB) min(Value,List) (Rtn low val of each pair)'),
('\x1f', 'median(', 'median(List[,Freqlist]) (Returns median of List with frequency Freqlist)'),
(' ', 'randM(', 'randM(Rows,Columns) (Returns a random matrix of the dimension (Rows * Columns))'),
('!', 'mean(', 'mean(List[,Freqlist]) (Returns mean of List with frequency Freqlist)'),
('"', 'solve(', 'solve(Expression,Variable,Guess,{Lower,Upper}) (Solves Expression for Variable)'),
('#', 'seq(', 'seq(Expression,Variable,Begin,End[,Increment]) (Returns list of solutions)'),
('$', 'fnInt(', 'fnInt(Expression,Variable,Lower,Upper[,Tolerance]) (Returns integral of Expression)'),
('%', 'nDeriv(', 'nDeriv(Expression,Variable,Value[,h]) (Returns approx num deriv of Expr w/ Variable at Value)'),
("'", 'fMin(', 'fMin(Expression,Variable,Lower,Upper[,Tolerance]) (Returns minimum value of Expression)'),
('(', 'fMax(', 'fMax(Expression,Variable,Lower,Upper[,Tolerance]) (Returns maximum value of Expression)'),
(')', ' ', ''),
('*', '"', '"Textstring" (Returns a string containing Textstring)'),
('+', ',', ''),
(',', '&i', 'i (imaginary i=(-1)^(1/2))'),
('-', '!', 'Value! (factorial (Value!)=(Value-1)!*Value)'),
('0', '0', ''),
('1', '1', ''),
('2', '2', ''),
('3', '3', ''),
('4', '4', ''),
('5', '5', ''),
('6', '6', ''),
('7', '7', ''),
('8', '8', ''),
('9', '9', ''),
(':', '.', ''),
(';', '&E', 'Value&EPower (Used in scientific notation. Same as Value*10^Power)'),
('<', ' or ', 'ValueA or ValueB (Logical OR operator)'),
('=', ' xor ', 'ValueA or ValueB (Logical XOR operator, same as (A OR B) AND NOT (A AND B))'),
('>', ':', 'Denotes a new line of code'),
('?', '\n', ''),
# All hail the Almighty Microsoft,
# who insist on using linefeed AND carrage return.
# The \r\n will be used, because Macs and most
# Linux distros seem capable of using it.
# Comment the following line out if you don't
# want the program to do that.
('?', '\r\n', ''),
('@', ' and ', 'ValueA and ValueB (Logical AND operator)'),
('A', 'A', ''),
('B', 'B', ''),
('C', 'C', ''),
('D', 'D', ''),
('E', 'E', ''),
('F', 'F', ''),
('G', 'G', ''),
('H', 'H', ''),
('I', 'I', ''),
('J', 'J', ''),
('K', 'K', ''),
('L', 'L', ''),
('M', 'M', ''),
('N', 'N', ''),
('O', 'O', ''),
('P', 'P', ''),
('Q', 'Q', ''),
('R', 'R', ''),
('S', 'S', ''),
('T', 'T', ''),
('U', 'U', ''),
('V', 'V', ''),
('W', 'W', ''),
('X', 'X', ''),
('Y', 'Y', ''),
('Z', 'Z', ''),
('[', '&theta', 'The Greek letter Theta'),
('\\\x00', '[A]', ''),
('\\\x01', '[B]', ''),
('\\\x02', '[C]', ''),
('\\\x03', '[D]', ''),
('\\\x04', '[E]', ''),
('\\\x05', '[F]', ''),
('\\\x06', '[G]', ''),
('\\\x07', '[H]', ''),
('\\\x08', '[I]', ''),
('\\\t', '[J]', ''),
(']\x00', '&L1', ''),
(']\x01', '&L2', ''),
(']\x02', '&L3', ''),
(']\x03', '&L4', ''),
(']\x04', '&L5', ''),
(']\x05', '&L6', ''),
('^\x10', '&Y1', ''),
('^\x11', '&Y2', ''),
('^\x12', '&Y3', ''),
('^\x13', '&Y4', ''),
('^\x14', '&Y5', ''),
('^\x15', '&Y6', ''),
('^\x16', '&Y7', ''),
('^\x17', '&Y8', ''),
('^\x18', '&Y9', ''),
('^\x19', '&Y0', ''),
('^ ', '&X1T', ''),
('^!', '&Y1T', ''),
('^"', '&X2T', ''),
('^#', '&Y2T', ''),
('^$', '&X3T', ''),
('^%', '&Y3T', ''),
('^&', '&X4T', ''),
("^'", '&Y4T', ''),
('^(', '&X5T', ''),
('^)', '&Y5T', ''),
('^*', '&X6T', ''),
('^+', '&Y6T', ''),
('^@', '&r1', ''),
('^A', '&r2', ''),
('^B', '&r3', ''),
('^C', '&r4', ''),
('^D', '&r5', ''),
('^E', '&r6', ''),
('^\x80', '&u', ''),
('^\x81', '&v', ''),
('^\x82', '&w', ''),
('_', 'prgm', ''),
('`\x00', 'Pic1', ''),
('`\x01', 'Pic2', ''),
('`\x02', 'Pic3', ''),
('`\x03', 'Pic4', ''),
('`\x04', 'Pic5', ''),
('`\x05', 'Pic6', ''),
('`\x06', 'Pic7', ''),
('`\x07', 'Pic8', ''),
('`\x08', 'Pic9', ''),
('`\t', 'Pic0', ''),
('a\x00', 'GDB1', ''),
('a\x01', 'GDB2', ''),
('a\x02', 'GDB3', ''),
('a\x03', 'GDB4', ''),
('a\x04', 'GDB5', ''),
('a\x05', 'GDB6', ''),
('a\x06', 'GDB7', ''),
('a\x07', 'GDB8', ''),
('a\x08', 'GDB9', ''),
('a\t', 'GDB0', ''),
('b!', '&eta', 'The Greek letter eta'),
('d', 'Radian', 'Set Radian mode'),
('e', 'Degree', 'Set Degree mode'),
('f', 'Normal', 'Normal notation'),
('g', 'Sci', 'Scientific notation'),
('h', 'Eng', 'Engineering notation'),
('i', 'Float', 'Floating Point notation'),
('j', '=', 'Test for equality'),
('k', '<', 'Is less than'),
('l', '>', 'Is greater than'),
('m', '<=', 'Is less than or equal to'),
('n', '>=', 'Is greater than or equal to'),
('o', '!=', 'Is not equal to'),
('p', '+', ''),
('q', '-', ''),
('r', 'Ans', '(Returns the previous answer)'),
('s', 'Fix', 'Fix # (Sets fixed decimal notation to # places)'),
('t', 'Horiz', 'Horiz (Horizontal split-screen mode)'),
('u', 'Full', 'Full (Sets Fullscreen mode)'),
('v', 'Func', 'Func (Sets Function graphing mode)'),
('w', 'Param', 'Param (Sets Parametric graphing mode)'),
('x', 'Polar', 'Polar (Sets Polar graphing mode)'),
('y', 'Seq', 'Seq (Sets Sequence graphing mode)'),
('z', 'IndpntAuto', ''),
('{', 'IndpntAsk', ''),
('|', 'DependAuto', ''),
('}', 'DependAsk', ''),
('~\x00', 'Sequential', 'Sequential (Draw graphs one at a time)'),
('~\x01', 'Simul', 'Simul (Draw graphs simultaneously)'),
('~\x02', 'PolarGC', ''),
('~\x03', 'RectGC', ''),
('~\x04', 'CoordOn', ''),
('~\x05', 'CoordOff', ''),
('~\x06', 'Connected', '(Connect points on graph)'),
('~\x07', 'Dot', '(Don\'t connect points on graph)'),
('~\x08', 'AxesOn', '(Display axes on graph)'),
('~\t', 'AxesOff', '(Don\'t display axes on graph)'),
('~\n', 'GridOn', '(Display the grid)'),
('~\x0b', 'GridOff', '(Don\'t display the grid)'),
('~\x0c', 'LabelOn', '(Label the graphs)'),
('~\r', 'LabelOff', '(Don\'t label the graphs)'),
('~\x0e', 'Web', '(Draw seuence graphs as webs)'),
('~\x0f', 'Time', '(Draw sequence graphs over time)'),
('~\x10', 'uvAxes', ''),
('~\x11', 'uwAxes', ''),
('~\x12', 'vwAxes', ''),
('\x7f', '&square', 'Square mark'),
('\x80', '&plus', 'Plus mark'),
('\x81', '&dot', 'Dot mark'),
('\x82', '*', ''),
('\x83', '/', ''),
('\x84', 'Trace', ''),
('\x85', 'ClrDraw', '(Clear the graph window)'),
('\x86', 'ZStandard', '(Standard zoom)'),
('\x87', 'ZTrig', '(Trig zoom)'),
('\x88', 'ZBox', ''),
('\x89', 'Zoom In', ''),
('\x8a', 'Zoom Out', ''),
('\x8b', 'ZSquare', '(Zoom to give each pixel has an equal height and width)'),
('\x8c', 'ZInteger', '(Zoom to give each pixel a height and width of 1)'),
('\x8d', 'ZPrevious', ''),
('\x8e', 'ZDecimal', '(Zoom to give each pixel a height and width of 0.1)'),
('\x8f', 'ZoomStat', ''),
('\x90', 'ZoomRcl', ''),
('\x92', 'ZoomSto', ''),
('\x93', 'Text(', 'Text(Row,Column,Text1[,Text2,..,Textn]) (Draws text on the graph)'),
('\x94', ' nPr ', ''),
('\x95', ' nCr ', ''),
('\x96', 'FnOn ', 'FnOn [Function#,Function#...] (Enables all [specified] functions)'),
('\x97', 'FnOff ', 'FnOff [Function#,Function#...] (Disables all [specified] functions)'),
('\x98', 'StorePic ', 'StorePic # (Stores a screenshot in Pic#)'),
('\x99', 'RecallPic ', 'RecallPic # (Displays the screenshot stored in Pic#)'),
('\x9a', 'StoreGDB ', ''),
('\x9b', 'RecallGDB ', ''),
('\x9c', 'Line(', 'Line(X1,Y1,X2,Y2[,0]) (Draws a line from (X1,Y1) to (X2,Y2) on the graph. Add 0 to erase.)'),
('\x9d', 'Vertical ', 'Vertical x (Draws a vertical line at x)'),
('\x9e', 'Pt-On(', 'Pt-On(x,y[,mark]) (Draws a point at (x,y) with mark)'),
('\x9f', 'Pt-Off(', 'Pt-Off(x,y[,mark]) (Erases a point at (x,y) with mark)'),
('\xa0', 'Pt-Change(', 'Pt-Change(x,y) (Toggles the point at (x,y))'),
('\xa1', 'Pxl-On(', 'Pxl-On(Row,Column) (Draws the pixel at (Row,Column))'),
('\xa2', 'Pxl-Off(', 'Pxl-Off(Row,Column) (Erases the pixel at (Row,Column))'),
('\xa3', 'Pxl-Change(', 'Pxl-Change(Row,Column) (Toggles the pixel at (Row,Column))'),
('\xa4', 'Shade(', 'Shade(Lowerfunc,Upperfunc[,Xleft,Xright,Pattern,Patres]) (See manual for details)'),
('\xa5', 'Circle(', 'Circle(x,y,r) (Draws a circle with center (x,y) and radius r)'),
('\xa6', 'Horizontal ', 'Horizontal y (Draws a horizontal line at y)'),
('\xa7', 'Tangent(', 'Tangent(Expression,Value) (Draws a line tangent to Expression at Value)'),
('\xa8', 'DrawInv ', 'DrawInv Expression (Plots the inverse of Expression by plotting X values on the Y axis)'),
('\xa9', 'DrawF ', 'DrawF Expression (Plots Expression)'),
('\xaa\x00', 'Str1', ''),
('\xaa\x01', 'Str2', ''),
('\xaa\x02', 'Str3', ''),
('\xaa\x03', 'Str4', ''),
('\xaa\x04', 'Str5', ''),
('\xaa\x05', 'Str6', ''),
('\xaa\x06', 'Str7', ''),
('\xaa\x07', 'Str8', ''),
('\xaa\x08', 'Str9', ''),
('\xaa\t', 'Str0', ''),
('\xab', 'rand', 'rand[(Numtrials)] (Returns a random number from 0 to 1)'),
('\xac', '&pi', 'The Greek letter pi is approximated at 3.1415926545898'),
('\xad', 'getKey', 'getKey (Returns the last key pressed or 0 for no key. See Tools>Button List for details.)'),
('\xae', "'", ''),
('\xaf', '?', ''),
('\xb0', '&-', 'The negative sign. This is a different key from subtraction!'),
('\xb1', 'int(', 'int(Value) (Returns the largest integer ˜ Value)'),
('\xb2', 'abs(', 'abs(Value) (Returns the absolute value of Value)'),
('\xb3', 'det(', 'det(Matrix) (Returns the Determinant of Matrix)'),
('\xb4', 'identity(', 'identity(Dimension) (Returns the identity matrix of Dimension rows and columns)'),
('\xb5', 'dim(', 'Length->dim(List) {Rows,Columns}->dim(Matrix) (Gives List/Matrix the specified dimension(s))'),
('\xb6', 'sum(', 'sum(List[,Start,End]) (Returns the sum of values in List from Start to End)'),
('\xb7', 'prod(', 'prod(List[,Start,End]) (Returns the product of values in List from Start to End)'),
('\xb8', 'not(', 'not(Value) (If Value>0, returns 0. If Value=0, returns 1)'),
('\xb9', 'iPart(', 'iPart(Value) (Returns the integer part of a number)'),
('\xba', 'fPart(', 'fPart(Value) (Returns the fraction part of a number)'),
('\xbb\x07', 'dbd(', 'dbd(DDMM.YY, DDMM.YY) (Returns the number of days between two dates)'),
('\xbb\x08', 'lcm(', 'lcm(ValueA,ValueB) (Returns the least common multiple of ValueA and ValueB)'),
('\xbb\t', 'gcd(', 'gcd(ValueA,ValueB) (Returns the greatest common factor of ValueA and ValueB)'),
('\xbb\n', 'randInt(', 'randInt(Lower,Upper[,numtrials]) (Returns a random integer between Lower and Upper'),
('\xbb\x0b', 'randBin(', ''),
('\xbb\x0c', 'sub(', 'sub(String,Begin,Length) (Returns part of String starting at Begin of length Length)'),
('\xbb\r', 'stdDev(', 'stdDev(List[,Freqlist]) (Returns the standard derivation of the elements in List)'),
('\xbb\x0e', 'variance(', 'variance(List[,Freqlist]) (Returns the variance of the elements in List)'),
('\xbb\x0f', 'inString(', 'inString(String,Find[,Start]) (Returns position of the first instance of Find in String)'),
('\xbb%', 'conj(', 'conj(Value) (Returns the complex conjugate of Value)'),
('\xbb&', 'real(', 'real(Value) (Returns the real part of a complex number or numbers)'),
("\xbb'", 'imag(', 'imag(Value) (Returns the imaginary part of a complex number or numbers)'),
('\xbb(', 'angle(', 'angle(Value) (Returns the polar angle of a complex number or numbers)'),
('\xbb)', 'cumSum(', 'sumSum(List) (Returns a list of the cumulative sums of the elements in List)'),
('\xbb*', 'expr(', 'expr(String) (Converts String to an expression and executes it)'),
('\xbb+', 'length(', 'length(String) (Returns the number of characters in String)'),
('\xbb,', '&deltaList(', '&deltaList(List) (Returns the difference between consecutive terms in a list, as a list)'),
('\xbb-', 'ref(', 'ref(Matrix) (Returns the row-echelon form of Matrix)'),
('\xbb.', 'rref(', 'rref(Matrix) (Returns the reduced row-echelon form of Matrix)'),
('\xbb/', '>Rect', ''),
('\xbb0', '>Polar', ''),
('\xbb1', '&e', 'Euler\'s constant is approximated at 2.718281828459'),
('\xbb9', 'Matr>list(', ''),
('\xbb:', 'List>matr(', ''),
('\xbbE', 'GraphStyle(', ''),
('\xbbM', 'Real', 'Real (Sets real number mode)'),
('\xbbN', '&re^thetai', '(Sets polar complex number mode)'),
('\xbbO', '&a+bi', '(Sets rectangular complex number mode)'),
('\xbbP', 'ExprOn', 'ExprOn (Turns on expression display during Trace)'),
('\xbbQ', 'ExprOff', 'ExprOff (Turns off expression display during Trace)'),
('\xbbR', 'ClrAllLists', 'ClrAllLists (Clears all lists from memory)'),
('\xbbS', 'GetCalc(', 'GetCalc(Variable[,Portflag]) (See the manual for details)'),
('\xbbT', 'DelVar ', 'DelVar Variable (Deletes Variable from memory)'),
('\xbbU', 'Equ>String(', 'Equ>String(Yvar,Str#) (Converts Yvar into a string and stores it in Str#)'),
('\xbbV', 'String>Equ(', 'String>Equ(String,Yvar) (Converts String to an expression and stores it in Yvar)'),
('\xbbW', 'Clear Entries', 'Clear Entries (Clears the Last Entry storage area)'),
('\xbbd', '&G-T', 'G-T (Sets graph-table vertical split screen mode)'),
('\xbbe', 'ZoomFit', 'ZoomFit (Zooms the graph to include all minimums and maximums'),
('\xbbf', 'DiagnosticOn', ''),
('\xbbg', 'DiagnosticOff', ''),
('\xbbh', 'Archive ', 'Archive Variable (Stores Variable in flash memory)'),
('\xbbi', 'UnArchive ', 'UnArchive Variable (Stores Variable in RAM memory)'),
('\xbbj', 'Asm(', 'Asm(Program) (Executes an assembly-language program)'),
('\xbbk', 'AsmComp(', 'AsmComp(Asciiprogram,Hexprogram) (Compiles an Ascii asm program, stores it in Hexprogram)'),
('\xbbl', 'AsmPrgm', 'AsmPrgm (Use this at the heading of an assembly-language program)'),
('\xbbm', 'compiled asm', ''),
('\xbbn', 'Á', ''),
('\xbbo', 'À', ''),
('\xbbp', 'Â', ''),
('\xbbq', 'Ä', ''),
('\xbbr', 'á', ''),
('\xbbs', 'à', ''),
('\xbbt', 'â', ''),
('\xbbu', 'ä', ''),
('\xbbv', 'É', ''),
('\xbbw', 'È', ''),
('\xbbx', 'Ê', ''),
('\xbby', 'Ë', ''),
('\xbbz', 'é', ''),
('\xbb{', 'è', ''),
('\xbb|', 'ê', ''),
('\xbb}', 'ë', ''),
('\xbb\x7f', 'Ì', ''),
('\xbb\x80', 'Î', ''),
('\xbb\x81', 'Ï', ''),
('\xbb\x82', 'í', ''),
('\xbb\x83', 'ì', ''),
('\xbb\x84', 'î', ''),
('\xbb\x85', 'ï', ''),
('\xbb\x86', 'Ó', ''),
('\xbb\x87', 'Ò', ''),
('\xbb\x88', 'Ô', ''),
('\xbb\x89', 'Ö', ''),
('\xbb\x8a', 'ó', ''),
('\xbb\x8b', 'ò', ''),
('\xbb\x8c', 'ô', ''),
('\xbb\x8d', 'ö', ''),
('\xbb\x8e', 'Ú', ''),
('\xbb\x8f', 'Ù', ''),
('\xbb\x90', 'Û', ''),
('\xbb\x91', 'Ü', ''),
('\xbb\x92', 'ú', ''),
('\xbb\x93', 'ù', ''),
('\xbb\x94', 'û', ''),
('\xbb\x95', 'ü', ''),
('\xbb\x96', 'Ç', ''),
('\xbb\x97', 'ç', ''),
('\xbb\x98', 'Ñ', ''),
('\xbb\x99', 'ñ', ''),
('\xbb\x9a', '´', ''),
('\xbb\x9b', '`', ''),
('\xbb\x9c', '&"', 'An extra doublequote for some reason'),
('\xbb\x9d', '&?', 'The upside down question mark'),
('\xbb\x9e', '&!', 'The upside down exclamation point'),
('\xbb\x9f', '&alpha', 'The Greek letter Alpha'),
('\xbb\xa0', '&beta', 'The Greek letter Beta'),
('\xbb\xa1', '&gamma', 'The Greek letter Gamma'),
('\xbb\xa2', '&delta', 'The Greek letter Delta'),
('\xbb\xa3', '&ldelta', 'The Greek letter Delta (lowercase)'),
('\xbb\xa4', '&epsilon', 'The Greek letter Epsilon'),
('\xbb\xa5', '&lambda', 'The Greek letter Lambda'),
('\xbb\xa6', '&mu', 'The Greek letter Mu'),
('\xbb\xa7', '&xpi', 'For some reason, Pi has two characters'),
('\xbb\xa8', '&rho', 'The Greek letter Rho'),
('\xbb\xa9', '&sigma', 'The Greek letter Sigma'),
('\xbb\xab', '&phi', 'The Greek letter Phi'),
('\xbb\xac', '&omega', 'The Greek letter Omega'),
('\xbb\xae', '&chi', 'The Greek letter Chi'),
('\xbb\xb0', 'a', ''),
('\xbb\xb1', 'b', ''),
('\xbb\xb2', 'c', ''),
('\xbb\xb3', 'd', ''),
('\xbb\xb4', 'e', ''),
('\xbb\xb5', 'f', ''),
('\xbb\xb6', 'g', ''),
('\xbb\xb7', 'h', ''),
('\xbb\xb8', 'i', ''),
('\xbb\xb9', 'j', ''),
('\xbb\xba', 'k', ''),
('\xbb\xbc', 'l', ''),
('\xbb\xbd', 'm', ''),
('\xbb\xbe', 'n', ''),
('\xbb\xbf', 'o', ''),
('\xbb\xc0', 'p', ''),
('\xbb\xc1', 'q', ''),
('\xbb\xc2', 'r', ''),
('\xbb\xc3', 's', ''),
('\xbb\xc4', 't', ''),
('\xbb\xc5', 'u', ''),
('\xbb\xc6', 'v', ''),
('\xbb\xc7', 'w', ''),
('\xbb\xc8', 'x', ''),
('\xbb\xc9', 'y', ''),
('\xbb\xca', 'z', ''),
('\xbb\xcb', '&lsigma', 'The Greek letter Sigma (lowercase)'),
('\xbb\xcc', '&smallT1', ''),
('\xbb\xcd', 'Í', ''),
('\xbb\xce', 'GarbageCollect', 'Defragment, clean up memory'),
('\xbb\xcf', '~', ''),
('\xbb\xd1', '@', ''),
('\xbb\xd2', '#', ''),
('\xbb\xd3', '$', ''),
('\xbb\xd4', '&&', 'The ampersand must be escaped, as it is the escape character'),
('\xbb\xd5', '`', ''),
('\xbb\xd6', ';', ''),
('\xbb\xd7', '\\', ''),
('\xbb\xd8', '|', ''),
('\xbb\xd9', '_', ''),
('\xbb\xda', '%', 'Number% (Converts number to a percentage. NOT MODULUS OPERATOR)'),
('\xbb\xdb', '&...', 'Elipsis'),
('\xbb\xdc', '&angle', 'Angle symbol'),
('\xbb\xdd', '&beta', 'The Greek letter Beta'),
('\xbb\xde', '&smallx1', ''),
('\xbb\xdf', '&smallT2', ''),
('\xbb\xe0', '&small0', ''),
('\xbb\xe1', '&small1', ''),
('\xbb\xe2', '&small2', ''),
('\xbb\xe3', '&small3', ''),
('\xbb\xe4', '&small4', ''),
('\xbb\xe5', '&small5', ''),
('\xbb\xe6', '&small6', ''),
('\xbb\xe7', '&small7', ''),
('\xbb\xe8', '&small8', ''),
('\xbb\xe9', '&small9', ''),
('\xbb\xea', '&small10', ''),
('\xbb\xeb', '&leftarrow', ''),
('\xbb\xec', '&rightarrow', ''),
('\xbb\xed', '&uparrowsmall', ''),
('\xbb\xee', '&downarrowsmall', ''),
('\xbb\xef', '&smallx2', ''),
('\xbb\xf0', '&integral', 'The Integral symbol'),
('\xbb\xf1', '&uparrow', ''),
('\xbb\xf2', '&downarrow', ''),
('\xbb\xf3', '&squareroot', ''),
('\xbb\xf4', '&highlightedequals', 'A highlighted equals sign'),
('\xbc', '&squareroot(', '&squareroot(Value) (Returns the square root of Value)'),
('\xbd', '&cuberoot(', '&cuberoot(Value) (Returns the cube root of Value)'),
('\xbe', 'ln(', 'ln(Value) (Returns the natural logarithm of Value)'),
('\xbf', '&e^(', 'e^(Value) (Returns e to the power of Value)'),
('\xc0', 'log(', 'log(Value) (Returns the logarithm of Value)'),
('\xc1', '10^(', '10^(Value) (Returns 10 to the power of Value)'),
('\xc2', 'sin(', 'sin(Value) (Returns the sine of Value)'),
('\xc3', '&arcsin(', '&arcsin(Value) (Returns the arcsine of Value)'),
('\xc4', 'cos(', 'cos(Value) (Returns the cosine of Value)'),
('\xc5', '&arccos(', '&arccos(Value) (Returns the arccosine of Value)'),
('\xc6', 'tan(', 'tan(Value) (Returns the tangent of Value)'),
('\xc7', '&arctan(', '&arctan(Value) (Returns the arctangent of Value)'),
('\xc8', 'sinh(', 'sinh(Value) (Returns the hyperbolic sine of Value)'),
('\xc9', '&arcsinh(', '&arcsinh(Value) (Returns the hyperbolic arcsine of Value)'),
('\xca', 'cosh(', 'cosh(Value) (Returns the hyperbolic cosine of Value)'),
('\xcb', '&arccosh(', '&arccosh(Value) (Returns the hyperbolic arccosine of Value)'),
('\xcc', 'tanh(', 'tanh(Value) (Returns the hyperbolic tangent of Value)'),
('\xcd', '&arctanh(', '&arctanh(Value) (Returns the hyperbolic arctangent of Value)'),
('\xce', 'If ', 'If Condition:Command (If Condition=0, skips Command)'),
('\xcf', 'Then', 'If Condition:Then:Commands:Commands:End (If Condition=0, skips Commands)'),
('\xd0', 'Else', 'If Condition:Then:A:Else:B:End (If Condition=1, executes A. If Condition=0, executes B)'),
('\xd1', 'While ', 'While Condition:Commands:Commands:End (Executes Commands while Condition=True)'),
('\xd2', 'Repeat ', 'Repeat Condition:Commands:Commands:End (Executes Commands until Condition=True)'),
('\xd3', 'For(', 'For(Variable,Begin,End[,Increment]):Commands:End (See manual for details)'),
('\xd4', 'End', 'End (See "For(", "If ", "Then", "Else", "While ", and "Repeat ")'),
('\xd5', 'Return', 'Return (Returns to the calling program)'),
('\xd6', 'Lbl ', 'Lbl Label (Creates a 1 or 2 letter label)'),
('\xd7', 'Goto ', 'Goto Label (Sends program execution to Label)'),
('\xd8', 'Pause ', 'Pause [Value] (Displays Value, suspends execution unitl the Enter key is pressed)'),
('\xd9', 'Stop', 'Stop (Ends program execution, returns to Home Screen)'),
('\xda', 'IS>(', 'IS>(Variable,Value):Command (Increments Variable by 1, skips Command if Variable>Value)'),
('\xdb', 'DS<(', 'DS<(Variable,Value):Command (Decrements Variable by 1, skips Command if Variable<Value)'),
('\xdc', 'Input ', 'Input ["Text",]Variable (Prompts for user to enter value, stores in Variable)'),
('\xdd', 'Prompt ', 'Prompt Variable[,Variable,Variable...] (Prompts user for variables in succession)'),
('\xde', 'Disp ', 'Disp Value[,Value,Value] (Displays each value as a new line on the home screen)'),
('\xdf', 'DispGraph', 'DispGraph (Displays the graph)'),
('\xe0', 'Output(', 'Output(Row,Column,Value) (Displays Value on the Home Screen starting at Row and Column)'),
('\xe1', 'ClrHome', 'ClrHome (Clears the Home Screen)'),
('\xe2', 'Fill(', 'Fill(Value,Matrix/List) (Fills Matrix/List with Value)'),
('\xe3', 'SortA(', 'SortA(List) (Sorts List elements in acending order)'),
('\xe4', 'SortD(', 'SortD(List) (Sorts List elements in decending order)'),
('\xe5', 'DispTable', 'DispTable (Displays the table)'),
('\xe6', 'Menu(', 'Menu("Title","Text1",Label1[,"Text2",Label2,...,"Text7",Label7]) (See Manual for details)'),
('\xe7', 'Send(', ''),
('\xe8', 'Get(', ''),
('\xeb', '&list', '&list (Identifies the next 1-5 characters as the name of a list)'),
('\xf0', '^', ''),
('\xf1', '&root', 'x&rooty (Returns y^(1/x))')]
def stat(): #Statistics tokens
return [
('.', 'CubicReg', ''),
('/', 'QuartReg', ''),
('\x1b', 'R>Pr(', ''),
('\x1c', 'R>Ptheta', ''),
('\x1d', 'P>Rx(', ''),
('\x1e', 'P>Ry', ''),
('b\x01', 'RegEq', ''),
('b\x02', 'n', ''),
('b\x03', 'xbar', ''),
('b\x04', 'sumx', ''),
('b\x05', 'sumx^2', ''),
('b\x06', 'Sx', ''),
('b\x07', 'sigmax', ''),
('b\x08', 'minX', ''),
('b\t', 'maxX', ''),
('b\n', 'minY', ''),
('b\x0b', 'maxY', ''),
('b\x0c', 'ybar', ''),
('b\r', 'sumy', ''),
('b\x0e', 'sumy^2', ''),
('b\x0f', 'Sy', ''),
('b\x10', 'sigmay', ''),
('b\x11', 'sumxy', ''),
('b\x12', 'r', ''),
('b\x13', 'Med', ''),
('b\x14', 'Q1', ''),
('b\x15', 'Q3', ''),
('b\x16', 'a', ''),
('b\x17', 'b', ''),
('b\x18', 'c', ''),
('b\x19', 'd', ''),
('b\x1a', 'e', ''),
('b\x1b', 'x1', ''),
('b\x1c', 'x2', ''),
('b\x1d', 'x3', ''),
('b\x1e', 'y1', ''),
('b\x1f', 'y2', ''),
('b ', 'y3', ''),
('b!', 'eta', 'The Greek letter eta'),
('b"', 'p', 'p'),
('b#', 'z', 'z'),
('b$', 't', 't'),
('b%', 'X^2', 'X^2'),
('b&', 'F', 'F (Statistics)'),
("b'", 'df', ''),
('b(', 'pcarat', ''),
('b)', 'pcarat1', ''),
('b*', 'pcarat2', ''),
('b+', 'xbar1', ''),
('b,', 'Sx1', ''),
('b-', 'n1', ''),
('b.', 'xbar2', ''),
('b/', 'Sx2', ''),
('b0', 'n2', ''),
('b1', 'Sxp', ''),
('b2', 'lower', ''),
('b3', 'upper', ''),
('b4', 's', 's'),
('b5', 'r^2', ''),
('b6', 'R^2', ''),
('b7', 'Factordf', ''),
('b8', 'FactorSS', ''),
('b9', 'FactorMS', ''),
('b:', 'Errordf', ''),
('b;', 'ErrorSS', ''),
('b<', 'ErrorMS', ''),
('\xbb\x10', 'normalcdf(', ''),
('\xbb\x11', 'invNorm(', ''),
('\xbb\x12', 'tcdf(', ''),
('\xbb\x13', '&X^2cdf(', ''),
('\xbb\x14', '&Fcdf(', ''),
('\xbb\x15', 'binompdf(', ''),
('\xbb\x16', 'binomcdf(', ''),
('\xbb\x17', 'poissonpdf(', ''),
('\xbb\x18', 'poissoncdf(', ''),
('\xbb\x19', 'geometpdf(', ''),
('\xbb\x1a', 'geometcdf(', ''),
('\xbb\x1b', 'normalpdf(', ''),
('\xbb\x1c', 'tpdf(', ''),
('\xbb\x1d', '&X^2pdf(', ''),
('\xbb\x1e', '&Fpdf(', ''),
('\xbb\x1f', 'randNorm(', ''),
('\xbb2', 'SinReg ', ''),
('\xbb3', 'Logistic ', ''),
('\xbb4', 'LinRegTTest ', ''),
('\xbb5', 'ShadeNorm(', ''),
('\xbb6', 'Shade_t(', ''),
('\xbb7', 'ShadeX^2', ''),
('\xbb8', 'ShadeF(', ''),
('\xbb9', 'Matr>list(', ''),
('\xbb:', 'List>matr(', ''),
('\xbb;', 'Z-Test(', ''),
('\xbb<', 'T-Test ', ''),
('\xbb=', '2-SampZTest(', ''),
('\xbb>', '1-PropZTest(', ''),
('\xbb?', '2-PropZTest(', ''),
('\xbb@', '&X^2-Test(', ''),
('\xbbA', 'ZInterval ', ''),
('\xbbB', '2-SampZInt(', ''),
('\xbbC', '1-PropZInt(', ''),
('\xbbD', '2-PropZInt(', ''),
('\xbbF', '2-SampTTest ', ''),
('\xbbG', '2-SampFTest ', ''),
('\xbbH', 'TInterval ', ''),
('\xbbI', '2-SampTInt ', ''),
('\xbbJ', 'SetUpEditor ', ''),
('\xbbK', 'Pmt_End', ''),
('\xbbL', 'Pmt_Bgn', ''),
('\xbbX', 'Select(', ''),
('\xbbY', 'ANOVA(', ''),
('\xbbZ', 'ModBoxplot', ''),
('\xbb[', 'NormProbPlot', ''),
('\xbb\xad', '&^p', ''),
('\xbb\xae', '&chi', 'The Greek letter Chi'),
('\xbb\xaf', '&F', ''),
('\xe9', 'PlotsOn ', ''),
('\xea', 'PlotsOff ', ''),
('\xec', 'Plot1(', ''),
('\xed', 'Plot2(', ''),
('\xee', 'Plot3(', ''),
('\xf2', '1-VarStats ', ''),
('\xf3', '2-VarStats ', ''),
('\xf4', 'LinReg(a+bx) ', ''),
('\xf5', 'ExpReg ', ''),
('\xf6', 'LnReg ', ''),
('\xf7', 'PwrReg ', ''),
('\xf8', 'Med-Med ', ''),
('\xf9', 'QuadReg ', ''),
('\xfa', 'ClrList ', ''),
('\xfb', 'ClrTable', ''),
('\xfc', 'Histogram', ''),
('\xfd', 'xyLine', ''),
('\xfe', 'Scatter', ''),
('\xff', 'LinReg(ax+b) ', '')]
def finance(): #Financial tokens
return [
('\xbb\x00', 'npv(', ''),
('\xbb\x01', 'irr(', ''),
('\xbb\x02', 'bal(', ''),
('\xbb\x03', 'sumprn(', ''),
('\xbb\x04', 'sumInt(', ''),
('\xbb\x05', '>Nom(', ''),
('\xbb\x06', '>Eff(', ''),
('\xbb ', 'tmv_Pmt', ''),
('\xbb!', 'tmv_I%', ''),
('\xbb"', 'tmv_PV', ''),
('\xbb#', 'tmv_N', ''),
('\xbb$', 'tmv_FV', '')]
def ti84plus(): #Tokens used in the TI84+ and TI84s
return [
('\xef\x00', 'setDate(', 'setDate(YYYY, MM, DD) (Sets the date)'),
('\xef\x01', 'setTime(', 'setTime(HH, MM, SS) (Sets the time in 24HR format)'),
('\xef\x02', 'checkTmr(', 'checkTmr(Variable) (Returns number of seconds since the timer stored in Variable)'),
('\xef\x03', 'setDtFmt(', 'setDtFmt(Format) (Set date display format: 1-M/D/Y 2-D/M/Y 3-Y/M/D)'),
('\xef\x04', 'setTmFmt(', 'setTmFmt(Format) (Set time display format: 12-12HR mode 24-24HR mode)'),
('\xef\x05', 'timeCnv(', 'timeCnv(Seconds) (Returns a list containing {D, H, M, S})'),
('\xef\x06', 'dayOfWk(', 'dayOfWk(YYYY, MM, DD) (Returns 1-7: 1=Sunday, 2=Monday, 3=Tuesday, etc...)'),
('\xef\x07', 'getDtStr(', 'getDtStr(Format) (Get a string representing the date. See setDtFmt for options.)'),
('\xef\x08', 'getTmStr(', 'getTmStr(Format) (Get a string representing the time. See setTmFmt for options.)'),
('\xef\x09', 'getDate', 'getDate (Returns a list containing {Y, M, D})'),
('\xef\x0a', 'getTime', 'getTime (Returns a list containing {H, M, S})'),
('\xef\x0b', 'startTmr', 'startTmr->Variable (Start a new timer, store in Variable. See "checkTmr(")'),
('\xef\x0c', 'getDtFmt', 'getDtFmt (Return the current date display format: 1-M/D/Y 2-D/M/Y 3-Y/M/D)'),
('\xef\x0d', 'getTmFmt', 'getTmFmt (Return the current time display format: 12-12HR mode 24-24HR mode)'),
('\xef\x0e', 'isClockOn', 'isClockOn (Returns 1 if clock is on)'),
('\xef\x0f', 'ClockOff', 'ClockOff (Disables the clock in the Mode screen)'),
('\xef\x10', 'ClockOn', 'ClockOn (Enables the clock in the Mode screen)'),
('\xef\x11', 'OpenLib(', ''),
('\xef\x12', 'ExecLib', ''),
('\xef\x13', 'invT(', ''),
('\xef\x14', 'X^2GOF-Test(', ''),
('\xef\x15', 'LinRegTInt', ''),
('\xef\x16', 'Manual-Fit', '')]