home *** CD-ROM | disk | FTP | other *** search
-
- GRASP 3.5 Readme File - February 12, 1990
-
- This file contains three sections:
-
- New features in Grasp 3.5
- Updating applications from Grasp 3.1
- Additions to the manual
-
- There are two additional Readme files, for Inset and for the High-Level
- Language examples. Inset's Readme is in the INSET directory. The HLL
- Readme in is the HLL directory.
-
-
- --------------------------------------------------------------------------
-
-
- New features in Grasp 3.5
-
- Grasp now sports 102 commands, greatly improved performance, and many new
- features which give Grasp all the capabilities of other third-generation
- languages like C and Pascal. Here are some of the highlights:
-
- Grasp
-
- Video modes
-
- Grasp now supports most of the enhanced VGA modes, including 16-color
- 1024x768 and 256-color 800x600. As always, the modes available to you
- depend on your video card. Page 6-4 in the Grasp manual lists all of
- the modes.
-
- Differential animation
-
- The utility GDFF creates differential animation files which Grasp can
- play back. This technique saves the changes from one frame to another
- in a sequence of images, resulting in much smaller and faster
- animations. See page 2-13 for an introduction to the concept.
-
- DOS commands, CDs, and other devices
-
- Grasp now has full multimedia capability. The INT command calls
- interrupts, which allows Grasp programs to control CD players and
- other devices and to issue DOS commands such as Make Directory. See
- the files DOSIO.TXT and CDCMD.TXT for examples.
-
- Conditional execution
-
- Grasp now features conditional execution in If-Else-Endif constructs,
- which can be built around value comparisons, user keystrokes, mouse
- clicks, and other testable conditions. See pages 3-34 through 3-37.
-
- Variables, operators, and functions
-
- Grasp now allows variables and can perform string and math operations.
- See pages 3-28 and 3-29 for an introduction to variables, and pages
- 6-18 through 6-20 for lists of operators and functions.
-
- Subroutines
-
- You can now pass parameters to subroutines, including variables.
- See pages 3-37 through 3-41 for details.
-
- Typographic controls
-
- The Text command now wraps text within windows automatically, and you
- can choose left, center, or right alignment of text. Letter and word
- spacing can also be controlled. See page 4-88.
-
- Picture/clipping command use
-
- All Grasp commands can now work with clippings or pictures. To use a
- clipping with a command designed for pictures such as Pfade, preface
- the buffer number with a C. To use a picture with a clipping command
- such as Putup, preface the buffer number with a P.
-
- Pictor
-
- Quick keys
-
- The quick-key feature has been expanded to include more menu options
- and to allow you to select all of the drawing tools. See section six
- of the Pictor manual for a complete list. Also note that it's no
- longer necessary to use the Alt key with a letter key to select menu
- options or tools, unless you're using the Text tool.
-
- VGA color cycling
-
- In VGA modes you can cycle a range of colors on screen by pressing
- Tab. All colors from the left to the right mouse button color will
- begin shifting positions as they do in Grasp with the Cycle command.
- Tab again to speed up shifting; use Shift-Tab to slow it down and stop
- it. Press the Backspace key to reverse cycling direction.
-
- VGA color range adjustment
-
- The range of colors from the left to the right mouse button color can
- be adjusted in hue, brightness, and contrast, using the Ctrl key with
- the function keys. These are listed in section six of the Pictor
- manual. Press the Asterisk key to restore the original palette, or
- save the image to make the adjustments permanent. Note that until you
- save the image and reload it, any adjustments you make with this
- feature affect the underlying palette.
-
- Edit menu and Change Colors dialog box
-
- When the Change Colors dialog box is displayed, you can use the Edit
- menu functions Cut, Copy, Paste, and Invert Colors. They will operate
- on the selected range of colors (from left to right button color).
- Copy and Paste make it easy to move ranges of colors in 256-color
- mode. To use this feature, just click on Edit on the menu bar or
- press the quick key for the function you want (C for Copy, for
- example).
-
- Artools
-
- Artools is now bundled with Grasp. If you're familiar with the
- previous version of Artools, you'll notice two program changes:
- TXTCLP (for converting text-mode images to graphics modes) has been
- added, and TGAPIC/PICTGA are no longer included. The Artools program
- has also been eliminated: each of the programs now has its own
- interactive screen.
-
- --------------------------------------------------------------------------
-
-
- Updating existing applications
-
- Applications written in Grasp 3.1 will run under version 3.5 with four
- exceptions. We're confident that Grasp's enhanced capabilities and
- performance will make converting your applications worthwhile.
-
- 1 The TOUCH command has been eliminated. Touchscreen users should rely
- on the software provided with their screens, which can be used to
- simulate keystrokes in response to touches. Grasp programs can then
- test for keystrokes instead.
-
- 2 The FLOAT command has been enhanced with ENDFLOAT. Float still leaves
- a clipping displayed at its last location, but now it saves the
- background under that clipping in a buffer. The next Float command
- restores the background from that buffer before starting its Float.
-
- This new feature allows you to put together a sequence of Floats to
- create complex movement. However, the Endfloat command must now be
- issued after the last Float in a series. Existing applications that
- use Float may need Endfloats to work correctly.
-
- 3 The new math operators include the dash (subtraction and negation).
- Unfortunately, this means that filenames in Grasp programs cannot use
- dashes unless they're enclosed in quotes. For example, PLOAD T-12,1
- will cause an error, but PLOAD "T-12",1 will work. If you've used
- dashes in filenames, add quotes or rename the files.
-
- 4 Since text can now span multiple lines, it's imperative that all
- quotes be balanced. This was not true in version 3.1: you could leave
- off the closing quote from a Text command without causing an error.
- In version 3.5 the interpreter will scan lines, treating them as text,
- until it finds the next quote.
-
-
- --------------------------------------------------------------------------
-
-
- Omissions from the manual (new features that didn't make it to press).
-
- String function
-
- The function STRING(LENGTH,CHAR) returns a string of the specified
- length filled with the specified character (or filled with the first
- character of CHAR if it's longer than one character). For example,
- this command displays a line of dashes: TEXT STRING(80,"-")
-
- CD control
-
- The disk file CDCMD.TXT (in your Grasp directory) contains Grasp
- routines to play audio CD's in a CD-ROM drive. The file contains an
- example of their use, which is a revision of the example on page 3-41.
-
- DOS functions and text file manipulation
-
- The disk file DOSIO.TXT (in your Grasp directory) contains Grasp
- routines that execute DOS commands such as Make Directory. It also
- contains routines to read and write to disk files, and a simple
- example of their use.
-
- Return variable
-
- The return variable @0, which is discussed on page 3-40, is also set
- when a subroutine is called. It's set equal to the subroutine's name,
- which makes it easy to trace program flow when debugging or reporting
- errors. The DOS routine DOSERR, in DOSIO.TXT, uses this feature.
-
- Exclusive OR
-
- The caret (^) is the exclusive-OR operator. Comparison is bit-by-bit.
-
- Address function
-
- The function ADR(variable) returns a 32-bit address in hex, containing
- both the segment and offset. For example, ADR("myname") might return
- the string "0x287B3E58".
- In addition, the PEEK functions and POKE commands (PEEK, PEEKL, PEEKW,
- POKE, POKEL, POKEW) can use one 32-bit address parameter instead of
- two 16-bit ones. This approach, however, limits you to Poking one
- value rather than multiple ones. Here's an example:
-
- SET POINTER ADR("SHARY") ; put address of string "SHARY" in STRPOINTER
- POKE @POINTER+4 ASC("I") ; write "I" to memory at fifth byte position
- TEXT @@POINTER ; display "SHARI"
- WAITKEY
-
- Memory and variables
-
- The previous example illustrates a peculiarity of memory addressing in
- Grasp. You can't use the obvious method to directly alter variables:
-
- SET X "SHARY" ; put string "SHARY" into variable X
- SET POINTER ADR(@X) ; put address of X into variable POINTER
- POKE @POINTER+4 ASC("I") ; write "I" to memory at fifth byte position
- TEXT @X ; still displays "SHARY"
- WAITKEY
-
- You have to create a variable which is the address of a string, and
- refer to the string itself by double indirection. Here's a correct
- example:
-
- SET XPOINTER "SHARY" ; create pointer variable to point to "SHARY"
- POKE @XPOINTER+4 ASC("I"); write "I" to memory at fifth byte position
- TEXT @@XPOINTER ; display "SHARI"
- WAITKEY
-
- This limitation is imposed by Grasp's own memory management routines,
- which are designed to maximize available memory for image buffers.
-
- Direct memory reference
-
- As illustrated in the manual, the indirection function @ looks at the
- contents of what follows. For example, @X refers to the contents of X
- instead of the string "X". However, if @ is used with a number
- greater than 255, Grasp will interpret it as a reference to the
- contents of memory at the given location, and will return the string
- at that address up to the first null (ASCII 0) character. For
- example, @0x287B3E58 refers to the string at hex address 287B3E58.
-
- New system function: Abort
-
- There is one additional system function called Abort that can be
- turned on and off with the SET (System Control) command. With Abort
- ON (it's on by default when Grasp starts), keystrokes will cancel a
- Waitkey or other timed pause. If you set Abort OFF, all timed events
- will take the allotted time--for instance, WAITKEY 100 will always
- wait one second. Set Abort off to preserve timing in applications
- where it's critical. See page 4-78 for details of the SET command.
-
- Editing Keys
-
- When editing programs in the Grasp editor, the following Wordstar key
- combinations can be used in addition to those listed on page 6-8 of
- the manual.
-
- Ctrl-F Next word Ctrl-A Previous word
- Ctrl-R Page up Ctrl-C Page down
- Ctrl-D Next character Ctrl-S Previous character
- Ctrl-X Next line Ctrl-E Previous line
- Ctrl-W Scroll down one line Ctrl-Z Scroll up one line
-
- Ctrl-Q C Go to end of file Ctrl-Q R Go to beginning of file
- Ctrl-Q D Go to end of line Ctrl-Q S Go to beginning of line
- Ctrl-Q B Go to start of block Ctrl-Q K Go to end of block
-
- Ctrl-K B Mark start of block Ctrl-K K Mark end of block
- Ctrl-K C Copy block Ctrl-K V Move block
- Ctrl-K R Read in a file Ctrl-K W Write block to disk
- Ctrl-K Y Delete block Ctrl-K H Turn off block
-
- Ctrl-K D Save changes & exit Ctrl-K Q Abandon changes & exit
- Ctrl-K S Save file & continue Ctrl-K X Exit to main menu
-
- Ctrl-N Insert new line Ctrl-Y Delete line
- Ctrl-G Delete character Ctrl-Q Y Delete to end of line
- Ctrl-P Insert next character typed even if it's a control character.
- Ctrl-V Toggle insert on and off
-
- When command
-
- A WHEN command that calls a subroutine has to use the word GOSUB
- before the subroutine's name. This is the only instance where using a
- subroutine's name alone will not work.
-
- Glib
-
- Ther's a new command option in Glib called Move (/M). Like Update
- (/U), it inserts the named files into the library file. Unlike
- Update, it also deletes the files from the directory. For example,
- the command
-
- GLIB /M MYAPP *.*
-
- would copy all files in the current directory into MYAPP.GL, then
- delete them, leaving only MYAPP.GL.
-
- --------------------------------------------------------------------------
- --- end of file ---
-