Programmable Key Definition String Area
4096-4351 $1000-$!OFF Key
Fl F2 F3 F4 F5 F6 F7 F8 SHIFT-RUN/STOP HELP
bytes of the area (4096-4105/$1000-$1009) holds the length of one of the definition strings:
Location 4096/$1000 4097/$1001 4098/$1002 4099/$1003 4100/$1004 4101/$1005 4102/$1006 4103/$1007 4104/$1008 4105/$1009
The remaining 246 bytes (4106-435l/$100A-$lOFF) are available for definition strings. There is no particular limit on the length of an individual definition string, except that the combined length of all the definition strings cannot exceed 246 bytes. The definition strings correspond to keys in the order shown above. The offset to the first character in a particular string is found by adding the lengths of all preceding defini- tions. No special characters are used to separate the strings. It is possible for a key to have no associated definition string, in which case the length location for the key should be set to 0/$00. The default definitions for the keys are as follows: Key Default definition
Fl GRAPHIC F2 DLOAD" F3 DIRECTORY {RETURN} F4 SCNCLR {RETURN} F5 DSAVE" F6 RUN {RETURN} F7 LIST {RETURN} F8 MONITOR{RETURN} SHIFT-RUN/STOP DL"*{RETURN}RUN{RETURN} HELP HELP{RETURN}
These definitions, along with the corresponding length values, are copied from locations 52904-52980/$CEA8-$CEF4 in screen editor ROM during the Kernal CINT routine [$C07B]. In BASIC, the KEY statement can be used to change definitions. From machine language, the Kernal PFKEY routine [$FF65] (or screen editor KEYSET routine [$C021]) can be used. Pro- grammable keys are handled by a subroutine [$C6CA] within the screen editor keyscan routine.
$1133-$1134
4403-4404152
BASIC Working Storage
4352-4607/$1100-$1IFF
4352-4400 $1100-$1130 DOSSTR
DOS command assembly area
The BASIC statements that issue DOS commands—for ex- ample, HEADER, COPY, CATALOG, and SCRATCH—use this area to assemble the command string to be sent to the disk drive.
4401-4402 $1131-$1132 XPOS
Bitmapped-screen pixel-cursor horizontal position
These locations hold the horizontal (x) coordinate of the cur- rent position of the pixel cursor on the bitmapped screen. The range of values here depends on the scale factor currently in use. If scaling is not used, the value can be found in the range 0-319. In any case, a value of zero specifies the left edge of the screen. The value here is set to 0/$00 whenever the bit- mapped screen is cleared, either by the SCNCLR routine or by adding the clear parameter to a GRAPHIC statement. After execution of any BASIC graphic statement, this location will hold the value of the final horizontal pixel position affected by the operation. The value here can be set explicitly using the LOCATE statement, which stores the specified horizontal posi- tion in this location. If the DRAWTO form of the DRAW state- ment is used, the line will begin at the horizontal position specified here.
4403-4404 $1133-$1134 YPOS
Bitmapped-screen pixel-cursor vertical position
These locations hold the vertical (y) coordinate of the current position of the pixel cursor on the bitmapped screen. The range of values here depends on the scale factor currently in use. If scaling is not used, the value can be found in the range 0-199. In any case, a value of zero specifies the top edge of the screen. The value here is set to 0/$00 whenever the bit- mapped screen is cleared, either by the SCNCLR routine or by adding the clear parameter to a GRAPHIC statement. After execution of any BASIC graphic statement, this location will hold the value of the final vertical pixel position affected by the operation. The value here can be set explicitly using the
4096-4351 $1000-$!OFF Key Fl F2 F3 F4 F5 F6 F7 F8 SHIFT-RUN/STOP HELP
bytes of the area (4096-4105/$1000-$1009) holds the length of one of the definition strings:
Location 4096/$1000 4097/$1001 4098/$1002 4099/$1003 4100/$1004 4101/$1005 4102/$1006 4103/$1007 4104/$1008 4105/$1009
The remaining 246 bytes (4106-435l/$100A-$lOFF) are available for definition strings. There is no particular limit on the length of an individual definition string, except that the combined length of all the definition strings cannot exceed 246 bytes. The definition strings correspond to keys in the order shown above. The offset to the first character in a particular string is found by adding the lengths of all preceding defini- tions. No special characters are used to separate the strings. It is possible for a key to have no associated definition string, in which case the length location for the key should be set to 0/$00. The default definitions for the keys are as follows: Key Default definition
Fl GRAPHIC F2 DLOAD" F3 DIRECTORY {RETURN} F4 SCNCLR {RETURN} F5 DSAVE" F6 RUN {RETURN} F7 LIST {RETURN} F8 MONITOR{RETURN} SHIFT-RUN/STOP DL"*{RETURN}RUN{RETURN} HELP HELP{RETURN}
These definitions, along with the corresponding length values, are copied from locations 52904-52980/$CEA8-$CEF4 in screen editor ROM during the Kernal CINT routine [$C07B]. In BASIC, the KEY statement can be used to change definitions. From machine language, the Kernal PFKEY routine [$FF65] (or screen editor KEYSET routine [$C021]) can be used. Pro- grammable keys are handled by a subroutine [$C6CA] within the screen editor keyscan routine.
$1133-$1134
4403-4404152
BASIC Working Storage
4352-4607/$1100-$1IFF
4352-4400 $1100-$1130 DOSSTR
DOS command assembly area
The BASIC statements that issue DOS commands—for ex- ample, HEADER, COPY, CATALOG, and SCRATCH—use this area to assemble the command string to be sent to the disk drive.
4401-4402 $1131-$1132 XPOS
Bitmapped-screen pixel-cursor horizontal position
These locations hold the horizontal (x) coordinate of the cur- rent position of the pixel cursor on the bitmapped screen. The range of values here depends on the scale factor currently in use. If scaling is not used, the value can be found in the range 0-319. In any case, a value of zero specifies the left edge of the screen. The value here is set to 0/$00 whenever the bit- mapped screen is cleared, either by the SCNCLR routine or by adding the clear parameter to a GRAPHIC statement. After execution of any BASIC graphic statement, this location will hold the value of the final horizontal pixel position affected by the operation. The value here can be set explicitly using the LOCATE statement, which stores the specified horizontal posi- tion in this location. If the DRAWTO form of the DRAW state- ment is used, the line will begin at the horizontal position specified here.
4403-4404 $1133-$1134 YPOS
Bitmapped-screen pixel-cursor vertical position
These locations hold the vertical (y) coordinate of the current position of the pixel cursor on the bitmapped screen. The range of values here depends on the scale factor currently in use. If scaling is not used, the value can be found in the range 0-199. In any case, a value of zero specifies the top edge of the screen. The value here is set to 0/$00 whenever the bit- mapped screen is cleared, either by the SCNCLR routine or by adding the clear parameter to a GRAPHIC statement. After execution of any BASIC graphic statement, this location will hold the value of the final vertical pixel position affected by the operation. The value here can be set explicitly using the
4405-4406
$1135-$1136
$116D
4461
LOCATE statement, which stores the specified vertical posi- tion in this location. If the DRAWTO form of the DRAW state- ment is used, the line will begin at the vertical position
specified here.
4405-4406 $1135-$1136 XDEST
Final horizontal pixel position for graphics operations
These locations hold the calculated ending horizontal pixel- cursor position for BASIC graphics operations. The operation is complete when the value in locations 4401-4402/$1131-$1132 equals the value here.
4407-4408 $1137-$1138 YDEST
Final vertical pixel position for graphics operations
These locations hold the calculated ending vertical pixel-cursor position for BASIC graphics operations. The operation is com- plete when the value in locations 4403-4404/$1133-$1134 equals the value here.
4409-4455 $1139-$1167
Working storage for assorted graphics routines
BASIC graphics routines such as BOX, CIRCLE, DRAW, and PAINT use various locations in this range to perform the cal- culations necessary to plot the points for the figure being drawn. The MOVSPR routine also uses some of these loca- tions for sprite position calculations in those cases where the sprite is moved relative to the pixel cursor.
4456 $ 1168 CHRPAG
Starting page for character pattern definitions
This location is used during the CHAR routine [$67D7] in the calculations to determine where character shapes are to be placed on the bitmapped screen. The value here is the starting page of character memory. This location will hold the value from either 4588/$llEC or 4587/$llEB.
4457 $1169 BITCNT
Bit counter for shape retrieval
This location is used during the GSHAPE routine [$658D] as a counter for the bits to be read from each byte of the storage string.
4458 $ 116A SCALEM
Scaling flag
This location indicates whether the scaling feature is to be used when graphics are drawn on the bitmapped screen. While this location contains 0/$00, scaling will not be used. When the location contains any nonzero value, the horizontal and vertical coordinates for all graphics routines will be scaled according to the values in locations 135-136/$87-$88 and 137-138/$89-$8A. This location is initialized to 0/SOO (scal- ing off) during the BASIC cold-start sequence, and also when- ever the clear-screen parameter is included in a GRAPHIC statement. The routine to execute the SCALE statement
[$6960] will store the first parameter following SCALE (0 or 1) here.
4459 $116B WIDTH
Line width for bitmapped graphics routines
The value here determines whether the lines drawn by BASIC bitmapped graphics routines are to be standard width (indi- cated when this location contains 0/$00) or double width (in- dicated when this location contains any nonzero value). The value here is initialized to 0/$00 (normal width) during the BASIC cold-start sequence. The routine to execute the WIDTH statement [$71B6] will store the width parameter minus 1 in this location.
$116C
FILFLG
4460
BOX fill flag
This location is used during the BOX routine [$62B7] to specify whether the shape is to be open or filled. If the value here is 0/$00 the shape will be open; otherwise, it will be filled. This location is initialized to 0/$00 (open shapes) during the BASIC cold-start sequence. When a BOX statement is exe- cuted, the seventh parameter (paint) following the statement will be copied here. If that parameter is omitted, it will default to 0/$00.
S116D
BITMSK
4461
Bit mask value
This location is used as a mask value to select individual bits during the DRAW and SPRDEF routines.
4405-4406
$1135-$1136
$116D
4461
LOCATE statement, which stores the specified vertical posi- tion in this location. If the DRAWTO form of the DRAW state- ment is used, the line will begin at the vertical position
specified here.
4405-4406 $1135-$1136 XDEST
Final horizontal pixel position for graphics operations
These locations hold the calculated ending horizontal pixel- cursor position for BASIC graphics operations. The operation is complete when the value in locations 4401-4402/$1131-$1132 equals the value here.
4407-4408 $1137-$1138 YDEST
Final vertical pixel position for graphics operations
These locations hold the calculated ending vertical pixel-cursor position for BASIC graphics operations. The operation is com- plete when the value in locations 4403-4404/$1133-$1134 equals the value here.
4409-4455 $1139-$1167
Working storage for assorted graphics routines
BASIC graphics routines such as BOX, CIRCLE, DRAW, and PAINT use various locations in this range to perform the cal- culations necessary to plot the points for the figure being drawn. The MOVSPR routine also uses some of these loca- tions for sprite position calculations in those cases where the sprite is moved relative to the pixel cursor.
4456 $ 1168 CHRPAG
Starting page for character pattern definitions
This location is used during the CHAR routine [$67D7] in the calculations to determine where character shapes are to be placed on the bitmapped screen. The value here is the starting page of character memory. This location will hold the value from either 4588/$llEC or 4587/$llEB.
4457 $1169 BITCNT
Bit counter for shape retrieval
This location is used during the GSHAPE routine [$658D] as a counter for the bits to be read from each byte of the storage string.
4458 $ 116A SCALEM
Scaling flag
This location indicates whether the scaling feature is to be used when graphics are drawn on the bitmapped screen. While this location contains 0/$00, scaling will not be used. When the location contains any nonzero value, the horizontal and vertical coordinates for all graphics routines will be scaled according to the values in locations 135-136/$87-$88 and 137-138/$89-$8A. This location is initialized to 0/SOO (scal- ing off) during the BASIC cold-start sequence, and also when- ever the clear-screen parameter is included in a GRAPHIC statement. The routine to execute the SCALE statement
[$6960] will store the first parameter following SCALE (0 or 1) here.
4459 $116B WIDTH
Line width for bitmapped graphics routines
The value here determines whether the lines drawn by BASIC bitmapped graphics routines are to be standard width (indi- cated when this location contains 0/$00) or double width (in- dicated when this location contains any nonzero value). The value here is initialized to 0/$00 (normal width) during the BASIC cold-start sequence. The routine to execute the WIDTH statement [$71B6] will store the width parameter minus 1 in this location.
$116C
FILFLG
4460
BOX fill flag
This location is used during the BOX routine [$62B7] to specify whether the shape is to be open or filled. If the value here is 0/$00 the shape will be open; otherwise, it will be filled. This location is initialized to 0/$00 (open shapes) during the BASIC cold-start sequence. When a BOX statement is exe- cuted, the seventh parameter (paint) following the statement will be copied here. If that parameter is omitted, it will default to 0/$00.
S116D
BITMSK
4461
Bit mask value
This location is used as a mask value to select individual bits during the DRAW and SPRDEF routines.
4462 $116E $117C-$117D 4467-4477