Index

Function Name: PFKEY

Purpose: Program a function key
Call address: $FF65 (hex) 65381 (decimal)
Preparation:

	Registers:	.A = pointer to string adr
			     (lo/hi/bank)
			.Y = string length
			.X = key number (1-10)
	Memory:		system map
	Flags:		none
	Calls:		none
Results:
	Registers:	.A used
			.X used
			.Y used
	Memory:		PKYBUF, PKYDEF tables updated
	Flags:		.C = 0 if successful
			.C = 1 if no room available

Description: PFKEY (alias KEYSET) is an Editor utility to replace a C128 function key string with a user's string. Keys 1-8 are F1-F8, 9 is the SHIFT RUN string, and 10 is the HELP string. The example below replaces the "help" RETURN string assigned at system initialization to the H E L P key with the string "string." Both the key length table, PKYBUF ($1000-$1009), and the definition area, PKYDEF ($100A-$10FF) are compressed and updated. The maximum length of all ten strings is 246 characters. No change is made if there is insufficient room for a new definition.

EXAMPLE:

	LDA	#$FA	;pointer to string address
	LDY	#$06	;length
	LDX	#$0A	;key # (HELP key)
	JSR	$FF65	;install new key def'n
	BCS	NO_ROOM

>000FA 00 13 00		:ptr to $1300 bank 0
>01300 53 54 52 49 4E 47	:"string"