Professional Documents
Culture Documents
Assemble Data and Graphic Programs: A: B: C: CD (Q:)
Assemble Data and Graphic Programs: A: B: C: CD (Q:)
A: B: C: CD (Q:)
1. CHANGE DIRECTORY
change to:
a. LIST FILES
b. DELETE FILE
c. RETRIEVE FILES
2. COPY FILES
347
Chapter 9
Assemble Data and Graphic Programs
CALL GWBASIC
Address Books. WINDOWS 95. Use Packard Bell Comm Central. Use E-Mail. MERGE Database files in Word Pro-
cessor document.
PROGRAMS IN SYSTEM.
List Create or OPEN Program Models. Use one column of a Database to list program names to create files and an-
other column for programs to OPEN and use the file.
A: B: or C:
2. COPY or SAVE. Easily PASTE and SAVE code files, documents, and programs.
348
Chapter 9
Assemble Data and Graphic Programs
RUN.
COPY code. PASTE to (.html). Use ISP for internet directory. Transfer from hard drive.
1
1
Take a Road Trip With MS DOS 6.0 Upgrade
350
Chapter 9
Assemble Data and Graphic Programs
DATA
FILE
OPEN #1 Output Disk, Directory\ Sub Dir\File Name
INPUT - Input List Prompts - A$ List B$ List C List
CLOSE #1
PRINT #1,
A$ List B$ List C List
GWBASIC #1 Create Data Files from Input Lists Program #2, Terms
CREATE TEXT TEST DATA OUTPUT FILES FOR PROGRAM MODELS. (Program #3 Sequential File).
1. Mnemonic. Choose new file name for output files.
2. Data. Enter items in fields for complete data records.
3. Display. Print (#) or put one record at a time on disk files.
10 open "O", #1, DR:\LAB\ILLUS.WP
20 Input "prompt"; word$
If "END" goto 70
30 Input "meaning"; mean$
40 Input "numbers";c
41 Edit
50 Print #1 A$, B$, C
60 Goto 20
70 Close #1
Program #3, Print Sequential File #1
Save DR:\DIRECTORY\PROGNAME.BAS
Edit 10
10 OPEN "I", #2,
"dr:\DIRECTORY\FILE"
Program #4a Save Revised Input File Code
Select Basic menu. SAVE programs. No quotation marks are around the program name (progname.bas).
RUN. Qbasic shows code lines after RUNs are complete. Quotation marks are around file names. Modify program code
lists.
351
Chapter 9
Assemble Data and Graphic Programs
352
Chapter 9
Assemble Data and Graphic Programs
are used around the program name. Use ((CONTROL) (D)) Chr$ ( 4 ) to go to PRODOS for Open, Write and Print "
filename", and drive. Specify path with the slash(/). Give record lengths for random files (Read filename - length, reco-
rd). No file # is used.
JAVA PROGRAMMING.
Display Text. Use an applet. Create a new text field Object. Run Appleviewer.
GWBASIC OR BASIC.
Program Code Numbered Lines. Change Model. Modify program line code sequence numbers. LLIST or LIST (pro-
gram code sequence number) Add additional lines. Make other changes.
BASIC PROGRAMMING.
Gwbasic program code files with (.bas) extensions are executable.
Qbasic Editor initially lists (.bas) files on current directories.
Visual Basic. Group programs on worksheet tabs.
Data files may or may not have file extensions. List data files if program problems develop. Use 01 or 001 for
compare alphabetic one.
Reference Manual HELP. Select HELP menu terms for program aid. Use string segment statement on relative file data
fields or Databases which do not have trailing spaces removed (See Program #2 and APPENDIX\III and IV programs
and Chapter 12).
INPUT FILE
PROGRAM LOGIC CODE
GOTO - Code Line Gosub
IF - Equal Greater Than Less Than Goto Gosub
COUNTER Counter +1
FOR-NEXT
DATA ARRAYS
DIMENSION - Dim List A Counter a Word$(Ctr)
DIMENSION - Dim List B Counter b
OUTPUT FILE
WRITE #
PUT #
CLOSE - Input Output
OTHER
LOAD
Program
DATA PROCESSING CODE
SEG$ - Mnemonic$ Begin Length
INPUT - Keyboard Prompt Mouse
PRINT - Prompt Information Locate X;Y Call Hchar
354
Chapter 9
Assemble Data and Graphic Programs
Command ( ). Use parenthesis in graphic commands to indicate grid coordinates, color, screen buffers, overlay char-
acters, and sound. Combine commands in program modules. RUN graphics programs with figures. Create larger figures.
Basic Motion. Develop moving figures in graphic models. Use xor to remove previous images. Pan and zoom circles
and boxes with view. Save graphics on disk with bsave. Use bload commands to put pictures back on screens. Bload
retrieves black and white screen images from disk.
Enhance and Improve the Model. Graphical commands are listed in table Gwbasic #5. Use.
Declare.
Sub
COPY code for another computer.
355
Chapter 9
Assemble Data and Graphic Programs
MODIFY MODEL.
Program Code Terms.
import applet.*
import awt.*
import java.io.* - Use files.
URL Universal Resource locator. - Use other computer locations.
URL URL = GetDocumentBase()
URL URL = getcodebase() - Graphics.
HTML Hypertext Markup Language - Use internet files.
A: B: C: - Disk drives.
CHDIR - Change from one working directory to another on a disk drive.
FILES - List file names on subdirectories on which Gwbasic processing is being done.
GWBASIC - Load Microsoft interpreter into active memory. Follow with program name.
KILL - Delete or erase a file.
MKDIR - Create subdirectories for data files.
357
Chapter 9
Assemble Data and Graphic Programs
GWBASIC CODE LINE EDIT CHANGE. Change Code in Program Models. AUTO - Create program line
Numbers.
LLIST - List program lines from memory to line printers.
LOAD - Copy programs from disk to computer memory. RUN programs. Select OPEN in Qbasic Menus.
Lprint - List data lines from program in memory to line printers.
RENUM - Renumber program lines.
TI99. Use the number (1) key to enter compilers. Compilers reside in read only memory.
LOAD Listdisk programs. List disk directory. Locate programs stored on a floppy disk. Locate programs.
RUN one program at a time from DSK1. List files.
For To (Step) - Iterative routines process data lists repeatedly until limits are reached. Use a counter value. Set limits on
the number of times to repeat processes.
Increase Counters. Count the number of records or graphic columns. When the limit is reached, pass control from For
To to other program statements (goto). Step is optional.
Goto - Transfer control to other program statements. Pass control backward or forward in program code in computer
memory. Specify program code line sequence number in Gwbasic or a paragraph label in Qbasic.
If Then Else - Conditional branches change logical processing. Detect specified attributes or values in data. Branch to
specific coding lines. Execute new program code statement sequences.
Locate Text String on Screen.
Locate X and Y Coordinates.
Locate - Position Gwbasic cursor. Choose a specific column and row to print (text) lines on screens.
Put - Position graphics on specific columns and rows of screens.
Remark (Remark). Review program code instructions from computer memory. Compiler ignores documentation re-
marks when programs are RUN. Cancel program execution. View listings. List program from memory to view remarks.
SUB - Subroutines or Macro
DATA INPUT OR FILE PROCESSING. Open Data in. Read data from:
1. Keyboards
2. Computer disks input files.
358
Chapter 9
Assemble Data and Graphic Programs
Clear (CLS) - Clear entire old screen of text or graphics. Not need for msgbox dialogue.
Close - Discontinue programs association with data or disk files. Free the file.
Common - Pass variables to other program modules.
Data - Read statements store fixed data lists for program to process. Enclose alphabetic attributes in quotes.
DIMension - Reserve input list memory. Specify the number of item numbers or attributes.
Display - Print TI99 items on screens. Use instead of print.
END - Terminate program execution. Close all files.
EOF ( ) - Marks are at ends of data files. Read complete files into programs. Conclude list processing when End of File
marks are reached.
Get - Retrieve random records to process. Retrieve graphic file figure.
Input - Transfer data into program memory buffer.
1. Keyboard Data. Display prompts: for data to enter. Enter several fields in specified order. Use comma separators
between the end of one data item field and the beginning of another. Enter all fields. Enter the correct number of
input statement commas, even if no data is entered. Otherwise, the message:
RETRY
is received until the correct number is entered.
2. ASCII data files on disk
A. Sequential. Use input and write output statements for TI99 and Microsoft Basic sequential files.
DOS Basic
INPUT # GET #
PRINT # PUT # WRITE #
B. Random file Processing. Use DOS get and put for Gwbasic and Qbasic random files. Also use lset and rset, type
and field #.
Key (call) TI99 Program - Transfer one keyboard character at a time.
Open # - Prepare Basic programs to use disk data files.
OPEN #
Reference file numbers in open statements in input and output file statements.
INPUT #
PRINT #
Tab
Semicolons (;)
Commas (,)
Put - Write DOS random file records. Put graphics on screens.
Read - Transfer data from data statements into DIMension statements.
Write - Remove trailing spaces from data fields written. Uses commas and double quotes as delimiters. RETRIEVE
records written on disk with a Word Processor.
STRING SEGMENT CODE DATA LENGTH. PROCESS AN ENTIRE DATA ATTRIBUTE OR WORD
STRING.
Read Records. Each item record has data values, attributes, descriptions and codes in fields. Every character or letter is
represented by a numeric code. Read special characters, in addition to letters.
ASC - Give character letter a numeric code. Give position of character codes in specified string segments. Format
screen text with TI99 call statement. Invalid characters terminate processing.
Chr$ - Give number code to print an ASCII character.
Field - Set Gwbasic data field boundaries or length in random files. Fill with spaces. Remove trailing spaces from
fielded data items to compare or store.
Len - Give the number of data string segment characters in specified item fields in TI99.
Seg$ or Mid$ - Compare attributes. Give a specified number of string segment characters.
Str$ - Convert numbers into strings.
Type - Specify Visual or Qbasic DOS 6 fields in random files.
Val - Process numerical data from fields formerly defined as alphabetic. Convert character strings into numbers.
Write - Print data on Word 7 documents or disk file. Create GWbasic or Qbasic sequential files. Remove trailing spaces
from fielded records from random files.
Char - Define character sets for TI994A. Establish individual characters by binary codes.
Color - Specify screen color for characters.
For - Slow motion on screens with for next delay command.
Gchar - Read a character from any where on the screen.
Hchar - Place one character on the screen. Repeat the character on a horizontal line several times.
Screen - Allow colors of TI99 screens to be set.
360
Chapter 9
Assemble Data and Graphic Programs
Select screen coordinate X and Y location references. Present pictures on screens. Specify color and sound. Simpler
computers have simple graphics commands. Move figures across the screen. (More than one parameter is required for
each of the program commands. The TI994A uses call before the command).
DOS BASIC TERMS FOR GRAPHICS DISPLAYS.
361
Chapter 9
Assemble Data and Graphic Programs
The SQL to retrieve the word "Form " from the Database index is:
Prompt:=""
Prompt:=field$
Title:="Bank Balance"
Buttons:= vbexplination
Buttons:= vbinformation
363
Chapter 9
Assemble Data and Graphic Programs
347
Chapter 9