// September 25, 1977  4:11 PM

// command language definitions

manifest [
	menuCode= #200
	keySetCode=menuCode+40
	commandTableSize= keySetCode + 10

	delKey= #177
	bsKey= #10
	escKey= #33
	lfKey= $*L
	crKey= $*N
	controlA=$A-$@
	controlB=$B-$@
	controlC=$C-$@
	controlD=$D-$@
	controlE=$E-$@
	controlF=$F-$@
	controlG=$G-$@
	controlH=bsKey
	controlI=$I-$@
	controlL=$L-$@
	controlO=$O-$@
	controlP=$P-$@
	controlQ=$Q-$@
	controlR=$R-$@
	controlS=$S-$@
	controlT=$T-$@
	controlU=$U-$@
	controlV=$V-$@
	controlW=$W-$@
	controlX=$X-$@
	controlY=$Y-$@
	controlZ=$Z-$@

	endCommand= #100000
	changeCommand= #140000
	]

// entry in commandTable:

structure COMMAND [
	end	bit 1
	change	bit 1
	com	bit 14
	]

//entry in actionTable:

structure ACTION [
	end	bit 4
	begin	bit 6
	switch	bit 6
	]

// index in actionTable (list of commands):

manifest [
	CMnothing=0
	CMmake=1
	CMcyclic=2
	CMbackUp=3
	CMstartAgain=4
	CMdelete=5
	CMundelete=6
	CMdelSelection=7
	CMquit=8
	CMrefresh=9
	CMread=10
	CMwrite=11
	CMplot=12
	CMbrush=13
	CMthickness=14
	CMredraw=15
	CMdash=16
	CMselect=17
	CMselectAll=18
	CMmTransf2=19
	CMcTransf2=20
	CMmTransf4=21
	CMcTransf4=22
	CMmTransf6=23
	CMcTransf6=24
	CMtext=25
	CMchar=26
	CMdelChar=27
	CMshowGrid=28
	CMhelp=29
	CMmoreHelp=30
	CMfont=31
	CMreadFont=32
	CMtextMode=33
	CMstatistics=34
	CMbitmap=35
	CMfreeHand=36
	CMvideo=37
	CMpaint=38
	CMcolorOnOff=39

	actionTableSize=40
	]


// end of command actions (i.e. >>ACTION.end):

manifest [
	EAnothing=0
	EAmake=1
	EAcyclic=2
	EAstartAgain=3
	EAtext=4
	EAfreeHand=5
	]

// command actions (i.e. >>ACTION.begin/switch):

manifest [
	CAnothing=0

	BAmake=1
	BAcyclic=2
	SWaddKnot=3

	CAbackUp=4
	CAstartAgain=5

	BAdelete=6
	SWdelete=7
	CAundelete=8

	CAchar=9
	CAdelChar=10
	BAtext=11
	SWtext=12

	BAselect=13
	BAselectAll=14
	SWselect=15
	CAdelSelection=16

	BAmTransf2=17
	BAcTransf2=18
	BAmTransf4=19
	BAcTransf4=20
	BAmTransf6=21
	BAcTransf6=22
	SWtransform=23

	CAwipe=24
	CAshowGrid=25
	CAquit=26

	CAplot=27
	CAread=28
	CAwrite=29
	CAtextMode=30
	CAstatistics=31
	CAbitmap=32
	CAreadFont=33

	CAbrush=34
	CAthickness=35
	CAfont=36

	BAredraw=37
	SWredraw=38

	BAdash=39
	SWdash=40

	BApaint=41
	SWpaint=42
	CAcolorOnOff=43
	CArefresh=44

	BAfreeHand=45
	SWfreeHand=46

	CAvideo=47

	CAhelp=48
	CAmoreHelp=49
	]


structure EVENT [
	switch	byte
	code	byte
	]