Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Assemble Data and Graphic Programs

TEXT CODE PROGRAM CONVERSIONS.


Choose internet (http: .html) files. Tanslate Word Processor document computer model.
Software Utilities. Convert programs. Develop data applications on computer networks.

DOS DIRECTORY FUNCTIONS.


Review Subdirectory Files. List File Names.
Change Directory (CHDIR). Change to a directory on another drive. Choose drives. DOS drives are:

A: B: C: CD (Q:)

1. CHANGE DIRECTORY
change to:
a. LIST FILES
b. DELETE FILE
c. RETRIEVE FILES
2. COPY FILES

Macintosh. Make folders.


 DOS COMMAND Level. Create subdirectories (MKDIR) on new directories or drives (See Chapter 1, List
Disk).
 COPY Text Laboratory Model Documentation and Database Disk Files. COPY model files from MEMBER di-
rectories or disk to subdirectories for computer laboratory models.
DOS Shell. Select Gold Star 316 DOS and WINDOW menu.
DOS PROMPT. COPY or XCOPY.
Previous DOS Command. Copy or modify old DOS entry with special function (F) keys.
Quicklink. FTP DOS or (.html) code and files to and from host. Convert program files (See Chapter 12, Case Study).
Group Files and Documents Logically. RENAME directory or file on host web SITE or for Java (.java) or (.class).
Review Data on Files.
Use DOS EDIT or TYPE. Use Applesoft ctrl D "catalogue"
UPGRADE PROGRAM CODE.
Linear Sequence Number Program Code. Review:
 TI99 Basic.
 Gwbasic one line menu.
Upgrade Computer Memory and Systems. Use more memory.
Modular Programs Use labels.
 Qbasic. Upgrade DOS 4 Gwbasic to DOS 5 computer systems. Use menu bar term function keys (F).
 Visual Basic. Upgrade Qbasic to WINDOWS 95. RUN.
 Use bin\Javac and Java
Software Configuration.
DOS 6.0 uses DBLSPACE to increase data storing capability. COPY DOS .sys files from a hard drive to floppy disks to
upgrade DOS VERsion on bootable disks. Use two system configurations (CONFIG.SYS).
Two Procedure AUTOEXEC.bat Configurations.
1. Games. Use Drive C:.
2. Software with Another Configuration. Use drive A:. as default drive instead of C:. Boot up the computer
from drive
A:

347
Chapter 9
Assemble Data and Graphic Programs

OLD and New Compiler.


Basic. Make an OLDBASIC directory on the hard drive on C:.

CALL GWBASIC

Address Books. WINDOWS 95. Use Packard Bell Comm Central. Use E-Mail. MERGE Database files in Word Pro-
cessor document.

BOOT DISK START PROGRAM


Search Disk Directories. Quickly access programs.
1. DOS 4.0. FILE SYSTEM.
2. WINDOWS 95 or 3.1
3. Other directory utilities (MAC).
PROGRAM GROUPS or Icons. Set up MAIN Screen or menu.
File Name (.exe) Extension. Highlight software programs.exe. RUN. CALL programs with (.exe) file extension from
another disk, such as a CD.
Batch. DOS files with (.bat) file extensions. Highlight and RUN. Execute a job stream of DOS commands. Execute
Javac.

COPY A COMPILER TO HARD DRIVE.


Link to Java.com. Use Web site HTTP. FTP to update compilers and programs. Additional TEMP disk space may be
required.
Java Development Kit. Copy JDK. Uncompress Appletviewer and Javac compiler and Java.
FTP, CD or Floppy Disk. COPY Gwbasic or Qbasic compiler to a hard disk. Use an Editor.
Applesoft. Boot from disks.
Excel 7 MACROS for Visual Basic. Use MACRO and MODULE or DIALOGUE BOX in Office 7. Select VIEW
MACRO OBJECT BROWSER.

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.

LOCATE PROGRAM MODELS.


FILE SYSTEM. Navigate directories by pointing the cursor.
DOS Shell File System. (DUAL) - Review Start Up directory for an operating system.
 Choose other disk directory.
1. Alphaworks. Set Alternate DOS directory instead of the directory specified in the set up.
2. Wordperfect. Review floppy disk directories without loosing the pointer on the viewing window.

COPY HOST FILES TO HARD DRIVE.


Host Computer. Dial number. Select a MEMBER or WORK directory. TRANSFER or DOWNLOAD.
Hard Drive. Use (arrow) or (tab) keys. Review directories in the MAIN menu WINDOW on Gold Star 316. Highlight
directory names with the cursor. Select the (Enter) key. List HOST directories file names.
1. Create a Directory to Download on Drive:

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

3. FILE. OPEN files. Highlight a program file in a disk directory.


4. Use Keyboard or Icon. LOAD a program, with a (.bas) file extension. Type in DOS GWBASIC or QBASIC com-
piler name followed by program mnemonic name. RUN program on the screens.
5. Use Java in DOS PROMPT.

CHANGE DIRECTORY FOR A FILE FROM THE BASIC COMPILER.


Make and change subdirectories with Basic compilers.
Program terms include:
MKDIR, CHDIR, KILL,
FILES

STATEMENT DRIVE:\ DIRECTORY\ SUBDIR\ FILE


Mkdir B:\ Language\ French\ file name
Chdir F:\ APPENDIX\ PartII\ file name
Kill J:\ Test\ Model\ file name
Files Lists files Lists programs

Program #1, Directory List


HISTORIC BASIC COMPILERS.
DOS or WINDOWS. MAIN MENU.
 Qbasic Editor. Select program FILE WINDOW. Choose OPEN files. Navigate disk directories or subdirectories
(See Program Directory List #1). List QBasic (.bas) programs with FILE.
 Excel. Select MACRO. OPEN file extension (.xls) Programs are on tabs.
 Gwbasic Directory Commands. A Gwbasic compiler is on disk. Distribute Microsoft modules with programs.1
CALL Gwbasic Compilers. Enter directory. Enter:
c:\oldbasic\Gwbasic xxx
Use directory commands instead of DOS. Call programs that are on disk. Gwbasic, Applesoft and TI99 Basic use
code line numbers.
A. LOAD (F1) programs.
B. RUN (F2) xxx.
RUN programs or MACROS.
 Java. Update the compiler. Contact the Web site. COPY latest versions. Enable a Navigator or Browser. Down-
load plug-ins to enable the computer to use software (.html) tags for applets. Compile and RUN Java.
 Call Javac Compiler. Enter: c:\java\bin\javac xxx
 TI-Basic. TI99 computers used only one directory. Compilers are in the hardware. Enter: 1.
 Get the Basic compiler.
 Macintosh Applesoft.
Mount the floppy disk. Press (reset) key. SAVE laboratory models.

ASSEMBLE LABORATORY MODEL COMPUTER PROGRAMS.


Locate directory WINDOWS. Navigate directory. Choose disk drive and directory (See Program Directory List #1).
DOS Basic Compiler.
 Gwbasic. Use DOS CHDIR. Choose program files.
 QBasic menu. Select FILE. Locate program code files.

DEVELOP PROGRAM CODE. SAVE


Enter Compiler. Simply enter program statement terms into Gold Star 316 computers. Code graphics simulations or
data processing program models.
SAVE New Program Code. Save and modify program code.
349
Chapter 9
Assemble Data and Graphic Programs

RUN.
COPY code. PASTE to (.html). Use ISP for internet directory. Transfer from hard drive.
1

LABORATORY PROGRAM SUBROUTINES COPIED FROM WORD PROCESSOR.


Select Navigator or Word Processor. COPY old programs or subroutines. SAVE AS or PASTE program file (.bas or
.xls).
 Basic or Gwbasic Program (.bas) Line Sequence Number. Insert program line number code. Use graphics.
 Visual or Qbasic Line (.xls). Insert blank line with (Enter) key. Add program statement code.
Process Data Item Lists.
1. EDIT. Change routines. Create slightly different data item list format for new data files.
2. RUN Basic Program. Create ASCII data files. Print files.
3. SAVE. Quickly modify programs for new data file reports. SAVE simple or modified programs with new subrou-
tine program names.
4. SAVE AS New Programs.
5. DELETE unnecessary programs. Do not SAVE every variety of computer model program.
Java and Graphics. SAVE AS (.java). Use Javac to compile class. Use Applet awt files.

BASIC PROGRAM CODE TERMS.


Reference Five Program Statement Term Groups in Gwbasic #1 through #5.
1. GWBASIC #1 - Open Statement. Use Input Lists. Create Files. Enter data input lists to create new files.
2. GWBASIC #2 - Edit Input Data Statements. Move data to DIM. Count items in program DIM statements.
3. GWBASIC #3 - Other Program Statements. Use strings for data. Debug.
Process and change data.
GWBASIC and Graphics.
4. GWBASIC #4 - Draw Graphic Figures. Create graphic figures.
5. QBASIC AND GWBASIC - Other Graphics Commands.
Place graphics. Use X, Y Coordinates.

FREQUENTLY USED ROUTINES TO PROCESS DATA INPUT FILES.


Write or code programs. RUN Basic programs with all lines in sequence. Follow logic.
Create Any New Output File.
1. Program. Create files using Basic program modules on any computer (See Program List 1). Pass data to SUBrou-
tines.
2. Data Input Lists. Enter data lists through keyboards (See Program #1 and #3). Use inputbox dialogue.
3. Records and Data Item Fields. Program subroutine segment creates one record line at a time. Use the same data
item field layout for all output records.
COPY from a Database File.
Input File. Choose data stored on disk. Change file names or the subdirectory acronyms in open file statements.
Disk File Name and String Segment Literals. Use input program statements (or inputbox) to enter literal strings from
keyboards (no file number is on the keyboard input or inputbox statements). Store keyboard input literal in memory.
Choose file names in open statements. Additional programs do not have to be written to print files with the same layout.

1
Take a Road Trip With MS DOS 6.0 Upgrade
350
Chapter 9
Assemble Data and Graphic Programs

DATA

DISPLAY "Program name" Program Name


DISPLAY "INPUT PROMPT Data Item Field Description
DIMENSION List(a) List Name Length of List A
DIMENSION List(b) List Name Length of List B

FILE
OPEN #1 Output Disk, Directory\ Sub Dir\File Name
INPUT - Input List Prompts - A$ List B$ List C List
CLOSE #1

Match Codes to Process Stored Data (See Saving Test Data)


EDIT
A$ List B$ List C List
Print Output Lists

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

DATABASE SOFTWARE INPUT FILE.


Enter data with Database or Spreadsheet special services.
1. Single Row. Layout fields. Update each record.
2. BATCH. Update a group of records.
3. Convert for Basic. Update entire file. Convert.
Update special service seasonal baseball files.

1 OPEN "o", #2,"dr:\DIRECTORY\FILE"


11 IF EOF(1) THEN 100
12 INPUT #1 A$, B$, C
SAVE DR:DIRECTORY\ACRONYM2.BAS

Program #4b, Save Code

Program #5, Statements

WRITE EDIT PROGRAM.


Choose Files. Choose file names from previous output conversion programs (or Spreadsheets). Use files as input (See
Program #3). The second program (or MACRO) lists, verifies, corrects or updates software or Basic input files.
1. Create new output files.
2. Print reports.
3. Review files.

MAC APPLESOFT AND PRODOS.


Begin new programs. Type NEW. Enter program code. SAVE programs. LOAD or RUN program names. No quotes

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.

CHANGE BASIC PROGRAM CODE TO READ DATABASE FILE.


Input. Choose files to read in program models. Improve output for presentations.
Program Modules. Develop models in small program steps. Change, refine or develop new computer models.
DATA DISPLAY
DISPLAY Prompts Prog Name
DIMENSION List(a) List A Name Length List A
DIMENSION List(b) List B Name Length List B
FILE
OPEN #1 Input Disk Directory\ Sub Dir\ File Name
INPUT #1 A$ B$ C
CLOSE #1
Code to Display and Process Lists
PROCESS
WINDOW VIEW VIEW PRINT TO

Data from Opened Program Files


FILE
OPEN #2 Output Disk Directory\ Sub Dir\ File Name
PRINT #2 E$ F$ G CLOSE #2
GWBASIC #2 Program Edit Statements to Read Database Data
Qbasic Editor Program Code Modules. Select PRINT from menus. PRINT program code lists or SUB routines
instead of line numbers.

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).

OPEN Input Output


Type - Field Disk Drive Directory File
Input - Random Get
Output - Print Write Random Put Rec
353
Chapter 9
Assemble Data and Graphic Programs

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

END End Program

GWBASIC #3 PROGRAM CODE STATEMENTS TO PROCESS DATABASE


TEXT AND GRAPHICS.
Screen. Place data, images or dialogue boxes on screen. Insert additional program code. Develop better data report
presentations. Windows define viewing screens. Adjust locations of data on screen.
Develop Screen Figures. Basic program graphics contains values. Represent lines and other characters with these
numbers.
TI99 Character Bits. Create special binary characters. Set bits in CHAR statements to represent characters for grap-
hics. Display numbers assigned to CHAR statement characters on screens for graphics.
Gold Star Program Commands. Create circles, boxes and lines in high or low screen resolution (Gold Star 316). Use
circle, line, draw, delay or color command. Display graphics on screens.
Java. Create applets. Display text. Draw shapes on canvas.

354
Chapter 9
Assemble Data and Graphic Programs

FIGURE PARAMETER 1 PARM 2 PARM 3 PARM 4 PARM 5


PARM 6

SCREEN MODE Screen 0 Screen 1 Screen 2 Screen 7 Screen 8


Screen 9
CIRCLE X;Y Radius Color Start Stop
Aspect
LINE X; Y X; Y Color Box Box Fill
Style
DRAW Up Down Left Right Diagonal
Paint
SCALE ANGLE MOVE
DELAY For To Next
COLOR Screen Palette Paint Coordinate
WINDOW X, Y X, Y
VIEW X, Y X, Y
GWBASIC #4 (AND QBASIC) GRAPHIC LINES COLOR FOR GRAPHICS.

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.

SCREEN Mode Resolution


Draw Circle Box
Palette Sound Paint
RECURRING ROUTINE
FOR I=1 TO
Movement
Get PUT XOR PSET
FOR I=1 TO Delay Action
WINDOW Cartesian Coordinates
SUB LOAD Load Program Module Segments

PUT Image Display Dimension Image


PUT Image XOR Remove Image
RUN

GWBASIC #5 GRAPHIC COMMANDS TO MOVE AND CHANGE 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

DECLARE SUB man03 (pose2!(), pose1(), yman3!, m3!)


DECLARE SUB man02 (ball!(), pose1!(), pose2(), yman2!, m2!)
620 man01 ball(), pose1(), pose2(), yman1, m1
man02 ball(), pose1(), pose2(), yman2, m2
SUB man01 (ball(), pose1(), pose2(), yman1, m1)
xstart = 10
SUB man02 (ball(), pose1(), pose2(), yman2, m2)
xstart = 20

Basketball Simulation Subroutines


Man01 and
Man02 are SUBroutines.
Pass Parameters. Easily change program code. Develop graphics features. Pass Qbasic graphics parameters from the
main program to subroutine modules. Use parameters in module code to create screen image simulation models.

BASIC TERMS FOR PROGRAM CODE COMPILER WORDS.


COPY Program Code Listings. Scroll program code lines on screens with directional arrows or scroll bar.
 Gwbasic. Edit line Numbers. Ensure all code lines are present.
 Visual Basic or Qbasic Editor. SEARCH program line code for a term or for a series of characters.
Menu or Direct Terms. Program menu terms do not affect program code. Choose HELP to examine and change
program code logic.
Direct Mode.
1. Basic or Gwbasic. Execute one statement code line for a controlled test.
2. Qbasic Editor. Execute several lines using WINDOW. OPEN a program file.
Gwbasic or Applesoft. LOAD code lines in sequence into memory.
Basic. Load OLD TI99 program into memory.

MODIFY MODEL.
Program Code Terms.

Define - Access MODULES.


Edit - Change Gwbasic or Basic. Modify existing program line numbers. SEARCH Qbasic for term to change. Block
coding with ((shift) (arrow)) keys.
LABEL - Line number for Visual Basic branch code reference.
LIST - Display Gwbasic and Basic program code lines on screens. Select lines on screens by program sequence code
line number. Scroll Qbasic programs with directional arrows. VIEW SUB code on screens.
NUMbers - Use Gwbasic program code line sequence number for goto statement branches. Use numbers for Qbasic
paragraph labels.
Printer. - List program code on printers. List one code line after another. Program code listings do not have page num-
bers. Select FILE PRINT.
RUN - Operate (RUN) a program in memory.
Select RUN in Excel.
Gwbasic. Use the (F2) Key.
Qbasic. Use the (F5).
SAVE - Preserve current program code lines in memory. Copy to disk. Choose SAVE AS in Qbasic to save new copies
of programs.

Use menu line. Select (Alt).


356
Chapter 9
Assemble Data and Graphic Programs

FILE EDIT VIEW SEARCH RUN DEBUG OPTIONS HELP

QBASIC MENU FUNCTIONS


QBASIC MENU DIALOGUE BOX. Perform several functions.
Select Function Terms.
FILE - Directory window.
1. OPEN - Navigate computer directories to find a program.
2. SAVE and SAVE AS - SAVE Programs. Use (.bas) or (.xls) or other data file extensions. Navigate program
directories
3. PRINT - Print Code Lines on Paper.
EDIT laboratory disk document
files. Copy program code.
VIEW screen output.
SEARCH program code for a
word.
DEBUG. Select TRACE to help
develop small logical steps.
Use SUBroutines and WINDOWS (F6).

CREATE MODEL COPY.


Instructions for Model. COPY computer data instructions.
Code Programs. Use program inputbox or prompt: and title: statements in code lists.
Review Program Code. Review program code terms and statements. Program Code appears in listings on printers and
on screens.
Change Processing Module. Pass control of program statements from one section of program code lines to another
coding line routine.

PROGRAM CODE STATEMENT TERMS.


JAVA PACKAGE. Graphics (.html) and (.gif) files

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.

ACCESS. Select menu terms TABLE, SQL, or QUERY.

GWBASIC AND DOS 4.0.


FILES ON DIRECTORIES.

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

Change input file directory names.

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 BASIC PROGRAM CODE MODEL TERMS TO CHANGE CODE.

DELETE - Remove or erase program or data files from disk.


INSERT and DELETE lines. Sequence numbers that result are not in orderly increments.
NUMber - Command to number program code lines.
OLD - Copy Basic programs from disk to computer memory. RUN programs.
RES - (Resequence) Renumber program lines. RESequencing is necessary to insert more coding 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.

CHANGE MODEL COPIES.


Improve Models. Change routine program or applet logic code.
Use new data files for current data manipulations to produce reports.

PROCESS DATABASE FILES. PROCESS DATA OR GRAPHICS.


PASS CONTROL FROM ITERATIVE ROUTINES.

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

Write Data out. Write data to output disks or screens.


Software Files. Select Spreadsheet or Database. Create input data files with special service software. Convert DIF files
to ASCII characters.
Program Statements.
INSERT - Insert Database or Spreadsheet into a Word 7 or Woprdperfect 7 document file.
TI-Write. Select TI-Writer to update eighty column data files.

TERMS TO PROCESS DATA FILE.

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 #

Output -Transfer data from a program. Save on disk.


Print - Screen Display or line print numeric values and alphabetic attributes.
Separate Items Fields. Punctuation characters serve as column position indicators.
Use Data Items Columns. Use:
359
Chapter 9
Assemble Data and Graphic Programs

 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.

JAVA TERMS FOR APPLETS.


Copy compilers on line. New compilers may require more computer capacity.

catch - Branch to an exception routine.


FileInputStream ("") - Create a file object.
g.drawstring(" ",40,75) - Display text on screen.
inputStream.read() - Read (or write) file data.
new - Create first instance or initialize data fields.
Return - Keyboard input.
System.out.println(" ") - Display message.
Thread - Move from one applet to another.
Textfield () - Data field. Use brackets [] for arrays.

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.

PROGRAM COMMANDS TO DISPLAY GRAPHICS ON SCREENS


SIMPLE TI99 OR APPLESOFT BASIC GRAPHIC COMMANDS.

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

Sin - Produce values of arguments for sine functions.


Sound - Produce tones of different frequency.
Vchar - Place one character on the screen. Repeat the character vertically several times to draw a line.

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.

Bload - Load an image to the screen. (Prog. #13 Bload)


Bsave - Save an image from the screen.
Circle - Draw a circle, ellipse, and angles on the screen. (Prog. #4 Rocket)
Color - Specify screen color for characters.
Draw - Sketch lines for figures and forms using Draw parameters (Prog. #2 Gun). Use a scale for sizes of drawings. Use
a parameter. Color background and outlines.
Get - Transfer graphic images from screens into DIMension arrays. Use figures again on another position on screens.
(See Prog. #8 Get, Chapter 9, Basketball).
Line - Draw lines and boxes on screens. (Prog. #2 Guns, #3 Boxes, Language APPENDIX\II, Lines APPENDIX V))
Paint - Fill graphics characters with color attributes (Prog. #10 Copalette). Use tiling.
Palette - Set up colors for one or more attributes on screens.
(Prog. #10 Copalette).
Pcopy -Copy screen pages.
Play - Play music by using Play commands. (Prog. #9 Song).
Preset - Display a point on a screen.
Put - Transfer or place graphic images to screens. (See Prog. #8 Get Basketball, Chapter 8).
Screen - The screen function returns ASC code for a character at a specified row and column on screens (Prog. #12
Orbit).
Screen - Change screen modes for lower or higher screen resolution images for Gwbasic. (Prog. #1 All Screen). Store
screens in memory. Several buffers can be used for motion without flicker.
Sin - Produce values of arguments for sine functions (Prog. #5 Curve).
System - Exit the compiler and return to DOS.
View Print - Set boundaries of screen text windows. (Language APPENDIX\II)
View - Define a physical Viewport limit.
Window - Draw figures not bound by the physical limits of the screen.
(Prog. #14 Zoom; #6 Chgwindow).

INVESTIGATE DOS BASIC PROGRAM CODE GRAPHICS.


Review manuals. Take time to completely digest material in computer manuals or from HELP print outs. The (Shift)
AID F1 function is available to help to enter graphics parameters. Enjoy enhancements. Draw detailed figures in higher
resolution screens. Move more views of an illustration across the screen for motion.
Screen Pages. Reduce screen flicker. Use an active and visual page buffer (See Graphics Representation, Motion and
Appendix\III).
Window View. Easily locate data on screens. Use window view statements on screens for text or graphics. Clear views
in portions of screens.
MACINTOSH GRAPHICS.

GR or HGR - Graphics or high resolution screen.


lin or Vlin - Horizontal or vertical lines.
Plot - Plot a point.

361
Chapter 9
Assemble Data and Graphic Programs

Text - Return to the text

VISUAL BASIC AND Database.

Find Data from Menu Term.


1. Dialogue Box. Select Find.
2. Dialogue Box. Select Replace
3. Use a Filter.
4. Make a Database Engine Query.

The SQL to retrieve the word "Form " from the Database index is:

SELECT DISTINCTROW SUBJECT1.NAME, SUBJECT1.DESC, SUBJECT1.P1, SUBJECT1.P2, SUBJECT1.P3,


SUBJECT1.P4, SUBJECT1.P5, SUBJECT1.P6
FROM SUBJECT1
WHERE (((SUBJECT1.NAME)="form"));
Use DIALOGUE BOXES in Visual Basic programs.
1. Message.
Msgbox prompt:= " "
2. Input Data.
Hold=Inputbox(Prompt:=" ")
Random File Data for Language Model Example.
TYPE RECORD
v1 as string * 14
v8 as string * 14
END TYPE
DIM verbrecord as record
verbrecord.v1 = v1$
verbrecord.v8 = v8$
PUT #2, cnt, verbrecord
JAVA. Download Java Development Kits, compilers and packages. Unzip.
A package is a class.
Packages include:
java.applet java.awt java.awt.image java.io java.lang java.net java.util Use Java on Sun or
Microsoft VITURAL MACHINES. Set up client and server protocol interfaces. Use Secure Socket Layers (SSL) to
prevent bad code from being transmitted. Use CLASSES and INTERFACES, then METHODS and FIELDS. Use Run-
time class to RUN across any computer platform.
Embed applets <applet> tags in (.html) files.
Use FILEDIALOGE class in java.awt to review directories.
JAVA GRAPHICS.
Use Universal Resources Locator (URL) to Get Images (.gif) from another location.
URL URL = getcodebase();
Image Figure = getimage;
codebase, "Images, Figure.gif");
REMOTE METHODS INVOCATE.
Write or COPY code for both a Client and a Server (Java Newsletter Feb. 2001, E-Mail Stuart Holloway). An ECHO
interface is also needed. Compile with rmic. Three DOS windows are required to RUN the java programs with rmireg-
istry.
VISUAL BASIC DIALOGUE.
362
Chapter 9
Assemble Data and Graphic Programs

Prompt:=""
Prompt:=field$
Title:="Bank Balance"
Buttons:= vbexplination
Buttons:= vbinformation

363
Chapter 9
Assemble Data and Graphic Programs

347
Chapter 9

You might also like