TI BASIC tokenized file

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Other links and references)
 
(One intermediate revision by one user not shown)
Line 289: Line 289:
 
* [[Wikipedia:TI BASIC (TI 99/4A)]]
 
* [[Wikipedia:TI BASIC (TI 99/4A)]]
 
* [http://www.pagetable.com/?p=288 TI 99/4a BASIC as a scripting language for Windows and Mac OS X]
 
* [http://www.pagetable.com/?p=288 TI 99/4a BASIC as a scripting language for Windows and Mac OS X]
 +
* [https://archive.org/search.php?query=collection%3Atibooks&sort=-publicdate TI 99/4a books (Internet Archive)]
 +
 +
[[Category:Texas Instruments]]

Latest revision as of 01:13, 11 April 2014

File Format
Name TI BASIC tokenized file
Ontology
Released 1979

Texas Instruments (TI) is best known for its calculators (such as the programmable TI-59), but from 1979 through the mid-1980s they also produced computers for the home market. The TI 99/4A was their most popular model, but it still failed to outcompete other manufacturers' home computers such as the Commodore 64, so the company ultimately left this market after losing a good deal of money.

There were two versions of BASIC for the TI 99/4A, a "standard" one and an "Extended BASIC" with additional commands. Both were stored in tokenized form. The tokenization was compatible between the two versions, with the added commands given token values that are unused in standard BASIC, and the standard commands keeping the same token values in both versions.

Program lines consisted of a two-byte line number followed by the tokens (byte values from 128-255) and literal characters (1-127), with a null byte (0) ending the line, and a byte 255 marking the end of the file.

TI BASIC was praised for having built-in commands to do things that in most other computer models of the time required complicated PEEKs, POKEs, and CALLs, but criticized for being particularly slow even by the standards of the day; it was "doubly-interpreted", with the BASIC interpreter itself being implemented in a mid-level interpreted language called Graphics Programming Language.

A Japanese computer called the Tomy Tutor used a version of BASIC that is reported to have had the same token values as TI BASIC.

[edit] Tokens

Blank values indicate either that the token is unused or is used for something unknown.

Hex Dec Token meaning
80 128
81 129 ELSE
82 130 :: (Extended)
83 131 ! (Extended)
84 132 IF
85 133 GO
86 134 GOTO
87 135 GOSUB
88 136 RETURN
89 137 DEF
8A 138 DIM
8B 139 END
8C 140 FOR
8D 141 LET
8E 142 BREAK
8F 143 UNBREAK
90 144 TRACE
91 145 UNTRACE
92 146 INPUT
93 147 DATA
94 148 RESTORE
95 149 RANDOMIZE
96 150 NEXT
97 151 READ
98 152 STOP
99 153 DELETE
9A 154 REM
9B 155 ON
9C 156 PRINT
9D 157 CALL
9E 158 OPTION
9F 159 OPEN
A0 160 CLOSE
A1 161 SUB
A2 162 DISPLAY
A3 163 IMAGE (Extended)
A4 164 ACCEPT
A5 165 ERROR (Extended)
A6 166 WARNING (Extended)
A7 167 SUBEXIT (Extended)
A8 168 SUBEND (Extended)
A9 169 RUN
AA 170 LINPUT (Extended)
AB 171
AC 172
AD 173
AE 174
AF 175
B0 176 THEN
B1 177 TO
B2 178 STEP
B3 179 ,
B4 180 ;
B5 181 :
B6 182 )
B7 183 (
B8 184 &
B9 185
BA 186 OR (Extended)
BB 187 AND (Extended)
BC 188 XOR (Extended)
BD 189 NOT (Extended)
BE 190 =
BF 191 <
C0 192 >
C1 193 +
C2 194 -
C3 195 *
C4 196 /
C5 197 ^
C6 198
C7 199 "string"
C8 200 string
C9 201 Stmt #
CA 202 EOF
CB 203 ABS
CC 204 ATN
CD 205 COS
CE 206 EXP
CF 207 INT
D0 208 LOG
D1 209 SGN
D2 210 SIN
D3 211 SQR
D4 212 TAN
D5 213 LEN
D6 214 CHR$
D7 215 RND
D8 216 SEG$
D9 217 POS
DA 218 VAL
DB 219 STR$
DC 220 ASC
DD 221 PI (Extended)
DE 222 REC
DF 223 MAX (Extended)
E0 224 MIN (Extended)
E1 225 RPT$ (Extended)
E2 226
E3 227
E4 228
E5 229
E6 230
E7 231
E8 232 NUMERIC (Extended)
E9 233 DIGIT (Extended)
EA 234 UALPHA (Extended)
EB 235 SIZE (Extended)
EC 236 ALL (Extended)
ED 237 USING (Extended)
EE 238 BEEP (Extended)
EF 239 ERASE (Extended)
E0 240 AT (Extended)
F1 241 BASE
F2 242
F3 243 VARIABLE
F4 244 RELATIVE
F5 245 INTERNAL
F6 246 SEQUENTIAL
F7 247 OUTPUT
F8 248 UPDATE
F9 249 APPEND
FA 250 FIXED
FB 251 PERMANENT
FC 252 TAB
FD 253 # (files)
FE 254 VALIDATE (Extended)
FF 255 end of file marker

[edit] Format documentation

[edit] Other links and references

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox