;***************************************************************************
;	FREEKEY.ASM
;***************************************************************************
;	WRITTEN IN ASM (CPM 80)
;
;       BY:     BYRON MCKAY           
;       178 CENTRE ST #14              
;       MOUNTAIN VIEW, CA. 94040
;===========================================================================
; PROGRAMS THE FUNCTION KEYS ON LIBERTY 200 TERMINAL (ADAPTABLE TO TVI)
;===========================================================================
;	REVISIONS HISTORY
;	Version 1.o released - set up for wordstar functions on all keys
;           1-21-84 bam
; Equates
;
BDOS	EQU	0005H	;BDOS ENTRY
PSTRING	EQU	09H	;PRINT STRING
ESC	EQU	1BH	;ESCAPE
CR	EQU	0DH	;CARRIAGE RETURN
LF	EQU	0AH	;LINE FEED
CNTLY	EQU	19H	;^Y
;
;
	ORG	0100H
;
;
START	MVI	C,PSTRING
	LXI	D,MSG
	CALL	BDOS
	RET
;
MSG	EQU	$
;
;
; 	USE 25TH LINE TO PRINT LABELS FOR FUNCTION KEYS
;	INSERT YOUR LABELS IN THE DB STATEMENTS MARKED 'FX'
;	ENSURE THAT YOU DO NOT CHANGE THE SIZE OF THE LABELS
;
	DB	ESC,'f',ESC,'G4'	;TURN ON 25TH LINE
	DB	'1-'			;PRINT SEPERATOR
	DB	'BlkSt'			;PRINT F1 KEY LABEL
	DB	'|2-'			;PRINT NEXT SEPERATOR REPEAT TILL DONE
	DB	'BlkEn'	;F2
	DB	'|3-'
	DB	'BlkMv'	;F3
	DB	'|4-'	
	DB	'BlkCp'	;F4
	DB	'|5-'	
	DB	'BlkDl' ;F5
	DB	'|6-'	
	DB	'TopFl' ;F6
	DB	'|7-'	
	DB	'BotFl'	;F7
	DB	'|8-'	
	DB	'DoneA' ;F8
	DB	'|9-'	
	DB	'DoneS' ;F9
	DB	'|0-'	
	DB	'DoneX' ;F10
	DB	CR
	DB	ESC,'g'
;
;	FUNCTION KEYS - UNSHIFTED
;
 	DB	ESC,'|','11',0bh,'B',CNTLY	;F1
	DB	ESC,'|','21',0bh,'K',CNTLY     	;F2
	DB	ESC,'|','31',0bh,'V',CNTLY	;F3
	DB	ESC,'|','41',0bh,'C',CNTLY	;F4
	DB	ESC,'|','51',0bh,'Y',CNTLY	;F5
	DB	ESC,'|','61',11h,'R',CNTLY	;F6
	DB	ESC,'|','71',11h,'C',CNTLY	;F7
	DB	ESC,'|','81',0bh,'Q',CNTLY	;F8
	DB	ESC,'|','91',0bh,'D',CNTLY	;F9
	DB	ESC,'|',':1',0bh,'X',CNTLY	;F10
	DB	ESC,'|',0AH,'1',01H,CNTLY	;<- WORD KEY
	DB	ESC,'|',0BH,'1',06H,CNTLY	;-> WORD KEY
	DB	ESC,'|',0EH,'1',05H,CNTLY	;CURSOR UP KEY
	DB	ESC,'|',0FH,'1',18H,CNTLY	;CURSOR DOWN KEY
	DB	ESC,'|','!1',04H,CNTLY		;CURSOR RIGHT KEY
	DB	ESC,'|',20H,'1',13H,CNTLY	;CURSOR LEFT KEY
	DB	ESC,'|',08H,'1',17H,CNTLY	;SCROLL UP KEY
	DB	ESC,'|',09H,'1',1AH,CNTLY	;SCROLL DOWN KEY
;
	DB	'$'
;
	END	
