FACTOID # 140: In Switzerland, the average person has to work for 102 minutes to buy a kilogram of beef - one of the longest times in the developed world. On the other hand, they only have work 14 hours to buy a refrigerator for it.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RELATED ARTICLES
People who viewed "TI BASIC" also viewed:
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > TI BASIC

TI-BASIC is the unofficial name of a BASIC-like language built into Texas Instruments graphing calculators. (TI only refers to it as the calculators' "extensive programming capability".) It is the simplest way to program any TI calculator; assembly language (often referred to as "asm") can also be used, and C compilers exist for translation into assembly: TIGCC for Motorola 68000 based calculators, and Z88DK for Zilog Z80 based calculators. Although TI-BASIC is considerably slower than assembler and consequently is not much good for programming fast applications and games, it is very useful for quickly writing programs to solve math problems. BASIC (Beginners All-purpose Symbolic Instruction Code) is a family of high-level programming languages. ... Texas Instruments (NYSE: TXN), better known in the electronics industry as TI, is a company based in Dallas, Texas, renowned for developing and commercializing semiconductor and computer technology. ... A graphing calculator is a special kind of scientific/engineering calculator that is able to display and/or analyze mathematical function graphs. ... Computer programming (often simply programming) is the craft of implementing one or more interrelated abstract algorithms using a particular programming language to produce a concrete computer program. ... Assembly language commonly called assembly or asm, is a human-readable notation for the machine language that a specific computer architecture uses. ... The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language is a standardized imperative computer programming language developed in the early 1970s by Dennis Ritchie for use on the Unix operating system. ... A diagram of the operation of a typical multi-language compiler. ... The Motorola 68000 is a CISC microprocessor, the first member of a successful family of microprocessors from Motorola, which were all mostly software compatible. ... Z88DK is a Small-C-derived cross compiler for a long list of Z80 based computers. ... The Zilog Z80 is an 8-bit microprocessor designed and manufactured by Zilog from 1976 onwards. ...


Although it is lacking in features and usability, TI-BASIC is nonetheless an important factor in the programming community. Because TI graphing calculators are required at nearly all high schools, TI-BASIC is often the first glimpse many students have into the world of programming. Learning to program in TI-BASIC is a relatively easy task, encouraging potential programmers to explore the field of computer science.


Examples

These examples are slightly Z80-biased. For example, "ClrHome" would be "ClrLCD" on the TI-85 and TI-86. TI-85 graphing calculator The TI-85 is a graphing calculator made by Texas Instruments based around the Zilog Z80 microprocessor. ... TI-86 The TI-86 is a programmable graphing calculator introduced in 1997 and produced by Texas Instruments. ...


The following program, when run, will clear the screen and print the words "HELLO WORLD": A hello world program is a computer program that prints out Hello, world! on a display device. ...

 :ClrHome :Disp "HELLO WORLD" 

The next program will add the integers from 1 to 20 inclusive, and store the result to variable "A". It will then display the contents of A on a blank screen: In computer science and mathematics, a variable is a symbol denoting a quantity or symbolic representation. ...

 :ClrHome :0→A :For(X,1,20) :A+X→A :End :Disp A 

This program will loop indefinitely, pausing for a key to be pressed and informing the user of its keycode. Note that the "on" key will stop execution of a TI-BASIC program, and therefore does not have a keycode. (Some assembly subroutines can be called from a TI-BASIC program to clear this interrupt.

 :ClrHome :Repeat 0 :Repeat A :getKey→A :End :ClrHome :Disp A :End 

A common feature of TI-BASIC game programming is programming the arrow buttons to move an object on the screen. This program will draw a dot on on the screen that will move according to which arrow buttons you press. The lines up to Lbl 1 set up the graph mode screen for use with pixel-by-pixel movement.

 :ClrDraw :-47→Xmin :47→Xmax :-31→Ymin :31→Ymax :0→X :0→Y :Repeat 0 :Pt-Off(X,Y) :getKey→C :If C=24 :X-1→X :If C=25 :Y+1→Y :If C=26 :X+1→X :If C=34 :Y-1→Y :Pt-On(X,Y) :End 

However, this code is both large and slow. Attempts have been made to optimize TI-Basic. The program below does the same thing as the program above, yet is far smaller, and somewhat faster. Note that the end parentheses for commands such as "Pt-On" (point-on) are not needed.

 :ZStandard :ZInteger :DelVar X :DelVar Y :Repeat 0 :getKey→C :Pt-Off(X,Y :X+(Ans=26)-(Ans=24→X :Y+(C=25)-(C=34→Y :Pt-On(X,Y :End 

See also

Calculator programming is a feature available on many high-end calculators. ...

External links



 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.