home *** CD-ROM | disk | FTP | other *** search
- ---------------------------------------
-
- RECORD# <lf#>, <record#> [,<char#>]
-
- The RECORD# command is used with an OPENed RELative disk file to position
- the record pointer to a particular record. The record pointer must be set
- to point to a particular record before any reading from or writing to that
- record can be accomplished (use GET#, INPUT#, or INPUT$() to read; PRINT#
- to write).
-
- <Lf#> is the logical file number used when the file was OPENed.
-
- <Record#> may range from 1 to 65535, although if zero is used Commodore DOS
- will automatically promote it to a 1. If RECORD# sets the record pointer
- to a record beyond the current last record in the file DOS error "50,RECORD
- NOT PRESENT,XX,XX" occurs. This is a fatal error if trying to read that
- record, but writing to a record beyond the current last record in a
- relative file causes that record and all intervening records to be created.
- This enables a relative file to be expanded whenever necessary (record
- creation is a time-consuming process for the disk drive, however, and it is
- often preferable to create large numbers of records a few times rather than
- small numbers of records many times).
-
- <Char#> is used to set the character pointer to a particular character
- within the record. Reading and writing takes place at the current position
- of the character pointer, with the pointer advancing one character each
- time a character is read or written. <Char#> may range from 1 to 254,
- although if zero is used Commodore DOS will automatically promote it to a
- 1. If <char#> is not specified it is assumed to be 1. If <char#> is
- larger than the record size DOS error "51,OVERFLOW IN RECORD,XX,XX" will
- occur.
-
- Examples:
-
- 10 RECORD# 3, 63
- 20 RECORD# 13, 650, 20
- 30 RECORD# 5, A: A$=INPUT$(100, #5)
-
- ---------------------------------------
-
- RESTORE [<line#>]
-
- The V2 Basic RESTORE statement has been modified to accept an optional line
- number. If <line#> is present RESTORE sets the internal data pointer to
- that line number. RESTORE with no line number sets the pointer to the
- first line of the program. READing continues normally starting with the
- first DATA statement on or after the line the data pointer points to.
-
- Examples:
-
- 10 RESTORE
- 20 RESTORE 1000
-
- ---------------------------------------
-
- RUN [<line#>]
-
- The V2 Basic RUN command has been modified to set default screen scaling
- and sizing for bitmap graphics operations before beginning program
- execution. There is no other change in its behavior.
-
-
-
-
-
-
-
- Examples:
-
- RUN
- RUN 100
-
- ---------------------------------------
-
- SAVE <filename$> [,<dvc#>] [,<addr>]
-
- The V2 Basic SAVE command has been modified to save <filename$> on the
- current default device if <dvc#> is not specified. There is no other
- change in its behavior.
-
- Examples:
-
- 10 SAVE "MYPROGRAM"
- 20 SAVE "THISPROGRAM",8
- 30 SAVE "THATPROGRAM",1,2
-
- ---------------------------------------
-
- SCALE [<xrange/orient>] [,<yrange/orient>] [,<xorigin>] [,<yorigin>]
-
- SCALE sets the logical coordinate system of the bitmap screen. ERASE,
- LINE, LOCATE, POINT, and SPRLOC are all affected by logical scaling.
- CUR(), DRAW, and WRITE are not affected by logical scaling, except that
- they perform their functions starting at the current logical cursor
- position.
-
- The physical coordinate system of the bitmap screen consists of 64000
- pixels arranged in 320 columns by 200 rows. The origin (coordinates 0,0)
- is at the upper left corner of the screen. X values increase from left to
- right, and Y values increase from top to bottom. The bottom right corner
- of the screen has coordinates 319,199.
-
- EVS Basic overlays the physical coordinate system with a logical coordinate
- system. Statements which accept logical coordinates automatically
- transform them into physical coordinates before use according to the
- equations:
-
- physical xpos = 320/<xrange/orient> * (<logical xpos> + <xorigin>)
- physical ypos = 200/<yrange/orient> * (<logical ypos> + (yorigin>)
-
- Logical coordinates which are outside the physical coordinate system after
- transformation are not legal, except in the case of the SPRLOC statement.
- The default logical screen coordinate system is equivalent to the physical
- coordinate system (which is the same as SCALE 320,200,0,0). RUNning a
- program resets the default logical coordinate system.
-
- SCALE without parameters resets the default logical coordinate system. If
- parameters are present it is not possible to "skip over" unused SCALE
- parameters. All must be present up to the last one actually used.
- Parameters not specified retain their current values. The range of all
- four parameters is -32768 to +32767, except that <xrange/orient> and
- <yrange/orient> may not be zero. The logical origin may be located
- anywhere, including outside the physical coordinate system.
-
- Examples:
-
-
-
-
-
-
-
- 10 SCALE
- 20 SCALE 320,-200,0,-199
- 30 SCALE 320,-240,160,-120
- 40 SCALE 280,192
- 50 SCALE 640,400
- 60 SCALE 2*3.14,-2,3.14,-1
-
- ---------------------------------------
-
- SPRCOL <sprite# [,<sum>]>, <color>
-
- The SPRCOL statement sets the color of one or more sprites. For multicolor
- sprites, SPRCOL sets the color independent of the two shared multicolors.
-
- The VIC-II chip can display eight sprites, which EVS Basic numbers 1 to 8.
- Any single sprite can be affected by using its number for <sprite#>. In
- this case <sum> is not used and should not be present. Multiple sprites
- can be affected at the same time by using 0 for <sprite#> together with
- <sum>. <Sum> is calculated by starting with zero and adding 1 for sprite
- 1, 2 for sprite 2, 4 for sprite 3, 8 for sprite 4, 16 for sprite 5, 32 for
- sprite 6, 64 for sprite 7, and 128 for sprite 8. <Sum> has a maximum value
- of 255, which would affect all 8 sprites at once (1+2+4+8+16+32+64+128).
-
- <Color> may range from 0 to 15.
-
- Examples:
-
- 10 SPRCOL 1, 7
- 20 SPRCOL I, C(I)
- 30 SPRCOL 0, 255, 1
-
- ---------------------------------------
-
- SPRITE <sprite# [,<sum>]>, [<enable> [,<priority> [,<xsize> [,<ysize>
- [,<multi>]]]]]
-
- SPRITE controls all the "on-or-off" aspects of the appearance of one or
- more sprites. The most important of these is visibility, but display
- priority, size, and multicolor mode are also included.
-
- <Sprite# [,<sum>]> has the same form and behavior as described for the
- SPRCOL statement. The remaining parameters are all expressions. If the
- expression is non-zero (true), the parameter will be turned "on". If the
- expression has a value of zero (false), the parameter will be turned "off".
- Parameters not present remain in their current state.
-
- <Enable> controls sprite visibility. An "off" sprite cannot be seen. If a
- sprite is "on" it may be visible (if it is located within the physical
- screen coordinates, if it has a color different from the paper color, if it
- is not hidden by foreground or another sprite).
-
- <Priority> controls what happens when a sprite and a foreground object
- appear in the same place on the screen. If "off" (higher), a sprite will
- appear in front of any foreground objects it crosses. If "on" (lower), the
- sprite will disappear behind them (sprites also have a built-in priority to
- other sprites. Sprite 1 has the highest, sprite 2 the second highest and
- so on down to sprite 8, which has the lowest priority. When two sprites
- cross the one with higher priority passes in front of the one with lower
- priority.).
-
-
-
-
-
-
-
- <Xsize> and <ysize> control horizontal and vertical sprite size. "Off" is
- normal size and "on" is double size.
-
- <Multi> controls sprite multicolor. A normal ("off") sprite can display
- only one color, while a multicolor ("on") sprite can also display either or
- both of the two additional colors shared by all multicolor sprites. The
- pixels of multicolor sprites are twice as wide and half as many as the
- pixels of normal sprites.
-
- SPRITE functions in all graphic modes except mode 0. Values set by a
- SPRITE statement remain in effect until changed by another SPRITE
- statement, with the exception that the GRAPHIC statement sets <enable> to
- "off" for all eight sprites.
-
- Examples:
-
- 10 SPRITE 1,1,0,0,0,1
- 20 SPRITE 3,,,X<312, Y<100
- 30 SPRITE 0,255,0
-
- ---------------------------------------
-
- SPRLOC <sprite# [,<sum>]>, <xpos>, <ypos>
-
- SPRLOC positions one or more sprites on the logical screen. <Sprite#
- [,<sum>]> has the same form and behavior as described for the SPRLOC
- statement.
-
- <Xpos>, <ypos> sets the position of the upper left corner of a sprite. The
- range of <xpos>, <ypos> depends on the current logical screen coordinates.
- The default range is -24, -50 to 487, 205. Not all of these values
- correspond to locations on the physical screen. SPRLOC is the only
- statement that allows <xpos>, <ypos> to be outside the physical screen
- area. Normal-sized sprites are completely on the physical screen only
- within the range 0, 0 to 295, 178, and will be completely off the screen
- outside the range -23, -20 to 319, 199.
-
- SPRLOC functions in all graphic modes except mode 0.
-
- Examples:
-
- 10 SPRLOC 1, 160, 100
- 20 SPRLOC 0, 3, -24, -50
- 30 SPRLOC A, X(A), Y(A)
-
- --------------------------------------
-
- SPRMULTI [<color1> [,<color2>]]
-
- The SPRMULTI statements sets the two colors shared by multicolor sprites.
- These colors are in addition to the unique color each sprite may have
- (which is set by SPRCOL). Like the multicolor graphic modes, in exchange
- for the two extra colors a multicolor sprite loses half its horizontal
- resolution as the pixels that make it up become twice as wide and half as
- many.
-
- Each color may range from 0 to 15. SPRMULTI functions in all graphic
- modes.
-
- Examples:
-
-
-
-
-
-
-
- 10 SPRMULTI 4, 0
- 20 SPRMULTI A
- 30 SPRMULTI ,A+1
-
- ---------------------------------------
-
- SPRPIC <sprite# [,<sum>]>, <image>
-
- SPRPIC assigns a sprite image block to a sprite. A sprite "looks like" the
- image in the sprite image block currently assigned to it. <Sprite#
- [,<sum>]> has the same form and behavior described for the SPRLOC
- statement.
-
- Sprite image block numbers range from 0 to 206 (these are the same image
- blocks that are used by the IMAGE statement. The IMAGE statement is one
- way of assigning an image to a sprite image block). An image block itself
- has no default value. It is the programmer's responsibility to ensure that
- any image block used in a SPRPIC statement actually contains a useful image
- and causes no memory use conflict (see IMAGE for more details).
-
- The image block assigned to a sprite may be changed at any time (this is
- one way to animate a sprite). There are no default image block assignments
- to sprites.
-
- Examples:
-
- 10 SPRPIC 1, 8
- 20 SPRPIC 0, 3, P(A)
-
- ---------------------------------------
-
- SWAP <var1>, <var2>
-
- The SWAP statement exchanges the values of two variables. <Var1> and
- <var2> can be any two variables of the same type (real, integer, or
- string). It is not possible to SWAP a real with an integer variable (to
- exchange these two types it is necessary to use a third "holding" variable
- to temporarily store one of the two variables).
-
- Examples:
-
- 10 SWAP A, B
- 20 SWAP A$(I), A$(J)
- 30 SWAP A%, A%(I)
-
-