Index: ram/execins.s
===================================================================
--- ram/execins.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ ram/execins.s	(revision 08e1da1cabca094217491629d328ae7146816782)
@@ -1,18 +1,18 @@
-* ------------------------------------------------------------------------------
-* execins.s -- execute an instrument selection
-* Version 9 -- 1988-09-09 -- D.N. Lynx Crowe
-*
-* Hand optimized C object code from:  execins.c -- ver 2 -- 1988-06-29
-* ------------------------------------------------------------------------------
-*
+| ------------------------------------------------------------------------------
+| execins.s -- execute an instrument selection
+| Version 9 -- 1988-09-09 -- D.N. Lynx Crowe
+
+| Hand optimized C object code from:  execins.c -- ver 2 -- 1988-06-29
+| ------------------------------------------------------------------------------
+
 		.text
-*
-DOUBLED		.equ	1			* double output to WS table
-*
+
+DOUBLED		=	1			| double output to WS table
+
 		.xdef	_execins
-*
+
 		.xref	_clrvce
 		.xref	_execkey
-*
+
 		.xref	_io_fpu
 		.xref	_instmod
@@ -20,201 +20,201 @@
 		.xref	_idefs
 		.xref	_vbufs
-*
-* register equates
-* ----------------
-SYNC		.equ	D4
-OLDSR		.equ	D5
-VCE		.equ	D7
-*
-IP		.equ	A5
-P1		.equ	A4
-P2		.equ	A3
-*
-P3		.equ	A2
-P4		.equ	A1
-*
-* parameter offsets
-* -----------------
-VOICE		.equ	8
-INS		.equ	10
-TAG		.equ	12
-*
-		.page
-*
-_execins:	link	A6,#0			* link stack frames
-		movem.l	D3-VCE/P2-IP,-(sp)	* preserve registers
-		move.w	VOICE(A6),VCE		* get voice number
-		move.w	VCE,D0			* calculate IP
-		add.w	D0,D0			* ...
-		add.w	D0,D0			* ...
-		lea	vibtabl,A0		* ...
-		movea.l	0(A0,D0.W),IP		* ...
-		add.l	#_vbufs,IP		* ...
-		move.w	VCE,(sp)		* clrvce(vce)
-		jsr	_clrvce			* ...
-		tst.w	TAG(A6)			* if (tag) {
-		beq	L2			* ...
-*
-		move.l	IP,P1			* p1 = ip;
-		move.w	INS(A6),D0		* p2 = &idefs[ins]
-		add.w	D0,D0			* ...
-		add.w	D0,D0			* ...
-		lea	vibtabl,A0		* ...
-		movea.l	0(A0,D0.W),P2		* ...
-		add.l	#_idefs,P2		* ...
-		move.w	#1968,D0		* set move count
-*
-L6:		move.w	(P2)+,(P1)+		* load voice buffer
-		dbra	D0,L6			* ...
-*
-		.page
-*
-		move.w	VCE,D0			* calculate FPU offset for voice
-		move.w	#9,D1			* ...
-		asl.w	D1,D0			* ...
-		asl.w	#1,D0			* ...
-		ext.l	D0			* ...
-		move.l	D0,P1			* ...
-		move.l	D0,P3			* ...
-		add.l	#_io_fpu,P1		* point P1 at FPU WS A
-		add.l	#$202,P1		* ...
-		lea	1778(IP),P2		* point P2 at instdef WS A
-		add.l	#_io_fpu,P3		* point P3 at FPU WS B
-		add.l	#2,P3			* ...
-		lea	2858(IP),P4		* point P4 at instdef WS B
-		move.w	#253,D0			* setup move count
-*
+
+| register equates
+| ----------------
+SYNC		=	D4
+OLDSR		=	D5
+VCE		=	D7
+
+IP		=	A5
+P1		=	A4
+P2		=	A3
+
+P3		=	A2
+P4		=	A1
+
+| parameter offsets
+| -----------------
+VOICE		=	8
+INS		=	10
+TAG		=	12
+
+		.page
+
+_execins:	link	A6,#0			| link stack frames
+		movem.l	D3-VCE/P2-IP,-(sp)	| preserve registers
+		move.w	VOICE(A6),VCE		| get voice number
+		move.w	VCE,D0			| calculate IP
+		add.w	D0,D0			| ...
+		add.w	D0,D0			| ...
+		lea	vibtabl,A0		| ...
+		movea.l	0(A0,D0.W),IP		| ...
+		add.l	#_vbufs,IP		| ...
+		move.w	VCE,(sp)		| clrvce(vce)
+		jsr	_clrvce			| ...
+		tst.w	TAG(A6)			| if (tag) {
+		beq	L2			| ...
+
+		move.l	IP,P1			| p1 = ip;
+		move.w	INS(A6),D0		| p2 = &idefs[ins]
+		add.w	D0,D0			| ...
+		add.w	D0,D0			| ...
+		lea	vibtabl,A0		| ...
+		movea.l	0(A0,D0.W),P2		| ...
+		add.l	#_idefs,P2		| ...
+		move.w	#1968,D0		| set move count
+
+L6:		move.w	(P2)+,(P1)+		| load voice buffer
+		dbra	D0,L6			| ...
+
+		.page
+
+		move.w	VCE,D0			| calculate FPU offset for voice
+		move.w	#9,D1			| ...
+		asl.w	D1,D0			| ...
+		asl.w	#1,D0			| ...
+		ext.l	D0			| ...
+		move.l	D0,P1			| ...
+		move.l	D0,P3			| ...
+		add.l	#_io_fpu,P1		| point P1 at FPU WS A
+		add.l	#0x202,P1		| ...
+		lea	1778(IP),P2		| point P2 at instdef WS A
+		add.l	#_io_fpu,P3		| point P3 at FPU WS B
+		add.l	#2,P3			| ...
+		lea	2858(IP),P4		| point P4 at instdef WS B
+		move.w	#253,D0			| setup move count
+
 		.ifne	DOUBLED
-		move.l	P1,-(a7)		* save P1 on stack
-		move.l	P2,-(a7)		* save P2 on stack
-		move.l	P3,-(a7)		* save P3 on stack
-		move.l	P4,-(a7)		* save P4 on stack
-		move.w	D0,-(a7)		* save D0 on stack
+		move.l	P1,-(a7)		| save P1 on stack
+		move.l	P2,-(a7)		| save P2 on stack
+		move.l	P3,-(a7)		| save P3 on stack
+		move.l	P4,-(a7)		| save P4 on stack
+		move.w	D0,-(a7)		| save D0 on stack
 		.endc
-*
-		move.w	SR,OLDSR		* turn off FPU interrupts
-		move.w	#$2200,SR		* ...
-*
-L10:		move.w	(P2)+,(P1)+		* set FPU WS A from instdef
-		nop				* delay for FPU timing
-		nop				* ...
-		nop				* ...
-		move.w	(P4)+,(P3)+		* set FPU WS B from instdef
-		nop				* delay for FPU timing
-		nop				* ...
-		dbra	D0,L10			* loop until done
-*
+
+		move.w	SR,OLDSR		| turn off FPU interrupts
+		move.w	#0x2200,SR		| ...
+
+L10:		move.w	(P2)+,(P1)+		| set FPU WS A from instdef
+		nop				| delay for FPU timing
+		nop				| ...
+		nop				| ...
+		move.w	(P4)+,(P3)+		| set FPU WS B from instdef
+		nop				| delay for FPU timing
+		nop				| ...
+		dbra	D0,L10			| loop until done
+
 		.ifne	DOUBLED
-		move.w	(a7)+,D0		* restore D0 from stack
-		movea.l	(a7)+,P4		* restore P4 from stack
-		movea.l	(a7)+,P3		* restore P3 from stack
-		movea.l	(a7)+,P2		* restore P2 from stack
-		movea.l	(a7)+,P1		* restore P1 from stack
-*
-L10A:		move.w	(P2)+,(P1)+		* set FPU WS A from instdef
-		nop				* delay for FPU timing
-		nop				* ...
-		nop				* ...
-		move.w	(P4)+,(P3)+		* set FPU WS B from instdef
-		nop				* delay for FPU timing
-		nop				* ...
-		dbra	D0,L10A			* loop until done
-*
+		move.w	(a7)+,D0		| restore D0 from stack
+		movea.l	(a7)+,P4		| restore P4 from stack
+		movea.l	(a7)+,P3		| restore P3 from stack
+		movea.l	(a7)+,P2		| restore P2 from stack
+		movea.l	(a7)+,P1		| restore P1 from stack
+
+L10A:		move.w	(P2)+,(P1)+		| set FPU WS A from instdef
+		nop				| delay for FPU timing
+		nop				| ...
+		nop				| ...
+		move.w	(P4)+,(P3)+		| set FPU WS B from instdef
+		nop				| delay for FPU timing
+		nop				| ...
+		dbra	D0,L10A			| loop until done
+
 		.endc
-*
-		move.w	OLDSR,SR		* enable FPU interrupts
-*
-		.page
-*
-		move.w	VCE,A0			* instmod[vce] = FALSE
-		add.l	A0,A0			* ...
-		add.l	#_instmod,A0		* ...
-		clr.w	(A0)			* ...
-		move.w	VCE,A0			* s_inst[vce] = ins
-		add.l	A0,A0			* ...
-		add.l	#_s_inst,A0		* ...
-		move.w	INS(A6),(A0)		* ...
-		move.b	70(IP),SYNC		* get config bits
-		ext.w	SYNC			* ...
-		asl.w	#8,SYNC			* ...
-		btst	#2,74(IP)		* sync 2nd osc
-		beq	L15			* ...
-*
-		ori.w	#$2000,SYNC		* ...
-*
-L15:		btst	#2,75(IP)		* sync 3rd osc
-		beq	L16			* ...
-*
-		ori.w	#$4000,SYNC		* ...
-*
-L16:		btst	#2,76(IP)		* sync 4th osc
-		beq	L17			* ...
-*
-		ori.w	#$8000,SYNC		* ...
-*
-L17:		move.w	VCE,A0			* send sync to FPU
-		add.l	A0,A0			* ...
-		add.l	#_io_fpu,A0		* ...
-		add.l	#$5FE0,A0		* ...
-		move.w	SYNC,(A0)		* ...
-*
-L2:		move.w	#1,(sp)			* execkey(-1, 0, vce, 1)
-		move.w	VCE,-(sp)		* ...
-		clr.w	-(sp)			* ...
-		move.w	#-1,-(sp)		* ...
-		jsr	_execkey		* ...
-		addq.l	#6,sp			* ...
-		tst.l	(sp)+			* clean up stack
-		movem.l	(sp)+,SYNC-VCE/P2-IP	* restore registers
-		unlk	A6			* unlink stack frames
-		rts				* return
-*
-		.page
-*
+
+		move.w	OLDSR,SR		| enable FPU interrupts
+
+		.page
+
+		move.w	VCE,A0			| instmod[vce] = FALSE
+		add.l	A0,A0			| ...
+		add.l	#_instmod,A0		| ...
+		clr.w	(A0)			| ...
+		move.w	VCE,A0			| s_inst[vce] = ins
+		add.l	A0,A0			| ...
+		add.l	#_s_inst,A0		| ...
+		move.w	INS(A6),(A0)		| ...
+		move.b	70(IP),SYNC		| get config bits
+		ext.w	SYNC			| ...
+		asl.w	#8,SYNC			| ...
+		btst	#2,74(IP)		| sync 2nd osc
+		beq	L15			| ...
+
+		ori.w	#0x2000,SYNC		| ...
+
+L15:		btst	#2,75(IP)		| sync 3rd osc
+		beq	L16			| ...
+
+		ori.w	#0x4000,SYNC		| ...
+
+L16:		btst	#2,76(IP)		| sync 4th osc
+		beq	L17			| ...
+
+		ori.w	#0x8000,SYNC		| ...
+
+L17:		move.w	VCE,A0			| send sync to FPU
+		add.l	A0,A0			| ...
+		add.l	#_io_fpu,A0		| ...
+		add.l	#0x5FE0,A0		| ...
+		move.w	SYNC,(A0)		| ...
+
+L2:		move.w	#1,(sp)			| execkey(-1, 0, vce, 1)
+		move.w	VCE,-(sp)		| ...
+		clr.w	-(sp)			| ...
+		move.w	#-1,-(sp)		| ...
+		jsr	_execkey		| ...
+		addq.l	#6,sp			| ...
+		tst.l	(sp)+			| clean up stack
+		movem.l	(sp)+,SYNC-VCE/P2-IP	| restore registers
+		unlk	A6			| unlink stack frames
+		rts				| return
+
+		.page
+
 		.data
-*
-* vibtabl -- voice and instrument buffer offset table
-* -------    ----------------------------------------
-vibtabl:	.dc.l	0		* 0
-		.dc.l	3938		* 1
-		.dc.l	7876		* 2
-		.dc.l	11814		* 3
-		.dc.l	15752		* 4
-		.dc.l	19690		* 5
-		.dc.l	23628		* 6
-		.dc.l	27566		* 7
-		.dc.l	31504		* 8
-		.dc.l	35442		* 9
-		.dc.l	39380		* 10
-		.dc.l	43318		* 11
-		.dc.l	47256		* 12
-		.dc.l	51194		* 13
-		.dc.l	55132		* 14
-		.dc.l	59070		* 15
-		.dc.l	63008		* 16
-		.dc.l	66946		* 17
-		.dc.l	70884		* 18
-		.dc.l	74822		* 19
-		.dc.l	78760		* 20
-		.dc.l	82698		* 21
-		.dc.l	86636		* 22
-		.dc.l	90574		* 23
-		.dc.l	94512		* 24
-		.dc.l	98450		* 25
-		.dc.l	102388		* 26
-		.dc.l	106326		* 27
-		.dc.l	110264		* 28
-		.dc.l	114202		* 29
-		.dc.l	118140		* 30
-		.dc.l	122078		* 31
-		.dc.l	126016		* 32
-		.dc.l	129954		* 33
-		.dc.l	133892		* 34
-		.dc.l	137830		* 35
-		.dc.l	141768		* 36
-		.dc.l	145706		* 37
-		.dc.l	149644		* 38
-		.dc.l	153582		* 39
-		.dc.l	157520		* 40
-*
+
+| vibtabl -- voice and instrument buffer offset table
+| -------    ----------------------------------------
+vibtabl:	.dc.l	0		| 0
+		.dc.l	3938		| 1
+		.dc.l	7876		| 2
+		.dc.l	11814		| 3
+		.dc.l	15752		| 4
+		.dc.l	19690		| 5
+		.dc.l	23628		| 6
+		.dc.l	27566		| 7
+		.dc.l	31504		| 8
+		.dc.l	35442		| 9
+		.dc.l	39380		| 10
+		.dc.l	43318		| 11
+		.dc.l	47256		| 12
+		.dc.l	51194		| 13
+		.dc.l	55132		| 14
+		.dc.l	59070		| 15
+		.dc.l	63008		| 16
+		.dc.l	66946		| 17
+		.dc.l	70884		| 18
+		.dc.l	74822		| 19
+		.dc.l	78760		| 20
+		.dc.l	82698		| 21
+		.dc.l	86636		| 22
+		.dc.l	90574		| 23
+		.dc.l	94512		| 24
+		.dc.l	98450		| 25
+		.dc.l	102388		| 26
+		.dc.l	106326		| 27
+		.dc.l	110264		| 28
+		.dc.l	114202		| 29
+		.dc.l	118140		| 30
+		.dc.l	122078		| 31
+		.dc.l	126016		| 32
+		.dc.l	129954		| 33
+		.dc.l	133892		| 34
+		.dc.l	137830		| 35
+		.dc.l	141768		| 36
+		.dc.l	145706		| 37
+		.dc.l	149644		| 38
+		.dc.l	153582		| 39
+		.dc.l	157520		| 40
+
 		.end
Index: ram/execkey.s
===================================================================
--- ram/execkey.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ ram/execkey.s	(revision 08e1da1cabca094217491629d328ae7146816782)
@@ -1,16 +1,16 @@
-* ------------------------------------------------------------------------------
-* execkey.s -- execute key -- FPU function start subroutine
-* Version 15 -- 1988-08-29 -- D.N. Lynx Crowe
-* Hand optimized version of execkey() and fnstart() from C compiler output
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| execkey.s -- execute key -- FPU function start subroutine
+| Version 15 -- 1988-08-29 -- D.N. Lynx Crowe
+| Hand optimized version of execkey() and fnstart() from C compiler output
+| ------------------------------------------------------------------------------
 		.text
-*
-LOC_EOR		.equ	0
-LOC_SUB		.equ	1
-*
+
+LOC_EOR		=	0
+LOC_SUB		=	1
+
 		.xdef	_execkey
-*
+
 		.xref	_xgetran
-*
+
 		.xref	_rsntab
 		.xref	_expbit
@@ -26,77 +26,77 @@
 		.xref	_veltab
 		.xref	_vpsms
-*
-		.page
-*
-* Offsets for execkey() parameters
-* -------------------------------- 
-TRG		.equ	8		* WORD -- trigger
-PCH		.equ	10		* WORD -- pitch
-VCE		.equ	12		* WORD -- voice  (0..11)
-TAG		.equ	14		* WORD -- I_TM_... inversion tag
-*
-* Register variables
-* ------------------
-A_FP		.equ	A5		* LONG -- struct idfnhdr *
-A_FPU		.equ	A4		* LONG -- FPU base address
-A_SMP		.equ	A3		* LONG -- struct sment *
-*
-R_FPMANT	.equ	D7		* WORD -- FPU time mantissa
-R_FPEXP		.equ	D6		* WORD -- FPU time exponent
-R_FPCTL		.equ	D5		* WORD -- FPU control word
-R_I		.equ	D4		* WORD -- loop index
-R_FPVAL		.equ	D3		* WORD -- FPU value
-*
-* Local (stack) variables
-* -----------------------
-PT		.equ	-4		* LONG -- instpnt *
-VEP		.equ	-8		* LONG -- struct valent *
-OLDI		.equ	-10		* WORD -- old IPL  (sr)
-OCTYPE		.equ	-12		* WORD -- oscillator 1 mode / scratch
-VP		.equ	-14		* WORD -- voice # + function # index
-SRCNUM		.equ	-16		* WORD -- general source #
-SRCVAL		.equ	-18		* WORD -- general source value
-TSRCVAL		.equ	-20		* WORD -- temporary general source value
-MLTVAL		.equ	-22		* WORD -- general source multiplier
-TFPVAL		.equ	-24		* WORD -- temporary FPU value
-LTMP		.equ	-28		* LONG -- long temporary
-IP		.equ	-32		* LONG -- struct instdef *
-GROUP		.equ	-34		* WORD -- group number << 4
-*
-* Symbolic constants
-* ------------------
-LASTLOCL	.equ	GROUP		* last local on the stack
-*
-FPU_DI		.equ	$2200		* sr value for disabling FPU interrupts
-PITCHMAX	.equ	21920		* maximum pitch value
-VALMAX		.equ	$00007D00	* maximum FPU value
-VALMIN		.equ	$FFFF8300	* minimum FPU value
-VBLEN		.equ	3938		* length of a voice buffer
-LSPCH		.equ	2		* left shift for pitch sources
-*
-		.page
-*
-* execkey(trg, pch, vce)
-* short trg, pch, vce;
-* {
-*
+
+		.page
+
+| Offsets for execkey() parameters
+| --------------------------------
+TRG		=	8		| WORD -- trigger
+PCH		=	10		| WORD -- pitch
+VCE		=	12		| WORD -- voice  (0..11)
+TAG		=	14		| WORD -- I_TM_... inversion tag
+
+| Register variables
+| ------------------
+A_FP		=	A5		| LONG -- struct idfnhdr |
+A_FPU		=	A4		| LONG -- FPU base address
+A_SMP		=	A3		| LONG -- struct sment |
+
+R_FPMANT	=	D7		| WORD -- FPU time mantissa
+R_FPEXP		=	D6		| WORD -- FPU time exponent
+R_FPCTL		=	D5		| WORD -- FPU control word
+R_I		=	D4		| WORD -- loop index
+R_FPVAL		=	D3		| WORD -- FPU value
+
+| Local (stack) variables
+| -----------------------
+PT		=	-4		| LONG -- instpnt |
+VEP		=	-8		| LONG -- struct valent |
+OLDI		=	-10		| WORD -- old IPL  (sr)
+OCTYPE		=	-12		| WORD -- oscillator 1 mode / scratch
+VP		=	-14		| WORD -- voice # + function # index
+SRCNUM		=	-16		| WORD -- general source #
+SRCVAL		=	-18		| WORD -- general source value
+TSRCVAL		=	-20		| WORD -- temporary general source value
+MLTVAL		=	-22		| WORD -- general source multiplier
+TFPVAL		=	-24		| WORD -- temporary FPU value
+LTMP		=	-28		| LONG -- long temporary
+IP		=	-32		| LONG -- struct instdef |
+GROUP		=	-34		| WORD -- group number << 4
+
+| Symbolic constants
+| ------------------
+LASTLOCL	=	GROUP		| last local on the stack
+
+FPU_DI		=	0x2200		| sr value for disabling FPU interrupts
+PITCHMAX	=	21920		| maximum pitch value
+VALMAX		=	0x00007D00	| maximum FPU value
+VALMIN		=	0xFFFF8300	| minimum FPU value
+VBLEN		=	3938		| length of a voice buffer
+LSPCH		=	2		| left shift for pitch sources
+
+		.page
+
+| execkey(trg, pch, vce)
+| short trg, pch, vce;
+| {
+
 _execkey:	link	A6,#LASTLOCL
 		movem.l	D2-R_FPMANT/A_SMP-A_FP,-(sp)
-*
-*	ip = &vbufs[vce];
-*
+
+|	ip = &vbufs[vce];
+
 		move.w	VCE(A6),D0
 		asl.w	#2,D0
 		lea	vbtab,A0
 		move.l	0(A0,D0.W),IP(A6)
-*
-*	vce2trg[vce] = trg;
-*
+
+|	vce2trg[vce] = trg;
+
 		lsr.w	#1,D0
 		lea	_vce2trg,A0
 		move.w	TRG(A6),0(A0,D0.W)
-*
-*	group = (vce2grp[vce] - 1) << 4;
-*
+
+|	group = (vce2grp[vce] - 1) << 4;
+
 		move.w	VCE(A6),A0
 		add.l	A0,A0
@@ -107,12 +107,12 @@
 		asl.w	#4,D0
 		move.w	D0,GROUP(A6)
-*
-		.page
-* ------------------------------------------------------------------------------
-* Start function 0 -- Frq 1
-* ------------------------------------------------------------------------------
-*
-*    if (ip->idhfnc[0].idftmd & I_TM_KEY) {
-*
+
+		.page
+| ------------------------------------------------------------------------------
+| Start function 0 -- Frq 1
+| ------------------------------------------------------------------------------
+
+|    if (ip->idhfnc[0].idftmd & I_TM_KEY) {
+
 		move.l	IP(A6),A0
 		move.b	93(A0),D0
@@ -121,28 +121,28 @@
 		btst	#0,D0
 		bne	FN00A
-*
+
 		jmp	FN01
-*
-*	vp = (vce << 4) + 1;
-*
+
+|	vp = (vce << 4) + 1;
+
 FN00A:		move	VCE(A6),D0
 		asl	#4,D0
 		add.w	#1,D0
 		move	D0,VP(A6)
-*
-*	fpu = io_fpu + FPU_OFNC + (vp << 4);
-*
+
+|	fpu = io_fpu + FPU_OFNC + (vp << 4);
+
 		asl	#5,D0
 		ext.l	D0
 		move.l	D0,A_FPU
-		add.l	#_io_fpu+$4000,A_FPU
-*
-*	fp = &ip->idhfnc[0];
-*
+		add.l	#_io_fpu+0x4000,A_FPU
+
+|	fp = &ip->idhfnc[0];
+
 		move.l	IP(A6),A_FP
 		add.l	#86,A_FP
-*
-*	pt = &ip->idhpnt[fp->idfpt1];
-*
+
+|	pt = &ip->idhpnt[fp->idfpt1];
+
 		clr.l	D0
 		move.b	6(A_FP),D0
@@ -154,9 +154,9 @@
 		add.l	#242,D0
 		move.l	D0,PT(A6)
-*
-		.page
-*
-*	srcnum = group | fp->idfsrc;
-*
+
+		.page
+
+|	srcnum = group | fp->idfsrc;
+
 		move.w	GROUP(A6),D0
 		ext.l	D0
@@ -165,7 +165,7 @@
 		or	D1,D0
 		move	D0,SRCNUM(A6)
-*
-*	vep = &valents[srcnum];
-*
+
+|	vep = &valents[srcnum];
+
 		add.l	D0,D0
 		move.l	D0,D1
@@ -174,7 +174,7 @@
 		add.l	#_valents,D0
 		move.l	D0,VEP(A6)
-*
-*	smp = vpsms[vp];
-*
+
+|	smp = vpsms[vp];
+
 		move	VP(A6),A0
 		add.l	A0,A0
@@ -182,174 +182,174 @@
 		add.l	#_vpsms,A0
 		move.l	(A0),A_SMP
-*
-*	if (srcnum NE smp->sm) {
-*
+
+|	if (srcnum NE smp->sm) {
+
 		clr	D0
 		move	10(A_SMP),D0
 		cmp	SRCNUM(A6),D0
 		beq	F00L113
-*
-*		(smp->prv)->nxt = smp->nxt;
-*
+
+|		(smp->prv)->nxt = smp->nxt;
+
 		move.l	4(A_SMP),A0
 		move.l	(A_SMP),(A0)
-*
-*		(smp->nxt)->prv = smp->prv;
-*
+
+|		(smp->nxt)->prv = smp->prv;
+
 		move.l	(A_SMP),A0
 		move.l	4(A_SMP),4(A0)
-*
-*		smp->prv = (struct sment *)vep;
-*
+
+|		smp->prv = (struct sment |)vep;
+
 		move.l	VEP(A6),4(A_SMP)
-*
-*		smp->nxt = vep->nxt;
-*
+
+|		smp->nxt = vep->nxt;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),(A_SMP)
-*
-*		(vep->nxt)->prv = smp;
-*
+
+|		(vep->nxt)->prv = smp;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),A0
 		move.l	A_SMP,4(A0)
-*
-*		vep->nxt = smp;
-*
+
+|		vep->nxt = smp;
+
 		move.l	VEP(A6),A0
 		move.l	A_SMP,(A0)
-*
-*		smp->sm = srcnum;
-*
+
+|		smp->sm = srcnum;
+
 		move	SRCNUM(A6),10(A_SMP)
-*
-*	}
-*
-*	mltval = fp->idfmlt;
-*
+
+|	}
+
+|	mltval = fp->idfmlt;
+
 F00L113:	move	2(A_FP),MLTVAL(A6)
-*
-		.page
-*
-*	switch (fp->idfsrc) {
-*
+
+		.page
+
+|	switch (fp->idfsrc) {
+
 		move.b	4(A_FP),D0
 		ext.w	d0
 		cmp	#10,D0
 		bhi	F00L122
-*
+
 		asl	#2,D0
 		lea	F00L123,A0
 		movea.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*	case SM_NONE:
-*		mltval = 0;
-*
+
+|	case SM_NONE:
+|		mltval = 0;
+
 F00L116:	clr	MLTVAL(A6)
-*
-*		tsrcval = 0;
-*
+
+|		tsrcval = 0;
+
 		clr	TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F00L114
-*
-*	case SM_RAND:
-*		tsrcval = xgetran(mltval);
-*
+
+|	case SM_RAND:
+|		tsrcval = xgetran(mltval);
+
 F00L117:	move	MLTVAL(A6),(sp)
 		jsr	_xgetran
 		move	D0,TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F00L114
-*
-*	case SM_PTCH:
-*		tsrcval = pch;
-*
+
+|	case SM_PTCH:
+|		tsrcval = pch;
+
 F00L118:	move	PCH(A6),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F00L114
-*
-		.page
-*
-*	case SM_FREQ:
-*		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|	case SM_FREQ:
+|		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
+
 F00L119:	move.w	PCH(A6),D0
 		asr.w	#7,D0
-		and.w	#$00FF,D0
+		and.w	#0x00FF,D0
 		move.w	D0,A0
 		add.l	A0,A0
 		add.l	#_ptoftab,A0
 		move.w	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F00L114
-*
-*	case SM_KVEL:
-*		tsrcval = veltab[trg];
-*
+
+|	case SM_KVEL:
+|		tsrcval = veltab[trg];
+
 F00L120:	move.w	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_veltab,A0
 		move.w	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F00L114
-*
-*	case SM_KPRS:
-*		tsrcval = prstab[trg];
-*
+
+|	case SM_KPRS:
+|		tsrcval = prstab[trg];
+
 F00L121:	move.w	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_prstab,A0
 		move.w	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F00L114
-*
-*	default:
-*		tsrcval = vep->val;
-*
+
+|	default:
+|		tsrcval = vep->val;
+
 F00L122:	move.l	VEP(A6),A0
 		move.w	8(A0),TSRCVAL(A6)
-*
-*	}
-*
-		.page
-*
-*		srcval = addpch(tsrcval, 0);
-*
+
+|	}
+
+		.page
+
+|		srcval = addpch(tsrcval, 0);
+
 F00L114:	move.w	TSRCVAL(A6),D0
 		ext.l	D0
 		asr.l	#5,D0
-*		sub.l	#500,D0
+|		sub.l	#500,D0
 		asl.l	#LSPCH,D0
 		cmp.l	#PITCHMAX,D0
 		ble	F00L129A
-*
+
 		move.l	#PITCHMAX,D0
-*
+
 F00L129A:	move	D0,SRCVAL(A6)
-*
-		.page
-*
-*	if (pt->ipvsrc) {
-*
+
+		.page
+
+|	if (pt->ipvsrc) {
+
 F00L124:	move.l	PT(A6),A0
 		tst.b	6(A0)
 		beq	F00L136
-*
-*		switch (pt->ipvsrc) {
-*
+
+|		switch (pt->ipvsrc) {
+
 		move.l	PT(A6),A0
 		move.b	6(A0),D0
@@ -358,13 +358,13 @@
 		cmp	#9,D0
 		bhi	F00L144
-*
+
 		asl	#2,D0
 		lea	F00L145,A0
 		move.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*		case SM_RAND:
-*			ltmp = xgetran(pt_>ipvmlt);
-*
+
+|		case SM_RAND:
+|			ltmp = xgetran(pt_>ipvmlt);
+
 F00L139:	move.l	PT(A6),A0
 		move	4(A0),(sp)
@@ -372,24 +372,24 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F00L137
-*
-*		case SM_PTCH:
-*			ltmp = pch;
-*
+
+|		case SM_PTCH:
+|			ltmp = pch;
+
 F00L140:	move	PCH(A6),A0
 		move.l	A0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F00L137
-*
-		.page
-*
-*		case SM_FREQ:
-*			ltmp = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|		case SM_FREQ:
+|			ltmp = ptoftab[(pch >> 7) & 0x00FF];
+
 F00L141:	move	PCH(A6),D0
 		asr	#7,D0
@@ -401,12 +401,12 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F00L137
-*
-*		case SM_KVEL:
-*			ltmp = veltab[trg];
-*
+
+|		case SM_KVEL:
+|			ltmp = veltab[trg];
+
 F00L142:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -415,14 +415,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F00L137
-*
-		.page
-*
-*		case SM_KPRS:
-*			ltmp = prstab[trg];
-*
+
+		.page
+
+|		case SM_KPRS:
+|			ltmp = prstab[trg];
+
 F00L143:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -431,14 +431,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F00L137
-*
-		.page
-*
-*		default:
-*			ltmp = valents[group | pt->ipvsrc].val;
-*
+
+		.page
+
+|		default:
+|			ltmp = valents[group | pt->ipvsrc].val;
+
 F00L144:	move.l	PT(A6),A0
 		clr.l	D0
@@ -454,12 +454,12 @@
 		move	8(A0,A1.l),D0
 		move.l	D0,LTMP(A6)
-*
-*		}
-*
-*
-		.page
-*
-*		ltmp = (ltmp * pt->ipvmlt) >> 15;
-*
+
+|		}
+
+
+		.page
+
+|		ltmp = (ltmp | pt->ipvmlt) >> 15;
+
 F00L137:	move.l	PT(A6),A0
 		move.w	4(A0),D0
@@ -469,52 +469,52 @@
 		asr.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		ltmp += (long)pt->ipval;
-*
+
+|		ltmp += (long)pt->ipval;
+
 		move.l	PT(A6),A0
 		move	2(A0),D0
 		ext.l	D0
 		add.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F00L146
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F00L147
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F00L146:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F00L147
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		tfpval = (short)ltmp;
-*
+
+|		tfpval = (short)ltmp;
+
 F00L147:	move.w	LTMP+2(A6),TFPVAL(A6)
 		bra	F00L149
-*
-*	} else {
-*
-*		tfpval = pt->ipval;
-*
+
+|	} else {
+
+|		tfpval = pt->ipval;
+
 F00L136:	move.l	PT(A6),A0
 		move	2(A0),TFPVAL(A6)
-*
-*	}
-*
-		.page
-*
-*	fpmant = (((long)pt->iptim & 0x0000FFF0L)
-*		* ((long)timemlt & 0x0000FFFFL)) >> 15;
-*
+
+|	}
+
+		.page
+
+|	fpmant = (((long)pt->iptim & 0x0000FFF0L)
+|		| ((long)timemlt & 0x0000FFFFL)) >> 15;
+
 F00L149:	move.l	PT(A6),A0
 		move.w	(A0),D0
 		move.w	D0,D2
-		andi.w	#$FFF0,D0
+		andi.w	#0xFFF0,D0
 		move.w	_timemlt,D1
 		muls	D1,D0
@@ -522,38 +522,38 @@
 		asr.l	D1,D0
 		move	D0,R_FPMANT
-*
-*	fpexp = expbit[pt->iptim & 0x000F];
-*
-		and	#$000F,D2
+
+|	fpexp = expbit[pt->iptim & 0x000F];
+
+		and	#0x000F,D2
 		move	D2,A0
 		add.l	A0,A0
 		add.l	#_expbit,A0
 		move	(A0),R_FPEXP
-*
-		.page
-*
-*		octype = ip->idhos1c & OC_MOD;
-*
+
+		.page
+
+|		octype = ip->idhos1c & OC_MOD;
+
 F00L152:	move.l	IP(A6),A0
 		move.b	74(A0),D0
 		and	#3,D0
-*
-*		if ((octype EQ OC_FRQ) OR (octype EQ OC_PCH))
-*
+
+|		if ((octype EQ OC_FRQ) OR (octype EQ OC_PCH))
+
 		cmp	#2,D0
 		beq	F00L1001
-*
+
 		cmp	#3,D0
 		bne	F00L153
-*
-*			fp->idfpch = ip->idhos1v;
-*
+
+|			fp->idfpch = ip->idhos1v;
+
 F00L1001:	move.l	IP(A6),A0
 		move	78(A0),(A_FP)
 		bra	F00L154
-*
-*		else
-*			fp->idfpch = pch + ip->idhos1v;
-*
+
+|		else
+|			fp->idfpch = pch + ip->idhos1v;
+
 F00L153:	move.w	PCH(A6),D0
 		ext.l	D0
@@ -561,17 +561,17 @@
 		ext.l	D1
 		add.l	d1,d0
-*
-*		if (fp->idfpch > PITCHMAX)
-*			fp->idfpch = PITCHMAX;
-*
+
+|		if (fp->idfpch > PITCHMAX)
+|			fp->idfpch = PITCHMAX;
+
 		cmp.l	#PITCHMAX,d0
 		ble	F00153A
-*
+
 		move.l	#PITCHMAX,d0
-*
+
 F00153A:	move.w	d0,(A_FP)
-*
-*		fpval = addpch(tfpval, fp->idfpch);
-*
+
+|		fpval = addpch(tfpval, fp->idfpch);
+
 F00L154:	move.w	TFPVAL(A6),D1
 		ext.l	D1
@@ -584,128 +584,128 @@
 		cmp.l	#PITCHMAX,D0
 		ble	F00L154A
-*
+
 		move.l	#PITCHMAX,D0
-*
+
 F00L154A:	move	D0,R_FPVAL
-*
-		.page
-*
+
+		.page
+
 		move.b	5(A_FP),D0
 		ext.w	D0
 		sub.w	#1,D0
 		movea.l	PT(A6),A0
-*
-*	oldi = setipl(FPU_DI);
-*
+
+|	oldi = setipl(FPU_DI);
+
 		move	sr,OLDI(A6)
 		move	#FPU_DI,sr
-*
+
 F00L168:	clr.b	10(A0)
 		add.l	#12,A0
 		dbra	D0,F00L168
-*
-		.page
-*
-*	fp->idftmd ^= I_NVBITS;
-*
+
+		.page
+
+|	fp->idftmd ^= I_NVBITS;
+
 F00L165:	eor.b	#24,7(A_FP)
-*
-*	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
-*
+
+|	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
+
 		move.b	7(A_FP),R_FPCTL
 		and	#28,R_FPCTL
 		or	#3,R_FPCTL
-*
-*	fp->idfcpt = fp->idfpt1;
-*
+
+|	fp->idfcpt = fp->idfpt1;
+
 		move.b	6(A_FP),8(A_FP)
-*
-*	fp->idftmd |= I_ACTIVE;
-*
+
+|	fp->idftmd |= I_ACTIVE;
+
 		or.b	#2,7(A_FP)
-*
-*	fp->idftrf = trg;
-*
+
+|	fp->idftrf = trg;
+
 		move	TRG(A6),10(A_FP)
-*
-*	*(fpu + (long)FPU_TCV1) = srcval;
-*
-		move	SRCVAL(A6),$8(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TCV1) = srcval;
+
+		move	SRCVAL(A6),0x8(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TSF1) = mltval;
-*
-		move	MLTVAL(A6),$A(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TSF1) = mltval;
+
+		move	MLTVAL(A6),0xA(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TMNT) = fpmant;
-*
-		move	R_FPMANT,$14(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TMNT) = fpmant;
+
+		move	R_FPMANT,0x14(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TEXP) = fpexp;
-*
-		move	R_FPEXP,$16(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TEXP) = fpexp;
+
+		move	R_FPEXP,0x16(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-		.page
-*
-*	if (fp->idftmd & I_VNSUBN)
-*
+
+		.page
+
+|	if (fp->idftmd & I_VNSUBN)
+
 		btst	#3,7(A_FP)
 		beq	F00L169
-*
-*		*(fpu + (long)FPU_TNV1) = fpval;
-*
-		move	R_FPVAL,$1C(A_FPU)
+
+|		|(fpu + (long)FPU_TNV1) = fpval;
+
+		move	R_FPVAL,0x1C(A_FPU)
 		bra	F00L170
-*
-*	else
-*		*(fpu + (long)FPU_TNV0) = fpval;
-*
+
+|	else
+|		|(fpu + (long)FPU_TNV0) = fpval;
+
 F00L169:	move	R_FPVAL,2(A_FPU)
-*
-*	++octype;
-*
+
+|	++octype;
+
 F00L170:	add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TCTL) = fpctl;
-*
+
+|	|(fpu + (long)FPU_TCTL) = fpctl;
+
 		move	R_FPCTL,(A_FPU)
-*
-*	setipl(oldi);
-*
+
+|	setipl(oldi);
+
 		move	OLDI(A6),sr
-*    }
-*
-		.page
-* ------------------------------------------------------------------------------
-* Start function 1 -- Frq 2
-* ------------------------------------------------------------------------------
-*    if (legato) {
-*
-*	legato = 0;
-*	return;
-*    }
+|    }
+
+		.page
+| ------------------------------------------------------------------------------
+| Start function 1 -- Frq 2
+| ------------------------------------------------------------------------------
+|    if (legato) {
+
+|	legato = 0;
+|	return;
+|    }
 FN01:		tst.w	_legato
 		beq	FN01AA
-*
+
 		clr.w	_legato
 		bra	FNEXIT
-*
-*    if (ip->idhfnc[1].idftmd & I_TM_KEY) {
-*
+
+|    if (ip->idhfnc[1].idftmd & I_TM_KEY) {
+
 FN01AA:		move.l	IP(A6),A0
 		move.b	105(A0),D0
@@ -714,29 +714,29 @@
 		btst	#0,D0
 		bne	FN01A
-*
+
 		jmp	FN02
-*
-*	vp = (vce << 4) + 3;
-*
+
+|	vp = (vce << 4) + 3;
+
 FN01A:		move	VCE(A6),D0
 		asl	#4,D0
 		add.w	#3,D0
 		move	D0,VP(A6)
-*
-*	fpu = io_fpu + FPU_OFNC + (vp << 4);
-*
+
+|	fpu = io_fpu + FPU_OFNC + (vp << 4);
+
 		asl	#5,D0
 		ext.l	D0
 		move.l	D0,A_FPU
-		add.l	#_io_fpu+$4000,A_FPU
-*
-*	fp = &ip->idhfnc[1];
-*
+		add.l	#_io_fpu+0x4000,A_FPU
+
+|	fp = &ip->idhfnc[1];
+
 		move.l	#12,A_FP
 		add.l	IP(A6),A_FP
 		add.l	#86,A_FP
-*
-*	pt = &ip->idhpnt[fp->idfpt1];
-*
+
+|	pt = &ip->idhpnt[fp->idfpt1];
+
 		clr.l	D0
 		move.b	6(A_FP),D0
@@ -748,9 +748,9 @@
 		add.l	#242,D0
 		move.l	D0,PT(A6)
-*
-		.page
-*
-*	srcnum = group | fp->idfsrc;
-*
+
+		.page
+
+|	srcnum = group | fp->idfsrc;
+
 		move.w	GROUP(A6),D0
 		ext.l	D0
@@ -759,7 +759,7 @@
 		or	D1,D0
 		move	D0,SRCNUM(A6)
-*
-*	vep = &valents[srcnum];
-*
+
+|	vep = &valents[srcnum];
+
 		add.l	D0,D0
 		move.l	D0,D1
@@ -768,7 +768,7 @@
 		add.l	#_valents,D0
 		move.l	D0,VEP(A6)
-*
-*	smp = vpsms[vp];
-*
+
+|	smp = vpsms[vp];
+
 		move	VP(A6),A0
 		add.l	A0,A0
@@ -776,104 +776,104 @@
 		add.l	#_vpsms,A0
 		move.l	(A0),A_SMP
-*
-*	if (srcnum NE smp->sm) {
-*
+
+|	if (srcnum NE smp->sm) {
+
 		clr	D0
 		move	10(A_SMP),D0
 		cmp	SRCNUM(A6),D0
 		beq	F01L113
-*
-*		(smp->prv)->nxt = smp->nxt;
-*
+
+|		(smp->prv)->nxt = smp->nxt;
+
 		move.l	4(A_SMP),A0
 		move.l	(A_SMP),(A0)
-*
-*		(smp->nxt)->prv = smp->prv;
-*
+
+|		(smp->nxt)->prv = smp->prv;
+
 		move.l	(A_SMP),A0
 		move.l	4(A_SMP),4(A0)
-*
-*		smp->prv = (struct sment *)vep;
-*
+
+|		smp->prv = (struct sment |)vep;
+
 		move.l	VEP(A6),4(A_SMP)
-*
-*		smp->nxt = vep->nxt;
-*
+
+|		smp->nxt = vep->nxt;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),(A_SMP)
-*
-*		(vep->nxt)->prv = smp;
-*
+
+|		(vep->nxt)->prv = smp;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),A0
 		move.l	A_SMP,4(A0)
-*
-*		vep->nxt = smp;
-*
+
+|		vep->nxt = smp;
+
 		move.l	VEP(A6),A0
 		move.l	A_SMP,(A0)
-*
-*		smp->sm = srcnum;
-*
+
+|		smp->sm = srcnum;
+
 		move	SRCNUM(A6),10(A_SMP)
-*
-*	}
-*
-*	mltval = fp->idfmlt;
-*
+
+|	}
+
+|	mltval = fp->idfmlt;
+
 F01L113:	move	2(A_FP),MLTVAL(A6)
-*
-		.page
-*
-*	switch (fp->idfsrc) {
-*
+
+		.page
+
+|	switch (fp->idfsrc) {
+
 		move.b	4(A_FP),D0
 		ext.w	d0
 		cmp	#10,D0
 		bhi	F01L122
-*
+
 		asl	#2,D0
 		lea	F01L123,A0
 		movea.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*	case SM_NONE:
-*		mltval = 0;
-*
+
+|	case SM_NONE:
+|		mltval = 0;
+
 F01L116:	clr	MLTVAL(A6)
-*
-*		tsrcval = 0;
-*
+
+|		tsrcval = 0;
+
 		clr	TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F01L114
-*
-*	case SM_RAND:
-*		tsrcval = xgetran(mltval);
-*
+
+|	case SM_RAND:
+|		tsrcval = xgetran(mltval);
+
 F01L117:	move	MLTVAL(A6),(sp)
 		jsr	_xgetran
 		move	D0,TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F01L114
-*
-*	case SM_PTCH:
-*		tsrcval = pch;
-*
+
+|	case SM_PTCH:
+|		tsrcval = pch;
+
 F01L118:	move	PCH(A6),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F01L114
-*
-		.page
-*
-*	case SM_FREQ:
-*		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|	case SM_FREQ:
+|		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
+
 F01L119:	move	PCH(A6),D0
 		asr	#7,D0
@@ -883,67 +883,67 @@
 		add.l	#_ptoftab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F01L114
-*
-*	case SM_KVEL:
-*		tsrcval = veltab[trg];
-*
+
+|	case SM_KVEL:
+|		tsrcval = veltab[trg];
+
 F01L120:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_veltab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F01L114
-*
-*	case SM_KPRS:
-*		tsrcval = prstab[trg];
-*
+
+|	case SM_KPRS:
+|		tsrcval = prstab[trg];
+
 F01L121:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_prstab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F01L114
-*
-*	default:
-*		tsrcval = vep->val;
-*
+
+|	default:
+|		tsrcval = vep->val;
+
 F01L122:	move.l	VEP(A6),A0
 		move	8(A0),TSRCVAL(A6)
-*
-*	}
-*
-		.page
-*
-*		srcval = addpch(tsrcval, 0);
-*
+
+|	}
+
+		.page
+
+|		srcval = addpch(tsrcval, 0);
+
 F01L114:	move.w	TSRCVAL(A6),D0
 		ext.l	D0
 		asr.l	#5,D0
-*		sub.l	#500,D0
+|		sub.l	#500,D0
 		asl.l	#LSPCH,D0
 		cmp.l	#PITCHMAX,D0
 		ble	F01L129A
-*
+
 		move.l	#PITCHMAX,D0
-*
+
 F01L129A:	move	D0,SRCVAL(A6)
-*
-		.page
-*
-*	if (pt->ipvsrc) {
-*
+
+		.page
+
+|	if (pt->ipvsrc) {
+
 F01L124:	move.l	PT(A6),A0
 		tst.b	6(A0)
 		beq	F01L136
-*
-*		switch (pt->ipvsrc) {
-*
+
+|		switch (pt->ipvsrc) {
+
 		move.l	PT(A6),A0
 		move.b	6(A0),D0
@@ -952,13 +952,13 @@
 		cmp	#9,D0
 		bhi	F01L144
-*
+
 		asl	#2,D0
 		lea	F01L145,A0
 		move.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*		case SM_RAND:
-*			ltmp = xgetran(pt_>ipvmlt);
-*
+
+|		case SM_RAND:
+|			ltmp = xgetran(pt_>ipvmlt);
+
 F01L139:	move.l	PT(A6),A0
 		move	4(A0),(sp)
@@ -966,24 +966,24 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F01L137
-*
-*		case SM_PTCH:
-*			ltmp = pch;
-*
+
+|		case SM_PTCH:
+|			ltmp = pch;
+
 F01L140:	move	PCH(A6),A0
 		move.l	A0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F01L137
-*
-		.page
-*
-*		case SM_FREQ:
-*			ltmp = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|		case SM_FREQ:
+|			ltmp = ptoftab[(pch >> 7) & 0x00FF];
+
 F01L141:	move	PCH(A6),D0
 		asr	#7,D0
@@ -995,12 +995,12 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F01L137
-*
-*		case SM_KVEL:
-*			ltmp = veltab[trg];
-*
+
+|		case SM_KVEL:
+|			ltmp = veltab[trg];
+
 F01L142:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -1009,14 +1009,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F01L137
-*
-		.page
-*
-*		case SM_KPRS:
-*			ltmp = prstab[trg];
-*
+
+		.page
+
+|		case SM_KPRS:
+|			ltmp = prstab[trg];
+
 F01L143:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -1025,14 +1025,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F01L137
-*
-		.page
-*
-*		default:
-*			ltmp = valents[group | pt->ipvsrc].val;
-*
+
+		.page
+
+|		default:
+|			ltmp = valents[group | pt->ipvsrc].val;
+
 F01L144:	move.l	PT(A6),A0
 		clr.l	D0
@@ -1048,12 +1048,12 @@
 		move	8(A0,A1.l),D0
 		move.l	D0,LTMP(A6)
-*
-*		}
-*
-*
-		.page
-*
-*		ltmp = (ltmp * pt->ipvmlt) >> 15;
-*
+
+|		}
+
+
+		.page
+
+|		ltmp = (ltmp | pt->ipvmlt) >> 15;
+
 F01L137:	move.l	PT(A6),A0
 		move.w	4(A0),D0
@@ -1063,52 +1063,52 @@
 		asr.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		ltmp += (long)pt->ipval;
-*
+
+|		ltmp += (long)pt->ipval;
+
 		move.l	PT(A6),A0
 		move	2(A0),D0
 		ext.l	D0
 		add.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F01L146
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F01L147
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F01L146:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F01L147
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		tfpval = (short)ltmp;
-*
+
+|		tfpval = (short)ltmp;
+
 F01L147:	move.w	LTMP+2(A6),TFPVAL(A6)
 		bra	F01L149
-*
-*	} else {
-*
-*		tfpval = pt->ipval;
-*
+
+|	} else {
+
+|		tfpval = pt->ipval;
+
 F01L136:	move.l	PT(A6),A0
 		move	2(A0),TFPVAL(A6)
-*
-*	}
-*
-		.page
-*
-*	fpmant = (((long)pt->iptom & 0x0000FFF0L)
-*		* ((long)timemlt & 0x0000FFFFL)) >> 15;
-*
+
+|	}
+
+		.page
+
+|	fpmant = (((long)pt->iptom & 0x0000FFF0L)
+|		| ((long)timemlt & 0x0000FFFFL)) >> 15;
+
 F01L149:	move.l	PT(A6),A0
 		move.w	(A0),D0
 		move.w	D0,D2
-		andi.w	#$FFF0,D0
+		andi.w	#0xFFF0,D0
 		move.w	_timemlt,D1
 		muls	D1,D0
@@ -1116,22 +1116,22 @@
 		asr.l	D1,D0
 		move	D0,R_FPMANT
-*
-*	fpexp = expbit[pt->iptim & 0x000F];
-*
-		and	#$000F,D2
+
+|	fpexp = expbit[pt->iptim & 0x000F];
+
+		and	#0x000F,D2
 		move	D2,A0
 		add.l	A0,A0
 		add.l	#_expbit,A0
 		move	(A0),R_FPEXP
-*
-		.page
-*
-*		fp->idfpch = ip->idhos2v;
-*
+
+		.page
+
+|		fp->idfpch = ip->idhos2v;
+
 F01L155:	move.l	IP(A6),A0
 		move.w	80(A0),(A_FP)
-*
-*		fpval = addpch(tfpval, fp_>idfpch);
-*
+
+|		fpval = addpch(tfpval, fp_>idfpch);
+
 		move.w	TFPVAL(A6),D1
 		ext.l	D1
@@ -1144,117 +1144,117 @@
 		cmp.l	#PITCHMAX,D0
 		ble	F01L155A
-*
+
 		move.l	#PITCHMAX,D0
-*
+
 F01L155A:	move	D0,R_FPVAL
-*
-		.page
-*
+
+		.page
+
 		move.b	5(A_FP),D0
 		ext.w	D0
 		sub.w	#1,D0
 		movea.l	PT(A6),A0
-*
-*	oldi = setipl(FPU_DI);
-*
+
+|	oldi = setipl(FPU_DI);
+
 		move	sr,OLDI(A6)
 		move	#FPU_DI,sr
-*
+
 F01L168:	clr.b	10(A0)
 		add.l	#12,a0
 		dbra	D0,F01L168
-*
-		.page
-*
-*	fp->idftmd ^= I_NVBITS;
-*
+
+		.page
+
+|	fp->idftmd ^= I_NVBITS;
+
 F01L165:	eor.b	#24,7(A_FP)
-*
-*	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
-*
+
+|	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
+
 		move.b	7(A_FP),R_FPCTL
 		and	#28,R_FPCTL
 		or	#3,R_FPCTL
-*
-*	fp->idfcpt = fp->idfpt1;
-*
+
+|	fp->idfcpt = fp->idfpt1;
+
 		move.b	6(A_FP),8(A_FP)
-*
-*	fp->idftmd |= I_ACTIVE;
-*
+
+|	fp->idftmd |= I_ACTIVE;
+
 		or.b	#2,7(A_FP)
-*
-*	fp->idftrf = trg;
-*
+
+|	fp->idftrf = trg;
+
 		move	TRG(A6),10(A_FP)
-*
-*	*(fpu + (long)FPU_TCV1) = srcval;
-*
-		move	SRCVAL(A6),$8(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TCV1) = srcval;
+
+		move	SRCVAL(A6),0x8(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TSF1) = mltval;
-*
-		move	MLTVAL(A6),$A(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TSF1) = mltval;
+
+		move	MLTVAL(A6),0xA(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TMNT) = fpmant;
-*
-		move	R_FPMANT,$14(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TMNT) = fpmant;
+
+		move	R_FPMANT,0x14(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TEXP) = fpexp;
-*
-		move	R_FPEXP,$16(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TEXP) = fpexp;
+
+		move	R_FPEXP,0x16(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-		.page
-*
-*	if (fp->idftmd & I_VNSUBN)
-*
+
+		.page
+
+|	if (fp->idftmd & I_VNSUBN)
+
 		btst	#3,7(A_FP)
 		beq	F01L169
-*
-*		*(fpu + (long)FPU_TNV1) = fpval;
-*
-		move	R_FPVAL,$1C(A_FPU)
+
+|		|(fpu + (long)FPU_TNV1) = fpval;
+
+		move	R_FPVAL,0x1C(A_FPU)
 		bra	F01L170
-*
-*	else
-*		*(fpu + (long)FPU_TNV0) = fpval;
-*
+
+|	else
+|		|(fpu + (long)FPU_TNV0) = fpval;
+
 F01L169:	move	R_FPVAL,2(A_FPU)
-*
-*	++octype;
-*
+
+|	++octype;
+
 F01L170:	add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TCTL) = fpctl;
-*
+
+|	|(fpu + (long)FPU_TCTL) = fpctl;
+
 		move	R_FPCTL,(A_FPU)
-*
-*	setipl(oldi);
-*
+
+|	setipl(oldi);
+
 		move	OLDI(A6),sr
-*
-		.page
-* ------------------------------------------------------------------------------
-* Start function 2 -- Frq 3
-* ------------------------------------------------------------------------------
-*
-*    if (ip->idhfnc[2].idftmd & I_TM_KEY) {
-*
+
+		.page
+| ------------------------------------------------------------------------------
+| Start function 2 -- Frq 3
+| ------------------------------------------------------------------------------
+
+|    if (ip->idhfnc[2].idftmd & I_TM_KEY) {
+
 FN02:		move.l	IP(A6),A0
 		move.b	117(A0),D0
@@ -1263,29 +1263,29 @@
 		btst	#0,D0
 		bne	FN02A
-*
+
 		jmp	FN03
-*
-*	vp = (vce << 4) + 5;
-*
+
+|	vp = (vce << 4) + 5;
+
 FN02A:		move	VCE(A6),D0
 		asl	#4,D0
 		add.w	#5,D0
 		move	D0,VP(A6)
-*
-*	fpu = io_fpu + FPU_OFNC + (vp << 4);
-*
+
+|	fpu = io_fpu + FPU_OFNC + (vp << 4);
+
 		asl	#5,D0
 		ext.l	D0
 		move.l	D0,A_FPU
-		add.l	#_io_fpu+$4000,A_FPU
-*
-*	fp = &ip->idhfnc[2];
-*
+		add.l	#_io_fpu+0x4000,A_FPU
+
+|	fp = &ip->idhfnc[2];
+
 		move.l	#24,A_FP
 		add.l	IP(A6),A_FP
 		add.l	#86,A_FP
-*
-*	pt = &ip->idhpnt[fp->idfpt1];
-*
+
+|	pt = &ip->idhpnt[fp->idfpt1];
+
 		clr.l	D0
 		move.b	6(A_FP),D0
@@ -1297,9 +1297,9 @@
 		add.l	#242,D0
 		move.l	D0,PT(A6)
-*
-		.page
-*
-*	srcnum = group | fp->idfsrc;
-*
+
+		.page
+
+|	srcnum = group | fp->idfsrc;
+
 		move.w	GROUP(A6),D0
 		ext.l	D0
@@ -1308,7 +1308,7 @@
 		or	D1,D0
 		move	D0,SRCNUM(A6)
-*
-*	vep = &valents[srcnum];
-*
+
+|	vep = &valents[srcnum];
+
 		add.l	D0,D0
 		move.l	D0,D1
@@ -1317,7 +1317,7 @@
 		add.l	#_valents,D0
 		move.l	D0,VEP(A6)
-*
-*	smp = vpsms[vp];
-*
+
+|	smp = vpsms[vp];
+
 		move	VP(A6),A0
 		add.l	A0,A0
@@ -1325,104 +1325,104 @@
 		add.l	#_vpsms,A0
 		move.l	(A0),A_SMP
-*
-*	if (srcnum NE smp->sm) {
-*
+
+|	if (srcnum NE smp->sm) {
+
 		clr	D0
 		move	10(A_SMP),D0
 		cmp	SRCNUM(A6),D0
 		beq	F02L113
-*
-*		(smp->prv)->nxt = smp->nxt;
-*
+
+|		(smp->prv)->nxt = smp->nxt;
+
 		move.l	4(A_SMP),A0
 		move.l	(A_SMP),(A0)
-*
-*		(smp->nxt)->prv = smp->prv;
-*
+
+|		(smp->nxt)->prv = smp->prv;
+
 		move.l	(A_SMP),A0
 		move.l	4(A_SMP),4(A0)
-*
-*		smp->prv = (struct sment *)vep;
-*
+
+|		smp->prv = (struct sment |)vep;
+
 		move.l	VEP(A6),4(A_SMP)
-*
-*		smp->nxt = vep->nxt;
-*
+
+|		smp->nxt = vep->nxt;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),(A_SMP)
-*
-*		(vep->nxt)->prv = smp;
-*
+
+|		(vep->nxt)->prv = smp;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),A0
 		move.l	A_SMP,4(A0)
-*
-*		vep->nxt = smp;
-*
+
+|		vep->nxt = smp;
+
 		move.l	VEP(A6),A0
 		move.l	A_SMP,(A0)
-*
-*		smp->sm = srcnum;
-*
+
+|		smp->sm = srcnum;
+
 		move	SRCNUM(A6),10(A_SMP)
-*
-*	}
-*
-*	mltval = fp->idfmlt;
-*
+
+|	}
+
+|	mltval = fp->idfmlt;
+
 F02L113:	move	2(A_FP),MLTVAL(A6)
-*
-		.page
-*
-*	switch (fp->idfsrc) {
-*
+
+		.page
+
+|	switch (fp->idfsrc) {
+
 		move.b	4(A_FP),D0
 		ext.w	d0
 		cmp	#10,D0
 		bhi	F02L122
-*
+
 		asl	#2,D0
 		lea	F02L123,A0
 		movea.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*	case SM_NONE:
-*		mltval = 0;
-*
+
+|	case SM_NONE:
+|		mltval = 0;
+
 F02L116:	clr	MLTVAL(A6)
-*
-*		tsrcval = 0;
-*
+
+|		tsrcval = 0;
+
 		clr	TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F02L114
-*
-*	case SM_RAND:
-*		tsrcval = xgetran(mltval);
-*
+
+|	case SM_RAND:
+|		tsrcval = xgetran(mltval);
+
 F02L117:	move	MLTVAL(A6),(sp)
 		jsr	_xgetran
 		move	D0,TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F02L114
-*
-*	case SM_PTCH:
-*		tsrcval = pch;
-*
+
+|	case SM_PTCH:
+|		tsrcval = pch;
+
 F02L118:	move	PCH(A6),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F02L114
-*
-		.page
-*
-*	case SM_FREQ:
-*		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|	case SM_FREQ:
+|		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
+
 F02L119:	move	PCH(A6),D0
 		asr	#7,D0
@@ -1432,67 +1432,67 @@
 		add.l	#_ptoftab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F02L114
-*
-*	case SM_KVEL:
-*		tsrcval = veltab[trg];
-*
+
+|	case SM_KVEL:
+|		tsrcval = veltab[trg];
+
 F02L120:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_veltab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F02L114
-*
-*	case SM_KPRS:
-*		tsrcval = prstab[trg];
-*
+
+|	case SM_KPRS:
+|		tsrcval = prstab[trg];
+
 F02L121:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_prstab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F02L114
-*
-*	default:
-*		tsrcval = vep->val;
-*
+
+|	default:
+|		tsrcval = vep->val;
+
 F02L122:	move.l	VEP(A6),A0
 		move	8(A0),TSRCVAL(A6)
-*
-*	}
-*
-		.page
-*
-*		srcval = addpch(tsrcval, 0);
-*
+
+|	}
+
+		.page
+
+|		srcval = addpch(tsrcval, 0);
+
 F02L114:	move.w	TSRCVAL(A6),D0
 		ext.l	D0
 		asr.l	#5,D0
-*		sub.l	#500,D0
+|		sub.l	#500,D0
 		asl.l	#LSPCH,D0
 		cmp.l	#PITCHMAX,D0
 		ble	F02L129A
-*
+
 		move.l	#PITCHMAX,D0
-*
+
 F02L129A:	move	D0,SRCVAL(A6)
-*
-		.page
-*
-*	if (pt->ipvsrc) {
-*
+
+		.page
+
+|	if (pt->ipvsrc) {
+
 F02L124:	move.l	PT(A6),A0
 		tst.b	6(A0)
 		beq	F02L136
-*
-*		switch (pt->ipvsrc) {
-*
+
+|		switch (pt->ipvsrc) {
+
 		move.l	PT(A6),A0
 		move.b	6(A0),D0
@@ -1501,13 +1501,13 @@
 		cmp	#9,D0
 		bhi	F02L144
-*
+
 		asl	#2,D0
 		lea	F02L145,A0
 		move.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*		case SM_RAND:
-*			ltmp = xgetran(pt_>ipvmlt);
-*
+
+|		case SM_RAND:
+|			ltmp = xgetran(pt_>ipvmlt);
+
 F02L139:	move.l	PT(A6),A0
 		move	4(A0),(sp)
@@ -1515,24 +1515,24 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F02L137
-*
-*		case SM_PTCH:
-*			ltmp = pch;
-*
+
+|		case SM_PTCH:
+|			ltmp = pch;
+
 F02L140:	move	PCH(A6),A0
 		move.l	A0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F02L137
-*
-		.page
-*
-*		case SM_FREQ:
-*			ltmp = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|		case SM_FREQ:
+|			ltmp = ptoftab[(pch >> 7) & 0x00FF];
+
 F02L141:	move	PCH(A6),D0
 		asr	#7,D0
@@ -1544,12 +1544,12 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F02L137
-*
-*		case SM_KVEL:
-*			ltmp = veltab[trg];
-*
+
+|		case SM_KVEL:
+|			ltmp = veltab[trg];
+
 F02L142:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -1558,14 +1558,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F02L137
-*
-		.page
-*
-*		case SM_KPRS:
-*			ltmp = prstab[trg];
-*
+
+		.page
+
+|		case SM_KPRS:
+|			ltmp = prstab[trg];
+
 F02L143:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -1574,14 +1574,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F02L137
-*
-		.page
-*
-*		default:
-*			ltmp = valents[group | pt->ipvsrc].val;
-*
+
+		.page
+
+|		default:
+|			ltmp = valents[group | pt->ipvsrc].val;
+
 F02L144:	move.l	PT(A6),A0
 		clr.l	D0
@@ -1597,12 +1597,12 @@
 		move	8(A0,A1.l),D0
 		move.l	D0,LTMP(A6)
-*
-*		}
-*
-*
-		.page
-*
-*		ltmp = (ltmp * pt->ipvmlt) >> 15;
-*
+
+|		}
+
+
+		.page
+
+|		ltmp = (ltmp | pt->ipvmlt) >> 15;
+
 F02L137:	move.l	PT(A6),A0
 		move.w	4(A0),D0
@@ -1612,52 +1612,52 @@
 		asr.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		ltmp += (long)pt->ipval;
-*
+
+|		ltmp += (long)pt->ipval;
+
 		move.l	PT(A6),A0
 		move	2(A0),D0
 		ext.l	D0
 		add.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F02L146
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F02L147
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F02L146:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F02L147
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		tfpval = (short)ltmp;
-*
+
+|		tfpval = (short)ltmp;
+
 F02L147:	move.w	LTMP+2(A6),TFPVAL(A6)
 		bra	F02L149
-*
-*	} else {
-*
-*		tfpval = pt->ipval;
-*
+
+|	} else {
+
+|		tfpval = pt->ipval;
+
 F02L136:	move.l	PT(A6),A0
 		move	2(A0),TFPVAL(A6)
-*
-*	}
-*
-		.page
-*
-*	fpmant = (((long)pt->iptom & 0x0000FFF0L)
-*		* ((long)timemlt & 0x0000FFFFL)) >> 15;
-*
+
+|	}
+
+		.page
+
+|	fpmant = (((long)pt->iptom & 0x0000FFF0L)
+|		| ((long)timemlt & 0x0000FFFFL)) >> 15;
+
 F02L149:	move.l	PT(A6),A0
 		move.w	(A0),D0
 		move.w	D0,D2
-		andi.w	#$FFF0,D0
+		andi.w	#0xFFF0,D0
 		move.w	_timemlt,D1
 		muls	D1,D0
@@ -1665,22 +1665,22 @@
 		asr.l	D1,D0
 		move	D0,R_FPMANT
-*
-*	fpexp = expbit[pt->iptim & 0x000F];
-*
-		and	#$000F,D2
+
+|	fpexp = expbit[pt->iptim & 0x000F];
+
+		and	#0x000F,D2
 		move	D2,A0
 		add.l	A0,A0
 		add.l	#_expbit,A0
 		move	(A0),R_FPEXP
-*
-		.page
-*
-*		fp->idfpch = ip->idhos3v;
-*
+
+		.page
+
+|		fp->idfpch = ip->idhos3v;
+
 F02L156:	move.l	IP(A6),A0
 		move.w	82(A0),(A_FP)
-*
-*		fpval = addpch(tfpval, fp->idfpch);
-*
+
+|		fpval = addpch(tfpval, fp->idfpch);
+
 		move.w	TFPVAL(A6),D1
 		ext.l	D1
@@ -1693,117 +1693,117 @@
 		cmp.l	#PITCHMAX,D0
 		ble	F02L156A
-*
+
 		move.l	#PITCHMAX,D0
-*
+
 F02L156A:	move	D0,R_FPVAL
-*
-		.page
-*
+
+		.page
+
 		move.b	5(A_FP),D0
 		ext.w	D0
 		sub.w	#1,D0
 		movea.l	PT(A6),A0
-*
-*	oldi = setipl(FPU_DI);
-*
+
+|	oldi = setipl(FPU_DI);
+
 		move	sr,OLDI(A6)
 		move	#FPU_DI,sr
-*
+
 F02L168:	clr.b	10(A0)
 		add.l	#12,a0
 		dbra	D0,F02L168
-*
-		.page
-*
-*	fp->idftmd ^= I_NVBITS;
-*
+
+		.page
+
+|	fp->idftmd ^= I_NVBITS;
+
 F02L165:	eor.b	#24,7(A_FP)
-*
-*	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
-*
+
+|	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
+
 		move.b	7(A_FP),R_FPCTL
 		and	#28,R_FPCTL
 		or	#3,R_FPCTL
-*
-*	fp->idfcpt = fp->idfpt1;
-*
+
+|	fp->idfcpt = fp->idfpt1;
+
 		move.b	6(A_FP),8(A_FP)
-*
-*	fp->idftmd |= I_ACTIVE;
-*
+
+|	fp->idftmd |= I_ACTIVE;
+
 		or.b	#2,7(A_FP)
-*
-*	fp->idftrf = trg;
-*
+
+|	fp->idftrf = trg;
+
 		move	TRG(A6),10(A_FP)
-*
-*	*(fpu + (long)FPU_TCV1) = srcval;
-*
-		move	SRCVAL(A6),$8(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TCV1) = srcval;
+
+		move	SRCVAL(A6),0x8(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TSF1) = mltval;
-*
-		move	MLTVAL(A6),$A(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TSF1) = mltval;
+
+		move	MLTVAL(A6),0xA(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TMNT) = fpmant;
-*
-		move	R_FPMANT,$14(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TMNT) = fpmant;
+
+		move	R_FPMANT,0x14(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TEXP) = fpexp;
-*
-		move	R_FPEXP,$16(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TEXP) = fpexp;
+
+		move	R_FPEXP,0x16(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-		.page
-*
-*	if (fp->idftmd & I_VNSUBN)
-*
+
+		.page
+
+|	if (fp->idftmd & I_VNSUBN)
+
 		btst	#3,7(A_FP)
 		beq	F02L169
-*
-*		*(fpu + (long)FPU_TNV1) = fpval;
-*
-		move	R_FPVAL,$1C(A_FPU)
+
+|		|(fpu + (long)FPU_TNV1) = fpval;
+
+		move	R_FPVAL,0x1C(A_FPU)
 		bra	F02L170
-*
-*	else
-*		*(fpu + (long)FPU_TNV0) = fpval;
-*
+
+|	else
+|		|(fpu + (long)FPU_TNV0) = fpval;
+
 F02L169:	move	R_FPVAL,2(A_FPU)
-*
-*	++octype;
-*
+
+|	++octype;
+
 F02L170:	add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TCTL) = fpctl;
-*
+
+|	|(fpu + (long)FPU_TCTL) = fpctl;
+
 		move	R_FPCTL,(A_FPU)
-*
-*	setipl(oldi);
-*
+
+|	setipl(oldi);
+
 		move	OLDI(A6),sr
-*
-		.page
-* ------------------------------------------------------------------------------
-* Start function 3 -- Frq 4
-* ------------------------------------------------------------------------------
-*
-*    if (ip->idhfnc[3].idftmd & I_TM_KEY) {
-*
+
+		.page
+| ------------------------------------------------------------------------------
+| Start function 3 -- Frq 4
+| ------------------------------------------------------------------------------
+
+|    if (ip->idhfnc[3].idftmd & I_TM_KEY) {
+
 FN03:		move.l	IP(A6),A0
 		move.b	129(A0),D0
@@ -1812,29 +1812,29 @@
 		btst	#0,D0
 		bne	FN03A
-*
+
 		jmp	FN04
-*
-*	vp = (vce << 4) + 7;
-*
+
+|	vp = (vce << 4) + 7;
+
 FN03A:		move	VCE(A6),D0
 		asl	#4,D0
 		add.w	#7,D0
 		move	D0,VP(A6)
-*
-*	fpu = io_fpu + FPU_OFNC + (vp << 4);
-*
+
+|	fpu = io_fpu + FPU_OFNC + (vp << 4);
+
 		asl	#5,D0
 		ext.l	D0
 		move.l	D0,A_FPU
-		add.l	#_io_fpu+$4000,A_FPU
-*
-*	fp = &ip->idhfnc[3];
-*
+		add.l	#_io_fpu+0x4000,A_FPU
+
+|	fp = &ip->idhfnc[3];
+
 		move.l	#36,A_FP
 		add.l	IP(A6),A_FP
 		add.l	#86,A_FP
-*
-*	pt = &ip->idhpnt[fp->idfpt1];
-*
+
+|	pt = &ip->idhpnt[fp->idfpt1];
+
 		clr.l	D0
 		move.b	6(A_FP),D0
@@ -1846,9 +1846,9 @@
 		add.l	#242,D0
 		move.l	D0,PT(A6)
-*
-		.page
-*
-*	srcnum = group | fp->idfsrc;
-*
+
+		.page
+
+|	srcnum = group | fp->idfsrc;
+
 		move.w	GROUP(A6),D0
 		ext.l	D0
@@ -1857,7 +1857,7 @@
 		or	D1,D0
 		move	D0,SRCNUM(A6)
-*
-*	vep = &valents[srcnum];
-*
+
+|	vep = &valents[srcnum];
+
 		add.l	D0,D0
 		move.l	D0,D1
@@ -1866,7 +1866,7 @@
 		add.l	#_valents,D0
 		move.l	D0,VEP(A6)
-*
-*	smp = vpsms[vp];
-*
+
+|	smp = vpsms[vp];
+
 		move	VP(A6),A0
 		add.l	A0,A0
@@ -1874,104 +1874,104 @@
 		add.l	#_vpsms,A0
 		move.l	(A0),A_SMP
-*
-*	if (srcnum NE smp->sm) {
-*
+
+|	if (srcnum NE smp->sm) {
+
 		clr	D0
 		move	10(A_SMP),D0
 		cmp	SRCNUM(A6),D0
 		beq	F03L113
-*
-*		(smp->prv)->nxt = smp->nxt;
-*
+
+|		(smp->prv)->nxt = smp->nxt;
+
 		move.l	4(A_SMP),A0
 		move.l	(A_SMP),(A0)
-*
-*		(smp->nxt)->prv = smp->prv;
-*
+
+|		(smp->nxt)->prv = smp->prv;
+
 		move.l	(A_SMP),A0
 		move.l	4(A_SMP),4(A0)
-*
-*		smp->prv = (struct sment *)vep;
-*
+
+|		smp->prv = (struct sment |)vep;
+
 		move.l	VEP(A6),4(A_SMP)
-*
-*		smp->nxt = vep->nxt;
-*
+
+|		smp->nxt = vep->nxt;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),(A_SMP)
-*
-*		(vep->nxt)->prv = smp;
-*
+
+|		(vep->nxt)->prv = smp;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),A0
 		move.l	A_SMP,4(A0)
-*
-*		vep->nxt = smp;
-*
+
+|		vep->nxt = smp;
+
 		move.l	VEP(A6),A0
 		move.l	A_SMP,(A0)
-*
-*		smp->sm = srcnum;
-*
+
+|		smp->sm = srcnum;
+
 		move	SRCNUM(A6),10(A_SMP)
-*
-*	}
-*
-*	mltval = fp->idfmlt;
-*
+
+|	}
+
+|	mltval = fp->idfmlt;
+
 F03L113:	move	2(A_FP),MLTVAL(A6)
-*
-		.page
-*
-*	switch (fp->idfsrc) {
-*
+
+		.page
+
+|	switch (fp->idfsrc) {
+
 		move.b	4(A_FP),D0
 		ext.w	d0
 		cmp	#10,D0
 		bhi	F03L122
-*
+
 		asl	#2,D0
 		lea	F03L123,A0
 		movea.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*	case SM_NONE:
-*		mltval = 0;
-*
+
+|	case SM_NONE:
+|		mltval = 0;
+
 F03L116:	clr	MLTVAL(A6)
-*
-*		tsrcval = 0;
-*
+
+|		tsrcval = 0;
+
 		clr	TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F03L114
-*
-*	case SM_RAND:
-*		tsrcval = xgetran(mltval);
-*
+
+|	case SM_RAND:
+|		tsrcval = xgetran(mltval);
+
 F03L117:	move	MLTVAL(A6),(sp)
 		jsr	_xgetran
 		move	D0,TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F03L114
-*
-*	case SM_PTCH:
-*		tsrcval = pch;
-*
+
+|	case SM_PTCH:
+|		tsrcval = pch;
+
 F03L118:	move	PCH(A6),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F03L114
-*
-		.page
-*
-*	case SM_FREQ:
-*		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|	case SM_FREQ:
+|		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
+
 F03L119:	move	PCH(A6),D0
 		asr	#7,D0
@@ -1981,67 +1981,67 @@
 		add.l	#_ptoftab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F03L114
-*
-*	case SM_KVEL:
-*		tsrcval = veltab[trg];
-*
+
+|	case SM_KVEL:
+|		tsrcval = veltab[trg];
+
 F03L120:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_veltab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F03L114
-*
-*	case SM_KPRS:
-*		tsrcval = prstab[trg];
-*
+
+|	case SM_KPRS:
+|		tsrcval = prstab[trg];
+
 F03L121:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_prstab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F03L114
-*
-*	default:
-*		tsrcval = vep->val;
-*
+
+|	default:
+|		tsrcval = vep->val;
+
 F03L122:	move.l	VEP(A6),A0
 		move	8(A0),TSRCVAL(A6)
-*
-*	}
-*
-		.page
-*
-*		srcval = addpch(tsrcval, 0);
-*
+
+|	}
+
+		.page
+
+|		srcval = addpch(tsrcval, 0);
+
 F03L114:	move.w	TSRCVAL(A6),D0
 		ext.l	D0
 		asr.l	#5,D0
-*		sub.l	#500,D0
+|		sub.l	#500,D0
 		asl.l	#LSPCH,D0
 		cmp.l	#PITCHMAX,D0
 		ble	F03L129A
-*
+
 		move.l	#PITCHMAX,D0
 
 F03L129A:	move	D0,SRCVAL(A6)
-*
-		.page
-*
-*	if (pt->ipvsrc) {
-*
+
+		.page
+
+|	if (pt->ipvsrc) {
+
 F03L124:	move.l	PT(A6),A0
 		tst.b	6(A0)
 		beq	F03L136
-*
-*		switch (pt->ipvsrc) {
-*
+
+|		switch (pt->ipvsrc) {
+
 		move.l	PT(A6),A0
 		move.b	6(A0),D0
@@ -2050,13 +2050,13 @@
 		cmp	#9,D0
 		bhi	F03L144
-*
+
 		asl	#2,D0
 		lea	F03L145,A0
 		move.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*		case SM_RAND:
-*			ltmp = xgetran(pt_>ipvmlt);
-*
+
+|		case SM_RAND:
+|			ltmp = xgetran(pt_>ipvmlt);
+
 F03L139:	move.l	PT(A6),A0
 		move	4(A0),(sp)
@@ -2064,24 +2064,24 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F03L137
-*
-*		case SM_PTCH:
-*			ltmp = pch;
-*
+
+|		case SM_PTCH:
+|			ltmp = pch;
+
 F03L140:	move	PCH(A6),A0
 		move.l	A0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F03L137
-*
-		.page
-*
-*		case SM_FREQ:
-*			ltmp = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|		case SM_FREQ:
+|			ltmp = ptoftab[(pch >> 7) & 0x00FF];
+
 F03L141:	move	PCH(A6),D0
 		asr	#7,D0
@@ -2093,12 +2093,12 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F03L137
-*
-*		case SM_KVEL:
-*			ltmp = veltab[trg];
-*
+
+|		case SM_KVEL:
+|			ltmp = veltab[trg];
+
 F03L142:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -2107,14 +2107,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F03L137
-*
-		.page
-*
-*		case SM_KPRS:
-*			ltmp = prstab[trg];
-*
+
+		.page
+
+|		case SM_KPRS:
+|			ltmp = prstab[trg];
+
 F03L143:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -2123,14 +2123,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F03L137
-*
-		.page
-*
-*		default:
-*			ltmp = valents[group | pt->ipvsrc].val;
-*
+
+		.page
+
+|		default:
+|			ltmp = valents[group | pt->ipvsrc].val;
+
 F03L144:	move.l	PT(A6),A0
 		clr.l	D0
@@ -2146,12 +2146,12 @@
 		move	8(A0,A1.l),D0
 		move.l	D0,LTMP(A6)
-*
-*		}
-*
-*
-		.page
-*
-*		ltmp = (ltmp * pt->ipvmlt) >> 15;
-*
+
+|		}
+
+
+		.page
+
+|		ltmp = (ltmp | pt->ipvmlt) >> 15;
+
 F03L137:	move.l	PT(A6),A0
 		move.w	4(A0),D0
@@ -2161,52 +2161,52 @@
 		asr.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		ltmp += (long)pt->ipval;
-*
+
+|		ltmp += (long)pt->ipval;
+
 		move.l	PT(A6),A0
 		move	2(A0),D0
 		ext.l	D0
 		add.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F03L146
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F03L147
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F03L146:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F03L147
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		tfpval = (short)ltmp;
-*
+
+|		tfpval = (short)ltmp;
+
 F03L147:	move.w	LTMP+2(A6),TFPVAL(A6)
 		bra	F03L149
-*
-*	} else {
-*
-*		tfpval = pt->ipval;
-*
+
+|	} else {
+
+|		tfpval = pt->ipval;
+
 F03L136:	move.l	PT(A6),A0
 		move	2(A0),TFPVAL(A6)
-*
-*	}
-*
-		.page
-*
-*	fpmant = (((long)pt->iptom & 0x0000FFF0L)
-*		* ((long)timemlt & 0x0000FFFFL)) >> 15;
-*
+
+|	}
+
+		.page
+
+|	fpmant = (((long)pt->iptom & 0x0000FFF0L)
+|		| ((long)timemlt & 0x0000FFFFL)) >> 15;
+
 F03L149:	move.l	PT(A6),A0
 		move.w	(A0),D0
 		move.w	D0,D2
-		andi.w	#$FFF0,D0
+		andi.w	#0xFFF0,D0
 		move.w	_timemlt,D1
 		muls	D1,D0
@@ -2214,22 +2214,22 @@
 		asr.l	D1,D0
 		move	D0,R_FPMANT
-*
-*	fpexp = expbit[pt->iptim & 0x000F];
-*
-		and	#$000F,D2
+
+|	fpexp = expbit[pt->iptim & 0x000F];
+
+		and	#0x000F,D2
 		move	D2,A0
 		add.l	A0,A0
 		add.l	#_expbit,A0
 		move	(A0),R_FPEXP
-*
-		.page
-*
-*		fp->idfpch = ip->idhos4v;
-*
+
+		.page
+
+|		fp->idfpch = ip->idhos4v;
+
 F03L157:	move.l	IP(A6),A0
 		move.w	84(A0),(A_FP)
-*
-*		fpval = addpch(tfpval, fp->idfpch);
-*
+
+|		fpval = addpch(tfpval, fp->idfpch);
+
 		move.w	TFPVAL(A6),D1
 		ext.l	D1
@@ -2242,117 +2242,117 @@
 		cmp.l	#PITCHMAX,D0
 		ble	F03L157A
-*
+
 		move.l	#PITCHMAX,D0
-*
+
 F03L157A:	move	D0,R_FPVAL
-*
-		.page
-*
+
+		.page
+
 		move.b	5(A_FP),D0
 		ext.w	D0
 		sub.w	#1,D0
 		movea.l	PT(A6),A0
-*
-*	oldi = setipl(FPU_DI);
-*
+
+|	oldi = setipl(FPU_DI);
+
 		move	sr,OLDI(A6)
 		move	#FPU_DI,sr
-*
+
 F03L168:	clr.b	10(A0)
 		add.l	#12,a0
 		dbra	D0,F03L168
-*
-		.page
-*
-*	fp->idftmd ^= I_NVBITS;
-*
+
+		.page
+
+|	fp->idftmd ^= I_NVBITS;
+
 F03L165:	eor.b	#24,7(A_FP)
-*
-*	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
-*
+
+|	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
+
 		move.b	7(A_FP),R_FPCTL
 		and	#28,R_FPCTL
 		or	#3,R_FPCTL
-*
-*	fp->idfcpt = fp->idfpt1;
-*
+
+|	fp->idfcpt = fp->idfpt1;
+
 		move.b	6(A_FP),8(A_FP)
-*
-*	fp->idftmd |= I_ACTIVE;
-*
+
+|	fp->idftmd |= I_ACTIVE;
+
 		or.b	#2,7(A_FP)
-*
-*	fp->idftrf = trg;
-*
+
+|	fp->idftrf = trg;
+
 		move	TRG(A6),10(A_FP)
-*
-*	*(fpu + (long)FPU_TCV1) = srcval;
-*
-		move	SRCVAL(A6),$8(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TCV1) = srcval;
+
+		move	SRCVAL(A6),0x8(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TSF1) = mltval;
-*
-		move	MLTVAL(A6),$A(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TSF1) = mltval;
+
+		move	MLTVAL(A6),0xA(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TMNT) = fpmant;
-*
-		move	R_FPMANT,$14(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TMNT) = fpmant;
+
+		move	R_FPMANT,0x14(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TEXP) = fpexp;
-*
-		move	R_FPEXP,$16(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TEXP) = fpexp;
+
+		move	R_FPEXP,0x16(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-		.page
-*
-*	if (fp->idftmd & I_VNSUBN)
-*
+
+		.page
+
+|	if (fp->idftmd & I_VNSUBN)
+
 		btst	#3,7(A_FP)
 		beq	F03L169
-*
-*		*(fpu + (long)FPU_TNV1) = fpval;
-*
-		move	R_FPVAL,$1C(A_FPU)
+
+|		|(fpu + (long)FPU_TNV1) = fpval;
+
+		move	R_FPVAL,0x1C(A_FPU)
 		bra	F03L170
-*
-*	else
-*		*(fpu + (long)FPU_TNV0) = fpval;
-*
+
+|	else
+|		|(fpu + (long)FPU_TNV0) = fpval;
+
 F03L169:	move	R_FPVAL,2(A_FPU)
-*
-*	++octype;
-*
+
+|	++octype;
+
 F03L170:	add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TCTL) = fpctl;
-*
+
+|	|(fpu + (long)FPU_TCTL) = fpctl;
+
 		move	R_FPCTL,(A_FPU)
-*
-*	setipl(oldi);
-*
+
+|	setipl(oldi);
+
 		move	OLDI(A6),sr
-*
-		.page
-* ------------------------------------------------------------------------------
-* Start function 4 -- Filtr
-* ------------------------------------------------------------------------------
-*
-*    if (ip->idhfnc[4].idftmd & I_TM_KEY) {
-*
+
+		.page
+| ------------------------------------------------------------------------------
+| Start function 4 -- Filtr
+| ------------------------------------------------------------------------------
+
+|    if (ip->idhfnc[4].idftmd & I_TM_KEY) {
+
 FN04:		move.l	IP(A6),A0
 		move.b	141(A0),D0
@@ -2361,33 +2361,33 @@
 		btst	#0,D0
 		bne	FN04A
-*
+
 		jmp	FN05
-*
-*	vp = (vce << 4) + 10;
-*
+
+|	vp = (vce << 4) + 10;
+
 FN04A:		move	VCE(A6),D0
 		asl	#4,D0
 		add.w	#10,D0
 		move	D0,VP(A6)
-*
-*	fpu = io_fpu + FPU_OFNC + (vp << 4);
-*
+
+|	fpu = io_fpu + FPU_OFNC + (vp << 4);
+
 		asl	#5,D0
 		ext.l	D0
 		move.l	D0,A_FPU
-		add.l	#_io_fpu+$4000,A_FPU
-*
-*	fp = &ip->idhfnc[4];
-*
+		add.l	#_io_fpu+0x4000,A_FPU
+
+|	fp = &ip->idhfnc[4];
+
 		move.l	#48,A_FP
 		add.l	IP(A6),A_FP
 		add.l	#86,A_FP
-*
-		.page
-*
-*	Added code:
-*
-*		output resonance via table lookup with FPU interrupts off
-*
+
+		.page
+
+|	Added code:
+
+|		output resonance via table lookup with FPU interrupts off
+
 		lea	_rsntab,A0
 		clr.w	D0
@@ -2401,16 +2401,16 @@
 		ext.l	D0
 		move.l	D0,A0
-		add.l	#_io_fpu+$4000,A0
+		add.l	#_io_fpu+0x4000,A0
 		move.w	sr,OLDI(A6)
 		move.w	#FPU_DI,sr
 		move.w	d1,2(A0)
 		add.w	#1,OCTYPE(A6)
-		move.w	d1,$1C(A0)
+		move.w	d1,0x1C(A0)
 		add.w	#1,OCTYPE(A6)
-		move.w	#$0015,(A0)
+		move.w	#0x0015,(A0)
 		move.w	OLDI(A6),sr
-*
-*	pt = &ip->idhpnt[fp->idfpt1];
-*
+
+|	pt = &ip->idhpnt[fp->idfpt1];
+
 		clr.l	D0
 		move.b	6(A_FP),D0
@@ -2422,9 +2422,9 @@
 		add.l	#242,D0
 		move.l	D0,PT(A6)
-*
-		.page
-*
-*	srcnum = group | fp->idfsrc;
-*
+
+		.page
+
+|	srcnum = group | fp->idfsrc;
+
 		move.w	GROUP(A6),D0
 		ext.l	D0
@@ -2433,7 +2433,7 @@
 		or	D1,D0
 		move	D0,SRCNUM(A6)
-*
-*	vep = &valents[srcnum];
-*
+
+|	vep = &valents[srcnum];
+
 		add.l	D0,D0
 		move.l	D0,D1
@@ -2442,7 +2442,7 @@
 		add.l	#_valents,D0
 		move.l	D0,VEP(A6)
-*
-*	smp = vpsms[vp];
-*
+
+|	smp = vpsms[vp];
+
 		move	VP(A6),A0
 		add.l	A0,A0
@@ -2450,104 +2450,104 @@
 		add.l	#_vpsms,A0
 		move.l	(A0),A_SMP
-*
-*	if (srcnum NE smp->sm) {
-*
+
+|	if (srcnum NE smp->sm) {
+
 		clr	D0
 		move	10(A_SMP),D0
 		cmp	SRCNUM(A6),D0
 		beq	F04L113
-*
-*		(smp->prv)->nxt = smp->nxt;
-*
+
+|		(smp->prv)->nxt = smp->nxt;
+
 		move.l	4(A_SMP),A0
 		move.l	(A_SMP),(A0)
-*
-*		(smp->nxt)->prv = smp->prv;
-*
+
+|		(smp->nxt)->prv = smp->prv;
+
 		move.l	(A_SMP),A0
 		move.l	4(A_SMP),4(A0)
-*
-*		smp->prv = (struct sment *)vep;
-*
+
+|		smp->prv = (struct sment |)vep;
+
 		move.l	VEP(A6),4(A_SMP)
-*
-*		smp->nxt = vep->nxt;
-*
+
+|		smp->nxt = vep->nxt;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),(A_SMP)
-*
-*		(vep->nxt)->prv = smp;
-*
+
+|		(vep->nxt)->prv = smp;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),A0
 		move.l	A_SMP,4(A0)
-*
-*		vep->nxt = smp;
-*
+
+|		vep->nxt = smp;
+
 		move.l	VEP(A6),A0
 		move.l	A_SMP,(A0)
-*
-*		smp->sm = srcnum;
-*
+
+|		smp->sm = srcnum;
+
 		move	SRCNUM(A6),10(A_SMP)
-*
-*	}
-*
-*	mltval = fp->idfmlt;
-*
+
+|	}
+
+|	mltval = fp->idfmlt;
+
 F04L113:	move	2(A_FP),MLTVAL(A6)
-*
-		.page
-*
-*	switch (fp->idfsrc) {
-*
+
+		.page
+
+|	switch (fp->idfsrc) {
+
 		move.b	4(A_FP),D0
 		ext.w	d0
 		cmp	#10,D0
 		bhi	F04L122
-*
+
 		asl	#2,D0
 		lea	F04L123,A0
 		movea.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*	case SM_NONE:
-*		mltval = 0;
-*
+
+|	case SM_NONE:
+|		mltval = 0;
+
 F04L116:	clr	MLTVAL(A6)
-*
-*		tsrcval = 0;
-*
+
+|		tsrcval = 0;
+
 		clr	TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F04L114
-*
-*	case SM_RAND:
-*		tsrcval = xgetran(mltval);
-*
+
+|	case SM_RAND:
+|		tsrcval = xgetran(mltval);
+
 F04L117:	move	MLTVAL(A6),(sp)
 		jsr	_xgetran
 		move	D0,TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F04L114
-*
-*	case SM_PTCH:
-*		tsrcval = pch;
-*
+
+|	case SM_PTCH:
+|		tsrcval = pch;
+
 F04L118:	move	PCH(A6),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F04L114
-*
-		.page
-*
-*	case SM_FREQ:
-*		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|	case SM_FREQ:
+|		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
+
 F04L119:	move	PCH(A6),D0
 		asr	#7,D0
@@ -2557,45 +2557,45 @@
 		add.l	#_ptoftab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F04L114
-*
-*	case SM_KVEL:
-*		tsrcval = veltab[trg];
-*
+
+|	case SM_KVEL:
+|		tsrcval = veltab[trg];
+
 F04L120:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_veltab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F04L114
-*
-*	case SM_KPRS:
-*		tsrcval = prstab[trg];
-*
+
+|	case SM_KPRS:
+|		tsrcval = prstab[trg];
+
 F04L121:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_prstab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F04L114
-*
-*	default:
-*		tsrcval = vep->val;
-*
+
+|	default:
+|		tsrcval = vep->val;
+
 F04L122:	move.l	VEP(A6),A0
 		move	8(A0),TSRCVAL(A6)
-*
-*	}
-*
-		.page
-*
-*		ltmp = ((long)tsrcval >> 1) + ((long)tsrcval >> 2);
-*
+
+|	}
+
+		.page
+
+|		ltmp = ((long)tsrcval >> 1) + ((long)tsrcval >> 2);
+
 F04L114:	move	TSRCVAL(A6),D0
 		ext.l	D0
@@ -2606,37 +2606,37 @@
 		add.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F04L131
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F04L132
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F04L131:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F04L132
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		srcval = (short)ltmp;
-*
+
+|		srcval = (short)ltmp;
+
 F04L132:	move.l	LTMP(A6),D0
 		move	D0,SRCVAL(A6)
-*
-		.page
-*
-*	if (pt->ipvsrc) {
-*
+
+		.page
+
+|	if (pt->ipvsrc) {
+
 F04L124:	move.l	PT(A6),A0
 		tst.b	6(A0)
 		beq	F04L136
-*
-*		switch (pt->ipvsrc) {
-*
+
+|		switch (pt->ipvsrc) {
+
 		move.l	PT(A6),A0
 		move.b	6(A0),D0
@@ -2645,13 +2645,13 @@
 		cmp	#9,D0
 		bhi	F04L144
-*
+
 		asl	#2,D0
 		lea	F04L145,A0
 		move.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*		case SM_RAND:
-*			ltmp = xgetran(pt_>ipvmlt);
-*
+
+|		case SM_RAND:
+|			ltmp = xgetran(pt_>ipvmlt);
+
 F04L139:	move.l	PT(A6),A0
 		move	4(A0),(sp)
@@ -2659,24 +2659,24 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F04L137
-*
-*		case SM_PTCH:
-*			ltmp = pch;
-*
+
+|		case SM_PTCH:
+|			ltmp = pch;
+
 F04L140:	move	PCH(A6),A0
 		move.l	A0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F04L137
-*
-		.page
-*
-*		case SM_FREQ:
-*			ltmp = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|		case SM_FREQ:
+|			ltmp = ptoftab[(pch >> 7) & 0x00FF];
+
 F04L141:	move	PCH(A6),D0
 		asr	#7,D0
@@ -2688,12 +2688,12 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F04L137
-*
-*		case SM_KVEL:
-*			ltmp = veltab[trg];
-*
+
+|		case SM_KVEL:
+|			ltmp = veltab[trg];
+
 F04L142:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -2702,14 +2702,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F04L137
-*
-		.page
-*
-*		case SM_KPRS:
-*			ltmp = prstab[trg];
-*
+
+		.page
+
+|		case SM_KPRS:
+|			ltmp = prstab[trg];
+
 F04L143:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -2718,14 +2718,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F04L137
-*
-		.page
-*
-*		default:
-*			ltmp = valents[group | pt->ipvsrc].val;
-*
+
+		.page
+
+|		default:
+|			ltmp = valents[group | pt->ipvsrc].val;
+
 F04L144:	move.l	PT(A6),A0
 		clr.l	D0
@@ -2741,12 +2741,12 @@
 		move	8(A0,A1.l),D0
 		move.l	D0,LTMP(A6)
-*
-*		}
-*
-*
-		.page
-*
-*		ltmp = (ltmp * pt->ipvmlt) >> 15;
-*
+
+|		}
+
+
+		.page
+
+|		ltmp = (ltmp | pt->ipvmlt) >> 15;
+
 F04L137:	move.l	PT(A6),A0
 		move.w	4(A0),D0
@@ -2756,52 +2756,52 @@
 		asr.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		ltmp += (long)pt->ipval;
-*
+
+|		ltmp += (long)pt->ipval;
+
 		move.l	PT(A6),A0
 		move	2(A0),D0
 		ext.l	D0
 		add.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F04L146
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F04L147
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F04L146:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F04L147
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		tfpval = (short)ltmp;
-*
+
+|		tfpval = (short)ltmp;
+
 F04L147:	move.w	LTMP+2(A6),TFPVAL(A6)
 		bra	F04L149
-*
-*	} else {
-*
-*		tfpval = pt->ipval;
-*
+
+|	} else {
+
+|		tfpval = pt->ipval;
+
 F04L136:	move.l	PT(A6),A0
 		move	2(A0),TFPVAL(A6)
-*
-*	}
-*
-		.page
-*
-*	fpmant = (((long)pt->iptom & 0x0000FFF0L)
-*		* ((long)timemlt & 0x0000FFFFL)) >> 15;
-*
+
+|	}
+
+		.page
+
+|	fpmant = (((long)pt->iptom & 0x0000FFF0L)
+|		| ((long)timemlt & 0x0000FFFFL)) >> 15;
+
 F04L149:	move.l	PT(A6),A0
 		move.w	(A0),D0
 		move.w	D0,D2
-		andi.w	#$FFF0,D0
+		andi.w	#0xFFF0,D0
 		move.w	_timemlt,D1
 		muls	D1,D0
@@ -2809,22 +2809,22 @@
 		asr.l	D1,D0
 		move	D0,R_FPMANT
-*
-*	fpexp = expbit[pt->iptim & 0x000F];
-*
-		and	#$000F,D2
+
+|	fpexp = expbit[pt->iptim & 0x000F];
+
+		and	#0x000F,D2
 		move	D2,A0
 		add.l	A0,A0
 		add.l	#_expbit,A0
 		move	(A0),R_FPEXP
-*
-		.page
-*
-*		fp->idfpch = pch;
-*
+
+		.page
+
+|		fp->idfpch = pch;
+
 F04L158:	move	PCH(A6),(A_FP)
-*
-*		ltmp = ((long)tfpval >> 1) + ((longtfpval >>2)
-*			+ (long)fp->idfpch;
-*
+
+|		ltmp = ((long)tfpval >> 1) + ((longtfpval >>2)
+|			+ (long)fp->idfpch;
+
 		move	TFPVAL(A6),D0
 		ext.l	D0
@@ -2838,135 +2838,135 @@
 		add.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F04L159
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F04L160
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F04L159:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F04L160
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		fpval = (short)ltmp;
-*
+
+|		fpval = (short)ltmp;
+
 F04L160:	move.l	LTMP(A6),D0
 		move	D0,R_FPVAL
-*
-		.page
-*
+
+		.page
+
 		move.b	5(A_FP),D0
 		ext.w	D0
 		sub.w	#1,D0
 		movea.l	PT(A6),A0
-*
-*	oldi = setipl(FPU_DI);
-*
+
+|	oldi = setipl(FPU_DI);
+
 		move	sr,OLDI(A6)
 		move	#FPU_DI,sr
-*
+
 F04L168:	clr.b	10(A0)
 		add.l	#12,a0
 		dbra	D0,F04L168
-*
-		.page
-*
-*	fp->idftmd ^= I_NVBITS;
-*
+
+		.page
+
+|	fp->idftmd ^= I_NVBITS;
+
 F04L165:	eor.b	#24,7(A_FP)
-*
-*	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
-*
+
+|	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
+
 		move.b	7(A_FP),R_FPCTL
 		and	#28,R_FPCTL
 		or	#3,R_FPCTL
-*
-*	fp->idfcpt = fp->idfpt1;
-*
+
+|	fp->idfcpt = fp->idfpt1;
+
 		move.b	6(A_FP),8(A_FP)
-*
-*	fp->idftmd |= I_ACTIVE;
-*
+
+|	fp->idftmd |= I_ACTIVE;
+
 		or.b	#2,7(A_FP)
-*
-*	fp->idftrf = trg;
-*
+
+|	fp->idftrf = trg;
+
 		move	TRG(A6),10(A_FP)
-*
-*	*(fpu + (long)FPU_TCV1) = srcval;
-*
-		move	SRCVAL(A6),$8(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TCV1) = srcval;
+
+		move	SRCVAL(A6),0x8(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TSF1) = mltval;
-*
-		move	MLTVAL(A6),$A(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TSF1) = mltval;
+
+		move	MLTVAL(A6),0xA(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TMNT) = fpmant;
-*
-		move	R_FPMANT,$14(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TMNT) = fpmant;
+
+		move	R_FPMANT,0x14(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TEXP) = fpexp;
-*
-		move	R_FPEXP,$16(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TEXP) = fpexp;
+
+		move	R_FPEXP,0x16(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-		.page
-*
-*	if (fp->idftmd & I_VNSUBN)
-*
+
+		.page
+
+|	if (fp->idftmd & I_VNSUBN)
+
 		btst	#3,7(A_FP)
 		beq	F04L169
-*
-*		*(fpu + (long)FPU_TNV1) = fpval;
-*
-		move	R_FPVAL,$1C(A_FPU)
+
+|		|(fpu + (long)FPU_TNV1) = fpval;
+
+		move	R_FPVAL,0x1C(A_FPU)
 		bra	F04L170
-*
-*	else
-*		*(fpu + (long)FPU_TNV0) = fpval;
-*
+
+|	else
+|		|(fpu + (long)FPU_TNV0) = fpval;
+
 F04L169:	move	R_FPVAL,2(A_FPU)
-*
-*	++octype;
-*
+
+|	++octype;
+
 F04L170:	add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TCTL) = fpctl;
-*
+
+|	|(fpu + (long)FPU_TCTL) = fpctl;
+
 		move	R_FPCTL,(A_FPU)
-*
-*	setipl(oldi);
-*
+
+|	setipl(oldi);
+
 		move	OLDI(A6),sr
-*
-		.page
-* ------------------------------------------------------------------------------
-* Start function 5 -- Loctn
-* ------------------------------------------------------------------------------
-*
-*    if (ip->idhfnc[5].idftmd & I_TM_KEY) {
-*
+
+		.page
+| ------------------------------------------------------------------------------
+| Start function 5 -- Loctn
+| ------------------------------------------------------------------------------
+
+|    if (ip->idhfnc[5].idftmd & I_TM_KEY) {
+
 FN05:		move.l	IP(A6),A0
 		move.b	153(A0),D0
@@ -2975,29 +2975,29 @@
 		btst	#0,D0
 		bne	FN05A
-*
+
 		jmp	FN06
-*
-*	vp = (vce << 4) + 4;
-*
+
+|	vp = (vce << 4) + 4;
+
 FN05A:		move	VCE(A6),D0
 		asl	#4,D0
 		add.w	#4,D0
 		move	D0,VP(A6)
-*
-*	fpu = io_fpu + FPU_OFNC + (vp << 4);
-*
+
+|	fpu = io_fpu + FPU_OFNC + (vp << 4);
+
 		asl	#5,D0
 		ext.l	D0
 		move.l	D0,A_FPU
-		add.l	#_io_fpu+$4000,A_FPU
-*
-*	fp = &ip->idhfnc[5];
-*
+		add.l	#_io_fpu+0x4000,A_FPU
+
+|	fp = &ip->idhfnc[5];
+
 		move.l	#60,A_FP
 		add.l	IP(A6),A_FP
 		add.l	#86,A_FP
-*
-*	pt = &ip->idhpnt[fp->idfpt1];
-*
+
+|	pt = &ip->idhpnt[fp->idfpt1];
+
 		clr.l	D0
 		move.b	6(A_FP),D0
@@ -3009,9 +3009,9 @@
 		add.l	#242,D0
 		move.l	D0,PT(A6)
-*
-		.page
-*
-*	srcnum = group | fp->idfsrc;
-*
+
+		.page
+
+|	srcnum = group | fp->idfsrc;
+
 		move.w	GROUP(A6),D0
 		ext.l	D0
@@ -3020,7 +3020,7 @@
 		or	D1,D0
 		move	D0,SRCNUM(A6)
-*
-*	vep = &valents[srcnum];
-*
+
+|	vep = &valents[srcnum];
+
 		add.l	D0,D0
 		move.l	D0,D1
@@ -3029,7 +3029,7 @@
 		add.l	#_valents,D0
 		move.l	D0,VEP(A6)
-*
-*	smp = vpsms[vp];
-*
+
+|	smp = vpsms[vp];
+
 		move	VP(A6),A0
 		add.l	A0,A0
@@ -3037,104 +3037,104 @@
 		add.l	#_vpsms,A0
 		move.l	(A0),A_SMP
-*
-*	if (srcnum NE smp->sm) {
-*
+
+|	if (srcnum NE smp->sm) {
+
 		clr	D0
 		move	10(A_SMP),D0
 		cmp	SRCNUM(A6),D0
 		beq	F05L113
-*
-*		(smp->prv)->nxt = smp->nxt;
-*
+
+|		(smp->prv)->nxt = smp->nxt;
+
 		move.l	4(A_SMP),A0
 		move.l	(A_SMP),(A0)
-*
-*		(smp->nxt)->prv = smp->prv;
-*
+
+|		(smp->nxt)->prv = smp->prv;
+
 		move.l	(A_SMP),A0
 		move.l	4(A_SMP),4(A0)
-*
-*		smp->prv = (struct sment *)vep;
-*
+
+|		smp->prv = (struct sment |)vep;
+
 		move.l	VEP(A6),4(A_SMP)
-*
-*		smp->nxt = vep->nxt;
-*
+
+|		smp->nxt = vep->nxt;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),(A_SMP)
-*
-*		(vep->nxt)->prv = smp;
-*
+
+|		(vep->nxt)->prv = smp;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),A0
 		move.l	A_SMP,4(A0)
-*
-*		vep->nxt = smp;
-*
+
+|		vep->nxt = smp;
+
 		move.l	VEP(A6),A0
 		move.l	A_SMP,(A0)
-*
-*		smp->sm = srcnum;
-*
+
+|		smp->sm = srcnum;
+
 		move	SRCNUM(A6),10(A_SMP)
-*
-*	}
-*
-*	mltval = fp->idfmlt;
-*
+
+|	}
+
+|	mltval = fp->idfmlt;
+
 F05L113:	move	2(A_FP),MLTVAL(A6)
-*
-		.page
-*
-*	switch (fp->idfsrc) {
-*
+
+		.page
+
+|	switch (fp->idfsrc) {
+
 		move.b	4(A_FP),D0
 		ext.w	d0
 		cmp	#10,D0
 		bhi	F05L122
-*
+
 		asl	#2,D0
 		lea	F05L123,A0
 		movea.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*	case SM_NONE:
-*		mltval = 0;
-*
+
+|	case SM_NONE:
+|		mltval = 0;
+
 F05L116:	clr	MLTVAL(A6)
-*
-*		tsrcval = 0;
-*
+
+|		tsrcval = 0;
+
 		clr	TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F05L114
-*
-*	case SM_RAND:
-*		tsrcval = xgetran(mltval);
-*
+
+|	case SM_RAND:
+|		tsrcval = xgetran(mltval);
+
 F05L117:	move	MLTVAL(A6),(sp)
 		jsr	_xgetran
 		move	D0,TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F05L114
-*
-*	case SM_PTCH:
-*		tsrcval = pch;
-*
+
+|	case SM_PTCH:
+|		tsrcval = pch;
+
 F05L118:	move	PCH(A6),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F05L114
-*
-		.page
-*
-*	case SM_FREQ:
-*		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|	case SM_FREQ:
+|		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
+
 F05L119:	move	PCH(A6),D0
 		asr	#7,D0
@@ -3144,57 +3144,57 @@
 		add.l	#_ptoftab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F05L114
-*
-*	case SM_KVEL:
-*		tsrcval = veltab[trg];
-*
+
+|	case SM_KVEL:
+|		tsrcval = veltab[trg];
+
 F05L120:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_veltab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F05L114
-*
-*	case SM_KPRS:
-*		tsrcval = prstab[trg];
-*
+
+|	case SM_KPRS:
+|		tsrcval = prstab[trg];
+
 F05L121:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_prstab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F05L114
-*
-*	default:
-*		tsrcval = vep->val;
-*
+
+|	default:
+|		tsrcval = vep->val;
+
 F05L122:	move.l	VEP(A6),A0
 		move	8(A0),TSRCVAL(A6)
-*
-*	}
-*
-		.page
-*
-*		srcval = tsrcval;
-*
+
+|	}
+
+		.page
+
+|		srcval = tsrcval;
+
 F05L114:	move	TSRCVAL(A6),SRCVAL(A6)
-*
-		.page
-*
-*	if (pt->ipvsrc) {
-*
+
+		.page
+
+|	if (pt->ipvsrc) {
+
 F05L124:	move.l	PT(A6),A0
 		tst.b	6(A0)
 		beq	F05L136
-*
-*		switch (pt->ipvsrc) {
-*
+
+|		switch (pt->ipvsrc) {
+
 		move.l	PT(A6),A0
 		move.b	6(A0),D0
@@ -3203,13 +3203,13 @@
 		cmp	#9,D0
 		bhi	F05L144
-*
+
 		asl	#2,D0
 		lea	F05L145,A0
 		move.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*		case SM_RAND:
-*			ltmp = xgetran(pt_>ipvmlt);
-*
+
+|		case SM_RAND:
+|			ltmp = xgetran(pt_>ipvmlt);
+
 F05L139:	move.l	PT(A6),A0
 		move	4(A0),(sp)
@@ -3217,24 +3217,24 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F05L137
-*
-*		case SM_PTCH:
-*			ltmp = pch;
-*
+
+|		case SM_PTCH:
+|			ltmp = pch;
+
 F05L140:	move	PCH(A6),A0
 		move.l	A0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F05L137
-*
-		.page
-*
-*		case SM_FREQ:
-*			ltmp = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|		case SM_FREQ:
+|			ltmp = ptoftab[(pch >> 7) & 0x00FF];
+
 F05L141:	move	PCH(A6),D0
 		asr	#7,D0
@@ -3246,12 +3246,12 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F05L137
-*
-*		case SM_KVEL:
-*			ltmp = veltab[trg];
-*
+
+|		case SM_KVEL:
+|			ltmp = veltab[trg];
+
 F05L142:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -3260,14 +3260,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F05L137
-*
-		.page
-*
-*		case SM_KPRS:
-*			ltmp = prstab[trg];
-*
+
+		.page
+
+|		case SM_KPRS:
+|			ltmp = prstab[trg];
+
 F05L143:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -3276,14 +3276,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F05L137
-*
-		.page
-*
-*		default:
-*			ltmp = valents[group | pt->ipvsrc].val;
-*
+
+		.page
+
+|		default:
+|			ltmp = valents[group | pt->ipvsrc].val;
+
 F05L144:	move.l	PT(A6),A0
 		clr.l	D0
@@ -3299,12 +3299,12 @@
 		move	8(A0,A1.l),D0
 		move.l	D0,LTMP(A6)
-*
-*		}
-*
-*
-		.page
-*
-*		ltmp = (ltmp * pt->ipvmlt) >> 15;
-*
+
+|		}
+
+
+		.page
+
+|		ltmp = (ltmp | pt->ipvmlt) >> 15;
+
 F05L137:	move.l	PT(A6),A0
 		move.w	4(A0),D0
@@ -3314,52 +3314,52 @@
 		asr.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		ltmp += (long)pt->ipval;
-*
+
+|		ltmp += (long)pt->ipval;
+
 		move.l	PT(A6),A0
 		move	2(A0),D0
 		ext.l	D0
 		add.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F05L146
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F05L147
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F05L146:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F05L147
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		tfpval = (short)ltmp;
-*
+
+|		tfpval = (short)ltmp;
+
 F05L147:	move.w	LTMP+2(A6),TFPVAL(A6)
 		bra	F05L149
-*
-*	} else {
-*
-*		tfpval = pt->ipval;
-*
+
+|	} else {
+
+|		tfpval = pt->ipval;
+
 F05L136:	move.l	PT(A6),A0
 		move	2(A0),TFPVAL(A6)
-*
-*	}
-*
-		.page
-*
-*	fpmant = (((long)pt->iptom & 0x0000FFF0L)
-*		* ((long)timemlt & 0x0000FFFFL)) >> 15;
-*
+
+|	}
+
+		.page
+
+|	fpmant = (((long)pt->iptom & 0x0000FFF0L)
+|		| ((long)timemlt & 0x0000FFFFL)) >> 15;
+
 F05L149:	move.l	PT(A6),A0
 		move.w	(A0),D0
 		move.w	D0,D2
-		andi.w	#$FFF0,D0
+		andi.w	#0xFFF0,D0
 		move.w	_timemlt,D1
 		muls	D1,D0
@@ -3367,49 +3367,49 @@
 		asr.l	D1,D0
 		move	D0,R_FPMANT
-*
-*	fpexp = expbit[pt->iptim & 0x000F];
-*
-		and	#$000F,D2
+
+|	fpexp = expbit[pt->iptim & 0x000F];
+
+		and	#0x000F,D2
 		move	D2,A0
 		add.l	A0,A0
 		add.l	#_expbit,A0
 		move	(A0),R_FPEXP
-*
-		.page
-*
-*		fp->idfpch = pch;
-*
+
+		.page
+
+|		fp->idfpch = pch;
+
 F05L163:	move	PCH(A6),(A_FP)
-*
-*		if (tfpval > VALMAX)
-*			tfpval = VALMAX;
-*		else if (tfpval < 0)
-*			tfpval = 0;
-*
+
+|		if (tfpval > VALMAX)
+|			tfpval = VALMAX;
+|		else if (tfpval < 0)
+|			tfpval = 0;
+
 		move.w	TFPVAL(A6),D0
-		cmp.w	#$7D00,D0
+		cmp.w	#0x7D00,D0
 		ble	F05L163B
-*
-		move.w	#$7D00,D0
+
+		move.w	#0x7D00,D0
 		bra	F05L163A
-		
+
 F05L163B:	tst.w	D0
 		bpl	F05L163A
-*
+
 		clr.w	D0
-*
-*#if	LOC_EOR
-*		fpval = (tfpval << 1) ^ 0x8000;
-*#endif
-*
+
+|#if	LOC_EOR
+|		fpval = (tfpval << 1) ^ 0x8000;
+|#endif
+
 		.ifne	LOC_EOR
 F05L163A:	add.w	D0,D0
-		eor.w	#$8000,D0
+		eor.w	#0x8000,D0
 		.endc
-*
-*#if	LOC_SUB
-*		fpval = ((tfpval >> 5) - 500) << 6;
-*#endif
-*
+
+|#if	LOC_SUB
+|		fpval = ((tfpval >> 5) - 500) << 6;
+|#endif
+
 		.ifne	LOC_SUB
 F05L163A:	asr.w	#5,D0
@@ -3417,115 +3417,115 @@
 		asl.w	#6,D0
 		.endc
-*
+
 		move.w	D0,R_FPVAL
-*
-		.page
-*
+
+		.page
+
 		move.b	5(A_FP),D0
 		ext.w	D0
 		sub.w	#1,D0
 		movea.l	PT(A6),A0
-*
-*	oldi = setipl(FPU_DI);
-*
+
+|	oldi = setipl(FPU_DI);
+
 		move	sr,OLDI(A6)
 		move	#FPU_DI,sr
-*
+
 F05L168:	clr.b	10(A0)
 		add.l	#12,a0
 		dbra	D0,F05L168
-*
-		.page
-*
-*	fp->idftmd ^= I_NVBITS;
-*
+
+		.page
+
+|	fp->idftmd ^= I_NVBITS;
+
 F05L165:	eor.b	#24,7(A_FP)
-*
-*	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
-*
+
+|	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
+
 		move.b	7(A_FP),R_FPCTL
 		and	#28,R_FPCTL
 		or	#3,R_FPCTL
-*
-*	fp->idfcpt = fp->idfpt1;
-*
+
+|	fp->idfcpt = fp->idfpt1;
+
 		move.b	6(A_FP),8(A_FP)
-*
-*	fp->idftmd |= I_ACTIVE;
-*
+
+|	fp->idftmd |= I_ACTIVE;
+
 		or.b	#2,7(A_FP)
-*
-*	fp->idftrf = trg;
-*
+
+|	fp->idftrf = trg;
+
 		move	TRG(A6),10(A_FP)
-*
-*	*(fpu + (long)FPU_TCV1) = srcval;
-*
-		move	SRCVAL(A6),$8(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TCV1) = srcval;
+
+		move	SRCVAL(A6),0x8(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TSF1) = mltval;
-*
-		move	MLTVAL(A6),$A(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TSF1) = mltval;
+
+		move	MLTVAL(A6),0xA(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TMNT) = fpmant;
-*
-		move	R_FPMANT,$14(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TMNT) = fpmant;
+
+		move	R_FPMANT,0x14(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TEXP) = fpexp;
-*
-		move	R_FPEXP,$16(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TEXP) = fpexp;
+
+		move	R_FPEXP,0x16(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-		.page
-*
-*	if (fp->idftmd & I_VNSUBN)
-*
+
+		.page
+
+|	if (fp->idftmd & I_VNSUBN)
+
 		btst	#3,7(A_FP)
 		beq	F05L169
-*
-*		*(fpu + (long)FPU_TNV1) = fpval;
-*
-		move	R_FPVAL,$1C(A_FPU)
+
+|		|(fpu + (long)FPU_TNV1) = fpval;
+
+		move	R_FPVAL,0x1C(A_FPU)
 		bra	F05L170
-*
-*	else
-*		*(fpu + (long)FPU_TNV0) = fpval;
-*
+
+|	else
+|		|(fpu + (long)FPU_TNV0) = fpval;
+
 F05L169:	move	R_FPVAL,2(A_FPU)
-*
-*	++octype;
-*
+
+|	++octype;
+
 F05L170:	add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TCTL) = fpctl;
-*
+
+|	|(fpu + (long)FPU_TCTL) = fpctl;
+
 		move	R_FPCTL,(A_FPU)
-*
-*	setipl(oldi);
-*
+
+|	setipl(oldi);
+
 		move	OLDI(A6),sr
-*
-		.page
-* ------------------------------------------------------------------------------
-* Start function 6 -- Ind 1
-* ------------------------------------------------------------------------------
-*
-*    if (ip->idhfnc[2].idftmd & I_TM_KEY) {
-*
+
+		.page
+| ------------------------------------------------------------------------------
+| Start function 6 -- Ind 1
+| ------------------------------------------------------------------------------
+
+|    if (ip->idhfnc[2].idftmd & I_TM_KEY) {
+
 FN06:		move.l	IP(A6),A0
 		move.b	165(A0),D0
@@ -3534,29 +3534,29 @@
 		btst	#0,D0
 		bne	FN06A
-*
+
 		jmp	FN07
-*
-*	vp = (vce << 4) + 9;
-*
+
+|	vp = (vce << 4) + 9;
+
 FN06A:		move	VCE(A6),D0
 		asl	#4,D0
 		add.w	#9,D0
 		move	D0,VP(A6)
-*
-*	fpu = io_fpu + FPU_OFNC + (vp << 4);
-*
+
+|	fpu = io_fpu + FPU_OFNC + (vp << 4);
+
 		asl	#5,D0
 		ext.l	D0
 		move.l	D0,A_FPU
-		add.l	#_io_fpu+$4000,A_FPU
-*
-*	fp = &ip->idhfnc[6];
-*
+		add.l	#_io_fpu+0x4000,A_FPU
+
+|	fp = &ip->idhfnc[6];
+
 		move.l	#72,A_FP
 		add.l	IP(A6),A_FP
 		add.l	#86,A_FP
-*
-*	pt = &ip->idhpnt[fp->idfpt1];
-*
+
+|	pt = &ip->idhpnt[fp->idfpt1];
+
 		clr.l	D0
 		move.b	6(A_FP),D0
@@ -3568,9 +3568,9 @@
 		add.l	#242,D0
 		move.l	D0,PT(A6)
-*
-		.page
-*
-*	srcnum = group | fp->idfsrc;
-*
+
+		.page
+
+|	srcnum = group | fp->idfsrc;
+
 		move.w	GROUP(A6),D0
 		ext.l	D0
@@ -3579,7 +3579,7 @@
 		or	D1,D0
 		move	D0,SRCNUM(A6)
-*
-*	vep = &valents[srcnum];
-*
+
+|	vep = &valents[srcnum];
+
 		add.l	D0,D0
 		move.l	D0,D1
@@ -3588,7 +3588,7 @@
 		add.l	#_valents,D0
 		move.l	D0,VEP(A6)
-*
-*	smp = vpsms[vp];
-*
+
+|	smp = vpsms[vp];
+
 		move	VP(A6),A0
 		add.l	A0,A0
@@ -3596,104 +3596,104 @@
 		add.l	#_vpsms,A0
 		move.l	(A0),A_SMP
-*
-*	if (srcnum NE smp->sm) {
-*
+
+|	if (srcnum NE smp->sm) {
+
 		clr	D0
 		move	10(A_SMP),D0
 		cmp	SRCNUM(A6),D0
 		beq	F06L113
-*
-*		(smp->prv)->nxt = smp->nxt;
-*
+
+|		(smp->prv)->nxt = smp->nxt;
+
 		move.l	4(A_SMP),A0
 		move.l	(A_SMP),(A0)
-*
-*		(smp->nxt)->prv = smp->prv;
-*
+
+|		(smp->nxt)->prv = smp->prv;
+
 		move.l	(A_SMP),A0
 		move.l	4(A_SMP),4(A0)
-*
-*		smp->prv = (struct sment *)vep;
-*
+
+|		smp->prv = (struct sment |)vep;
+
 		move.l	VEP(A6),4(A_SMP)
-*
-*		smp->nxt = vep->nxt;
-*
+
+|		smp->nxt = vep->nxt;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),(A_SMP)
-*
-*		(vep->nxt)->prv = smp;
-*
+
+|		(vep->nxt)->prv = smp;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),A0
 		move.l	A_SMP,4(A0)
-*
-*		vep->nxt = smp;
-*
+
+|		vep->nxt = smp;
+
 		move.l	VEP(A6),A0
 		move.l	A_SMP,(A0)
-*
-*		smp->sm = srcnum;
-*
+
+|		smp->sm = srcnum;
+
 		move	SRCNUM(A6),10(A_SMP)
-*
-*	}
-*
-*	mltval = fp->idfmlt;
-*
+
+|	}
+
+|	mltval = fp->idfmlt;
+
 F06L113:	move	2(A_FP),MLTVAL(A6)
-*
-		.page
-*
-*	switch (fp->idfsrc) {
-*
+
+		.page
+
+|	switch (fp->idfsrc) {
+
 		move.b	4(A_FP),D0
 		ext.w	d0
 		cmp	#10,D0
 		bhi	F06L122
-*
+
 		asl	#2,D0
 		lea	F06L123,A0
 		movea.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*	case SM_NONE:
-*		mltval = 0;
-*
+
+|	case SM_NONE:
+|		mltval = 0;
+
 F06L116:	clr	MLTVAL(A6)
-*
-*		tsrcval = 0;
-*
+
+|		tsrcval = 0;
+
 		clr	TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F06L114
-*
-*	case SM_RAND:
-*		tsrcval = xgetran(mltval);
-*
+
+|	case SM_RAND:
+|		tsrcval = xgetran(mltval);
+
 F06L117:	move	MLTVAL(A6),(sp)
 		jsr	_xgetran
 		move	D0,TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F06L114
-*
-*	case SM_PTCH:
-*		tsrcval = pch;
-*
+
+|	case SM_PTCH:
+|		tsrcval = pch;
+
 F06L118:	move	PCH(A6),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F06L114
-*
-		.page
-*
-*	case SM_FREQ:
-*		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|	case SM_FREQ:
+|		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
+
 F06L119:	move	PCH(A6),D0
 		asr	#7,D0
@@ -3703,57 +3703,57 @@
 		add.l	#_ptoftab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F06L114
-*
-*	case SM_KVEL:
-*		tsrcval = veltab[trg];
-*
+
+|	case SM_KVEL:
+|		tsrcval = veltab[trg];
+
 F06L120:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_veltab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F06L114
-*
-*	case SM_KPRS:
-*		tsrcval = prstab[trg];
-*
+
+|	case SM_KPRS:
+|		tsrcval = prstab[trg];
+
 F06L121:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_prstab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F06L114
-*
-*	default:
-*		tsrcval = vep->val;
-*
+
+|	default:
+|		tsrcval = vep->val;
+
 F06L122:	move.l	VEP(A6),A0
 		move	8(A0),TSRCVAL(A6)
-*
-*	}
-*
-		.page
-*
-*		srcval = tsrcval;
-*
+
+|	}
+
+		.page
+
+|		srcval = tsrcval;
+
 F06L114:	move	TSRCVAL(A6),SRCVAL(A6)
-*
-		.page
-*
-*	if (pt->ipvsrc) {
-*
+
+		.page
+
+|	if (pt->ipvsrc) {
+
 F06L124:	move.l	PT(A6),A0
 		tst.b	6(A0)
 		beq	F06L136
-*
-*		switch (pt->ipvsrc) {
-*
+
+|		switch (pt->ipvsrc) {
+
 		move.l	PT(A6),A0
 		move.b	6(A0),D0
@@ -3762,13 +3762,13 @@
 		cmp	#9,D0
 		bhi	F06L144
-*
+
 		asl	#2,D0
 		lea	F06L145,A0
 		move.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*		case SM_RAND:
-*			ltmp = xgetran(pt_>ipvmlt);
-*
+
+|		case SM_RAND:
+|			ltmp = xgetran(pt_>ipvmlt);
+
 F06L139:	move.l	PT(A6),A0
 		move	4(A0),(sp)
@@ -3776,24 +3776,24 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F06L137
-*
-*		case SM_PTCH:
-*			ltmp = pch;
-*
+
+|		case SM_PTCH:
+|			ltmp = pch;
+
 F06L140:	move	PCH(A6),A0
 		move.l	A0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F06L137
-*
-		.page
-*
-*		case SM_FREQ:
-*			ltmp = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|		case SM_FREQ:
+|			ltmp = ptoftab[(pch >> 7) & 0x00FF];
+
 F06L141:	move	PCH(A6),D0
 		asr	#7,D0
@@ -3805,12 +3805,12 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F06L137
-*
-*		case SM_KVEL:
-*			ltmp = veltab[trg];
-*
+
+|		case SM_KVEL:
+|			ltmp = veltab[trg];
+
 F06L142:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -3819,14 +3819,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F06L137
-*
-		.page
-*
-*		case SM_KPRS:
-*			ltmp = prstab[trg];
-*
+
+		.page
+
+|		case SM_KPRS:
+|			ltmp = prstab[trg];
+
 F06L143:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -3835,14 +3835,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F06L137
-*
-		.page
-*
-*		default:
-*			ltmp = valents[group | pt->ipvsrc].val;
-*
+
+		.page
+
+|		default:
+|			ltmp = valents[group | pt->ipvsrc].val;
+
 F06L144:	move.l	PT(A6),A0
 		clr.l	D0
@@ -3858,12 +3858,12 @@
 		move	8(A0,A1.l),D0
 		move.l	D0,LTMP(A6)
-*
-*		}
-*
-*
-		.page
-*
-*		ltmp = (ltmp * pt->ipvmlt) >> 15;
-*
+
+|		}
+
+
+		.page
+
+|		ltmp = (ltmp | pt->ipvmlt) >> 15;
+
 F06L137:	move.l	PT(A6),A0
 		move.w	4(A0),D0
@@ -3873,52 +3873,52 @@
 		asr.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		ltmp += (long)pt->ipval;
-*
+
+|		ltmp += (long)pt->ipval;
+
 		move.l	PT(A6),A0
 		move	2(A0),D0
 		ext.l	D0
 		add.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F06L146
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F06L147
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F06L146:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F06L147
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		tfpval = (short)ltmp;
-*
+
+|		tfpval = (short)ltmp;
+
 F06L147:	move.w	LTMP+2(A6),TFPVAL(A6)
 		bra	F06L149
-*
-*	} else {
-*
-*		tfpval = pt->ipval;
-*
+
+|	} else {
+
+|		tfpval = pt->ipval;
+
 F06L136:	move.l	PT(A6),A0
 		move	2(A0),TFPVAL(A6)
-*
-*	}
-*
-		.page
-*
-*	fpmant = (((long)pt->iptom & 0x0000FFF0L)
-*		* ((long)timemlt & 0x0000FFFFL)) >> 15;
-*
+
+|	}
+
+		.page
+
+|	fpmant = (((long)pt->iptom & 0x0000FFF0L)
+|		| ((long)timemlt & 0x0000FFFFL)) >> 15;
+
 F06L149:	move.l	PT(A6),A0
 		move.w	(A0),D0
 		move.w	D0,D2
-		andi.w	#$FFF0,D0
+		andi.w	#0xFFF0,D0
 		move.w	_timemlt,D1
 		muls	D1,D0
@@ -3926,131 +3926,131 @@
 		asr.l	D1,D0
 		move	D0,R_FPMANT
-*
-*	fpexp = expbit[pt->iptim & 0x000F];
-*
-		and	#$000F,D2
+
+|	fpexp = expbit[pt->iptim & 0x000F];
+
+		and	#0x000F,D2
 		move	D2,A0
 		add.l	A0,A0
 		add.l	#_expbit,A0
 		move	(A0),R_FPEXP
-*
-		.page
-*
-*		fp->idfpch = pch;
-*
+
+		.page
+
+|		fp->idfpch = pch;
+
 F06L163:	move	PCH(A6),(A_FP)
-*
-*		fpval = tfpval;
-*
+
+|		fpval = tfpval;
+
 		move	TFPVAL(A6),R_FPVAL
-*
-		.page
-*
+
+		.page
+
 		move.b	5(A_FP),D0
 		ext.w	D0
 		sub.w	#1,D0
 		movea.l	PT(A6),A0
-*
-*	oldi = setipl(FPU_DI);
-*
+
+|	oldi = setipl(FPU_DI);
+
 		move	sr,OLDI(A6)
 		move	#FPU_DI,sr
-*
+
 F06L168:	clr.b	10(A0)
 		add.l	#12,a0
 		dbra	D0,F06L168
-*
-		.page
-*
-*	fp->idftmd ^= I_NVBITS;
-*
+
+		.page
+
+|	fp->idftmd ^= I_NVBITS;
+
 F06L165:	eor.b	#24,7(A_FP)
-*
-*	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
-*
+
+|	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
+
 		move.b	7(A_FP),R_FPCTL
 		and	#28,R_FPCTL
 		or	#3,R_FPCTL
-*
-*	fp->idfcpt = fp->idfpt1;
-*
+
+|	fp->idfcpt = fp->idfpt1;
+
 		move.b	6(A_FP),8(A_FP)
-*
-*	fp->idftmd |= I_ACTIVE;
-*
+
+|	fp->idftmd |= I_ACTIVE;
+
 		or.b	#2,7(A_FP)
-*
-*	fp->idftrf = trg;
-*
+
+|	fp->idftrf = trg;
+
 		move	TRG(A6),10(A_FP)
-*
-*	*(fpu + (long)FPU_TCV1) = srcval;
-*
-		move	SRCVAL(A6),$8(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TCV1) = srcval;
+
+		move	SRCVAL(A6),0x8(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TSF1) = mltval;
-*
-		move	MLTVAL(A6),$A(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TSF1) = mltval;
+
+		move	MLTVAL(A6),0xA(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TMNT) = fpmant;
-*
-		move	R_FPMANT,$14(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TMNT) = fpmant;
+
+		move	R_FPMANT,0x14(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TEXP) = fpexp;
-*
-		move	R_FPEXP,$16(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TEXP) = fpexp;
+
+		move	R_FPEXP,0x16(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-		.page
-*
-*	if (fp->idftmd & I_VNSUBN)
-*
+
+		.page
+
+|	if (fp->idftmd & I_VNSUBN)
+
 		btst	#3,7(A_FP)
 		beq	F06L169
-*
-*		*(fpu + (long)FPU_TNV1) = fpval;
-*
-		move	R_FPVAL,$1C(A_FPU)
+
+|		|(fpu + (long)FPU_TNV1) = fpval;
+
+		move	R_FPVAL,0x1C(A_FPU)
 		bra	F06L170
-*
-*	else
-*		*(fpu + (long)FPU_TNV0) = fpval;
-*
+
+|	else
+|		|(fpu + (long)FPU_TNV0) = fpval;
+
 F06L169:	move	R_FPVAL,2(A_FPU)
-*
-*	++octype;
-*
+
+|	++octype;
+
 F06L170:	add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TCTL) = fpctl;
-*
+
+|	|(fpu + (long)FPU_TCTL) = fpctl;
+
 		move	R_FPCTL,(A_FPU)
-*
-*	setipl(oldi);
-*
+
+|	setipl(oldi);
+
 		move	OLDI(A6),sr
-*
-		.page
-* ------------------------------------------------------------------------------
-* Start function 7 -- Ind 2
-* ------------------------------------------------------------------------------
-*
-*    if (ip->idhfnc[7].idftmd & I_TM_KEY) {
-*
+
+		.page
+| ------------------------------------------------------------------------------
+| Start function 7 -- Ind 2
+| ------------------------------------------------------------------------------
+
+|    if (ip->idhfnc[7].idftmd & I_TM_KEY) {
+
 FN07:		move.l	IP(A6),A0
 		move.b	177(A0),D0
@@ -4059,29 +4059,29 @@
 		btst	#0,D0
 		bne	FN07A
-*
+
 		jmp	FN08
-*
-*	vp = (vce << 4) + 11;
-*
+
+|	vp = (vce << 4) + 11;
+
 FN07A:		move	VCE(A6),D0
 		asl	#4,D0
 		add.w	#11,D0
 		move	D0,VP(A6)
-*
-*	fpu = io_fpu + FPU_OFNC + (vp << 4);
-*
+
+|	fpu = io_fpu + FPU_OFNC + (vp << 4);
+
 		asl	#5,D0
 		ext.l	D0
 		move.l	D0,A_FPU
-		add.l	#_io_fpu+$4000,A_FPU
-*
-*	fp = &ip->idhfnc[7];
-*
+		add.l	#_io_fpu+0x4000,A_FPU
+
+|	fp = &ip->idhfnc[7];
+
 		move.l	#84,A_FP
 		add.l	IP(A6),A_FP
 		add.l	#86,A_FP
-*
-*	pt = &ip->idhpnt[fp->idfpt1];
-*
+
+|	pt = &ip->idhpnt[fp->idfpt1];
+
 		clr.l	D0
 		move.b	6(A_FP),D0
@@ -4093,9 +4093,9 @@
 		add.l	#242,D0
 		move.l	D0,PT(A6)
-*
-		.page
-*
-*	srcnum = group | fp->idfsrc;
-*
+
+		.page
+
+|	srcnum = group | fp->idfsrc;
+
 		move.w	GROUP(A6),D0
 		ext.l	D0
@@ -4104,7 +4104,7 @@
 		or	D1,D0
 		move	D0,SRCNUM(A6)
-*
-*	vep = &valents[srcnum];
-*
+
+|	vep = &valents[srcnum];
+
 		add.l	D0,D0
 		move.l	D0,D1
@@ -4113,7 +4113,7 @@
 		add.l	#_valents,D0
 		move.l	D0,VEP(A6)
-*
-*	smp = vpsms[vp];
-*
+
+|	smp = vpsms[vp];
+
 		move	VP(A6),A0
 		add.l	A0,A0
@@ -4121,104 +4121,104 @@
 		add.l	#_vpsms,A0
 		move.l	(A0),A_SMP
-*
-*	if (srcnum NE smp->sm) {
-*
+
+|	if (srcnum NE smp->sm) {
+
 		clr	D0
 		move	10(A_SMP),D0
 		cmp	SRCNUM(A6),D0
 		beq	F07L113
-*
-*		(smp->prv)->nxt = smp->nxt;
-*
+
+|		(smp->prv)->nxt = smp->nxt;
+
 		move.l	4(A_SMP),A0
 		move.l	(A_SMP),(A0)
-*
-*		(smp->nxt)->prv = smp->prv;
-*
+
+|		(smp->nxt)->prv = smp->prv;
+
 		move.l	(A_SMP),A0
 		move.l	4(A_SMP),4(A0)
-*
-*		smp->prv = (struct sment *)vep;
-*
+
+|		smp->prv = (struct sment |)vep;
+
 		move.l	VEP(A6),4(A_SMP)
-*
-*		smp->nxt = vep->nxt;
-*
+
+|		smp->nxt = vep->nxt;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),(A_SMP)
-*
-*		(vep->nxt)->prv = smp;
-*
+
+|		(vep->nxt)->prv = smp;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),A0
 		move.l	A_SMP,4(A0)
-*
-*		vep->nxt = smp;
-*
+
+|		vep->nxt = smp;
+
 		move.l	VEP(A6),A0
 		move.l	A_SMP,(A0)
-*
-*		smp->sm = srcnum;
-*
+
+|		smp->sm = srcnum;
+
 		move	SRCNUM(A6),10(A_SMP)
-*
-*	}
-*
-*	mltval = fp->idfmlt;
-*
+
+|	}
+
+|	mltval = fp->idfmlt;
+
 F07L113:	move	2(A_FP),MLTVAL(A6)
-*
-		.page
-*
-*	switch (fp->idfsrc) {
-*
+
+		.page
+
+|	switch (fp->idfsrc) {
+
 		move.b	4(A_FP),D0
 		ext.w	d0
 		cmp	#10,D0
 		bhi	F07L122
-*
+
 		asl	#2,D0
 		lea	F07L123,A0
 		movea.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*	case SM_NONE:
-*		mltval = 0;
-*
+
+|	case SM_NONE:
+|		mltval = 0;
+
 F07L116:	clr	MLTVAL(A6)
-*
-*		tsrcval = 0;
-*
+
+|		tsrcval = 0;
+
 		clr	TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F07L114
-*
-*	case SM_RAND:
-*		tsrcval = xgetran(mltval);
-*
+
+|	case SM_RAND:
+|		tsrcval = xgetran(mltval);
+
 F07L117:	move	MLTVAL(A6),(sp)
 		jsr	_xgetran
 		move	D0,TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F07L114
-*
-*	case SM_PTCH:
-*		tsrcval = pch;
-*
+
+|	case SM_PTCH:
+|		tsrcval = pch;
+
 F07L118:	move	PCH(A6),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F07L114
-*
-		.page
-*
-*	case SM_FREQ:
-*		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|	case SM_FREQ:
+|		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
+
 F07L119:	move	PCH(A6),D0
 		asr	#7,D0
@@ -4228,57 +4228,57 @@
 		add.l	#_ptoftab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F07L114
-*
-*	case SM_KVEL:
-*		tsrcval = veltab[trg];
-*
+
+|	case SM_KVEL:
+|		tsrcval = veltab[trg];
+
 F07L120:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_veltab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F07L114
-*
-*	case SM_KPRS:
-*		tsrcval = prstab[trg];
-*
+
+|	case SM_KPRS:
+|		tsrcval = prstab[trg];
+
 F07L121:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_prstab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F07L114
-*
-*	default:
-*		tsrcval = vep->val;
-*
+
+|	default:
+|		tsrcval = vep->val;
+
 F07L122:	move.l	VEP(A6),A0
 		move	8(A0),TSRCVAL(A6)
-*
-*	}
-*
-		.page
-*
-*		srcval = tsrcval;
-*
+
+|	}
+
+		.page
+
+|		srcval = tsrcval;
+
 F07L114:	move	TSRCVAL(A6),SRCVAL(A6)
-*
-		.page
-*
-*	if (pt->ipvsrc) {
-*
+
+		.page
+
+|	if (pt->ipvsrc) {
+
 F07L124:	move.l	PT(A6),A0
 		tst.b	6(A0)
 		beq	F07L136
-*
-*		switch (pt->ipvsrc) {
-*
+
+|		switch (pt->ipvsrc) {
+
 		move.l	PT(A6),A0
 		move.b	6(A0),D0
@@ -4287,13 +4287,13 @@
 		cmp	#9,D0
 		bhi	F07L144
-*
+
 		asl	#2,D0
 		lea	F07L145,A0
 		move.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*		case SM_RAND:
-*			ltmp = xgetran(pt_>ipvmlt);
-*
+
+|		case SM_RAND:
+|			ltmp = xgetran(pt_>ipvmlt);
+
 F07L139:	move.l	PT(A6),A0
 		move	4(A0),(sp)
@@ -4301,24 +4301,24 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F07L137
-*
-*		case SM_PTCH:
-*			ltmp = pch;
-*
+
+|		case SM_PTCH:
+|			ltmp = pch;
+
 F07L140:	move	PCH(A6),A0
 		move.l	A0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F07L137
-*
-		.page
-*
-*		case SM_FREQ:
-*			ltmp = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|		case SM_FREQ:
+|			ltmp = ptoftab[(pch >> 7) & 0x00FF];
+
 F07L141:	move	PCH(A6),D0
 		asr	#7,D0
@@ -4330,12 +4330,12 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F07L137
-*
-*		case SM_KVEL:
-*			ltmp = veltab[trg];
-*
+
+|		case SM_KVEL:
+|			ltmp = veltab[trg];
+
 F07L142:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -4344,14 +4344,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F07L137
-*
-		.page
-*
-*		case SM_KPRS:
-*			ltmp = prstab[trg];
-*
+
+		.page
+
+|		case SM_KPRS:
+|			ltmp = prstab[trg];
+
 F07L143:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -4360,14 +4360,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F07L137
-*
-		.page
-*
-*		default:
-*			ltmp = valents[group | pt->ipvsrc].val;
-*
+
+		.page
+
+|		default:
+|			ltmp = valents[group | pt->ipvsrc].val;
+
 F07L144:	move.l	PT(A6),A0
 		clr.l	D0
@@ -4383,12 +4383,12 @@
 		move	8(A0,A1.l),D0
 		move.l	D0,LTMP(A6)
-*
-*		}
-*
-*
-		.page
-*
-*		ltmp = (ltmp * pt->ipvmlt) >> 15;
-*
+
+|		}
+
+
+		.page
+
+|		ltmp = (ltmp | pt->ipvmlt) >> 15;
+
 F07L137:	move.l	PT(A6),A0
 		move.w	4(A0),D0
@@ -4398,52 +4398,52 @@
 		asr.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		ltmp += (long)pt->ipval;
-*
+
+|		ltmp += (long)pt->ipval;
+
 		move.l	PT(A6),A0
 		move	2(A0),D0
 		ext.l	D0
 		add.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F07L146
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F07L147
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F07L146:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F07L147
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		tfpval = (short)ltmp;
-*
+
+|		tfpval = (short)ltmp;
+
 F07L147:	move.w	LTMP+2(A6),TFPVAL(A6)
 		bra	F07L149
-*
-*	} else {
-*
-*		tfpval = pt->ipval;
-*
+
+|	} else {
+
+|		tfpval = pt->ipval;
+
 F07L136:	move.l	PT(A6),A0
 		move	2(A0),TFPVAL(A6)
-*
-*	}
-*
-		.page
-*
-*	fpmant = (((long)pt->iptom & 0x0000FFF0L)
-*		* ((long)timemlt & 0x0000FFFFL)) >> 15;
-*
+
+|	}
+
+		.page
+
+|	fpmant = (((long)pt->iptom & 0x0000FFF0L)
+|		| ((long)timemlt & 0x0000FFFFL)) >> 15;
+
 F07L149:	move.l	PT(A6),A0
 		move.w	(A0),D0
 		move.w	D0,D2
-		andi.w	#$FFF0,D0
+		andi.w	#0xFFF0,D0
 		move.w	_timemlt,D1
 		muls	D1,D0
@@ -4451,131 +4451,131 @@
 		asr.l	D1,D0
 		move	D0,R_FPMANT
-*
-*	fpexp = expbit[pt->iptim & 0x000F];
-*
-		and	#$000F,D2
+
+|	fpexp = expbit[pt->iptim & 0x000F];
+
+		and	#0x000F,D2
 		move	D2,A0
 		add.l	A0,A0
 		add.l	#_expbit,A0
 		move	(A0),R_FPEXP
-*
-		.page
-*
-*		fp->idfpch = pch;
-*
+
+		.page
+
+|		fp->idfpch = pch;
+
 F07L163:	move	PCH(A6),(A_FP)
-*
-*		fpval = tfpval;
-*
+
+|		fpval = tfpval;
+
 		move	TFPVAL(A6),R_FPVAL
-*
-		.page
-*
+
+		.page
+
 		move.b	5(A_FP),D0
 		ext.w	D0
 		sub.w	#1,D0
 		movea.l	PT(A6),A0
-*
-*	oldi = setipl(FPU_DI);
-*
+
+|	oldi = setipl(FPU_DI);
+
 		move	sr,OLDI(A6)
 		move	#FPU_DI,sr
-*
+
 F07L168:	clr.b	10(A0)
 		add.l	#12,a0
 		dbra	D0,F07L168
-*
-		.page
-*
-*	fp->idftmd ^= I_NVBITS;
-*
+
+		.page
+
+|	fp->idftmd ^= I_NVBITS;
+
 F07L165:	eor.b	#24,7(A_FP)
-*
-*	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
-*
+
+|	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
+
 		move.b	7(A_FP),R_FPCTL
 		and	#28,R_FPCTL
 		or	#3,R_FPCTL
-*
-*	fp->idfcpt = fp->idfpt1;
-*
+
+|	fp->idfcpt = fp->idfpt1;
+
 		move.b	6(A_FP),8(A_FP)
-*
-*	fp->idftmd |= I_ACTIVE;
-*
+
+|	fp->idftmd |= I_ACTIVE;
+
 		or.b	#2,7(A_FP)
-*
-*	fp->idftrf = trg;
-*
+
+|	fp->idftrf = trg;
+
 		move	TRG(A6),10(A_FP)
-*
-*	*(fpu + (long)FPU_TCV1) = srcval;
-*
-		move	SRCVAL(A6),$8(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TCV1) = srcval;
+
+		move	SRCVAL(A6),0x8(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TSF1) = mltval;
-*
-		move	MLTVAL(A6),$A(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TSF1) = mltval;
+
+		move	MLTVAL(A6),0xA(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TMNT) = fpmant;
-*
-		move	R_FPMANT,$14(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TMNT) = fpmant;
+
+		move	R_FPMANT,0x14(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TEXP) = fpexp;
-*
-		move	R_FPEXP,$16(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TEXP) = fpexp;
+
+		move	R_FPEXP,0x16(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-		.page
-*
-*	if (fp->idftmd & I_VNSUBN)
-*
+
+		.page
+
+|	if (fp->idftmd & I_VNSUBN)
+
 		btst	#3,7(A_FP)
 		beq	F07L169
-*
-*		*(fpu + (long)FPU_TNV1) = fpval;
-*
-		move	R_FPVAL,$1C(A_FPU)
+
+|		|(fpu + (long)FPU_TNV1) = fpval;
+
+		move	R_FPVAL,0x1C(A_FPU)
 		bra	F07L170
-*
-*	else
-*		*(fpu + (long)FPU_TNV0) = fpval;
-*
+
+|	else
+|		|(fpu + (long)FPU_TNV0) = fpval;
+
 F07L169:	move	R_FPVAL,2(A_FPU)
-*
-*	++octype;
-*
+
+|	++octype;
+
 F07L170:	add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TCTL) = fpctl;
-*
+
+|	|(fpu + (long)FPU_TCTL) = fpctl;
+
 		move	R_FPCTL,(A_FPU)
-*
-*	setipl(oldi);
-*
+
+|	setipl(oldi);
+
 		move	OLDI(A6),sr
-*
-		.page
-* ------------------------------------------------------------------------------
-* Start function 8 -- Ind 3
-* ------------------------------------------------------------------------------
-*
-*    if (ip->idhfnc[8].idftmd & I_TM_KEY) {
-*
+
+		.page
+| ------------------------------------------------------------------------------
+| Start function 8 -- Ind 3
+| ------------------------------------------------------------------------------
+
+|    if (ip->idhfnc[8].idftmd & I_TM_KEY) {
+
 FN08:		move.l	IP(A6),A0
 		move.b	189(A0),D0
@@ -4584,29 +4584,29 @@
 		btst	#0,D0
 		bne	FN08A
-*
+
 		jmp	FN09
-*
-*	vp = (vce << 4) + 12;
-*
+
+|	vp = (vce << 4) + 12;
+
 FN08A:		move	VCE(A6),D0
 		asl	#4,D0
 		add.w	#12,D0
 		move	D0,VP(A6)
-*
-*	fpu = io_fpu + FPU_OFNC + (vp << 4);
-*
+
+|	fpu = io_fpu + FPU_OFNC + (vp << 4);
+
 		asl	#5,D0
 		ext.l	D0
 		move.l	D0,A_FPU
-		add.l	#_io_fpu+$4000,A_FPU
-*
-*	fp = &ip->idhfnc[8];
-*
+		add.l	#_io_fpu+0x4000,A_FPU
+
+|	fp = &ip->idhfnc[8];
+
 		move.l	#96,A_FP
 		add.l	IP(A6),A_FP
 		add.l	#86,A_FP
-*
-*	pt = &ip->idhpnt[fp->idfpt1];
-*
+
+|	pt = &ip->idhpnt[fp->idfpt1];
+
 		clr.l	D0
 		move.b	6(A_FP),D0
@@ -4618,9 +4618,9 @@
 		add.l	#242,D0
 		move.l	D0,PT(A6)
-*
-		.page
-*
-*	srcnum = group | fp->idfsrc;
-*
+
+		.page
+
+|	srcnum = group | fp->idfsrc;
+
 		move.w	GROUP(A6),D0
 		ext.l	D0
@@ -4629,7 +4629,7 @@
 		or	D1,D0
 		move	D0,SRCNUM(A6)
-*
-*	vep = &valents[srcnum];
-*
+
+|	vep = &valents[srcnum];
+
 		add.l	D0,D0
 		move.l	D0,D1
@@ -4638,7 +4638,7 @@
 		add.l	#_valents,D0
 		move.l	D0,VEP(A6)
-*
-*	smp = vpsms[vp];
-*
+
+|	smp = vpsms[vp];
+
 		move	VP(A6),A0
 		add.l	A0,A0
@@ -4646,104 +4646,104 @@
 		add.l	#_vpsms,A0
 		move.l	(A0),A_SMP
-*
-*	if (srcnum NE smp->sm) {
-*
+
+|	if (srcnum NE smp->sm) {
+
 		clr	D0
 		move	10(A_SMP),D0
 		cmp	SRCNUM(A6),D0
 		beq	F08L113
-*
-*		(smp->prv)->nxt = smp->nxt;
-*
+
+|		(smp->prv)->nxt = smp->nxt;
+
 		move.l	4(A_SMP),A0
 		move.l	(A_SMP),(A0)
-*
-*		(smp->nxt)->prv = smp->prv;
-*
+
+|		(smp->nxt)->prv = smp->prv;
+
 		move.l	(A_SMP),A0
 		move.l	4(A_SMP),4(A0)
-*
-*		smp->prv = (struct sment *)vep;
-*
+
+|		smp->prv = (struct sment |)vep;
+
 		move.l	VEP(A6),4(A_SMP)
-*
-*		smp->nxt = vep->nxt;
-*
+
+|		smp->nxt = vep->nxt;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),(A_SMP)
-*
-*		(vep->nxt)->prv = smp;
-*
+
+|		(vep->nxt)->prv = smp;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),A0
 		move.l	A_SMP,4(A0)
-*
-*		vep->nxt = smp;
-*
+
+|		vep->nxt = smp;
+
 		move.l	VEP(A6),A0
 		move.l	A_SMP,(A0)
-*
-*		smp->sm = srcnum;
-*
+
+|		smp->sm = srcnum;
+
 		move	SRCNUM(A6),10(A_SMP)
-*
-*	}
-*
-*	mltval = fp->idfmlt;
-*
+
+|	}
+
+|	mltval = fp->idfmlt;
+
 F08L113:	move	2(A_FP),MLTVAL(A6)
-*
-		.page
-*
-*	switch (fp->idfsrc) {
-*
+
+		.page
+
+|	switch (fp->idfsrc) {
+
 		move.b	4(A_FP),D0
 		ext.w	d0
 		cmp	#10,D0
 		bhi	F08L122
-*
+
 		asl	#2,D0
 		lea	F08L123,A0
 		movea.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*	case SM_NONE:
-*		mltval = 0;
-*
+
+|	case SM_NONE:
+|		mltval = 0;
+
 F08L116:	clr	MLTVAL(A6)
-*
-*		tsrcval = 0;
-*
+
+|		tsrcval = 0;
+
 		clr	TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F08L114
-*
-*	case SM_RAND:
-*		tsrcval = xgetran(mltval);
-*
+
+|	case SM_RAND:
+|		tsrcval = xgetran(mltval);
+
 F08L117:	move	MLTVAL(A6),(sp)
 		jsr	_xgetran
 		move	D0,TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F08L114
-*
-*	case SM_PTCH:
-*		tsrcval = pch;
-*
+
+|	case SM_PTCH:
+|		tsrcval = pch;
+
 F08L118:	move	PCH(A6),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F08L114
-*
-		.page
-*
-*	case SM_FREQ:
-*		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|	case SM_FREQ:
+|		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
+
 F08L119:	move	PCH(A6),D0
 		asr	#7,D0
@@ -4753,57 +4753,57 @@
 		add.l	#_ptoftab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F08L114
-*
-*	case SM_KVEL:
-*		tsrcval = veltab[trg];
-*
+
+|	case SM_KVEL:
+|		tsrcval = veltab[trg];
+
 F08L120:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_veltab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F08L114
-*
-*	case SM_KPRS:
-*		tsrcval = prstab[trg];
-*
+
+|	case SM_KPRS:
+|		tsrcval = prstab[trg];
+
 F08L121:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_prstab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F08L114
-*
-*	default:
-*		tsrcval = vep->val;
-*
+
+|	default:
+|		tsrcval = vep->val;
+
 F08L122:	move.l	VEP(A6),A0
 		move	8(A0),TSRCVAL(A6)
-*
-*	}
-*
-		.page
-*
-*		srcval = tsrcval;
-*
+
+|	}
+
+		.page
+
+|		srcval = tsrcval;
+
 F08L114:	move	TSRCVAL(A6),SRCVAL(A6)
-*
-		.page
-*
-*	if (pt->ipvsrc) {
-*
+
+		.page
+
+|	if (pt->ipvsrc) {
+
 F08L124:	move.l	PT(A6),A0
 		tst.b	6(A0)
 		beq	F08L136
-*
-*		switch (pt->ipvsrc) {
-*
+
+|		switch (pt->ipvsrc) {
+
 		move.l	PT(A6),A0
 		move.b	6(A0),D0
@@ -4812,13 +4812,13 @@
 		cmp	#9,D0
 		bhi	F08L144
-*
+
 		asl	#2,D0
 		lea	F08L145,A0
 		move.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*		case SM_RAND:
-*			ltmp = xgetran(pt_>ipvmlt);
-*
+
+|		case SM_RAND:
+|			ltmp = xgetran(pt_>ipvmlt);
+
 F08L139:	move.l	PT(A6),A0
 		move	4(A0),(sp)
@@ -4826,24 +4826,24 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F08L137
-*
-*		case SM_PTCH:
-*			ltmp = pch;
-*
+
+|		case SM_PTCH:
+|			ltmp = pch;
+
 F08L140:	move	PCH(A6),A0
 		move.l	A0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F08L137
-*
-		.page
-*
-*		case SM_FREQ:
-*			ltmp = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|		case SM_FREQ:
+|			ltmp = ptoftab[(pch >> 7) & 0x00FF];
+
 F08L141:	move	PCH(A6),D0
 		asr	#7,D0
@@ -4855,12 +4855,12 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F08L137
-*
-*		case SM_KVEL:
-*			ltmp = veltab[trg];
-*
+
+|		case SM_KVEL:
+|			ltmp = veltab[trg];
+
 F08L142:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -4869,14 +4869,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F08L137
-*
-		.page
-*
-*		case SM_KPRS:
-*			ltmp = prstab[trg];
-*
+
+		.page
+
+|		case SM_KPRS:
+|			ltmp = prstab[trg];
+
 F08L143:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -4885,14 +4885,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F08L137
-*
-		.page
-*
-*		default:
-*			ltmp = valents[group | pt->ipvsrc].val;
-*
+
+		.page
+
+|		default:
+|			ltmp = valents[group | pt->ipvsrc].val;
+
 F08L144:	move.l	PT(A6),A0
 		clr.l	D0
@@ -4908,12 +4908,12 @@
 		move	8(A0,A1.l),D0
 		move.l	D0,LTMP(A6)
-*
-*		}
-*
-*
-		.page
-*
-*		ltmp = (ltmp * pt->ipvmlt) >> 15;
-*
+
+|		}
+
+
+		.page
+
+|		ltmp = (ltmp | pt->ipvmlt) >> 15;
+
 F08L137:	move.l	PT(A6),A0
 		move.w	4(A0),D0
@@ -4923,52 +4923,52 @@
 		asr.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		ltmp += (long)pt->ipval;
-*
+
+|		ltmp += (long)pt->ipval;
+
 		move.l	PT(A6),A0
 		move	2(A0),D0
 		ext.l	D0
 		add.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F08L146
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F08L147
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F08L146:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F08L147
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		tfpval = (short)ltmp;
-*
+
+|		tfpval = (short)ltmp;
+
 F08L147:	move.w	LTMP+2(A6),TFPVAL(A6)
 		bra	F08L149
-*
-*	} else {
-*
-*		tfpval = pt->ipval;
-*
+
+|	} else {
+
+|		tfpval = pt->ipval;
+
 F08L136:	move.l	PT(A6),A0
 		move	2(A0),TFPVAL(A6)
-*
-*	}
-*
-		.page
-*
-*	fpmant = (((long)pt->iptom & 0x0000FFF0L)
-*		* ((long)timemlt & 0x0000FFFFL)) >> 15;
-*
+
+|	}
+
+		.page
+
+|	fpmant = (((long)pt->iptom & 0x0000FFF0L)
+|		| ((long)timemlt & 0x0000FFFFL)) >> 15;
+
 F08L149:	move.l	PT(A6),A0
 		move.w	(A0),D0
 		move.w	D0,D2
-		andi.w	#$FFF0,D0
+		andi.w	#0xFFF0,D0
 		move.w	_timemlt,D1
 		muls	D1,D0
@@ -4976,131 +4976,131 @@
 		asr.l	D1,D0
 		move	D0,R_FPMANT
-*
-*	fpexp = expbit[pt->iptim & 0x000F];
-*
-		and	#$000F,D2
+
+|	fpexp = expbit[pt->iptim & 0x000F];
+
+		and	#0x000F,D2
 		move	D2,A0
 		add.l	A0,A0
 		add.l	#_expbit,A0
 		move	(A0),R_FPEXP
-*
-		.page
-*
-*		fp->idfpch = pch;
-*
+
+		.page
+
+|		fp->idfpch = pch;
+
 F08L163:	move	PCH(A6),(A_FP)
-*
-*		fpval = tfpval;
-*
+
+|		fpval = tfpval;
+
 		move	TFPVAL(A6),R_FPVAL
-*
-		.page
-*
+
+		.page
+
 		move.b	5(A_FP),D0
 		ext.w	D0
 		sub.w	#1,D0
 		movea.l	PT(A6),A0
-*
-*	oldi = setipl(FPU_DI);
-*
+
+|	oldi = setipl(FPU_DI);
+
 		move	sr,OLDI(A6)
 		move	#FPU_DI,sr
-*
+
 F08L168:	clr.b	10(A0)
 		add.l	#12,a0
 		dbra	D0,F08L168
-*
-		.page
-*
-*	fp->idftmd ^= I_NVBITS;
-*
+
+		.page
+
+|	fp->idftmd ^= I_NVBITS;
+
 F08L165:	eor.b	#24,7(A_FP)
-*
-*	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
-*
+
+|	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
+
 		move.b	7(A_FP),R_FPCTL
 		and	#28,R_FPCTL
 		or	#3,R_FPCTL
-*
-*	fp->idfcpt = fp->idfpt1;
-*
+
+|	fp->idfcpt = fp->idfpt1;
+
 		move.b	6(A_FP),8(A_FP)
-*
-*	fp->idftmd |= I_ACTIVE;
-*
+
+|	fp->idftmd |= I_ACTIVE;
+
 		or.b	#2,7(A_FP)
-*
-*	fp->idftrf = trg;
-*
+
+|	fp->idftrf = trg;
+
 		move	TRG(A6),10(A_FP)
-*
-*	*(fpu + (long)FPU_TCV1) = srcval;
-*
-		move	SRCVAL(A6),$8(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TCV1) = srcval;
+
+		move	SRCVAL(A6),0x8(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TSF1) = mltval;
-*
-		move	MLTVAL(A6),$A(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TSF1) = mltval;
+
+		move	MLTVAL(A6),0xA(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TMNT) = fpmant;
-*
-		move	R_FPMANT,$14(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TMNT) = fpmant;
+
+		move	R_FPMANT,0x14(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TEXP) = fpexp;
-*
-		move	R_FPEXP,$16(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TEXP) = fpexp;
+
+		move	R_FPEXP,0x16(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-		.page
-*
-*	if (fp->idftmd & I_VNSUBN)
-*
+
+		.page
+
+|	if (fp->idftmd & I_VNSUBN)
+
 		btst	#3,7(A_FP)
 		beq	F08L169
-*
-*		*(fpu + (long)FPU_TNV1) = fpval;
-*
-		move	R_FPVAL,$1C(A_FPU)
+
+|		|(fpu + (long)FPU_TNV1) = fpval;
+
+		move	R_FPVAL,0x1C(A_FPU)
 		bra	F08L170
-*
-*	else
-*		*(fpu + (long)FPU_TNV0) = fpval;
-*
+
+|	else
+|		|(fpu + (long)FPU_TNV0) = fpval;
+
 F08L169:	move	R_FPVAL,2(A_FPU)
-*
-*	++octype;
-*
+
+|	++octype;
+
 F08L170:	add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TCTL) = fpctl;
-*
+
+|	|(fpu + (long)FPU_TCTL) = fpctl;
+
 		move	R_FPCTL,(A_FPU)
-*
-*	setipl(oldi);
-*
+
+|	setipl(oldi);
+
 		move	OLDI(A6),sr
-*
-		.page
-* ------------------------------------------------------------------------------
-* Start function 9 -- Ind 4
-* ------------------------------------------------------------------------------
-*
-*    if (ip->idhfnc[9].idftmd & I_TM_KEY) {
-*
+
+		.page
+| ------------------------------------------------------------------------------
+| Start function 9 -- Ind 4
+| ------------------------------------------------------------------------------
+
+|    if (ip->idhfnc[9].idftmd & I_TM_KEY) {
+
 FN09:		move.l	IP(A6),A0
 		move.b	201(A0),D0
@@ -5109,29 +5109,29 @@
 		btst	#0,D0
 		bne	FN09A
-*
+
 		jmp	FN10
-*
-*	vp = (vce << 4) + 13;
-*
+
+|	vp = (vce << 4) + 13;
+
 FN09A:		move	VCE(A6),D0
 		asl	#4,D0
 		add.w	#13,D0
 		move	D0,VP(A6)
-*
-*	fpu = io_fpu + FPU_OFNC + (vp << 4);
-*
+
+|	fpu = io_fpu + FPU_OFNC + (vp << 4);
+
 		asl	#5,D0
 		ext.l	D0
 		move.l	D0,A_FPU
-		add.l	#_io_fpu+$4000,A_FPU
-*
-*	fp = &ip->idhfnc[9];
-*
+		add.l	#_io_fpu+0x4000,A_FPU
+
+|	fp = &ip->idhfnc[9];
+
 		move.l	#108,A_FP
 		add.l	IP(A6),A_FP
 		add.l	#86,A_FP
-*
-*	pt = &ip->idhpnt[fp->idfpt1];
-*
+
+|	pt = &ip->idhpnt[fp->idfpt1];
+
 		clr.l	D0
 		move.b	6(A_FP),D0
@@ -5143,9 +5143,9 @@
 		add.l	#242,D0
 		move.l	D0,PT(A6)
-*
-		.page
-*
-*	srcnum = group | fp->idfsrc;
-*
+
+		.page
+
+|	srcnum = group | fp->idfsrc;
+
 		move.w	GROUP(A6),D0
 		ext.l	D0
@@ -5154,7 +5154,7 @@
 		or	D1,D0
 		move	D0,SRCNUM(A6)
-*
-*	vep = &valents[srcnum];
-*
+
+|	vep = &valents[srcnum];
+
 		add.l	D0,D0
 		move.l	D0,D1
@@ -5163,7 +5163,7 @@
 		add.l	#_valents,D0
 		move.l	D0,VEP(A6)
-*
-*	smp = vpsms[vp];
-*
+
+|	smp = vpsms[vp];
+
 		move	VP(A6),A0
 		add.l	A0,A0
@@ -5171,104 +5171,104 @@
 		add.l	#_vpsms,A0
 		move.l	(A0),A_SMP
-*
-*	if (srcnum NE smp->sm) {
-*
+
+|	if (srcnum NE smp->sm) {
+
 		clr	D0
 		move	10(A_SMP),D0
 		cmp	SRCNUM(A6),D0
 		beq	F09L113
-*
-*		(smp->prv)->nxt = smp->nxt;
-*
+
+|		(smp->prv)->nxt = smp->nxt;
+
 		move.l	4(A_SMP),A0
 		move.l	(A_SMP),(A0)
-*
-*		(smp->nxt)->prv = smp->prv;
-*
+
+|		(smp->nxt)->prv = smp->prv;
+
 		move.l	(A_SMP),A0
 		move.l	4(A_SMP),4(A0)
-*
-*		smp->prv = (struct sment *)vep;
-*
+
+|		smp->prv = (struct sment |)vep;
+
 		move.l	VEP(A6),4(A_SMP)
-*
-*		smp->nxt = vep->nxt;
-*
+
+|		smp->nxt = vep->nxt;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),(A_SMP)
-*
-*		(vep->nxt)->prv = smp;
-*
+
+|		(vep->nxt)->prv = smp;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),A0
 		move.l	A_SMP,4(A0)
-*
-*		vep->nxt = smp;
-*
+
+|		vep->nxt = smp;
+
 		move.l	VEP(A6),A0
 		move.l	A_SMP,(A0)
-*
-*		smp->sm = srcnum;
-*
+
+|		smp->sm = srcnum;
+
 		move	SRCNUM(A6),10(A_SMP)
-*
-*	}
-*
-*	mltval = fp->idfmlt;
-*
+
+|	}
+
+|	mltval = fp->idfmlt;
+
 F09L113:	move	2(A_FP),MLTVAL(A6)
-*
-		.page
-*
-*	switch (fp->idfsrc) {
-*
+
+		.page
+
+|	switch (fp->idfsrc) {
+
 		move.b	4(A_FP),D0
 		ext.w	d0
 		cmp	#10,D0
 		bhi	F09L122
-*
+
 		asl	#2,D0
 		lea	F09L123,A0
 		movea.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*	case SM_NONE:
-*		mltval = 0;
-*
+
+|	case SM_NONE:
+|		mltval = 0;
+
 F09L116:	clr	MLTVAL(A6)
-*
-*		tsrcval = 0;
-*
+
+|		tsrcval = 0;
+
 		clr	TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F09L114
-*
-*	case SM_RAND:
-*		tsrcval = xgetran(mltval);
-*
+
+|	case SM_RAND:
+|		tsrcval = xgetran(mltval);
+
 F09L117:	move	MLTVAL(A6),(sp)
 		jsr	_xgetran
 		move	D0,TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F09L114
-*
-*	case SM_PTCH:
-*		tsrcval = pch;
-*
+
+|	case SM_PTCH:
+|		tsrcval = pch;
+
 F09L118:	move	PCH(A6),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F09L114
-*
-		.page
-*
-*	case SM_FREQ:
-*		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|	case SM_FREQ:
+|		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
+
 F09L119:	move	PCH(A6),D0
 		asr	#7,D0
@@ -5278,57 +5278,57 @@
 		add.l	#_ptoftab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F09L114
-*
-*	case SM_KVEL:
-*		tsrcval = veltab[trg];
-*
+
+|	case SM_KVEL:
+|		tsrcval = veltab[trg];
+
 F09L120:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_veltab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F09L114
-*
-*	case SM_KPRS:
-*		tsrcval = prstab[trg];
-*
+
+|	case SM_KPRS:
+|		tsrcval = prstab[trg];
+
 F09L121:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_prstab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F09L114
-*
-*	default:
-*		tsrcval = vep->val;
-*
+
+|	default:
+|		tsrcval = vep->val;
+
 F09L122:	move.l	VEP(A6),A0
 		move	8(A0),TSRCVAL(A6)
-*
-*	}
-*
-		.page
-*
-*		srcval = tsrcval;
-*
+
+|	}
+
+		.page
+
+|		srcval = tsrcval;
+
 F09L114:	move	TSRCVAL(A6),SRCVAL(A6)
-*
-		.page
-*
-*	if (pt->ipvsrc) {
-*
+
+		.page
+
+|	if (pt->ipvsrc) {
+
 F09L124:	move.l	PT(A6),A0
 		tst.b	6(A0)
 		beq	F09L136
-*
-*		switch (pt->ipvsrc) {
-*
+
+|		switch (pt->ipvsrc) {
+
 		move.l	PT(A6),A0
 		move.b	6(A0),D0
@@ -5337,13 +5337,13 @@
 		cmp	#9,D0
 		bhi	F09L144
-*
+
 		asl	#2,D0
 		lea	F09L145,A0
 		move.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*		case SM_RAND:
-*			ltmp = xgetran(pt_>ipvmlt);
-*
+
+|		case SM_RAND:
+|			ltmp = xgetran(pt_>ipvmlt);
+
 F09L139:	move.l	PT(A6),A0
 		move	4(A0),(sp)
@@ -5351,24 +5351,24 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F09L137
-*
-*		case SM_PTCH:
-*			ltmp = pch;
-*
+
+|		case SM_PTCH:
+|			ltmp = pch;
+
 F09L140:	move	PCH(A6),A0
 		move.l	A0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F09L137
-*
-		.page
-*
-*		case SM_FREQ:
-*			ltmp = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|		case SM_FREQ:
+|			ltmp = ptoftab[(pch >> 7) & 0x00FF];
+
 F09L141:	move	PCH(A6),D0
 		asr	#7,D0
@@ -5380,12 +5380,12 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F09L137
-*
-*		case SM_KVEL:
-*			ltmp = veltab[trg];
-*
+
+|		case SM_KVEL:
+|			ltmp = veltab[trg];
+
 F09L142:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -5394,14 +5394,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F09L137
-*
-		.page
-*
-*		case SM_KPRS:
-*			ltmp = prstab[trg];
-*
+
+		.page
+
+|		case SM_KPRS:
+|			ltmp = prstab[trg];
+
 F09L143:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -5410,14 +5410,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F09L137
-*
-		.page
-*
-*		default:
-*			ltmp = valents[group | pt->ipvsrc].val;
-*
+
+		.page
+
+|		default:
+|			ltmp = valents[group | pt->ipvsrc].val;
+
 F09L144:	move.l	PT(A6),A0
 		clr.l	D0
@@ -5433,12 +5433,12 @@
 		move	8(A0,A1.l),D0
 		move.l	D0,LTMP(A6)
-*
-*		}
-*
-*
-		.page
-*
-*		ltmp = (ltmp * pt->ipvmlt) >> 15;
-*
+
+|		}
+
+
+		.page
+
+|		ltmp = (ltmp | pt->ipvmlt) >> 15;
+
 F09L137:	move.l	PT(A6),A0
 		move.w	4(A0),D0
@@ -5448,52 +5448,52 @@
 		asr.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		ltmp += (long)pt->ipval;
-*
+
+|		ltmp += (long)pt->ipval;
+
 		move.l	PT(A6),A0
 		move	2(A0),D0
 		ext.l	D0
 		add.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F09L146
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F09L147
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F09L146:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F09L147
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		tfpval = (short)ltmp;
-*
+
+|		tfpval = (short)ltmp;
+
 F09L147:	move.w	LTMP+2(A6),TFPVAL(A6)
 		bra	F09L149
-*
-*	} else {
-*
-*		tfpval = pt->ipval;
-*
+
+|	} else {
+
+|		tfpval = pt->ipval;
+
 F09L136:	move.l	PT(A6),A0
 		move	2(A0),TFPVAL(A6)
-*
-*	}
-*
-		.page
-*
-*	fpmant = (((long)pt->iptom & 0x0000FFF0L)
-*		* ((long)timemlt & 0x0000FFFFL)) >> 15;
-*
+
+|	}
+
+		.page
+
+|	fpmant = (((long)pt->iptom & 0x0000FFF0L)
+|		| ((long)timemlt & 0x0000FFFFL)) >> 15;
+
 F09L149:	move.l	PT(A6),A0
 		move.w	(A0),D0
 		move.w	D0,D2
-		andi.w	#$FFF0,D0
+		andi.w	#0xFFF0,D0
 		move.w	_timemlt,D1
 		muls	D1,D0
@@ -5501,131 +5501,131 @@
 		asr.l	D1,D0
 		move	D0,R_FPMANT
-*
-*	fpexp = expbit[pt->iptim & 0x000F];
-*
-		and	#$000F,D2
+
+|	fpexp = expbit[pt->iptim & 0x000F];
+
+		and	#0x000F,D2
 		move	D2,A0
 		add.l	A0,A0
 		add.l	#_expbit,A0
 		move	(A0),R_FPEXP
-*
-		.page
-*
-*		fp->idfpch = pch;
-*
+
+		.page
+
+|		fp->idfpch = pch;
+
 F09L163:	move	PCH(A6),(A_FP)
-*
-*		fpval = tfpval;
-*
+
+|		fpval = tfpval;
+
 		move	TFPVAL(A6),R_FPVAL
-*
-		.page
-*
+
+		.page
+
 		move.b	5(A_FP),D0
 		ext.w	D0
 		sub.w	#1,D0
 		movea.l	PT(A6),A0
-*
-*	oldi = setipl(FPU_DI);
-*
+
+|	oldi = setipl(FPU_DI);
+
 		move	sr,OLDI(A6)
 		move	#FPU_DI,sr
-*
+
 F09L168:	clr.b	10(A0)
 		add.l	#12,a0
 		dbra	D0,F09L168
-*
-		.page
-*
-*	fp->idftmd ^= I_NVBITS;
-*
+
+		.page
+
+|	fp->idftmd ^= I_NVBITS;
+
 F09L165:	eor.b	#24,7(A_FP)
-*
-*	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
-*
+
+|	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
+
 		move.b	7(A_FP),R_FPCTL
 		and	#28,R_FPCTL
 		or	#3,R_FPCTL
-*
-*	fp->idfcpt = fp->idfpt1;
-*
+
+|	fp->idfcpt = fp->idfpt1;
+
 		move.b	6(A_FP),8(A_FP)
-*
-*	fp->idftmd |= I_ACTIVE;
-*
+
+|	fp->idftmd |= I_ACTIVE;
+
 		or.b	#2,7(A_FP)
-*
-*	fp->idftrf = trg;
-*
+
+|	fp->idftrf = trg;
+
 		move	TRG(A6),10(A_FP)
-*
-*	*(fpu + (long)FPU_TCV1) = srcval;
-*
-		move	SRCVAL(A6),$8(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TCV1) = srcval;
+
+		move	SRCVAL(A6),0x8(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TSF1) = mltval;
-*
-		move	MLTVAL(A6),$A(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TSF1) = mltval;
+
+		move	MLTVAL(A6),0xA(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TMNT) = fpmant;
-*
-		move	R_FPMANT,$14(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TMNT) = fpmant;
+
+		move	R_FPMANT,0x14(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TEXP) = fpexp;
-*
-		move	R_FPEXP,$16(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TEXP) = fpexp;
+
+		move	R_FPEXP,0x16(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-		.page
-*
-*	if (fp->idftmd & I_VNSUBN)
-*
+
+		.page
+
+|	if (fp->idftmd & I_VNSUBN)
+
 		btst	#3,7(A_FP)
 		beq	F09L169
-*
-*		*(fpu + (long)FPU_TNV1) = fpval;
-*
-		move	R_FPVAL,$1C(A_FPU)
+
+|		|(fpu + (long)FPU_TNV1) = fpval;
+
+		move	R_FPVAL,0x1C(A_FPU)
 		bra	F09L170
-*
-*	else
-*		*(fpu + (long)FPU_TNV0) = fpval;
-*
+
+|	else
+|		|(fpu + (long)FPU_TNV0) = fpval;
+
 F09L169:	move	R_FPVAL,2(A_FPU)
-*
-*	++octype;
-*
+
+|	++octype;
+
 F09L170:	add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TCTL) = fpctl;
-*
+
+|	|(fpu + (long)FPU_TCTL) = fpctl;
+
 		move	R_FPCTL,(A_FPU)
-*
-*	setipl(oldi);
-*
+
+|	setipl(oldi);
+
 		move	OLDI(A6),sr
-*
-		.page
-* ------------------------------------------------------------------------------
-* Start function 10 -- Ind 5
-* ------------------------------------------------------------------------------
-*
-*    if (ip->idhfnc[10].idftmd & I_TM_KEY) {
-*
+
+		.page
+| ------------------------------------------------------------------------------
+| Start function 10 -- Ind 5
+| ------------------------------------------------------------------------------
+
+|    if (ip->idhfnc[10].idftmd & I_TM_KEY) {
+
 FN10:		move.l	IP(A6),A0
 		move.b	213(A0),D0
@@ -5634,29 +5634,29 @@
 		btst	#0,D0
 		bne	FN10A
-*
+
 		jmp	FN11
-*
-*	vp = (vce << 4) + 14;
-*
+
+|	vp = (vce << 4) + 14;
+
 FN10A:		move	VCE(A6),D0
 		asl	#4,D0
 		add.w	#14,D0
 		move	D0,VP(A6)
-*
-*	fpu = io_fpu + FPU_OFNC + (vp << 4);
-*
+
+|	fpu = io_fpu + FPU_OFNC + (vp << 4);
+
 		asl	#5,D0
 		ext.l	D0
 		move.l	D0,A_FPU
-		add.l	#_io_fpu+$4000,A_FPU
-*
-*	fp = &ip->idhfnc[10];
-*
+		add.l	#_io_fpu+0x4000,A_FPU
+
+|	fp = &ip->idhfnc[10];
+
 		move.l	#120,A_FP
 		add.l	IP(A6),A_FP
 		add.l	#86,A_FP
-*
-*	pt = &ip->idhpnt[fp->idfpt1];
-*
+
+|	pt = &ip->idhpnt[fp->idfpt1];
+
 		clr.l	D0
 		move.b	6(A_FP),D0
@@ -5668,9 +5668,9 @@
 		add.l	#242,D0
 		move.l	D0,PT(A6)
-*
-		.page
-*
-*	srcnum = group | fp->idfsrc;
-*
+
+		.page
+
+|	srcnum = group | fp->idfsrc;
+
 		move.w	GROUP(A6),D0
 		ext.l	D0
@@ -5679,7 +5679,7 @@
 		or	D1,D0
 		move	D0,SRCNUM(A6)
-*
-*	vep = &valents[srcnum];
-*
+
+|	vep = &valents[srcnum];
+
 		add.l	D0,D0
 		move.l	D0,D1
@@ -5688,7 +5688,7 @@
 		add.l	#_valents,D0
 		move.l	D0,VEP(A6)
-*
-*	smp = vpsms[vp];
-*
+
+|	smp = vpsms[vp];
+
 		move	VP(A6),A0
 		add.l	A0,A0
@@ -5696,104 +5696,104 @@
 		add.l	#_vpsms,A0
 		move.l	(A0),A_SMP
-*
-*	if (srcnum NE smp->sm) {
-*
+
+|	if (srcnum NE smp->sm) {
+
 		clr	D0
 		move	10(A_SMP),D0
 		cmp	SRCNUM(A6),D0
 		beq	F10L113
-*
-*		(smp->prv)->nxt = smp->nxt;
-*
+
+|		(smp->prv)->nxt = smp->nxt;
+
 		move.l	4(A_SMP),A0
 		move.l	(A_SMP),(A0)
-*
-*		(smp->nxt)->prv = smp->prv;
-*
+
+|		(smp->nxt)->prv = smp->prv;
+
 		move.l	(A_SMP),A0
 		move.l	4(A_SMP),4(A0)
-*
-*		smp->prv = (struct sment *)vep;
-*
+
+|		smp->prv = (struct sment |)vep;
+
 		move.l	VEP(A6),4(A_SMP)
-*
-*		smp->nxt = vep->nxt;
-*
+
+|		smp->nxt = vep->nxt;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),(A_SMP)
-*
-*		(vep->nxt)->prv = smp;
-*
+
+|		(vep->nxt)->prv = smp;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),A0
 		move.l	A_SMP,4(A0)
-*
-*		vep->nxt = smp;
-*
+
+|		vep->nxt = smp;
+
 		move.l	VEP(A6),A0
 		move.l	A_SMP,(A0)
-*
-*		smp->sm = srcnum;
-*
+
+|		smp->sm = srcnum;
+
 		move	SRCNUM(A6),10(A_SMP)
-*
-*	}
-*
-*	mltval = fp->idfmlt;
-*
+
+|	}
+
+|	mltval = fp->idfmlt;
+
 F10L113:	move	2(A_FP),MLTVAL(A6)
-*
-		.page
-*
-*	switch (fp->idfsrc) {
-*
+
+		.page
+
+|	switch (fp->idfsrc) {
+
 		move.b	4(A_FP),D0
 		ext.w	d0
 		cmp	#10,D0
 		bhi	F10L122
-*
+
 		asl	#2,D0
 		lea	F10L123,A0
 		movea.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*	case SM_NONE:
-*		mltval = 0;
-*
+
+|	case SM_NONE:
+|		mltval = 0;
+
 F10L116:	clr	MLTVAL(A6)
-*
-*		tsrcval = 0;
-*
+
+|		tsrcval = 0;
+
 		clr	TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F10L114
-*
-*	case SM_RAND:
-*		tsrcval = xgetran(mltval);
-*
+
+|	case SM_RAND:
+|		tsrcval = xgetran(mltval);
+
 F10L117:	move	MLTVAL(A6),(sp)
 		jsr	_xgetran
 		move	D0,TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F10L114
-*
-*	case SM_PTCH:
-*		tsrcval = pch;
-*
+
+|	case SM_PTCH:
+|		tsrcval = pch;
+
 F10L118:	move	PCH(A6),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F10L114
-*
-		.page
-*
-*	case SM_FREQ:
-*		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|	case SM_FREQ:
+|		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
+
 F10L119:	move	PCH(A6),D0
 		asr	#7,D0
@@ -5803,57 +5803,57 @@
 		add.l	#_ptoftab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F10L114
-*
-*	case SM_KVEL:
-*		tsrcval = veltab[trg];
-*
+
+|	case SM_KVEL:
+|		tsrcval = veltab[trg];
+
 F10L120:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_veltab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F10L114
-*
-*	case SM_KPRS:
-*		tsrcval = prstab[trg];
-*
+
+|	case SM_KPRS:
+|		tsrcval = prstab[trg];
+
 F10L121:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_prstab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F10L114
-*
-*	default:
-*		tsrcval = vep->val;
-*
+
+|	default:
+|		tsrcval = vep->val;
+
 F10L122:	move.l	VEP(A6),A0
 		move	8(A0),TSRCVAL(A6)
-*
-*	}
-*
-		.page
-*
-*		srcval = tsrcval;
-*
+
+|	}
+
+		.page
+
+|		srcval = tsrcval;
+
 F10L114:	move	TSRCVAL(A6),SRCVAL(A6)
-*
-		.page
-*
-*	if (pt->ipvsrc) {
-*
+
+		.page
+
+|	if (pt->ipvsrc) {
+
 F10L124:	move.l	PT(A6),A0
 		tst.b	6(A0)
 		beq	F10L136
-*
-*		switch (pt->ipvsrc) {
-*
+
+|		switch (pt->ipvsrc) {
+
 		move.l	PT(A6),A0
 		move.b	6(A0),D0
@@ -5862,13 +5862,13 @@
 		cmp	#9,D0
 		bhi	F10L144
-*
+
 		asl	#2,D0
 		lea	F10L145,A0
 		move.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*		case SM_RAND:
-*			ltmp = xgetran(pt_>ipvmlt);
-*
+
+|		case SM_RAND:
+|			ltmp = xgetran(pt_>ipvmlt);
+
 F10L139:	move.l	PT(A6),A0
 		move	4(A0),(sp)
@@ -5876,24 +5876,24 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F10L137
-*
-*		case SM_PTCH:
-*			ltmp = pch;
-*
+
+|		case SM_PTCH:
+|			ltmp = pch;
+
 F10L140:	move	PCH(A6),A0
 		move.l	A0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F10L137
-*
-		.page
-*
-*		case SM_FREQ:
-*			ltmp = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|		case SM_FREQ:
+|			ltmp = ptoftab[(pch >> 7) & 0x00FF];
+
 F10L141:	move	PCH(A6),D0
 		asr	#7,D0
@@ -5905,12 +5905,12 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F10L137
-*
-*		case SM_KVEL:
-*			ltmp = veltab[trg];
-*
+
+|		case SM_KVEL:
+|			ltmp = veltab[trg];
+
 F10L142:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -5919,14 +5919,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F10L137
-*
-		.page
-*
-*		case SM_KPRS:
-*			ltmp = prstab[trg];
-*
+
+		.page
+
+|		case SM_KPRS:
+|			ltmp = prstab[trg];
+
 F10L143:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -5935,14 +5935,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F10L137
-*
-		.page
-*
-*		default:
-*			ltmp = valents[group | pt->ipvsrc].val;
-*
+
+		.page
+
+|		default:
+|			ltmp = valents[group | pt->ipvsrc].val;
+
 F10L144:	move.l	PT(A6),A0
 		clr.l	D0
@@ -5958,12 +5958,12 @@
 		move	8(A0,A1.l),D0
 		move.l	D0,LTMP(A6)
-*
-*		}
-*
-*
-		.page
-*
-*		ltmp = (ltmp * pt->ipvmlt) >> 15;
-*
+
+|		}
+
+
+		.page
+
+|		ltmp = (ltmp | pt->ipvmlt) >> 15;
+
 F10L137:	move.l	PT(A6),A0
 		move.w	4(A0),D0
@@ -5973,52 +5973,52 @@
 		asr.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		ltmp += (long)pt->ipval;
-*
+
+|		ltmp += (long)pt->ipval;
+
 		move.l	PT(A6),A0
 		move	2(A0),D0
 		ext.l	D0
 		add.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F10L146
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F10L147
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F10L146:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F10L147
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		tfpval = (short)ltmp;
-*
+
+|		tfpval = (short)ltmp;
+
 F10L147:	move.w	LTMP+2(A6),TFPVAL(A6)
 		bra	F10L149
-*
-*	} else {
-*
-*		tfpval = pt->ipval;
-*
+
+|	} else {
+
+|		tfpval = pt->ipval;
+
 F10L136:	move.l	PT(A6),A0
 		move	2(A0),TFPVAL(A6)
-*
-*	}
-*
-		.page
-*
-*	fpmant = (((long)pt->iptom & 0x0000FFF0L)
-*		* ((long)timemlt & 0x0000FFFFL)) >> 15;
-*
+
+|	}
+
+		.page
+
+|	fpmant = (((long)pt->iptom & 0x0000FFF0L)
+|		| ((long)timemlt & 0x0000FFFFL)) >> 15;
+
 F10L149:	move.l	PT(A6),A0
 		move.w	(A0),D0
 		move.w	D0,D2
-		andi.w	#$FFF0,D0
+		andi.w	#0xFFF0,D0
 		move.w	_timemlt,D1
 		muls	D1,D0
@@ -6026,131 +6026,131 @@
 		asr.l	D1,D0
 		move	D0,R_FPMANT
-*
-*	fpexp = expbit[pt->iptim & 0x000F];
-*
-		and	#$000F,D2
+
+|	fpexp = expbit[pt->iptim & 0x000F];
+
+		and	#0x000F,D2
 		move	D2,A0
 		add.l	A0,A0
 		add.l	#_expbit,A0
 		move	(A0),R_FPEXP
-*
-		.page
-*
-*		fp->idfpch = pch;
-*
+
+		.page
+
+|		fp->idfpch = pch;
+
 F10L163:	move	PCH(A6),(A_FP)
-*
-*		fpval = tfpval;
-*
+
+|		fpval = tfpval;
+
 		move	TFPVAL(A6),R_FPVAL
-*
-		.page
-*
+
+		.page
+
 		move.b	5(A_FP),D0
 		ext.w	D0
 		sub.w	#1,D0
 		movea.l	PT(A6),A0
-*
-*	oldi = setipl(FPU_DI);
-*
+
+|	oldi = setipl(FPU_DI);
+
 		move	sr,OLDI(A6)
 		move	#FPU_DI,sr
-*
+
 F10L168:	clr.b	10(A0)
 		add.l	#12,a0
 		dbra	D0,F10L168
-*
-		.page
-*
-*	fp->idftmd ^= I_NVBITS;
-*
+
+		.page
+
+|	fp->idftmd ^= I_NVBITS;
+
 F10L165:	eor.b	#24,7(A_FP)
-*
-*	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
-*
+
+|	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
+
 		move.b	7(A_FP),R_FPCTL
 		and	#28,R_FPCTL
 		or	#3,R_FPCTL
-*
-*	fp->idfcpt = fp->idfpt1;
-*
+
+|	fp->idfcpt = fp->idfpt1;
+
 		move.b	6(A_FP),8(A_FP)
-*
-*	fp->idftmd |= I_ACTIVE;
-*
+
+|	fp->idftmd |= I_ACTIVE;
+
 		or.b	#2,7(A_FP)
-*
-*	fp->idftrf = trg;
-*
+
+|	fp->idftrf = trg;
+
 		move	TRG(A6),10(A_FP)
-*
-*	*(fpu + (long)FPU_TCV1) = srcval;
-*
-		move	SRCVAL(A6),$8(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TCV1) = srcval;
+
+		move	SRCVAL(A6),0x8(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TSF1) = mltval;
-*
-		move	MLTVAL(A6),$A(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TSF1) = mltval;
+
+		move	MLTVAL(A6),0xA(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TMNT) = fpmant;
-*
-		move	R_FPMANT,$14(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TMNT) = fpmant;
+
+		move	R_FPMANT,0x14(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TEXP) = fpexp;
-*
-		move	R_FPEXP,$16(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TEXP) = fpexp;
+
+		move	R_FPEXP,0x16(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-		.page
-*
-*	if (fp->idftmd & I_VNSUBN)
-*
+
+		.page
+
+|	if (fp->idftmd & I_VNSUBN)
+
 		btst	#3,7(A_FP)
 		beq	F10L169
-*
-*		*(fpu + (long)FPU_TNV1) = fpval;
-*
-		move	R_FPVAL,$1C(A_FPU)
+
+|		|(fpu + (long)FPU_TNV1) = fpval;
+
+		move	R_FPVAL,0x1C(A_FPU)
 		bra	F10L170
-*
-*	else
-*		*(fpu + (long)FPU_TNV0) = fpval;
-*
+
+|	else
+|		|(fpu + (long)FPU_TNV0) = fpval;
+
 F10L169:	move	R_FPVAL,2(A_FPU)
-*
-*	++octype;
-*
+
+|	++octype;
+
 F10L170:	add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TCTL) = fpctl;
-*
+
+|	|(fpu + (long)FPU_TCTL) = fpctl;
+
 		move	R_FPCTL,(A_FPU)
-*
-*	setipl(oldi);
-*
+
+|	setipl(oldi);
+
 		move	OLDI(A6),sr
-*
-		.page
-* ------------------------------------------------------------------------------
-* Start function 11 -- Ind 6
-* ------------------------------------------------------------------------------
-*
-*    if (ip->idhfnc[11].idftmd & I_TM_KEY) {
-*
+
+		.page
+| ------------------------------------------------------------------------------
+| Start function 11 -- Ind 6
+| ------------------------------------------------------------------------------
+
+|    if (ip->idhfnc[11].idftmd & I_TM_KEY) {
+
 FN11:		move.l	IP(A6),A0
 		move.b	225(A0),D0
@@ -6159,29 +6159,29 @@
 		btst	#0,D0
 		bne	FN11A
-*
+
 		jmp	FN12
-*
-*	vp = (vce << 4) + 15;
-*
+
+|	vp = (vce << 4) + 15;
+
 FN11A:		move	VCE(A6),D0
 		asl	#4,D0
 		add.w	#15,D0
 		move	D0,VP(A6)
-*
-*	fpu = io_fpu + FPU_OFNC + (vp << 4);
-*
+
+|	fpu = io_fpu + FPU_OFNC + (vp << 4);
+
 		asl	#5,D0
 		ext.l	D0
 		move.l	D0,A_FPU
-		add.l	#_io_fpu+$4000,A_FPU
-*
-*	fp = &ip->idhfnc[11];
-*
+		add.l	#_io_fpu+0x4000,A_FPU
+
+|	fp = &ip->idhfnc[11];
+
 		move.l	#132,A_FP
 		add.l	IP(A6),A_FP
 		add.l	#86,A_FP
-*
-*	pt = &ip->idhpnt[fp->idfpt1];
-*
+
+|	pt = &ip->idhpnt[fp->idfpt1];
+
 		clr.l	D0
 		move.b	6(A_FP),D0
@@ -6193,9 +6193,9 @@
 		add.l	#242,D0
 		move.l	D0,PT(A6)
-*
-		.page
-*
-*	srcnum = group | fp->idfsrc;
-*
+
+		.page
+
+|	srcnum = group | fp->idfsrc;
+
 		move.w	GROUP(A6),D0
 		ext.l	D0
@@ -6204,7 +6204,7 @@
 		or	D1,D0
 		move	D0,SRCNUM(A6)
-*
-*	vep = &valents[srcnum];
-*
+
+|	vep = &valents[srcnum];
+
 		add.l	D0,D0
 		move.l	D0,D1
@@ -6213,7 +6213,7 @@
 		add.l	#_valents,D0
 		move.l	D0,VEP(A6)
-*
-*	smp = vpsms[vp];
-*
+
+|	smp = vpsms[vp];
+
 		move	VP(A6),A0
 		add.l	A0,A0
@@ -6221,104 +6221,104 @@
 		add.l	#_vpsms,A0
 		move.l	(A0),A_SMP
-*
-*	if (srcnum NE smp->sm) {
-*
+
+|	if (srcnum NE smp->sm) {
+
 		clr	D0
 		move	10(A_SMP),D0
 		cmp	SRCNUM(A6),D0
 		beq	F11L113
-*
-*		(smp->prv)->nxt = smp->nxt;
-*
+
+|		(smp->prv)->nxt = smp->nxt;
+
 		move.l	4(A_SMP),A0
 		move.l	(A_SMP),(A0)
-*
-*		(smp->nxt)->prv = smp->prv;
-*
+
+|		(smp->nxt)->prv = smp->prv;
+
 		move.l	(A_SMP),A0
 		move.l	4(A_SMP),4(A0)
-*
-*		smp->prv = (struct sment *)vep;
-*
+
+|		smp->prv = (struct sment |)vep;
+
 		move.l	VEP(A6),4(A_SMP)
-*
-*		smp->nxt = vep->nxt;
-*
+
+|		smp->nxt = vep->nxt;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),(A_SMP)
-*
-*		(vep->nxt)->prv = smp;
-*
+
+|		(vep->nxt)->prv = smp;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),A0
 		move.l	A_SMP,4(A0)
-*
-*		vep->nxt = smp;
-*
+
+|		vep->nxt = smp;
+
 		move.l	VEP(A6),A0
 		move.l	A_SMP,(A0)
-*
-*		smp->sm = srcnum;
-*
+
+|		smp->sm = srcnum;
+
 		move	SRCNUM(A6),10(A_SMP)
-*
-*	}
-*
-*	mltval = fp->idfmlt;
-*
+
+|	}
+
+|	mltval = fp->idfmlt;
+
 F11L113:	move	2(A_FP),MLTVAL(A6)
-*
-		.page
-*
-*	switch (fp->idfsrc) {
-*
+
+		.page
+
+|	switch (fp->idfsrc) {
+
 		move.b	4(A_FP),D0
 		ext.w	d0
 		cmp	#10,D0
 		bhi	F11L122
-*
+
 		asl	#2,D0
 		lea	F11L123,A0
 		movea.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*	case SM_NONE:
-*		mltval = 0;
-*
+
+|	case SM_NONE:
+|		mltval = 0;
+
 F11L116:	clr	MLTVAL(A6)
-*
-*		tsrcval = 0;
-*
+
+|		tsrcval = 0;
+
 		clr	TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F11L114
-*
-*	case SM_RAND:
-*		tsrcval = xgetran(mltval);
-*
+
+|	case SM_RAND:
+|		tsrcval = xgetran(mltval);
+
 F11L117:	move	MLTVAL(A6),(sp)
 		jsr	_xgetran
 		move	D0,TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F11L114
-*
-*	case SM_PTCH:
-*		tsrcval = pch;
-*
+
+|	case SM_PTCH:
+|		tsrcval = pch;
+
 F11L118:	move	PCH(A6),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F11L114
-*
-		.page
-*
-*	case SM_FREQ:
-*		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|	case SM_FREQ:
+|		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
+
 F11L119:	move	PCH(A6),D0
 		asr	#7,D0
@@ -6328,57 +6328,57 @@
 		add.l	#_ptoftab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F11L114
-*
-*	case SM_KVEL:
-*		tsrcval = veltab[trg];
-*
+
+|	case SM_KVEL:
+|		tsrcval = veltab[trg];
+
 F11L120:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_veltab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F11L114
-*
-*	case SM_KPRS:
-*		tsrcval = prstab[trg];
-*
+
+|	case SM_KPRS:
+|		tsrcval = prstab[trg];
+
 F11L121:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_prstab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F11L114
-*
-*	default:
-*		tsrcval = vep->val;
-*
+
+|	default:
+|		tsrcval = vep->val;
+
 F11L122:	move.l	VEP(A6),A0
 		move	8(A0),TSRCVAL(A6)
-*
-*	}
-*
-		.page
-*
-*		srcval = tsrcval;
-*
+
+|	}
+
+		.page
+
+|		srcval = tsrcval;
+
 F11L114:	move	TSRCVAL(A6),SRCVAL(A6)
-*
-		.page
-*
-*	if (pt->ipvsrc) {
-*
+
+		.page
+
+|	if (pt->ipvsrc) {
+
 F11L124:	move.l	PT(A6),A0
 		tst.b	6(A0)
 		beq	F11L136
-*
-*		switch (pt->ipvsrc) {
-*
+
+|		switch (pt->ipvsrc) {
+
 		move.l	PT(A6),A0
 		move.b	6(A0),D0
@@ -6387,13 +6387,13 @@
 		cmp	#9,D0
 		bhi	F11L144
-*
+
 		asl	#2,D0
 		lea	F11L145,A0
 		move.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*		case SM_RAND:
-*			ltmp = xgetran(pt_>ipvmlt);
-*
+
+|		case SM_RAND:
+|			ltmp = xgetran(pt_>ipvmlt);
+
 F11L139:	move.l	PT(A6),A0
 		move	4(A0),(sp)
@@ -6401,24 +6401,24 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F11L137
-*
-*		case SM_PTCH:
-*			ltmp = pch;
-*
+
+|		case SM_PTCH:
+|			ltmp = pch;
+
 F11L140:	move	PCH(A6),A0
 		move.l	A0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F11L137
-*
-		.page
-*
-*		case SM_FREQ:
-*			ltmp = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|		case SM_FREQ:
+|			ltmp = ptoftab[(pch >> 7) & 0x00FF];
+
 F11L141:	move	PCH(A6),D0
 		asr	#7,D0
@@ -6430,12 +6430,12 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F11L137
-*
-*		case SM_KVEL:
-*			ltmp = veltab[trg];
-*
+
+|		case SM_KVEL:
+|			ltmp = veltab[trg];
+
 F11L142:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -6444,14 +6444,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F11L137
-*
-		.page
-*
-*		case SM_KPRS:
-*			ltmp = prstab[trg];
-*
+
+		.page
+
+|		case SM_KPRS:
+|			ltmp = prstab[trg];
+
 F11L143:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -6460,14 +6460,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F11L137
-*
-		.page
-*
-*		default:
-*			ltmp = valents[group | pt->ipvsrc].val;
-*
+
+		.page
+
+|		default:
+|			ltmp = valents[group | pt->ipvsrc].val;
+
 F11L144:	move.l	PT(A6),A0
 		clr.l	D0
@@ -6483,12 +6483,12 @@
 		move	8(A0,A1.l),D0
 		move.l	D0,LTMP(A6)
-*
-*		}
-*
-*
-		.page
-*
-*		ltmp = (ltmp * pt->ipvmlt) >> 15;
-*
+
+|		}
+
+
+		.page
+
+|		ltmp = (ltmp | pt->ipvmlt) >> 15;
+
 F11L137:	move.l	PT(A6),A0
 		move.w	4(A0),D0
@@ -6498,52 +6498,52 @@
 		asr.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		ltmp += (long)pt->ipval;
-*
+
+|		ltmp += (long)pt->ipval;
+
 		move.l	PT(A6),A0
 		move	2(A0),D0
 		ext.l	D0
 		add.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F11L146
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F11L147
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F11L146:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F11L147
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		tfpval = (short)ltmp;
-*
+
+|		tfpval = (short)ltmp;
+
 F11L147:	move.w	LTMP+2(A6),TFPVAL(A6)
 		bra	F11L149
-*
-*	} else {
-*
-*		tfpval = pt->ipval;
-*
+
+|	} else {
+
+|		tfpval = pt->ipval;
+
 F11L136:	move.l	PT(A6),A0
 		move	2(A0),TFPVAL(A6)
-*
-*	}
-*
-		.page
-*
-*	fpmant = (((long)pt->iptom & 0x0000FFF0L)
-*		* ((long)timemlt & 0x0000FFFFL)) >> 15;
-*
+
+|	}
+
+		.page
+
+|	fpmant = (((long)pt->iptom & 0x0000FFF0L)
+|		| ((long)timemlt & 0x0000FFFFL)) >> 15;
+
 F11L149:	move.l	PT(A6),A0
 		move.w	(A0),D0
 		move.w	D0,D2
-		andi.w	#$FFF0,D0
+		andi.w	#0xFFF0,D0
 		move.w	_timemlt,D1
 		muls	D1,D0
@@ -6551,131 +6551,131 @@
 		asr.l	D1,D0
 		move	D0,R_FPMANT
-*
-*	fpexp = expbit[pt->iptim & 0x000F];
-*
-		and	#$000F,D2
+
+|	fpexp = expbit[pt->iptim & 0x000F];
+
+		and	#0x000F,D2
 		move	D2,A0
 		add.l	A0,A0
 		add.l	#_expbit,A0
 		move	(A0),R_FPEXP
-*
-		.page
-*
-*		fp->idfpch = pch;
-*
+
+		.page
+
+|		fp->idfpch = pch;
+
 F11L163:	move	PCH(A6),(A_FP)
-*
-*		fpval = tfpval;
-*
+
+|		fpval = tfpval;
+
 		move	TFPVAL(A6),R_FPVAL
-*
-		.page
-*
+
+		.page
+
 		move.b	5(A_FP),D0
 		ext.w	D0
 		sub.w	#1,D0
 		movea.l	PT(A6),A0
-*
-*	oldi = setipl(FPU_DI);
-*
+
+|	oldi = setipl(FPU_DI);
+
 		move	sr,OLDI(A6)
 		move	#FPU_DI,sr
-*
+
 F11L168:	clr.b	10(A0)
 		add.l	#12,a0
 		dbra	D0,F11L168
-*
-		.page
-*
-*	fp->idftmd ^= I_NVBITS;
-*
+
+		.page
+
+|	fp->idftmd ^= I_NVBITS;
+
 F11L165:	eor.b	#24,7(A_FP)
-*
-*	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
-*
+
+|	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
+
 		move.b	7(A_FP),R_FPCTL
 		and	#28,R_FPCTL
 		or	#3,R_FPCTL
-*
-*	fp->idfcpt = fp->idfpt1;
-*
+
+|	fp->idfcpt = fp->idfpt1;
+
 		move.b	6(A_FP),8(A_FP)
-*
-*	fp->idftmd |= I_ACTIVE;
-*
+
+|	fp->idftmd |= I_ACTIVE;
+
 		or.b	#2,7(A_FP)
-*
-*	fp->idftrf = trg;
-*
+
+|	fp->idftrf = trg;
+
 		move	TRG(A6),10(A_FP)
-*
-*	*(fpu + (long)FPU_TCV1) = srcval;
-*
-		move	SRCVAL(A6),$8(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TCV1) = srcval;
+
+		move	SRCVAL(A6),0x8(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TSF1) = mltval;
-*
-		move	MLTVAL(A6),$A(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TSF1) = mltval;
+
+		move	MLTVAL(A6),0xA(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TMNT) = fpmant;
-*
-		move	R_FPMANT,$14(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TMNT) = fpmant;
+
+		move	R_FPMANT,0x14(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TEXP) = fpexp;
-*
-		move	R_FPEXP,$16(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TEXP) = fpexp;
+
+		move	R_FPEXP,0x16(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-		.page
-*
-*	if (fp->idftmd & I_VNSUBN)
-*
+
+		.page
+
+|	if (fp->idftmd & I_VNSUBN)
+
 		btst	#3,7(A_FP)
 		beq	F11L169
-*
-*		*(fpu + (long)FPU_TNV1) = fpval;
-*
-		move	R_FPVAL,$1C(A_FPU)
+
+|		|(fpu + (long)FPU_TNV1) = fpval;
+
+		move	R_FPVAL,0x1C(A_FPU)
 		bra	F11L170
-*
-*	else
-*		*(fpu + (long)FPU_TNV0) = fpval;
-*
+
+|	else
+|		|(fpu + (long)FPU_TNV0) = fpval;
+
 F11L169:	move	R_FPVAL,2(A_FPU)
-*
-*	++octype;
-*
+
+|	++octype;
+
 F11L170:	add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TCTL) = fpctl;
-*
+
+|	|(fpu + (long)FPU_TCTL) = fpctl;
+
 		move	R_FPCTL,(A_FPU)
-*
-*	setipl(oldi);
-*
+
+|	setipl(oldi);
+
 		move	OLDI(A6),sr
-*
-		.page
-* ------------------------------------------------------------------------------
-* Start function 12 -- Level
-* ------------------------------------------------------------------------------
-*
-*    if (ip->idhfnc[12].idftmd & I_TM_KEY) {
-*
+
+		.page
+| ------------------------------------------------------------------------------
+| Start function 12 -- Level
+| ------------------------------------------------------------------------------
+
+|    if (ip->idhfnc[12].idftmd & I_TM_KEY) {
+
 FN12:		move.l	IP(A6),A0
 		move.b	237(A0),D0
@@ -6684,29 +6684,29 @@
 		btst	#0,D0
 		bne	FN12A
-*
+
 		jmp	FNEXIT
-*
-*	vp = (vce << 4) + 2;
-*
+
+|	vp = (vce << 4) + 2;
+
 FN12A:		move	VCE(A6),D0
 		asl	#4,D0
 		add.w	#2,D0
 		move	D0,VP(A6)
-*
-*	fpu = io_fpu + FPU_OFNC + (vp << 4);
-*
+
+|	fpu = io_fpu + FPU_OFNC + (vp << 4);
+
 		asl	#5,D0
 		ext.l	D0
 		move.l	D0,A_FPU
-		add.l	#_io_fpu+$4000,A_FPU
-*
-*	fp = &ip->idhfnc[12];
-*
+		add.l	#_io_fpu+0x4000,A_FPU
+
+|	fp = &ip->idhfnc[12];
+
 		move.l	#144,A_FP
 		add.l	IP(A6),A_FP
 		add.l	#86,A_FP
-*
-*	pt = &ip->idhpnt[fp->idfpt1];
-*
+
+|	pt = &ip->idhpnt[fp->idfpt1];
+
 		clr.l	D0
 		move.b	6(A_FP),D0
@@ -6718,9 +6718,9 @@
 		add.l	#242,D0
 		move.l	D0,PT(A6)
-*
-		.page
-*
-*	srcnum = group | fp->idfsrc;
-*
+
+		.page
+
+|	srcnum = group | fp->idfsrc;
+
 		move.w	GROUP(A6),D0
 		ext.l	D0
@@ -6729,7 +6729,7 @@
 		or	D1,D0
 		move	D0,SRCNUM(A6)
-*
-*	vep = &valents[srcnum];
-*
+
+|	vep = &valents[srcnum];
+
 		add.l	D0,D0
 		move.l	D0,D1
@@ -6738,7 +6738,7 @@
 		add.l	#_valents,D0
 		move.l	D0,VEP(A6)
-*
-*	smp = vpsms[vp];
-*
+
+|	smp = vpsms[vp];
+
 		move	VP(A6),A0
 		add.l	A0,A0
@@ -6746,104 +6746,104 @@
 		add.l	#_vpsms,A0
 		move.l	(A0),A_SMP
-*
-*	if (srcnum NE smp->sm) {
-*
+
+|	if (srcnum NE smp->sm) {
+
 		clr	D0
 		move	10(A_SMP),D0
 		cmp	SRCNUM(A6),D0
 		beq	F12L113
-*
-*		(smp->prv)->nxt = smp->nxt;
-*
+
+|		(smp->prv)->nxt = smp->nxt;
+
 		move.l	4(A_SMP),A0
 		move.l	(A_SMP),(A0)
-*
-*		(smp->nxt)->prv = smp->prv;
-*
+
+|		(smp->nxt)->prv = smp->prv;
+
 		move.l	(A_SMP),A0
 		move.l	4(A_SMP),4(A0)
-*
-*		smp->prv = (struct sment *)vep;
-*
+
+|		smp->prv = (struct sment |)vep;
+
 		move.l	VEP(A6),4(A_SMP)
-*
-*		smp->nxt = vep->nxt;
-*
+
+|		smp->nxt = vep->nxt;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),(A_SMP)
-*
-*		(vep->nxt)->prv = smp;
-*
+
+|		(vep->nxt)->prv = smp;
+
 		move.l	VEP(A6),A0
 		move.l	(A0),A0
 		move.l	A_SMP,4(A0)
-*
-*		vep->nxt = smp;
-*
+
+|		vep->nxt = smp;
+
 		move.l	VEP(A6),A0
 		move.l	A_SMP,(A0)
-*
-*		smp->sm = srcnum;
-*
+
+|		smp->sm = srcnum;
+
 		move	SRCNUM(A6),10(A_SMP)
-*
-*	}
-*
-*	mltval = fp->idfmlt;
-*
+
+|	}
+
+|	mltval = fp->idfmlt;
+
 F12L113:	move	2(A_FP),MLTVAL(A6)
-*
-		.page
-*
-*	switch (fp->idfsrc) {
-*
+
+		.page
+
+|	switch (fp->idfsrc) {
+
 		move.b	4(A_FP),D0
 		ext.w	d0
 		cmp	#10,D0
 		bhi	F12L122
-*
+
 		asl	#2,D0
 		lea	F12L123,A0
 		movea.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*	case SM_NONE:
-*		mltval = 0;
-*
+
+|	case SM_NONE:
+|		mltval = 0;
+
 F12L116:	clr	MLTVAL(A6)
-*
-*		tsrcval = 0;
-*
+
+|		tsrcval = 0;
+
 		clr	TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F12L114
-*
-*	case SM_RAND:
-*		tsrcval = xgetran(mltval);
-*
+
+|	case SM_RAND:
+|		tsrcval = xgetran(mltval);
+
 F12L117:	move	MLTVAL(A6),(sp)
 		jsr	_xgetran
 		move	D0,TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F12L114
-*
-*	case SM_PTCH:
-*		tsrcval = pch;
-*
+
+|	case SM_PTCH:
+|		tsrcval = pch;
+
 F12L118:	move	PCH(A6),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F12L114
-*
-		.page
-*
-*	case SM_FREQ:
-*		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|	case SM_FREQ:
+|		tsrcval = ptoftab[(pch >> 7) & 0x00FF];
+
 F12L119:	move	PCH(A6),D0
 		asr	#7,D0
@@ -6853,57 +6853,57 @@
 		add.l	#_ptoftab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F12L114
-*
-*	case SM_KVEL:
-*		tsrcval = veltab[trg];
-*
+
+|	case SM_KVEL:
+|		tsrcval = veltab[trg];
+
 F12L120:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_veltab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F12L114
-*
-*	case SM_KPRS:
-*		tsrcval = prstab[trg];
-*
+
+|	case SM_KPRS:
+|		tsrcval = prstab[trg];
+
 F12L121:	move	TRG(A6),A0
 		add.l	A0,A0
 		add.l	#_prstab,A0
 		move	(A0),TSRCVAL(A6)
-*
-*		break;
-*
+
+|		break;
+
 		bra	F12L114
-*
-*	default:
-*		tsrcval = vep->val;
-*
+
+|	default:
+|		tsrcval = vep->val;
+
 F12L122:	move.l	VEP(A6),A0
 		move	8(A0),TSRCVAL(A6)
-*
-*	}
-*
-		.page
-*
-*		srcval = tsrcval;
-*
+
+|	}
+
+		.page
+
+|		srcval = tsrcval;
+
 F12L114:	move	TSRCVAL(A6),SRCVAL(A6)
-*
-		.page
-*
-*	if (pt->ipvsrc) {
-*
+
+		.page
+
+|	if (pt->ipvsrc) {
+
 F12L124:	move.l	PT(A6),A0
 		tst.b	6(A0)
 		beq	F12L136
-*
-*		switch (pt->ipvsrc) {
-*
+
+|		switch (pt->ipvsrc) {
+
 		move.l	PT(A6),A0
 		move.b	6(A0),D0
@@ -6912,13 +6912,13 @@
 		cmp	#9,D0
 		bhi	F12L144
-*
+
 		asl	#2,D0
 		lea	F12L145,A0
 		move.l	0(A0,D0.W),A0
 		jmp	(A0)
-*
-*		case SM_RAND:
-*			ltmp = xgetran(pt_>ipvmlt);
-*
+
+|		case SM_RAND:
+|			ltmp = xgetran(pt_>ipvmlt);
+
 F12L139:	move.l	PT(A6),A0
 		move	4(A0),(sp)
@@ -6926,24 +6926,24 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F12L137
-*
-*		case SM_PTCH:
-*			ltmp = pch;
-*
+
+|		case SM_PTCH:
+|			ltmp = pch;
+
 F12L140:	move	PCH(A6),A0
 		move.l	A0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F12L137
-*
-		.page
-*
-*		case SM_FREQ:
-*			ltmp = ptoftab[(pch >> 7) & 0x00FF];
-*
+
+		.page
+
+|		case SM_FREQ:
+|			ltmp = ptoftab[(pch >> 7) & 0x00FF];
+
 F12L141:	move	PCH(A6),D0
 		asr	#7,D0
@@ -6955,12 +6955,12 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F12L137
-*
-*		case SM_KVEL:
-*			ltmp = veltab[trg];
-*
+
+|		case SM_KVEL:
+|			ltmp = veltab[trg];
+
 F12L142:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -6969,14 +6969,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F12L137
-*
-		.page
-*
-*		case SM_KPRS:
-*			ltmp = prstab[trg];
-*
+
+		.page
+
+|		case SM_KPRS:
+|			ltmp = prstab[trg];
+
 F12L143:	move	TRG(A6),A0
 		add.l	A0,A0
@@ -6985,14 +6985,14 @@
 		ext.l	D0
 		move.l	D0,LTMP(A6)
-*
-*			break;
-*
+
+|			break;
+
 		bra	F12L137
-*
-		.page
-*
-*		default:
-*			ltmp = valents[group | pt->ipvsrc].val;
-*
+
+		.page
+
+|		default:
+|			ltmp = valents[group | pt->ipvsrc].val;
+
 F12L144:	move.l	PT(A6),A0
 		clr.l	D0
@@ -7008,12 +7008,12 @@
 		move	8(A0,A1.l),D0
 		move.l	D0,LTMP(A6)
-*
-*		}
-*
-*
-		.page
-*
-*		ltmp = (ltmp * pt->ipvmlt) >> 15;
-*
+
+|		}
+
+
+		.page
+
+|		ltmp = (ltmp | pt->ipvmlt) >> 15;
+
 F12L137:	move.l	PT(A6),A0
 		move.w	4(A0),D0
@@ -7023,52 +7023,52 @@
 		asr.l	D1,D0
 		move.l	D0,LTMP(A6)
-*
-*		ltmp += (long)pt->ipval;
-*
+
+|		ltmp += (long)pt->ipval;
+
 		move.l	PT(A6),A0
 		move	2(A0),D0
 		ext.l	D0
 		add.l	D0,LTMP(A6)
-*
-*		if (ltmp GT (long)VALMAX)
-*			ltmp = (long)VALMAX;
-*
+
+|		if (ltmp GT (long)VALMAX)
+|			ltmp = (long)VALMAX;
+
 		cmp.l	#VALMAX,LTMP(A6)
 		ble	F12L146
-*
+
 		move.l	#VALMAX,LTMP(A6)
 		bra	F12L147
-*
-*		else if (ltmp LT (long)VALMIN)
-*			ltmp = (long)VALMIN;
-*
+
+|		else if (ltmp LT (long)VALMIN)
+|			ltmp = (long)VALMIN;
+
 F12L146:	cmp.l	#VALMIN,LTMP(A6)
 		bge	F12L147
-*
+
 		move.l	#VALMIN,LTMP(A6)
-*
-*		tfpval = (short)ltmp;
-*
+
+|		tfpval = (short)ltmp;
+
 F12L147:	move.w	LTMP+2(A6),TFPVAL(A6)
 		bra	F12L149
-*
-*	} else {
-*
-*		tfpval = pt->ipval;
-*
+
+|	} else {
+
+|		tfpval = pt->ipval;
+
 F12L136:	move.l	PT(A6),A0
 		move	2(A0),TFPVAL(A6)
-*
-*	}
-*
-		.page
-*
-*	fpmant = (((long)pt->iptom & 0x0000FFF0L)
-*		* ((long)timemlt & 0x0000FFFFL)) >> 15;
-*
+
+|	}
+
+		.page
+
+|	fpmant = (((long)pt->iptom & 0x0000FFF0L)
+|		| ((long)timemlt & 0x0000FFFFL)) >> 15;
+
 F12L149:	move.l	PT(A6),A0
 		move.w	(A0),D0
 		move.w	D0,D2
-		andi.w	#$FFF0,D0
+		andi.w	#0xFFF0,D0
 		move.w	_timemlt,D1
 		muls	D1,D0
@@ -7076,145 +7076,145 @@
 		asr.l	D1,D0
 		move	D0,R_FPMANT
-*
-*	fpexp = expbit[pt->iptim & 0x000F];
-*
-		and	#$000F,D2
+
+|	fpexp = expbit[pt->iptim & 0x000F];
+
+		and	#0x000F,D2
 		move	D2,A0
 		add.l	A0,A0
 		add.l	#_expbit,A0
 		move	(A0),R_FPEXP
-*
-		.page
-*
-*		fp->idfpch = pch;
-*
+
+		.page
+
+|		fp->idfpch = pch;
+
 F12L162:	move	PCH(A6),(A_FP)
-*
-*		fpval = ((tfpval >> 5) - 500) << 6;
-*
+
+|		fpval = ((tfpval >> 5) - 500) << 6;
+
 		move	TFPVAL(A6),R_FPVAL
 		asr	#5,R_FPVAL
 		add	#-500,R_FPVAL
 		asl	#6,R_FPVAL
-*
-		.page
-*
+
+		.page
+
 		move.b	5(A_FP),D0
 		ext.w	D0
 		sub.w	#1,D0
 		movea.l	PT(A6),A0
-*
-*	oldi = setipl(FPU_DI);
-*
+
+|	oldi = setipl(FPU_DI);
+
 		move	sr,OLDI(A6)
 		move	#FPU_DI,sr
-*
+
 F12L168:	clr.b	10(A0)
 		add.l	#12,a0
 		dbra	D0,F12L168
-*
-		.page
-*
-*	fp->idftmd ^= I_NVBITS;
-*
+
+		.page
+
+|	fp->idftmd ^= I_NVBITS;
+
 F12L165:	eor.b	#24,7(A_FP)
-*
-*	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
-*
+
+|	fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
+
 		move.b	7(A_FP),R_FPCTL
 		and	#28,R_FPCTL
 		or	#3,R_FPCTL
-*
-*	fp->idfcpt = fp->idfpt1;
-*
+
+|	fp->idfcpt = fp->idfpt1;
+
 		move.b	6(A_FP),8(A_FP)
-*
-*	fp->idftmd |= I_ACTIVE;
-*
+
+|	fp->idftmd |= I_ACTIVE;
+
 		or.b	#2,7(A_FP)
-*
-*	fp->idftrf = trg;
-*
+
+|	fp->idftrf = trg;
+
 		move	TRG(A6),10(A_FP)
-*
-*	*(fpu + (long)FPU_TCV1) = srcval;
-*
-		move	SRCVAL(A6),$8(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TCV1) = srcval;
+
+		move	SRCVAL(A6),0x8(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TSF1) = mltval;
-*
-		move	MLTVAL(A6),$A(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TSF1) = mltval;
+
+		move	MLTVAL(A6),0xA(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TMNT) = fpmant;
-*
-		move	R_FPMANT,$14(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TMNT) = fpmant;
+
+		move	R_FPMANT,0x14(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TEXP) = fpexp;
-*
-		move	R_FPEXP,$16(A_FPU)
-*
-*	++octype;
-*
+
+|	|(fpu + (long)FPU_TEXP) = fpexp;
+
+		move	R_FPEXP,0x16(A_FPU)
+
+|	++octype;
+
 		add	#1,OCTYPE(A6)
-*
-		.page
-*
-*	if (fp->idftmd & I_VNSUBN)
-*
+
+		.page
+
+|	if (fp->idftmd & I_VNSUBN)
+
 		btst	#3,7(A_FP)
 		beq	F12L169
-*
-*		*(fpu + (long)FPU_TNV1) = fpval;
-*
-		move	R_FPVAL,$1C(A_FPU)
+
+|		|(fpu + (long)FPU_TNV1) = fpval;
+
+		move	R_FPVAL,0x1C(A_FPU)
 		bra	F12L170
-*
-*	else
-*		*(fpu + (long)FPU_TNV0) = fpval;
-*
+
+|	else
+|		|(fpu + (long)FPU_TNV0) = fpval;
+
 F12L169:	move	R_FPVAL,2(A_FPU)
-*
-*	++octype;
-*
+
+|	++octype;
+
 F12L170:	add	#1,OCTYPE(A6)
-*
-*	*(fpu + (long)FPU_TCTL) = fpctl;
-*
+
+|	|(fpu + (long)FPU_TCTL) = fpctl;
+
 		move	R_FPCTL,(A_FPU)
-*
-*	setipl(oldi);
-*
+
+|	setipl(oldi);
+
 		move	OLDI(A6),sr
-*
-*    }
-*
-		.page
-*
+
+|    }
+
+		.page
+
 FNEXIT:		tst.l	(sp)+
 		movem.l	(sp)+,R_FPVAL-R_FPMANT/A_SMP-A_FP
 		unlk	A6
 		rts
-*
-* }
-*
-		.page
-*
+
+| }
+
+		.page
+
 		.data
-*
-* Jump tables for switch statements
-* ---------------------------------
-*
+
+| Jump tables for switch statements
+| ---------------------------------
+
 F00L123:	.dc.l	F00L116
 		.dc.l	F00L117
@@ -7228,5 +7228,5 @@
 		.dc.l	F00L122
 		.dc.l	F00L119
-*
+
 F00L145:	.dc.l	F00L139
 		.dc.l	F00L144
@@ -7239,5 +7239,5 @@
 		.dc.l	F00L144
 		.dc.l	F00L141
-*
+
 F01L123:	.dc.l	F01L116
 		.dc.l	F01L117
@@ -7251,5 +7251,5 @@
 		.dc.l	F01L122
 		.dc.l	F01L119
-*
+
 F01L145:	.dc.l	F01L139
 		.dc.l	F01L144
@@ -7262,5 +7262,5 @@
 		.dc.l	F01L144
 		.dc.l	F01L141
-*
+
 F02L123:	.dc.l	F02L116
 		.dc.l	F02L117
@@ -7274,5 +7274,5 @@
 		.dc.l	F02L122
 		.dc.l	F02L119
-*
+
 F02L145:	.dc.l	F02L139
 		.dc.l	F02L144
@@ -7285,5 +7285,5 @@
 		.dc.l	F02L144
 		.dc.l	F02L141
-*
+
 F03L123:	.dc.l	F03L116
 		.dc.l	F03L117
@@ -7297,5 +7297,5 @@
 		.dc.l	F03L122
 		.dc.l	F03L119
-*
+
 F03L145:	.dc.l	F03L139
 		.dc.l	F03L144
@@ -7308,5 +7308,5 @@
 		.dc.l	F03L144
 		.dc.l	F03L141
-*
+
 F04L123:	.dc.l	F04L116
 		.dc.l	F04L117
@@ -7320,5 +7320,5 @@
 		.dc.l	F04L122
 		.dc.l	F04L119
-*
+
 F04L145:	.dc.l	F04L139
 		.dc.l	F04L144
@@ -7331,5 +7331,5 @@
 		.dc.l	F04L144
 		.dc.l	F04L141
-*
+
 F05L123:	.dc.l	F05L116
 		.dc.l	F05L117
@@ -7343,5 +7343,5 @@
 		.dc.l	F05L122
 		.dc.l	F05L119
-*
+
 F05L145:	.dc.l	F05L139
 		.dc.l	F05L144
@@ -7354,5 +7354,5 @@
 		.dc.l	F05L144
 		.dc.l	F05L141
-*
+
 F06L123:	.dc.l	F06L116
 		.dc.l	F06L117
@@ -7366,5 +7366,5 @@
 		.dc.l	F06L122
 		.dc.l	F06L119
-*
+
 F06L145:	.dc.l	F06L139
 		.dc.l	F06L144
@@ -7377,5 +7377,5 @@
 		.dc.l	F06L144
 		.dc.l	F06L141
-*
+
 F07L123:	.dc.l	F07L116
 		.dc.l	F07L117
@@ -7389,5 +7389,5 @@
 		.dc.l	F07L122
 		.dc.l	F07L119
-*
+
 F07L145:	.dc.l	F07L139
 		.dc.l	F07L144
@@ -7400,5 +7400,5 @@
 		.dc.l	F07L144
 		.dc.l	F07L141
-*
+
 F08L123:	.dc.l	F08L116
 		.dc.l	F08L117
@@ -7412,5 +7412,5 @@
 		.dc.l	F08L122
 		.dc.l	F08L119
-*
+
 F08L145:	.dc.l	F08L139
 		.dc.l	F08L144
@@ -7423,5 +7423,5 @@
 		.dc.l	F08L144
 		.dc.l	F08L141
-*
+
 F09L123:	.dc.l	F09L116
 		.dc.l	F09L117
@@ -7435,5 +7435,5 @@
 		.dc.l	F09L122
 		.dc.l	F09L119
-*
+
 F09L145:	.dc.l	F09L139
 		.dc.l	F09L144
@@ -7446,5 +7446,5 @@
 		.dc.l	F09L144
 		.dc.l	F09L141
-*
+
 F10L123:	.dc.l	F10L116
 		.dc.l	F10L117
@@ -7458,5 +7458,5 @@
 		.dc.l	F10L122
 		.dc.l	F10L119
-*
+
 F10L145:	.dc.l	F10L139
 		.dc.l	F10L144
@@ -7469,5 +7469,5 @@
 		.dc.l	F10L144
 		.dc.l	F10L141
-*
+
 F11L123:	.dc.l	F11L116
 		.dc.l	F11L117
@@ -7481,5 +7481,5 @@
 		.dc.l	F11L122
 		.dc.l	F11L119
-*
+
 F11L145:	.dc.l	F11L139
 		.dc.l	F11L144
@@ -7492,5 +7492,5 @@
 		.dc.l	F11L144
 		.dc.l	F11L141
-*
+
 F12L123:	.dc.l	F12L116
 		.dc.l	F12L117
@@ -7504,5 +7504,5 @@
 		.dc.l	F12L122
 		.dc.l	F12L119
-*
+
 F12L145:	.dc.l	F12L139
 		.dc.l	F12L144
@@ -7515,7 +7515,7 @@
 		.dc.l	F12L144
 		.dc.l	F12L141
-*
-* vbtab -- vbuf pointer table -- indexed by voice number
-* -----    ---------------------------------------------
+
+| vbtab -- vbuf pointer table -- indexed by voice number
+| -----    ---------------------------------------------
 vbtab:		.dc.l	_vbufs
 		.dc.l	_vbufs+VBLEN
@@ -7530,4 +7530,4 @@
 		.dc.l	_vbufs+(10*VBLEN)
 		.dc.l	_vbufs+(11*VBLEN)
-*
+
 		.end
Index: ram/fpuint.s
===================================================================
--- ram/fpuint.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ ram/fpuint.s	(revision 08e1da1cabca094217491629d328ae7146816782)
@@ -1,21 +1,21 @@
-* ------------------------------------------------------------------------------
-* fpuint.s -- process FPU interrupts / clear FPU
-* Version 63 -- 1988-08-31 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| fpuint.s -- process FPU interrupts / clear FPU
+| Version 63 -- 1988-08-31 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
 		.text
-*
-		.xdef	_fpuint		* process an FPU interrupt
-		.xdef	_fpuclr		* reset the FPU
-		.xdef	_clrvce		* quiet a voice
-*
-		.xdef	_fputrap	* a very good debug trap point
-*
-		.xdef	_fp_resv	* 'spare' function reset value table
-		.xdef	_fpuifnc	* FPU interrupt code  (voice / function)
-*
-		.xref	_irand		* ranged random number function
-		.xref	_scope		* diagnostic scope function
-		.xref	_xgetran	* random number function
-*
+
+		.xdef	_fpuint		| process an FPU interrupt
+		.xdef	_fpuclr		| reset the FPU
+		.xdef	_clrvce		| quiet a voice
+
+		.xdef	_fputrap	| a very good debug trap point
+
+		.xdef	_fp_resv	| 'spare' function reset value table
+		.xdef	_fpuifnc	| FPU interrupt code  (voice / function)
+
+		.xref	_irand		| ranged random number function
+		.xref	_scope		| diagnostic scope function
+		.xref	_xgetran	| random number function
+
 		.xref	_expbit
 		.xref	_funcndx
@@ -33,937 +33,937 @@
 		.xref	_vce2trg
 		.xref	_veltab
-*
-		.page
-* ------------------------------------------------------------------------------
-* Register usage
-* --------------
-*	d0	scratch
-*	d1	FPU function index
-*	d2	point index from FH_CPT  (idfcpt)
-*	d3	scratch
-*	d4	jump point number from PT_PAR1  (ippar1)
-*	d5	scratch
-*
-*	a0	scratch
-*	a1	function header base
-*	a2	point table base
-*	a3	FPU base
-*
-* ------------------------------------------------------------------------------
-* FPU definitions
-* ---------------
-*
-UPD_BIT		.equ	$0001			* update bit  (1 = update)
-INT_BIT		.equ	$0002			* int. bit    (0 = disable)
-RAT_BIT		.equ	$0004			* ratio bit   (0 = ratio)
-*
-VSUBNBIT	.equ	3			* new value select bit number
-VAL_BITS	.equ	$0018			* new value select bit mask
-*
-MSK_RNVB	.equ	$000C			* new value / ratio bits
-MSK_ONVB	.equ	$0010			* old new value bit
-*
-FKILL		.equ	$0014			* kill value for function
-FSEND		.equ	$0015			* send new value to function
-*
-CLREXP		.equ	$8000			* clear value for time exponent
-CLRMNT		.equ	$8000			* clear value for time mantissa
-*
-* ------------------------------------------------------------------------------
-* Miscellaneous definitions
-* -------------------------
-*
-PCHMAX		.equ	21920			* maximum pitch value
-VALMAX		.equ	32000			* maximum value to send to FPU
-VALMIN		.equ	-32000			* minimum value to send to FPU
-*
-LSPCH		.equ	2			* left shift for sources to freq
-*
-VALLEN		.equ	10			* length of the 'valent' struct
-VT_VAL		.equ	8			* value offset in 'valent'
-*
-		.page
-* ------------------------------------------------------------------------------
-* FPU addresses
-* -------------
-*
-FPUBASE		.equ	$180000			* FPU base address
-*
-FPUWST		.equ	FPUBASE			* FPU waveshape base
-FPUFUNC		.equ	FPUBASE+$4000		* FPU function base
-FPUINT1		.equ	FPUBASE+$4000		* FPU int. input address (R/O)
-FPUINT2		.equ	FPUBASE+$6000		* FPU int. reset address (W/O)
-FPUCFG		.equ	FPUBASE+$5FE0		* FPU config. data address (W/O)
-*
-F_CTL		.equ	$00			* control word
-F_VAL10		.equ	$02			* new value "10"
-F_CV1		.equ	$08			* control voltage 1
-F_SF1		.equ	$0A			* scale factor 1
-F_CV2		.equ	$0C			* control voltage 2
-F_SF2		.equ	$0E			* scale factor 2
-F_CV3		.equ	$10			* control voltage 3
-F_SF3		.equ	$12			* scale factor 3
-F_MNT		.equ	$14			* time mantissa
-F_EXP		.equ	$16			* time exponent
-F_VAL01		.equ	$1C			* new value "01"
-*
-P_FREQ1		.equ	$0020			* frequency 1
-P_FREQ2		.equ	$0060			* frequency 2
-P_FREQ3		.equ	$00A0			* frequency 3
-P_FREQ4		.equ	$00E0			* frequency 4
-P_FILTER	.equ	$0140			* filter
-P_FILTRQ	.equ	$00C0			* filter q
-*
-P_INDEX1	.equ	$0120			* index 1
-P_INDEX2	.equ	$0160			* index 2
-P_INDEX3	.equ	$0180			* index 3
-P_INDEX4	.equ	$01A0			* index 4
-P_INDEX5	.equ	$01C0			* index 5
-P_INDEX6	.equ	$01E0			* index 6
-*
-P_LEVEL		.equ	$0040			* level
-*
-P_LOCN		.equ	$0080			* location
-P_DYNAM		.equ	$0100			* dynamics
-*
-		.page
-* ------------------------------------------------------------------------------
-* Structure definitions
-* ------------------------------------------------------------------------------
-* The following MUST match the idfnhdr structure definition in instdsp.h:
-*
-FH_LEN		.equ	12		* length of the idfnhdr structure
-*
-FH_PCH		.equ	0		* WORD - pitch offset  (freq1 only)
-FH_MLT		.equ	2		* WORD - overall value multiplier
-FH_SRC		.equ	4		* BYTE - overall value source
-FH_PIF		.equ	5		* BYTE - # of points in the function
-FH_PT1		.equ	6		* BYTE - index of first point
-FH_TMD		.equ	7		* BYTE - trigger mode / control bits
-FH_CPT		.equ	8		* BYTE - current point
-FH_PRM		.equ	9		* BYTE - misc. function parameter
-FH_TRG		.equ	10		* WORD - trigger
-*
-I_ACTIVE	.equ	1		* 'Active' bit number        (in FH_TMD)
-*
-MSK_CTL		.equ	$001C		* mask for FPU hardware bits (in FH_TMD)
-*
-* ------------------------------------------------------------------------------
-* The following MUST match the instpnt structure definition in instdsp.h:
-*
-PT_LEN		.equ	12		* length of the instpnt structure
-*
-PT_TIM		.equ	0		* WORD - time (packed)
-PT_VAL		.equ	2		* WORD - value
-PT_VMLT		.equ	4		* WORD - value multiplier
-PT_VSRC		.equ	6		* BYTE - value source
-PT_ACT		.equ	7		* BYTE - action
-PT_PAR1		.equ	8		* BYTE - parameter 1
-PT_PAR2		.equ	9		* BYTE - parameter 2
-PT_PAR3		.equ	10		* BYTE - parameter 3
-PT_PAD		.equ	11		* BYTE - padding for even boundary
-*
-MSK_MNT		.equ	$FFF0		* mask for mantissa  (in PT_TIM)
-MSK_EXP		.equ	$000F		* mask for exponent  (in PT_TIM)
-*
-MAX_ACT		.equ	7		* maximum action code value
-*
-		.page
-*
-* ------------------------------------------------------------------------------
-* pflist definitions -- must match those in instdsp.h
-*
-PF_NEXT		.equ	0
-PF_TRIG		.equ	4
-PF_FUNC		.equ	6
-PF_D1		.equ	8
-PF_D2		.equ	12
-PF_D4		.equ	16
-PF_A1		.equ	20
-PF_A2		.equ	24
-PF_A3		.equ	28
-* ------------------------------------------------------------------------------
-* Source definitions -- must match those in 'smdefs.h'
-*
-SM_RAND		.equ	1		* random
-SM_PTCH		.equ	5		* pitch
-SM_KPRS		.equ	6		* key pressure
-SM_KVEL		.equ	7		* key velocity
-SM_FREQ		.equ	10		* frequency
-*
-		.page
-* ------------------------------------------------------------------------------
-* _fpuint() -- process FPU interrupts
-*
-*	void
-*	fpuint();
-*
-*		Processes FPU interrupts.  Must be the target of vector 26,
-*		which is Autovector Interrupt level 2.
-*
-* ------------------------------------------------------------------------------
-*
-_fpuint:	movem.l	d0-d5/a0-a3,-(a7)	* preserve registers we use
-		move.w	FPUINT1,d0	* read FPU interrupt status
-		andi.w	#$00FF,d0	* mask out garbage in MS bits
-		move.w	d0,_fpuifnc	* save for later use
-		move.w	_ndisp,d1	* get display number
-		cmpi.w	#11,d1		* see if we display
-		bne	nodisp		* jump if not
-*
-		tst.w	_scopef		* ...
-		beq	nodisp		* ...
-*
-		move.w	d0,-(a7)	* display value
-		jsr	_scope		* ...
-		tst.w	(a7)+		* ...
-*
-		move.w	_fpuifnc,d0	* get FPU status
-*
-nodisp:		move.w	d0,d1		* save in d1  (becomes function offset)
-*
-		lsl.w	#5,d1		* develop FPU function offset
-		lea	FPUFUNC,a3	* setup FPU function base address
-*
-		lsl.w	#3,d0		* develop funcndx[] index
-		lea	_funcndx,a0	* setup funcndx[] base address
-*
-		tst.l	0(a0,d0.W)	* see if function is defined
-		bne	fnok		* jump if so
-*
-		move.w	d1,d0		* get function offset in d0
-		andi.w	#$1E00,d0	* mask for voice number
-		cmpi.w	#$1800,d0	* see if it's a real voice  (0..11)
-		bge	fpexit		* don't send a kill if not a real voice
-*
-		move.w	#FKILL,F_CTL(a3,d1.W)	* kill the undefined function
-*
-fpexit:		clr.w	FPUINT2		* reset the FPU interrupt latch
-		movem.l	(a7)+,d0-d5/a0-a3	* restore the registers
-		rte			* return to interrupted code
-*
-		.page
-* ------------------------------------------------------------------------------
-* set up to process active functions,  stop ones that should be inactive
-* ------------------------------------------------------------------------------
-fnok:		movea.l	0(a0,d0.W),a1	* get pointer to function header
-		movea.l	4(a0,d0.W),a2	* get pointer to point table
-		btst	#I_ACTIVE,FH_TMD(a1)	* see if function is active
-		bne	doact		* go process action if so
-*
-* ------------------------------------------------------------------------------
-* stop a function
-* ------------------------------------------------------------------------------
-stopfn:		move.b	FH_TMD(a1),d0	* get function control bits
-		andi.w	#MSK_RNVB,d0	* mask for ratio / new new-value bit
-		move.w	d0,d3		* isolate new new-value bit
-		add.w	d3,d3		* ... from function header
-		andi.w	#MSK_ONVB,d3	* ... shift to old new-value bit
-		or.w	d3,d0		* ... and put new bit in old bit	
-		move.w	d0,F_CTL(a3,d1.W)	* stop the function
-		bclr	#I_ACTIVE,FH_TMD(a1)	* reset the active bit
-		bra	fpexit		* go restore registers and exit
-*
-		.page
-* ------------------------------------------------------------------------------
-* setup for and dispatch to the proper action handler
-* ------------------------------------------------------------------------------
-doact:		clr.w	d2		* get current point index in d2
-		move.b	FH_CPT(a1),d2	* ...
-		lsl.w	#2,d2		* multiply it by the length of a point
-		move.w	d2,d0		* ...  (fast multiply by PT_LEN = 12
-		add.w	d2,d2		* ...   via shift and add)
-		add.w	d0,d2		* ...
-		clr.w	d4		* get jump point # into d4
-		move.b	PT_PAR1(a2,d2.W),d4	* ...
-		clr.w	d3		* get action code in d3
-		move.b	PT_ACT(a2,d2.W),d3	* ...
-		cmpi.b	#MAX_ACT,d3	* check against the limit
-		bgt	stopfn		* stop things if it's a bad action code
-*
-		lsl.w	#2,d3		* develop index to action dispatch table
-		lea	actab,a0	* get the address of the action handler
-		movea.l	0(a0,d3.W),a0	* ...
-*
-* ------------------------------------------------------------------------------
-* At this point we're ready to do the action associated with the point,
-* and the registers are set up,  and will remain,  as follows:
-*
-*	d1	FPU function index	a1	function header base
-*	d2	point table index	a2	point table base
-*					a3	FPU function base
-*	d4	jump point number
-*
-*	d0, d3, d5, and a0 are used as scratch throughout the code.
-*
-* ------------------------------------------------------------------------------
-*
-_fputrap:	jmp	(a0)		* dispatch to action handler
-*
-		.page
-* ------------------------------------------------------------------------------
-* act0 -- AC_NULL -- no action
-* ----    --------------------
-act0:		move.b	FH_PT1(a1),d0	* get first point number
-		add.b	FH_PIF(a1),d0	* add number of points in function
-		subq.b	#1,d0		* make it last point number
-		cmp.b	FH_CPT(a1),d0	* see if we're at the last point
-		beq	stopfn		* stop function if so
-*
-		addq.b	#1,FH_CPT(a1)	* update function header for next point
-		addi.w	#PT_LEN,d2	* advance the point index
-*
-* ------------------------------------------------------------------------------
-* outseg -- output a segment
-* ------    ----------------
-outseg:		move.w	PT_TIM(a2,d2.w),d3	* get packed time
-		move.w	d3,d0			* extract mantissa
-		andi.w	#MSK_MNT,d0		* ...
-		mulu	_timemlt,d0		* multiply by panel time pot value
-		lsr.l	#8,d0			* ... and scale it
-		lsr.l	#7,d0			* ...
-		move.w	d0,F_MNT(a3,d1.W)	* send mantissa to FPU
-		andi.w	#MSK_EXP,d3		* extract exponent code
-		add.w	d3,d3			* look up decoded exponent
-		lea	_expbit,a0		* ... in expbit
-		move.w	0(a0,d3.W),F_EXP(a3,d1.W)	* send exponent to FPU
-		move.w	PT_VAL(a2,d2.W),d3	* get the function value
-*
-* ------------------------------------------------------------------------------
-* get the point source, if any
-* ------------------------------------------------------------------------------
-		tst.w	PT_VMLT(a2,d2.W)	* see if we have a point mlt.
-		beq	nosrc			* don't do anything for zero
-*
-		clr.w	d0			* get the source number
-		move.b	PT_VSRC(a2,d2.W),d0	* ...
-		beq	nosrc			* don't do anything for zero
-*
-* ------------------------------------------------------------------------------
-* SM_RAND -- random
-* ------------------------------------------------------------------------------
-		cmpi.w	#SM_RAND,d0		* is this the random source ?
-		bne	srctyp0			* jump if not
-*
-		movem.l	d1-d2/a0-a2,-(a7)	* preserve registers around call
-		move.w	PT_VMLT(a2,d2.W),-(a7)	* pass multiplier to xgetran()
-		jsr	_xgetran		* call for a random number
-		tst.w	(a7)+			* clean up stack
-		movem.l	(a7)+,d1-d2/a0-a2	* restore registers
-		move.w	d0,d5			* put random value in the value register
-		bra	applym			* go apply the multiplier
-*
-		.page
-* ------------------------------------------------------------------------------
-* SM_FREQ -- frequency
-* ------------------------------------------------------------------------------
-srctyp0:	cmpi.w	#SM_FREQ,d0	* is this the frequency source ?
-		bne	srctyp1		* jump if not
-*
-		move.w	(a1),d0		* get the pitch
-		lsr.w	#6,d0		* shift to a word index
-		andi.w	#$01FE,d0	* mask out extraneous bits
-		lea	_ptoftab,a0	* get entry from ptoftab[]
-		move.w	0(a0,d0.W),d5	* ...
-		bra	applym		* go apply the multiplier
-*
-* ------------------------------------------------------------------------------
-* SM_PTCH -- pitch
-* ------------------------------------------------------------------------------
-srctyp1:	cmpi.w	#SM_PTCH,d0	* is this the pitch source ?
-		bne	srctyp2		* jump if not
-*
-		move.w	(a1),d5		* get the pitch as the value
-		bra	applym		* go apply the multiplier
-*
-* ------------------------------------------------------------------------------
-* SM_KVEL -- velocity
-* ------------------------------------------------------------------------------
-srctyp2:	cmpi.w	#SM_KVEL,d0	* is this the key velocity source ?
-		bne	srctyp3		* jump if not
-*
-		move.w	FH_TRG(a1),d0	* get the trigger number
-		add.w	d0,d0		* ... as a word index
-		lea	_veltab,a0	* ... into veltab[]
-		move.w	0(a0,d0.W),d5	* get the velocity from veltab[trg]
-		bra	applym		* go apply the multiplier
-*
-* ------------------------------------------------------------------------------
-* SM_KPRS -- pressure
-* ------------------------------------------------------------------------------
-srctyp3:	cmpi.w	#SM_KPRS,d0	* is this the key pressure source ?
-		bne	srctyp4		* jump if not  (must be an analog input)
-*
-		move.w	FH_TRG(a1),d0	* get the trigger number
-		add.w	d0,d0		* ... as a word index
-		lea	_prstab,a0	* ... into prstab[]
-		move.w	0(a0,d0.W),d5	* get the pressure from prstab[trg]
-		bra	applym		* go apply the multiplier
-*
-		.page
-* ------------------------------------------------------------------------------
-* all other sources come out of the valents[] array
-* ------------------------------------------------------------------------------
-srctyp4:	lea	_vce2grp,a0	* point at vce2grp[]
-		move.w	_fpuifnc,d5	* get voice number in d5
-		lsr.w	#3,d5		* ...
-		andi.w	#$001E,d5	* ... as a word index
-		move.w	0(a0,d5.W),d5	* get the group number
-		subq.w	#1,d5		* ...
-		lsl.w	#4,d5		* shift it left a nybble
-		or.w	d5,d0		* OR it into the source number
-		add.w	d0,d0		* make source number a valents[] index
-		move.w	d0,d5		* ... (fast multiply by VALLEN = 10
-		lsl.w	#2,d0		* ...  via shift and add)
-		add.w	d5,d0		* ...
-		lea	_valents,a0	* get base of valents[]
-		move.w	VT_VAL(a0,d0.W),d5	* get value
-*
-* ------------------------------------------------------------------------------
-* apply the multiplier to the source, and add it to the function value
-* ------------------------------------------------------------------------------
-applym:		muls	PT_VMLT(a2,d2.W),d5	* apply the multiplier
-		asr.l	#7,d5		* scale the result
-		asr.l	#8,d5		* ...
-		ext.l	d3		* add the function value
-		add.l	d3,d5		* ...
-		cmpi.l	#VALMAX,d5	* check for overflow
-		ble	srcmlt1		* jump if no overflow
-*
-		move.l	#VALMAX,d5	* limit at VALMAX
-		bra	srcmlt2		* ...
-*
-srcmlt1:	cmpi.l	#VALMIN,d5	* check for underflow
-		bge	srcmlt2		* jump if no underflow
-*
-		move.l	#VALMIN,d5	* limit at VALMIN
-*
-srcmlt2:	move.w	d5,d3		* setup value for output to FPU
-*
-		.page
-* ------------------------------------------------------------------------------
-* adjust the value according to the function type
-* ------------------------------------------------------------------------------
-nosrc:		move.w	d1,d0		* get function type
-		andi.w	#$01E0,d0	* ...
-*
-* ------------------------------------------------------------------------------
-* level or location
-* ------------------------------------------------------------------------------
-		cmpi.w	#P_LEVEL,d0	* see if it's the level
-		beq	outsegl		* jump if so
-*
-		cmpi.w	#P_LOCN,d0	* see if it's the location
-		bne	outsegf		* jump if not
-*
-		tst.w	d3		* check sign of value
-		bpl	outsegc		* jump if positive
-*
-		clr.w	d3		* force negative values to 0
-*
-outsegc:	asr.w	#5,d3		* shift value to LS bits
-		sub.w	#500,d3		* subtract 5.00 from value
-		asl.w	#6,d3		* readjust to MS bits
-		bra	outseg3		* go output the value
-*
-outsegl:	tst.w	d3		* check sign of value
-		bpl	outsegm		* jump if positive
-*
-		clr.w	d3		* limit negative values at 0
-*
-outsegm:	asr.w	#5,d3		* shift value to LS bits
-		sub.w	#500,d3		* subtract 5.00 from value
-		asl.w	#6,d3		* readjust to MS bits
-		bra	outseg3		* go output the value
-*
-		.page
-* ------------------------------------------------------------------------------
-* filter
-* ------------------------------------------------------------------------------
-outsegf:	cmpi.w	#P_FILTER,d0	* see if it's filter
-		bne	outsegp		* jump if not
-*
-		ext.l	d3		* make function value a long
-		asr.l	#1,d3		* multiply function value by .75
-		move.l	d3,d0		* ...  (fast multiply by .75
-		asr.l	#1,d0		* ...   via shift and add)
-		add.l	d0,d3		* ...
-		move.w	(a1),d0		* add pitch
-		ext.l	d0		* ...
-		add.l	d0,d3		* ...
-		cmpi.l	#VALMAX,d3	* see if it's within limits
-		ble	outsega		* ...
-*
-		move.w	#VALMAX,d3	* limit at VALMAX
-		bra	outseg3		* ...
-*
-outsega:	cmpi.l	#VALMIN,d3	* ...
-		bge	outseg3		* ...
-*
-		move.w	#VALMIN,d3	* limit at VALMIN
-		bra	outseg3		* ...
-*
-		.page
-* ------------------------------------------------------------------------------
-* freq 1..4
-* ------------------------------------------------------------------------------
-outsegp:	cmpi.w	#P_FREQ1,d0	* see if it's freq1
-		beq	outseg0		* go process freq1
-*
-outsegq:	cmpi.w	#P_FREQ2,d0	* see if it's freq2
-		beq	outseg0		* process it if so
-*
-		cmpi.w	#P_FREQ3,d0	* see if it's freq3
-		beq	outseg0		* process it if so
-*
-		cmpi.w	#P_FREQ4,d0	* see if it's freq4
-		bne	outseg3		* jump if not
-*
-outseg0:	ext.l	d3		* scale the point value to cents offset
-		asr.l	#5,d3		* ...
-		sub.l	#500,d3		* ... value - 500
-		asl.l	#LSPCH,d3	* mult. by 2 and scale for 1/2 cent lsb
-		move.w	(a1),d0		* add pitch from function header
-		ext.l	d0		* ...
-		add.l	d0,d3		* ...
-		cmp.l	#PCHMAX,d3	* see if result is valid
-		ble	outseg3		* jump if within pitch limits
-*
-		move.l	#PCHMAX,d3	* limit at maximum pitch
-*
-* ------------------------------------------------------------------------------
-* send the value to the FPU
-* ------------------------------------------------------------------------------
-outseg3:	move.b	FH_TMD(a1),d0	* get hardware bits from function header
-		eor.w	#VAL_BITS,d0	* toggle new value select bits
-		move.b	d0,FH_TMD(a1)	* store updated word
-		btst.l	#VSUBNBIT,d0	* check which value address to use
+
+		.page
+| ------------------------------------------------------------------------------
+| Register usage
+| --------------
+|	d0	scratch
+|	d1	FPU function index
+|	d2	point index from FH_CPT  (idfcpt)
+|	d3	scratch
+|	d4	jump point number from PT_PAR1  (ippar1)
+|	d5	scratch
+
+|	a0	scratch
+|	a1	function header base
+|	a2	point table base
+|	a3	FPU base
+
+| ------------------------------------------------------------------------------
+| FPU definitions
+| ---------------
+
+UPD_BIT		=	0x0001			| update bit  (1 = update)
+INT_BIT		=	0x0002			| int. bit    (0 = disable)
+RAT_BIT		=	0x0004			| ratio bit   (0 = ratio)
+
+VSUBNBIT	=	3			| new value select bit number
+VAL_BITS	=	0x0018			| new value select bit mask
+
+MSK_RNVB	=	0x000C			| new value / ratio bits
+MSK_ONVB	=	0x0010			| old new value bit
+
+FKILL		=	0x0014			| kill value for function
+FSEND		=	0x0015			| send new value to function
+
+CLREXP		=	0x8000			| clear value for time exponent
+CLRMNT		=	0x8000			| clear value for time mantissa
+
+| ------------------------------------------------------------------------------
+| Miscellaneous definitions
+| -------------------------
+
+PCHMAX		=	21920			| maximum pitch value
+VALMAX		=	32000			| maximum value to send to FPU
+VALMIN		=	-32000			| minimum value to send to FPU
+
+LSPCH		=	2			| left shift for sources to freq
+
+VALLEN		=	10			| length of the 'valent' struct
+VT_VAL		=	8			| value offset in 'valent'
+
+		.page
+| ------------------------------------------------------------------------------
+| FPU addresses
+| -------------
+
+FPUBASE		=	0x180000		| FPU base address
+
+FPUWST		=	FPUBASE			| FPU waveshape base
+FPUFUNC		=	FPUBASE+0x4000		| FPU function base
+FPUINT1		=	FPUBASE+0x4000		| FPU int. input address (R/O)
+FPUINT2		=	FPUBASE+0x6000		| FPU int. reset address (W/O)
+FPUCFG		=	FPUBASE+0x5FE0		| FPU config. data address (W/O)
+
+F_CTL		=	0x00			| control word
+F_VAL10		=	0x02			| new value "10"
+F_CV1		=	0x08			| control voltage 1
+F_SF1		=	0x0A			| scale factor 1
+F_CV2		=	0x0C			| control voltage 2
+F_SF2		=	0x0E			| scale factor 2
+F_CV3		=	0x10			| control voltage 3
+F_SF3		=	0x12			| scale factor 3
+F_MNT		=	0x14			| time mantissa
+F_EXP		=	0x16			| time exponent
+F_VAL01		=	0x1C			| new value "01"
+
+P_FREQ1		=	0x0020			| frequency 1
+P_FREQ2		=	0x0060			| frequency 2
+P_FREQ3		=	0x00A0			| frequency 3
+P_FREQ4		=	0x00E0			| frequency 4
+P_FILTER	=	0x0140			| filter
+P_FILTRQ	=	0x00C0			| filter q
+
+P_INDEX1	=	0x0120			| index 1
+P_INDEX2	=	0x0160			| index 2
+P_INDEX3	=	0x0180			| index 3
+P_INDEX4	=	0x01A0			| index 4
+P_INDEX5	=	0x01C0			| index 5
+P_INDEX6	=	0x01E0			| index 6
+
+P_LEVEL		=	0x0040			| level
+
+P_LOCN		=	0x0080			| location
+P_DYNAM		=	0x0100			| dynamics
+
+		.page
+| ------------------------------------------------------------------------------
+| Structure definitions
+| ------------------------------------------------------------------------------
+| The following MUST match the idfnhdr structure definition in instdsp.h:
+
+FH_LEN		=	12		| length of the idfnhdr structure
+
+FH_PCH		=	0		| WORD - pitch offset  (freq1 only)
+FH_MLT		=	2		| WORD - overall value multiplier
+FH_SRC		=	4		| BYTE - overall value source
+FH_PIF		=	5		| BYTE - # of points in the function
+FH_PT1		=	6		| BYTE - index of first point
+FH_TMD		=	7		| BYTE - trigger mode / control bits
+FH_CPT		=	8		| BYTE - current point
+FH_PRM		=	9		| BYTE - misc. function parameter
+FH_TRG		=	10		| WORD - trigger
+
+I_ACTIVE	=	1		| 'Active' bit number        (in FH_TMD)
+
+MSK_CTL		=	0x001C		| mask for FPU hardware bits (in FH_TMD)
+
+| ------------------------------------------------------------------------------
+| The following MUST match the instpnt structure definition in instdsp.h:
+
+PT_LEN		=	12		| length of the instpnt structure
+
+PT_TIM		=	0		| WORD - time (packed)
+PT_VAL		=	2		| WORD - value
+PT_VMLT		=	4		| WORD - value multiplier
+PT_VSRC		=	6		| BYTE - value source
+PT_ACT		=	7		| BYTE - action
+PT_PAR1		=	8		| BYTE - parameter 1
+PT_PAR2		=	9		| BYTE - parameter 2
+PT_PAR3		=	10		| BYTE - parameter 3
+PT_PAD		=	11		| BYTE - padding for even boundary
+
+MSK_MNT		=	0xFFF0		| mask for mantissa  (in PT_TIM)
+MSK_EXP		=	0x000F		| mask for exponent  (in PT_TIM)
+
+MAX_ACT		=	7		| maximum action code value
+
+		.page
+
+| ------------------------------------------------------------------------------
+| pflist definitions -- must match those in instdsp.h
+
+PF_NEXT		=	0
+PF_TRIG		=	4
+PF_FUNC		=	6
+PF_D1		=	8
+PF_D2		=	12
+PF_D4		=	16
+PF_A1		=	20
+PF_A2		=	24
+PF_A3		=	28
+| ------------------------------------------------------------------------------
+| Source definitions -- must match those in 'smdefs.h'
+
+SM_RAND		=	1		| random
+SM_PTCH		=	5		| pitch
+SM_KPRS		=	6		| key pressure
+SM_KVEL		=	7		| key velocity
+SM_FREQ		=	10		| frequency
+
+		.page
+| ------------------------------------------------------------------------------
+| _fpuint() -- process FPU interrupts
+
+|	void
+|	fpuint();
+
+|		Processes FPU interrupts.  Must be the target of vector 26,
+|		which is Autovector Interrupt level 2.
+
+| ------------------------------------------------------------------------------
+
+_fpuint:	movem.l	d0-d5/a0-a3,-(a7)	| preserve registers we use
+		move.w	FPUINT1,d0	| read FPU interrupt status
+		andi.w	#0x00FF,d0	| mask out garbage in MS bits
+		move.w	d0,_fpuifnc	| save for later use
+		move.w	_ndisp,d1	| get display number
+		cmpi.w	#11,d1		| see if we display
+		bne	nodisp		| jump if not
+
+		tst.w	_scopef		| ...
+		beq	nodisp		| ...
+
+		move.w	d0,-(a7)	| display value
+		jsr	_scope		| ...
+		tst.w	(a7)+		| ...
+
+		move.w	_fpuifnc,d0	| get FPU status
+
+nodisp:		move.w	d0,d1		| save in d1  (becomes function offset)
+
+		lsl.w	#5,d1		| develop FPU function offset
+		lea	FPUFUNC,a3	| setup FPU function base address
+
+		lsl.w	#3,d0		| develop funcndx[] index
+		lea	_funcndx,a0	| setup funcndx[] base address
+
+		tst.l	0(a0,d0.W)	| see if function is defined
+		bne	fnok		| jump if so
+
+		move.w	d1,d0		| get function offset in d0
+		andi.w	#0x1E00,d0	| mask for voice number
+		cmpi.w	#0x1800,d0	| see if it's a real voice  (0..11)
+		bge	fpexit		| don't send a kill if not a real voice
+
+		move.w	#FKILL,F_CTL(a3,d1.W)	| kill the undefined function
+
+fpexit:		clr.w	FPUINT2		| reset the FPU interrupt latch
+		movem.l	(a7)+,d0-d5/a0-a3	| restore the registers
+		rte			| return to interrupted code
+
+		.page
+| ------------------------------------------------------------------------------
+| set up to process active functions,  stop ones that should be inactive
+| ------------------------------------------------------------------------------
+fnok:		movea.l	0(a0,d0.W),a1	| get pointer to function header
+		movea.l	4(a0,d0.W),a2	| get pointer to point table
+		btst	#I_ACTIVE,FH_TMD(a1)	| see if function is active
+		bne	doact		| go process action if so
+
+| ------------------------------------------------------------------------------
+| stop a function
+| ------------------------------------------------------------------------------
+stopfn:		move.b	FH_TMD(a1),d0	| get function control bits
+		andi.w	#MSK_RNVB,d0	| mask for ratio / new new-value bit
+		move.w	d0,d3		| isolate new new-value bit
+		add.w	d3,d3		| ... from function header
+		andi.w	#MSK_ONVB,d3	| ... shift to old new-value bit
+		or.w	d3,d0		| ... and put new bit in old bit
+		move.w	d0,F_CTL(a3,d1.W)	| stop the function
+		bclr	#I_ACTIVE,FH_TMD(a1)	| reset the active bit
+		bra	fpexit		| go restore registers and exit
+
+		.page
+| ------------------------------------------------------------------------------
+| setup for and dispatch to the proper action handler
+| ------------------------------------------------------------------------------
+doact:		clr.w	d2		| get current point index in d2
+		move.b	FH_CPT(a1),d2	| ...
+		lsl.w	#2,d2		| multiply it by the length of a point
+		move.w	d2,d0		| ...  (fast multiply by PT_LEN = 12
+		add.w	d2,d2		| ...   via shift and add)
+		add.w	d0,d2		| ...
+		clr.w	d4		| get jump point # into d4
+		move.b	PT_PAR1(a2,d2.W),d4	| ...
+		clr.w	d3		| get action code in d3
+		move.b	PT_ACT(a2,d2.W),d3	| ...
+		cmpi.b	#MAX_ACT,d3	| check against the limit
+		bgt	stopfn		| stop things if it's a bad action code
+
+		lsl.w	#2,d3		| develop index to action dispatch table
+		lea	actab,a0	| get the address of the action handler
+		movea.l	0(a0,d3.W),a0	| ...
+
+| ------------------------------------------------------------------------------
+| At this point we're ready to do the action associated with the point,
+| and the registers are set up,  and will remain,  as follows:
+
+|	d1	FPU function index	a1	function header base
+|	d2	point table index	a2	point table base
+|					a3	FPU function base
+|	d4	jump point number
+
+|	d0, d3, d5, and a0 are used as scratch throughout the code.
+
+| ------------------------------------------------------------------------------
+
+_fputrap:	jmp	(a0)		| dispatch to action handler
+
+		.page
+| ------------------------------------------------------------------------------
+| act0 -- AC_NULL -- no action
+| ----    --------------------
+act0:		move.b	FH_PT1(a1),d0	| get first point number
+		add.b	FH_PIF(a1),d0	| add number of points in function
+		subq.b	#1,d0		| make it last point number
+		cmp.b	FH_CPT(a1),d0	| see if we're at the last point
+		beq	stopfn		| stop function if so
+
+		addq.b	#1,FH_CPT(a1)	| update function header for next point
+		addi.w	#PT_LEN,d2	| advance the point index
+
+| ------------------------------------------------------------------------------
+| outseg -- output a segment
+| ------    ----------------
+outseg:		move.w	PT_TIM(a2,d2.w),d3	| get packed time
+		move.w	d3,d0			| extract mantissa
+		andi.w	#MSK_MNT,d0		| ...
+		mulu	_timemlt,d0		| multiply by panel time pot value
+		lsr.l	#8,d0			| ... and scale it
+		lsr.l	#7,d0			| ...
+		move.w	d0,F_MNT(a3,d1.W)	| send mantissa to FPU
+		andi.w	#MSK_EXP,d3		| extract exponent code
+		add.w	d3,d3			| look up decoded exponent
+		lea	_expbit,a0		| ... in expbit
+		move.w	0(a0,d3.W),F_EXP(a3,d1.W)	| send exponent to FPU
+		move.w	PT_VAL(a2,d2.W),d3	| get the function value
+
+| ------------------------------------------------------------------------------
+| get the point source, if any
+| ------------------------------------------------------------------------------
+		tst.w	PT_VMLT(a2,d2.W)	| see if we have a point mlt.
+		beq	nosrc			| don't do anything for zero
+
+		clr.w	d0			| get the source number
+		move.b	PT_VSRC(a2,d2.W),d0	| ...
+		beq	nosrc			| don't do anything for zero
+
+| ------------------------------------------------------------------------------
+| SM_RAND -- random
+| ------------------------------------------------------------------------------
+		cmpi.w	#SM_RAND,d0		| is this the random source ?
+		bne	srctyp0			| jump if not
+
+		movem.l	d1-d2/a0-a2,-(a7)	| preserve registers around call
+		move.w	PT_VMLT(a2,d2.W),-(a7)	| pass multiplier to xgetran()
+		jsr	_xgetran		| call for a random number
+		tst.w	(a7)+			| clean up stack
+		movem.l	(a7)+,d1-d2/a0-a2	| restore registers
+		move.w	d0,d5			| put random value in the value register
+		bra	applym			| go apply the multiplier
+
+		.page
+| ------------------------------------------------------------------------------
+| SM_FREQ -- frequency
+| ------------------------------------------------------------------------------
+srctyp0:	cmpi.w	#SM_FREQ,d0	| is this the frequency source ?
+		bne	srctyp1		| jump if not
+
+		move.w	(a1),d0		| get the pitch
+		lsr.w	#6,d0		| shift to a word index
+		andi.w	#0x01FE,d0	| mask out extraneous bits
+		lea	_ptoftab,a0	| get entry from ptoftab[]
+		move.w	0(a0,d0.W),d5	| ...
+		bra	applym		| go apply the multiplier
+
+| ------------------------------------------------------------------------------
+| SM_PTCH -- pitch
+| ------------------------------------------------------------------------------
+srctyp1:	cmpi.w	#SM_PTCH,d0	| is this the pitch source ?
+		bne	srctyp2		| jump if not
+
+		move.w	(a1),d5		| get the pitch as the value
+		bra	applym		| go apply the multiplier
+
+| ------------------------------------------------------------------------------
+| SM_KVEL -- velocity
+| ------------------------------------------------------------------------------
+srctyp2:	cmpi.w	#SM_KVEL,d0	| is this the key velocity source ?
+		bne	srctyp3		| jump if not
+
+		move.w	FH_TRG(a1),d0	| get the trigger number
+		add.w	d0,d0		| ... as a word index
+		lea	_veltab,a0	| ... into veltab[]
+		move.w	0(a0,d0.W),d5	| get the velocity from veltab[trg]
+		bra	applym		| go apply the multiplier
+
+| ------------------------------------------------------------------------------
+| SM_KPRS -- pressure
+| ------------------------------------------------------------------------------
+srctyp3:	cmpi.w	#SM_KPRS,d0	| is this the key pressure source ?
+		bne	srctyp4		| jump if not  (must be an analog input)
+
+		move.w	FH_TRG(a1),d0	| get the trigger number
+		add.w	d0,d0		| ... as a word index
+		lea	_prstab,a0	| ... into prstab[]
+		move.w	0(a0,d0.W),d5	| get the pressure from prstab[trg]
+		bra	applym		| go apply the multiplier
+
+		.page
+| ------------------------------------------------------------------------------
+| all other sources come out of the valents[] array
+| ------------------------------------------------------------------------------
+srctyp4:	lea	_vce2grp,a0	| point at vce2grp[]
+		move.w	_fpuifnc,d5	| get voice number in d5
+		lsr.w	#3,d5		| ...
+		andi.w	#0x001E,d5	| ... as a word index
+		move.w	0(a0,d5.W),d5	| get the group number
+		subq.w	#1,d5		| ...
+		lsl.w	#4,d5		| shift it left a nybble
+		or.w	d5,d0		| OR it into the source number
+		add.w	d0,d0		| make source number a valents[] index
+		move.w	d0,d5		| ... (fast multiply by VALLEN = 10
+		lsl.w	#2,d0		| ...  via shift and add)
+		add.w	d5,d0		| ...
+		lea	_valents,a0	| get base of valents[]
+		move.w	VT_VAL(a0,d0.W),d5	| get value
+
+| ------------------------------------------------------------------------------
+| apply the multiplier to the source, and add it to the function value
+| ------------------------------------------------------------------------------
+applym:		muls	PT_VMLT(a2,d2.W),d5	| apply the multiplier
+		asr.l	#7,d5		| scale the result
+		asr.l	#8,d5		| ...
+		ext.l	d3		| add the function value
+		add.l	d3,d5		| ...
+		cmpi.l	#VALMAX,d5	| check for overflow
+		ble	srcmlt1		| jump if no overflow
+
+		move.l	#VALMAX,d5	| limit at VALMAX
+		bra	srcmlt2		| ...
+
+srcmlt1:	cmpi.l	#VALMIN,d5	| check for underflow
+		bge	srcmlt2		| jump if no underflow
+
+		move.l	#VALMIN,d5	| limit at VALMIN
+
+srcmlt2:	move.w	d5,d3		| setup value for output to FPU
+
+		.page
+| ------------------------------------------------------------------------------
+| adjust the value according to the function type
+| ------------------------------------------------------------------------------
+nosrc:		move.w	d1,d0		| get function type
+		andi.w	#0x01E0,d0	| ...
+
+| ------------------------------------------------------------------------------
+| level or location
+| ------------------------------------------------------------------------------
+		cmpi.w	#P_LEVEL,d0	| see if it's the level
+		beq	outsegl		| jump if so
+
+		cmpi.w	#P_LOCN,d0	| see if it's the location
+		bne	outsegf		| jump if not
+
+		tst.w	d3		| check sign of value
+		bpl	outsegc		| jump if positive
+
+		clr.w	d3		| force negative values to 0
+
+outsegc:	asr.w	#5,d3		| shift value to LS bits
+		sub.w	#500,d3		| subtract 5.00 from value
+		asl.w	#6,d3		| readjust to MS bits
+		bra	outseg3		| go output the value
+
+outsegl:	tst.w	d3		| check sign of value
+		bpl	outsegm		| jump if positive
+
+		clr.w	d3		| limit negative values at 0
+
+outsegm:	asr.w	#5,d3		| shift value to LS bits
+		sub.w	#500,d3		| subtract 5.00 from value
+		asl.w	#6,d3		| readjust to MS bits
+		bra	outseg3		| go output the value
+
+		.page
+| ------------------------------------------------------------------------------
+| filter
+| ------------------------------------------------------------------------------
+outsegf:	cmpi.w	#P_FILTER,d0	| see if it's filter
+		bne	outsegp		| jump if not
+
+		ext.l	d3		| make function value a long
+		asr.l	#1,d3		| multiply function value by .75
+		move.l	d3,d0		| ...  (fast multiply by .75
+		asr.l	#1,d0		| ...   via shift and add)
+		add.l	d0,d3		| ...
+		move.w	(a1),d0		| add pitch
+		ext.l	d0		| ...
+		add.l	d0,d3		| ...
+		cmpi.l	#VALMAX,d3	| see if it's within limits
+		ble	outsega		| ...
+
+		move.w	#VALMAX,d3	| limit at VALMAX
+		bra	outseg3		| ...
+
+outsega:	cmpi.l	#VALMIN,d3	| ...
+		bge	outseg3		| ...
+
+		move.w	#VALMIN,d3	| limit at VALMIN
+		bra	outseg3		| ...
+
+		.page
+| ------------------------------------------------------------------------------
+| freq 1..4
+| ------------------------------------------------------------------------------
+outsegp:	cmpi.w	#P_FREQ1,d0	| see if it's freq1
+		beq	outseg0		| go process freq1
+
+outsegq:	cmpi.w	#P_FREQ2,d0	| see if it's freq2
+		beq	outseg0		| process it if so
+
+		cmpi.w	#P_FREQ3,d0	| see if it's freq3
+		beq	outseg0		| process it if so
+
+		cmpi.w	#P_FREQ4,d0	| see if it's freq4
+		bne	outseg3		| jump if not
+
+outseg0:	ext.l	d3		| scale the point value to cents offset
+		asr.l	#5,d3		| ...
+		sub.l	#500,d3		| ... value - 500
+		asl.l	#LSPCH,d3	| mult. by 2 and scale for 1/2 cent lsb
+		move.w	(a1),d0		| add pitch from function header
+		ext.l	d0		| ...
+		add.l	d0,d3		| ...
+		cmp.l	#PCHMAX,d3	| see if result is valid
+		ble	outseg3		| jump if within pitch limits
+
+		move.l	#PCHMAX,d3	| limit at maximum pitch
+
+| ------------------------------------------------------------------------------
+| send the value to the FPU
+| ------------------------------------------------------------------------------
+outseg3:	move.b	FH_TMD(a1),d0	| get hardware bits from function header
+		eor.w	#VAL_BITS,d0	| toggle new value select bits
+		move.b	d0,FH_TMD(a1)	| store updated word
+		btst.l	#VSUBNBIT,d0	| check which value address to use
 		beq	outseg1
-*
-		move.w	d3,F_VAL01(a3,d1.W)	* send value to FPU
+
+		move.w	d3,F_VAL01(a3,d1.W)	| send value to FPU
 		bra	outseg2
-*
-outseg1:	move.w	d3,F_VAL10(a3,d1.W)	* send value to FPU
-*
-outseg2:	andi.w	#MSK_CTL,d0		* mask off software bits
-		ori.w	#UPD_BIT+INT_BIT,d0	* set the update & !lastseg bits
-		move.w	d0,F_CTL(a3,d1.W)	* send control word to FPU
-		bra	fpexit			* done -- exit
-*
-		.page
-*
-* ------------------------------------------------------------------------------
-* act1 -- AC_SUST -- pause if key is down  (sustain)
-* ----    ------------------------------------------
-act1:		move.w	_fpuifnc,d0	* get voice as a word index
-		lsr.w	#3,d0		* ...
-		andi.w	#$001E,d0	* ...
-		lea	_vce2trg,a0	* point at voice to trigger table
-		move.w	0(a0,d0.W),d0	* get trigger table entry into d0
-		cmpi.w	#-1,d0		* see if voice is free
-		beq	act0		* continue function if so
-*
-		btst	#15,d0		* see if voice is held by a pedal
-		bne	act1a		* sustain if so
-*
-		btst	#14,d0		* see if voice is sustained by a pedal
-		bne	act1a		* sustain if so
-*
-		lea	_trgtab,a0	* point at trigger table
-		tst.b	0(a0,d0.W)	* check trigger status
-		beq	act0		* continue function if not active
-*
-act1a:		move.l	_pfqhdr,d3	* see if any pflist entries remain
-		beq	act0		* continue if not  (shouldn't happen!)
-*
-		move.b	FH_PT1(a1),d0	* get first point number
-		add.b	FH_PIF(a1),d0	* add base to first point
-		subq.b	#1,d0		* make d0 last point number
-		cmp.b	FH_CPT(a1),d0	* check current point number
-		beq	stopfn		* done if this is the last point
-*
-		addq.b	#1,FH_CPT(a1)		* update current point number
-		addi.w	#PT_LEN,d2		* advance the point index
-		movea.l	d3,a0			* acquire a new pflist entry
-		move.l	(a0),_pfqhdr		* ...
-		move.l	_pflist,(a0)		* chain it to pflist
-		move.l	a0,_pflist		* ...
-		move.w	FH_TRG(a1),PF_TRIG(a0)		* set trigger number in entry
-		move.w	_fpuifnc,PF_FUNC(a0)		* set v/p word in entry
-		movem.l	d1-d2/d4/a1-a3,PF_D1(a0)	* set registers in entry
-		move.b	FH_TMD(a1),d0		* stop the function
-		andi.w	#MSK_RNVB,d0		* ...
-		move.w	d0,d3			* ...
-		add.w	d3,d3			* ...
-		andi.w	#MSK_ONVB,d3		* ...
-		or.w	d3,d0			* ...
-		move.w	d0,F_CTL(a3,d1.W)	* ...
-		bra	fpexit			* exit
-*
-		.page
-*
-* ------------------------------------------------------------------------------
-* act2 -- AC_ENBL -- stop if key is up
-* ----    ----------------------------
-act2:		move.w	_fpuifnc,d0	* get voice as a word index
-		lsr.w	#3,d0		* ...
-		andi.w	#$001E,d0	* ...
-		lea	_vce2trg,a0	* check to see if voice is free
-		move.w	0(a0,d0.W),d0	* ...
-		cmpi.w	#-1,d0		* ...
-		beq	stopfn		* if so, stop the function
-*
-		btst	#15,d0		* see if voice is held
-		bne	act0		* continue if so
-*
-		btst	#14,d0		* ...
-		bne	act0		* ...
-*
-		lea	_trgtab,a0	* check trigger table entry
-		tst.b	0(a0,d0.W)	* ...
-		bne	act0		* if trigger is active, continue
-*
-		bra	stopfn		* if not, stop the function
-*
-* ------------------------------------------------------------------------------
-* act3 -- AC_JUMP -- unconditional jump
-* ----    -----------------------------
-act3:		cmp.b	FH_PIF(a1),d4	* check jump point against limit
-		bcc	stopfn		* stop function if jump point invalid
-*
-		clr.w	d2		* get index of first point
-		move.b	FH_PT1(a1),d2	* ...
-		add.b	d4,d2		* add jump point
-		move.b	d2,FH_CPT(a1)	* make it the current point
-		lsl.w	#2,d2		* develop new point index in d2
-		move.w	d2,d0		* ... (fast multiply by PT_LEN = 12
-		add.w	d2,d2		* ...  via shift and add)
-		add.w	d0,d2		* ...
-		bra	outseg		* output the segment
-*
-		.page
-*
-* ------------------------------------------------------------------------------
-* act4 -- AC_LOOP -- jump to point PT_PAR1 PT_PAR2 times
-* ----    ----------------------------------------------
-act4:		tst.b	PT_PAR3(a2,d2.W)	* check counter
-		bne	act4a			* jump if it's running
-*
-		move.b	PT_PAR2(a2,d2.W),d0	* get parameter
-		subi.w	#90,d0			* put parameter in random range
-		bmi	act4b			* treat as normal if < 90
-*
-		movem.l	d1-d2/a0-a2,-(a7)	* get ranged random number
-		move.w	d0,-(a7)		* ...
-		jsr	_irand			* ...
-		tst.w	(a7)+			* ...
-		movem.l	(a7)+,d1-d2/a0-a2	* ...
-		move.b	d0,PT_PAR3(a2,d2.w)	* set counter
-		beq	act0			* next segment if cntr set to 0
-*
-		bra	act3			* else jump to the point
-*
-act4b:		move.b	PT_PAR2(a2,d2.W),PT_PAR3(a2,d2.W)	* set counter
-		beq	act0			* next segment if cntr set to 0
-*
-		bra	act3			* else jump to the point
-*
-act4a:		subq.b	#1,PT_PAR3(a2,d2.W)	* decrement counter
-		beq	act0			* next segment if cntr ran out
-*
-		bra	act3			* jump if it's still non-zero
-*
-* ------------------------------------------------------------------------------
-* act5 -- AC_KYUP -- jump if key is up
-* ----    ----------------------------
-act5:		move.w	_fpuifnc,d0	* get voice as a word index
-		lsr.w	#3,d0		* ...
-		andi.w	#$001E,d0	* ...
-		lea	_vce2trg,a0	* check to see if voice is free
-		move.w	0(a0,d0.W),d0	* ...
-		cmpi.w	#-1,d0		* ...
-		beq	act3		* if so (inactive), do the jump
-*
-		btst	#15,d0		* see if voice is held
-		bne	act0		* continue if so
-*
-		btst	#14,d0		* ...
-		bne	act0		* ...
-*
-		lea	_trgtab,a0	* check trigger table entry
-		tst.b	0(a0,d0.W)	* see if the trigger is active
-		beq	act3		* if not, do the jump
-*
-		bra	act0		* if so, do next segment
-*
-		.page
-*
-* ------------------------------------------------------------------------------
-* act6 -- AC_KYDN -- jump if key is down
-* ----    ------------------------------
-act6:		move.w	_fpuifnc,d0	* get voice as a word index
-		lsr.w	#3,d0		* ...
-		andi.w	#$001E,d0	* ...
-		lea	_vce2trg,a0	* check to see if voice is free
-		move.w	0(a0,d0.W),d0	* ...
-		cmpi.w	#-1,d0		* ...
-		beq	act0		* if so (inactive), continue
-*
-		btst	#15,d0		* see if voice is held
-		bne	act3		* do jump if so
-*
-		btst	#14,d0		* ...
-		bne	act3		* ...
-*
-		lea	_trgtab,a0	* check trigger table entry
-		tst.b	0(a0,d0.W)	* see if the trigger is active
-		bne	act3		* if so, do the jump
-*
-		bra	act0		* if not, do next segment
-*
-* ------------------------------------------------------------------------------
-* Test stub
-* ---------
-act7:		bra	act0		* AC_HERE: treat act7 as AC_NULL
-*
-		.page
-* ------------------------------------------------------------------------------
-*
-* _fpuclr -- clear the FPU
-* -------    -------------
-*
-*	void
-*	fpuclr()
-*
-*		Resets the FPU functions to their nominal values.
-*
-* ------------------------------------------------------------------------------
-*
-_fpuclr:	link	a6,#0			* link stack frames
-		move.w	sr,-(a7)		* save the interrupt level
-		ori.w	#$0700,sr		* turn off interrupts
-*
-		lea	FPUFUNC,a0		* point at the first function
-		lea	_fp_resv,a2		* point at reset value table
-		move.w	#11,d1			* set the outer loop count
-*
-		.page
-* ------------------------------------------------------------------------------
-* reset the 'spare' function for the voice
-* ------------------------------------------------------------------------------
-clr0:		move.w	#CLREXP,F_EXP(a0)	* set time exponent
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#CLRMNT,F_MNT(a0)	* set time mantissa
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-		move.w	#0,F_SF3(a0)		* set scale factor 3
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#0,F_CV3(a0)		* set voltage 3
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-		move.w	#0,F_SF2(a0)		* set scale factor 2
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#0,F_CV2(a0)		* set voltage 2
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-		move.w	#0,F_SF1(a0)		* set scale factor 1
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#0,F_CV1(a0)		* set voltage 1
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-		move.w	(a2),F_VAL10(a0)	* set value from variable table
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	(a2)+,F_VAL01(a0)	* ...
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#FSEND,F_CTL(a0)	* set control word
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-		.page
-		adda.w	#$0020,a0		* point at 2nd function
-		lea	fprescon,a1		* set reset constant pointer
-		move.w	#14,d0			* set inner loop count
-*
-* ------------------------------------------------------------------------------
-* reset the other functions for the voice
-* ------------------------------------------------------------------------------
-clr1:		move.w	#CLREXP,F_EXP(a0)	* set time exponent
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#CLRMNT,F_MNT(a0)	* set time mantissa
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-		move.w	#0,F_SF3(a0)		* set scale factor 3
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#0,F_CV3(a0)		* set voltage 3
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-		move.w	#0,F_SF2(a0)		* set scale factor 2
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#0,F_CV2(a0)		* set voltage 2
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-		move.w	#0,F_SF1(a0)		* set scale factor 1
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#0,F_CV1(a0)		* set voltage 1
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-		move.w	(a1),F_VAL10(a0)	* set value from constant table
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	(a1)+,F_VAL01(a0)	* ...
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#FSEND,F_CTL(a0)	* set control word
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-		.page
-* ------------------------------------------------------------------------------
-* loop through reset for all of the voices and functions
-* ------------------------------------------------------------------------------
-		adda.w	#$0020,a0		* point at next function
-		dbra	d0,clr1			* loop until all funcs. cleared
-*
-		dbra	d1,clr0			* loop until all voices cleared
-* ------------------------------------------------------------------------------
-* clear the FPU interrupt, and return
-* ------------------------------------------------------------------------------
-		move.w	#0,FPUINT2		* clear FPU interrupt
-		move.w	(a7)+,sr		* restore interrupts
-		unlk	a6			* unlink stack frames
-		rts				* return to caller
-*
-		.page
-*
-* _clrvce -- quiet a voice
-* -------    -------------
-*
-*	void
-*	clrvce(vce)
-*	short vce;
-*
-*		Quiet the voice by resetting the FPU functions it uses.
-*
-_clrvce:	link	a6,#0			* link stack frames
-		move.w	sr,-(a7)		* save the interrupt level
-		ori.w	#$0700,sr		* turn off interrupts
-*
-		lea	FPUFUNC+$20,a0		* point at the 2nd function
-		move.w	8(a6),d0		* get voice number
-		ext.l	d0			* ...
-		lsl.l	#8,d0			* shift into position
-		add.l	d0,d0			* ...
-		adda.l	d0,a0			* add to function base
-		lea	fprescon,a1		* set reset constant pointer
-		move.w	#14,d0			* set inner loop count
-*
-vclr1:		move.l	a0,d1			* see if we reset this function
-		and.w	#$01F0,d1		* ...
-*
-		cmpi.w	#$0100,d1		* dynamics ?
-		beq	vclr2			* skip it if so
-*
-		move.w	#CLREXP,F_EXP(a0)	* set time exponent
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#CLRMNT,F_MNT(a0)	* set time mantissa
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-		cmpi.w	#$0020,d1		* freq 1 ?
-		beq	vclr3			* don't reset CV3 (fine tune)
-*
-		move.w	#0,F_SF3(a0)		* set scale factor 3
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#0,F_CV3(a0)		* set voltage 3
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-vclr3:		move.w	#0,F_SF1(a0)		* set scale factor 1
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#0,F_CV1(a0)		* set voltage 1
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-		.page
-*
-		move.w	(a1),F_VAL10(a0)	* set value from constant table
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	(a1),F_VAL01(a0)	* ...
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-		move.w	#FSEND,F_CTL(a0)	* set control word
-		tst.l	actab			* delay
-		tst.l	actab			* ...
-*
-vclr2:		adda.w	#2,a1			* point at next function
-		adda.w	#$0020,a0		*
-		dbra	d0,vclr1		* loop until all funcs. cleared
-*
-		move.w	(a7)+,sr		* restore interrupts
-		unlk	a6			* unlink stack frames
-		rts				* return to caller
-*
-		.page
-* ------------------------------------------------------------------------------
+
+outseg1:	move.w	d3,F_VAL10(a3,d1.W)	| send value to FPU
+
+outseg2:	andi.w	#MSK_CTL,d0		| mask off software bits
+		ori.w	#UPD_BIT+INT_BIT,d0	| set the update & !lastseg bits
+		move.w	d0,F_CTL(a3,d1.W)	| send control word to FPU
+		bra	fpexit			| done -- exit
+
+		.page
+
+| ------------------------------------------------------------------------------
+| act1 -- AC_SUST -- pause if key is down  (sustain)
+| ----    ------------------------------------------
+act1:		move.w	_fpuifnc,d0	| get voice as a word index
+		lsr.w	#3,d0		| ...
+		andi.w	#0x001E,d0	| ...
+		lea	_vce2trg,a0	| point at voice to trigger table
+		move.w	0(a0,d0.W),d0	| get trigger table entry into d0
+		cmpi.w	#-1,d0		| see if voice is free
+		beq	act0		| continue function if so
+
+		btst	#15,d0		| see if voice is held by a pedal
+		bne	act1a		| sustain if so
+
+		btst	#14,d0		| see if voice is sustained by a pedal
+		bne	act1a		| sustain if so
+
+		lea	_trgtab,a0	| point at trigger table
+		tst.b	0(a0,d0.W)	| check trigger status
+		beq	act0		| continue function if not active
+
+act1a:		move.l	_pfqhdr,d3	| see if any pflist entries remain
+		beq	act0		| continue if not  (shouldn't happen!)
+
+		move.b	FH_PT1(a1),d0	| get first point number
+		add.b	FH_PIF(a1),d0	| add base to first point
+		subq.b	#1,d0		| make d0 last point number
+		cmp.b	FH_CPT(a1),d0	| check current point number
+		beq	stopfn		| done if this is the last point
+
+		addq.b	#1,FH_CPT(a1)		| update current point number
+		addi.w	#PT_LEN,d2		| advance the point index
+		movea.l	d3,a0			| acquire a new pflist entry
+		move.l	(a0),_pfqhdr		| ...
+		move.l	_pflist,(a0)		| chain it to pflist
+		move.l	a0,_pflist		| ...
+		move.w	FH_TRG(a1),PF_TRIG(a0)		| set trigger number in entry
+		move.w	_fpuifnc,PF_FUNC(a0)		| set v/p word in entry
+		movem.l	d1-d2/d4/a1-a3,PF_D1(a0)	| set registers in entry
+		move.b	FH_TMD(a1),d0		| stop the function
+		andi.w	#MSK_RNVB,d0		| ...
+		move.w	d0,d3			| ...
+		add.w	d3,d3			| ...
+		andi.w	#MSK_ONVB,d3		| ...
+		or.w	d3,d0			| ...
+		move.w	d0,F_CTL(a3,d1.W)	| ...
+		bra	fpexit			| exit
+
+		.page
+
+| ------------------------------------------------------------------------------
+| act2 -- AC_ENBL -- stop if key is up
+| ----    ----------------------------
+act2:		move.w	_fpuifnc,d0	| get voice as a word index
+		lsr.w	#3,d0		| ...
+		andi.w	#0x001E,d0	| ...
+		lea	_vce2trg,a0	| check to see if voice is free
+		move.w	0(a0,d0.W),d0	| ...
+		cmpi.w	#-1,d0		| ...
+		beq	stopfn		| if so, stop the function
+
+		btst	#15,d0		| see if voice is held
+		bne	act0		| continue if so
+
+		btst	#14,d0		| ...
+		bne	act0		| ...
+
+		lea	_trgtab,a0	| check trigger table entry
+		tst.b	0(a0,d0.W)	| ...
+		bne	act0		| if trigger is active, continue
+
+		bra	stopfn		| if not, stop the function
+
+| ------------------------------------------------------------------------------
+| act3 -- AC_JUMP -- unconditional jump
+| ----    -----------------------------
+act3:		cmp.b	FH_PIF(a1),d4	| check jump point against limit
+		bcc	stopfn		| stop function if jump point invalid
+
+		clr.w	d2		| get index of first point
+		move.b	FH_PT1(a1),d2	| ...
+		add.b	d4,d2		| add jump point
+		move.b	d2,FH_CPT(a1)	| make it the current point
+		lsl.w	#2,d2		| develop new point index in d2
+		move.w	d2,d0		| ... (fast multiply by PT_LEN = 12
+		add.w	d2,d2		| ...  via shift and add)
+		add.w	d0,d2		| ...
+		bra	outseg		| output the segment
+
+		.page
+
+| ------------------------------------------------------------------------------
+| act4 -- AC_LOOP -- jump to point PT_PAR1 PT_PAR2 times
+| ----    ----------------------------------------------
+act4:		tst.b	PT_PAR3(a2,d2.W)	| check counter
+		bne	act4a			| jump if it's running
+
+		move.b	PT_PAR2(a2,d2.W),d0	| get parameter
+		subi.w	#90,d0			| put parameter in random range
+		bmi	act4b			| treat as normal if < 90
+
+		movem.l	d1-d2/a0-a2,-(a7)	| get ranged random number
+		move.w	d0,-(a7)		| ...
+		jsr	_irand			| ...
+		tst.w	(a7)+			| ...
+		movem.l	(a7)+,d1-d2/a0-a2	| ...
+		move.b	d0,PT_PAR3(a2,d2.w)	| set counter
+		beq	act0			| next segment if cntr set to 0
+
+		bra	act3			| else jump to the point
+
+act4b:		move.b	PT_PAR2(a2,d2.W),PT_PAR3(a2,d2.W)	| set counter
+		beq	act0			| next segment if cntr set to 0
+
+		bra	act3			| else jump to the point
+
+act4a:		subq.b	#1,PT_PAR3(a2,d2.W)	| decrement counter
+		beq	act0			| next segment if cntr ran out
+
+		bra	act3			| jump if it's still non-zero
+
+| ------------------------------------------------------------------------------
+| act5 -- AC_KYUP -- jump if key is up
+| ----    ----------------------------
+act5:		move.w	_fpuifnc,d0	| get voice as a word index
+		lsr.w	#3,d0		| ...
+		andi.w	#0x001E,d0	| ...
+		lea	_vce2trg,a0	| check to see if voice is free
+		move.w	0(a0,d0.W),d0	| ...
+		cmpi.w	#-1,d0		| ...
+		beq	act3		| if so (inactive), do the jump
+
+		btst	#15,d0		| see if voice is held
+		bne	act0		| continue if so
+
+		btst	#14,d0		| ...
+		bne	act0		| ...
+
+		lea	_trgtab,a0	| check trigger table entry
+		tst.b	0(a0,d0.W)	| see if the trigger is active
+		beq	act3		| if not, do the jump
+
+		bra	act0		| if so, do next segment
+
+		.page
+
+| ------------------------------------------------------------------------------
+| act6 -- AC_KYDN -- jump if key is down
+| ----    ------------------------------
+act6:		move.w	_fpuifnc,d0	| get voice as a word index
+		lsr.w	#3,d0		| ...
+		andi.w	#0x001E,d0	| ...
+		lea	_vce2trg,a0	| check to see if voice is free
+		move.w	0(a0,d0.W),d0	| ...
+		cmpi.w	#-1,d0		| ...
+		beq	act0		| if so (inactive), continue
+
+		btst	#15,d0		| see if voice is held
+		bne	act3		| do jump if so
+
+		btst	#14,d0		| ...
+		bne	act3		| ...
+
+		lea	_trgtab,a0	| check trigger table entry
+		tst.b	0(a0,d0.W)	| see if the trigger is active
+		bne	act3		| if so, do the jump
+
+		bra	act0		| if not, do next segment
+
+| ------------------------------------------------------------------------------
+| Test stub
+| ---------
+act7:		bra	act0		| AC_HERE: treat act7 as AC_NULL
+
+		.page
+| ------------------------------------------------------------------------------
+
+| _fpuclr -- clear the FPU
+| -------    -------------
+
+|	void
+|	fpuclr()
+
+|		Resets the FPU functions to their nominal values.
+
+| ------------------------------------------------------------------------------
+
+_fpuclr:	link	a6,#0			| link stack frames
+		move.w	sr,-(a7)		| save the interrupt level
+		ori.w	#0x0700,sr		| turn off interrupts
+
+		lea	FPUFUNC,a0		| point at the first function
+		lea	_fp_resv,a2		| point at reset value table
+		move.w	#11,d1			| set the outer loop count
+
+		.page
+| ------------------------------------------------------------------------------
+| reset the 'spare' function for the voice
+| ------------------------------------------------------------------------------
+clr0:		move.w	#CLREXP,F_EXP(a0)	| set time exponent
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#CLRMNT,F_MNT(a0)	| set time mantissa
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+		move.w	#0,F_SF3(a0)		| set scale factor 3
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#0,F_CV3(a0)		| set voltage 3
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+		move.w	#0,F_SF2(a0)		| set scale factor 2
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#0,F_CV2(a0)		| set voltage 2
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+		move.w	#0,F_SF1(a0)		| set scale factor 1
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#0,F_CV1(a0)		| set voltage 1
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+		move.w	(a2),F_VAL10(a0)	| set value from variable table
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	(a2)+,F_VAL01(a0)	| ...
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#FSEND,F_CTL(a0)	| set control word
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+		.page
+		adda.w	#0x0020,a0		| point at 2nd function
+		lea	fprescon,a1		| set reset constant pointer
+		move.w	#14,d0			| set inner loop count
+
+| ------------------------------------------------------------------------------
+| reset the other functions for the voice
+| ------------------------------------------------------------------------------
+clr1:		move.w	#CLREXP,F_EXP(a0)	| set time exponent
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#CLRMNT,F_MNT(a0)	| set time mantissa
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+		move.w	#0,F_SF3(a0)		| set scale factor 3
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#0,F_CV3(a0)		| set voltage 3
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+		move.w	#0,F_SF2(a0)		| set scale factor 2
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#0,F_CV2(a0)		| set voltage 2
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+		move.w	#0,F_SF1(a0)		| set scale factor 1
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#0,F_CV1(a0)		| set voltage 1
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+		move.w	(a1),F_VAL10(a0)	| set value from constant table
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	(a1)+,F_VAL01(a0)	| ...
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#FSEND,F_CTL(a0)	| set control word
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+		.page
+| ------------------------------------------------------------------------------
+| loop through reset for all of the voices and functions
+| ------------------------------------------------------------------------------
+		adda.w	#0x0020,a0		| point at next function
+		dbra	d0,clr1			| loop until all funcs. cleared
+
+		dbra	d1,clr0			| loop until all voices cleared
+| ------------------------------------------------------------------------------
+| clear the FPU interrupt, and return
+| ------------------------------------------------------------------------------
+		move.w	#0,FPUINT2		| clear FPU interrupt
+		move.w	(a7)+,sr		| restore interrupts
+		unlk	a6			| unlink stack frames
+		rts				| return to caller
+
+		.page
+
+| _clrvce -- quiet a voice
+| -------    -------------
+
+|	void
+|	clrvce(vce)
+|	short vce;
+
+|		Quiet the voice by resetting the FPU functions it uses.
+
+_clrvce:	link	a6,#0			| link stack frames
+		move.w	sr,-(a7)		| save the interrupt level
+		ori.w	#0x0700,sr		| turn off interrupts
+
+		lea	FPUFUNC+0x20,a0		| point at the 2nd function
+		move.w	8(a6),d0		| get voice number
+		ext.l	d0			| ...
+		lsl.l	#8,d0			| shift into position
+		add.l	d0,d0			| ...
+		adda.l	d0,a0			| add to function base
+		lea	fprescon,a1		| set reset constant pointer
+		move.w	#14,d0			| set inner loop count
+
+vclr1:		move.l	a0,d1			| see if we reset this function
+		and.w	#0x01F0,d1		| ...
+
+		cmpi.w	#0x0100,d1		| dynamics ?
+		beq	vclr2			| skip it if so
+
+		move.w	#CLREXP,F_EXP(a0)	| set time exponent
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#CLRMNT,F_MNT(a0)	| set time mantissa
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+		cmpi.w	#0x0020,d1		| freq 1 ?
+		beq	vclr3			| don't reset CV3 (fine tune)
+
+		move.w	#0,F_SF3(a0)		| set scale factor 3
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#0,F_CV3(a0)		| set voltage 3
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+vclr3:		move.w	#0,F_SF1(a0)		| set scale factor 1
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#0,F_CV1(a0)		| set voltage 1
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+		.page
+
+		move.w	(a1),F_VAL10(a0)	| set value from constant table
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	(a1),F_VAL01(a0)	| ...
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+		move.w	#FSEND,F_CTL(a0)	| set control word
+		tst.l	actab			| delay
+		tst.l	actab			| ...
+
+vclr2:		adda.w	#2,a1			| point at next function
+		adda.w	#0x0020,a0		|
+		dbra	d0,vclr1		| loop until all funcs. cleared
+
+		move.w	(a7)+,sr		| restore interrupts
+		unlk	a6			| unlink stack frames
+		rts				| return to caller
+
+		.page
+| ------------------------------------------------------------------------------
 		.data
-* ------------------------------------------------------------------------------
-*
-* actab -- action code dispatch table
-* -----    --------------------------
-actab:		dc.l	act0	* 0 - AC_NULL:  no action
-		dc.l	act1	* 1 - AC_SUST:  sustain
-		dc.l	act2	* 2 - AC_ENBL:  enable
-		dc.l	act3	* 3 - AC_JUMP:  unconditional jump
-		dc.l	act4	* 4 - AC_LOOP:  jump n times      (loop)
-		dc.l	act5	* 5 - AC_KYUP:  jump if key up    (enable jump)
-		dc.l	act6	* 6 - AC_KYDN:  jump if key down  (sustain jump)
-		dc.l	act7	* 7 - AC_HERE:  here on key up
-*
-* fprescon -- FPU reset constant table
-* --------    ------------------------
-fprescon:	dc.w	$0000	* frq 1		  0.00
-		dc.w	$8300	* level		-10.00
-		dc.w	$0000	* frq 2		  0.00
-		dc.w	$0000	* locn		  0.00
-		dc.w	$0000	* frq 3		  0.00
-		dc.w	$0000	* reson		  0.00
-		dc.w	$0000	* frq 4		  0.00
-		dc.w	$7D00	* dyn		+10.00
-		dc.w	$0000	* ind 1		  0.00
-		dc.w	$3E80	* filt		 +5.00
-		dc.w	$0000	* ind 2		  0.00
-		dc.w	$0000	* ind 3		  0.00
-		dc.w	$0000	* ind 4		  0.00
-		dc.w	$0000	* ind 5		  0.00
-		dc.w	$0000	* ind 6		  0.00
-*
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+
+| actab -- action code dispatch table
+| -----    --------------------------
+actab:		dc.l	act0	| 0 - AC_NULL:  no action
+		dc.l	act1	| 1 - AC_SUST:  sustain
+		dc.l	act2	| 2 - AC_ENBL:  enable
+		dc.l	act3	| 3 - AC_JUMP:  unconditional jump
+		dc.l	act4	| 4 - AC_LOOP:  jump n times      (loop)
+		dc.l	act5	| 5 - AC_KYUP:  jump if key up    (enable jump)
+		dc.l	act6	| 6 - AC_KYDN:  jump if key down  (sustain jump)
+		dc.l	act7	| 7 - AC_HERE:  here on key up
+
+| fprescon -- FPU reset constant table
+| --------    ------------------------
+fprescon:	dc.w	0x0000	| frq 1		  0.00
+		dc.w	0x8300	| level		-10.00
+		dc.w	0x0000	| frq 2		  0.00
+		dc.w	0x0000	| locn		  0.00
+		dc.w	0x0000	| frq 3		  0.00
+		dc.w	0x0000	| reson		  0.00
+		dc.w	0x0000	| frq 4		  0.00
+		dc.w	0x7D00	| dyn		+10.00
+		dc.w	0x0000	| ind 1		  0.00
+		dc.w	0x3E80	| filt		 +5.00
+		dc.w	0x0000	| ind 2		  0.00
+		dc.w	0x0000	| ind 3		  0.00
+		dc.w	0x0000	| ind 4		  0.00
+		dc.w	0x0000	| ind 5		  0.00
+		dc.w	0x0000	| ind 6		  0.00
+
+| ------------------------------------------------------------------------------
 		.bss
-* ------------------------------------------------------------------------------
-*
-_fp_resv:	ds.w	12		* fpu spare function reset values
-_fpuifnc:	ds.w	1		* interrupting function number from FPU
-*
+| ------------------------------------------------------------------------------
+
+_fp_resv:	ds.w	12		| fpu spare function reset values
+_fpuifnc:	ds.w	1		| interrupting function number from FPU
+
 		.end
Index: ram/procpfl.s
===================================================================
--- ram/procpfl.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ ram/procpfl.s	(revision 08e1da1cabca094217491629d328ae7146816782)
@@ -1,17 +1,17 @@
-* ------------------------------------------------------------------------------
-* procpfl.s -- process pendant functions  (sustain release processing)
-* Version 8 -- 1988-08-31 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| procpfl.s -- process pendant functions  (sustain release processing)
+| Version 8 -- 1988-08-31 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_procpfl
-*
-		.xdef	_curpf_f	* current function (v/p)
-		.xdef	_curpf_l	* current pflist entry
-		.xdef	_curpf_t	* current trigger
-*
+
+		.xdef	_curpf_f	| current function (v/p)
+		.xdef	_curpf_l	| current pflist entry
+		.xdef	_curpf_t	| current trigger
+
 		.xref	_irand
 		.xref	_xgetran
-*
+
 		.xref	_expbit
 		.xref	_funcndx
@@ -26,733 +26,733 @@
 		.xref	_vce2trg
 		.xref	_veltab
-*
-		.page
-* ------------------------------------------------------------------------------
-* Register usage
-* --------------
-*	d0	scratch
-*	d1	FPU function index
-*	d2	point index from FH_CPT  (idfcpt)
-*	d3	scratch
-*	d4	jump point number from PT_PAR1  (ippar1)
-*	d5	scratch
-*
-*	a0	scratch
-*	a1	function header base
-*	a2	point table base
-*	a3	FPU base
-*
-* ------------------------------------------------------------------------------
-* FPU definitions
-* ---------------
-*
-UPD_BIT		.equ	$0001			* update bit  (1 = update)
-INT_BIT		.equ	$0002			* int. bit    (0 = disable)
-RAT_BIT		.equ	$0004			* ratio bit   (0 = ratio)
-*
-VSUBNBIT	.equ	3			* new value select bit number
-VAL_BITS	.equ	$0018			* new value select bit mask
-*
-MSK_RNVB	.equ	$000C			* new value / ratio bits
-MSK_ONVB	.equ	$0010			* old new value bit
-*
-FKILL		.equ	$0014			* kill value for function
-FSEND		.equ	$0015			* send new value to function
-*
-CLREXP		.equ	$8000			* clear value for time exponent
-CLRMNT		.equ	$8000			* clear value for time mantissa
-*
-* ------------------------------------------------------------------------------
-* Miscellaneous definitions
-* -------------------------
-*
-PCHMAX		.equ	21920			* maximum pitch value
-VALMAX		.equ	32000			* maximum value to send to FPU
-VALMIN		.equ	-32000			* minimum value to send to FPU
-*
-LSPCH		.equ	2			* left shift for sources to freq
-*
-VALLEN		.equ	10			* length of the 'valent' struct
-VT_VAL		.equ	8			* value offset in 'valent'
-*
-		.page
-* ------------------------------------------------------------------------------
-* FPU addresses
-* -------------
-*
-FPUBASE		.equ	$180000			* FPU base address
-*
-FPUWST		.equ	FPUBASE			* FPU waveshape base
-FPUFUNC		.equ	FPUBASE+$4000		* FPU function base
-FPUINT1		.equ	FPUBASE+$4000		* FPU int. input address (R/O)
-FPUINT2		.equ	FPUBASE+$6000		* FPU int. reset address (W/O)
-FPUCFG		.equ	FPUBASE+$5FE0		* FPU config. data address (W/O)
-*
-F_CTL		.equ	$00			* control word
-F_VAL10		.equ	$02			* new value "10"
-F_CV1		.equ	$08			* control voltage 1
-F_SF1		.equ	$0A			* scale factor 1
-F_CV2		.equ	$0C			* control voltage 2
-F_SF2		.equ	$0E			* scale factor 2
-F_CV3		.equ	$10			* control voltage 3
-F_SF3		.equ	$12			* scale factor 3
-F_MNT		.equ	$14			* time mantissa
-F_EXP		.equ	$16			* time exponent
-F_VAL01		.equ	$1C			* new value "01"
-*
-P_FREQ1		.equ	$0020			* frequency 1
-P_FREQ2		.equ	$0060			* frequency 2
-P_FREQ3		.equ	$00A0			* frequency 3
-P_FREQ4		.equ	$00E0			* frequency 4
-P_FILTER	.equ	$0140			* filter
-P_FILTRQ	.equ	$00C0			* filter q
-*
-P_INDEX1	.equ	$0120			* index 1
-P_INDEX2	.equ	$0160			* index 2
-P_INDEX3	.equ	$0180			* index 3
-P_INDEX4	.equ	$01A0			* index 4
-P_INDEX5	.equ	$01C0			* index 5
-P_INDEX6	.equ	$01E0			* index 6
-*
-P_LEVEL		.equ	$0040			* level
-*
-P_LOCN		.equ	$0080			* location
-P_DYNAM		.equ	$0100			* dynamics
-*
-		.page
-* ------------------------------------------------------------------------------
-* Structure definitions
-* ------------------------------------------------------------------------------
-* The following MUST match the idfnhdr structure definition in instdsp.h:
-*
-FH_LEN		.equ	12		* length of the idfnhdr structure
-*
-FH_PCH		.equ	0		* WORD - pitch offset
-FH_MLT		.equ	2		* WORD - overall value multiplier
-FH_SRC		.equ	4		* BYTE - overall value source
-FH_PIF		.equ	5		* BYTE - # of points in the function
-FH_PT1		.equ	6		* BYTE - index of first point
-FH_TMD		.equ	7		* BYTE - trigger mode / control bits
-FH_CPT		.equ	8		* BYTE - current point
-FH_PRM		.equ	9		* BYTE - misc. function parameter
-FH_TRG		.equ	10		* WORD - trigger
-*
-I_ACTIVE	.equ	1		* 'Active' bit number        (in FH_TMD)
-*
-MSK_CTL		.equ	$001C		* mask for FPU hardware bits (in FH_TMD)
-*
-* ------------------------------------------------------------------------------
-* The following MUST match the instpnt structure definition in instdsp.h:
-*
-PT_LEN		.equ	12		* length of the instpnt structure
-*
-PT_TIM		.equ	0		* WORD - time (packed)
-PT_VAL		.equ	2		* WORD - value
-PT_VMLT		.equ	4		* WORD - value multiplier
-PT_VSRC		.equ	6		* BYTE - value source
-PT_ACT		.equ	7		* BYTE - action
-PT_PAR1		.equ	8		* BYTE - parameter 1
-PT_PAR2		.equ	9		* BYTE - parameter 2
-PT_PAR3		.equ	10		* BYTE - parameter 3
-PT_PAD		.equ	11		* BYTE - padding for even boundary
-*
-MSK_MNT		.equ	$FFF0		* mask for mantissa  (in PT_TIM)
-MSK_EXP		.equ	$000F		* mask for exponent  (in PT_TIM)
-*
-MAX_ACT		.equ	7		* maximum action code value
-*
-* ------------------------------------------------------------------------------
-* Source definitions -- must match those in 'smdefs.h'
-*
-SM_RAND		.equ	1		* random
-SM_PTCH		.equ	5		* pitch
-SM_KPRS		.equ	6		* key pressure
-SM_KVEL		.equ	7		* key velocity
-SM_FREQ		.equ	10		* frequency
-*
-		.page
-*
-* Layout of pflist entries	32 bytes each
-* ------------------------
-PF_NEXT		.equ	0		* LONG - next entry pointer
-PF_TRIG		.equ	4		* WORD - trigger number
-PF_FUNC		.equ	6		* WORD - fpuifnc value
-PF_D1		.equ	8		* LONG - d1
-PF_D2		.equ	12		* LONG - d2
-PF_D4		.equ	16		* LONG - d4
-PF_A1		.equ	20		* LONG - a1
-PF_A2		.equ	24		* LONG - a2
-PF_A3		.equ	28		* LONG - a3
-*
-* Parameter offset
-* ----------------
-TRIG		.equ	8		* WORD - trigger number
-*
-* Register equates
-* ----------------
-RCUR		.equ	a4		* current pflist entry pointer
-RPRV		.equ	a5		* previous pflist entry pointer
-*
-		.page
-* ------------------------------------------------------------------------------
-* _procpfl() -- process pendant functions
-*
-*	void
-*	procpfl(trig);
-*	unsigned trig;
-*
-*		Processes pendant (sustained) functions by restarting them
-*	when the trigger (trig) that's sustaining them is released.
-*	Invoked by key release processing in msm() and localkb().
-*
-* ------------------------------------------------------------------------------
-*
-_procpfl:	nop				* FOR DEBUGGING PATCH
-*
-		link	a6,#0			* allocate stack frame
-		movem.l	d3-d7/a3-a5,-(a7)	* preserve registers we use
-*
-		move.w	sr,d7			* save interrupt state
-		move.w	#$2200,sr		* turn off FPU interrupts
-*
-		move.w	TRIG(a6),d6		* get trigger we're processing
-		move.w	d6,_curpf_t		* ...
-		movea.l	#_pflist,RPRV		* point at 'previous' pflist entry
-		bra	pfscan			* go scan the chain
-*
-pfpass:		movea.l	RCUR,RPRV		* point at previous entry
-*
-pfscan:		move.l	(RPRV),d5		* get next pflist entry pointer
-		beq	pfexit			* done if no more
-*
-		movea.l	d5,RCUR			* point at  current entry
-		move.l	d5,_curpf_l		* ...
-*
-		cmp.w	PF_TRIG(RCUR),d6	* see if this entry is wanted
-		bne	pfpass			* jump if not
-*
-		movem.l	PF_D1(RCUR),d1-d2/d4/a1-a3	* restore processing state
-		move.w	PF_FUNC(RCUR),_curpf_f		* ...
-*
-		btst	#I_ACTIVE,FH_TMD(a1)	* see if function is active
-		bne	doact			* continue function if so
-*
-		bra	stopfn			* stop function if not
-*
-pfnext:		move.l	(RCUR),(RPRV)		* remove entry from pflist
-		move.l	_pfqhdr,(RCUR)		* chain entry to free list
-		move.l	RCUR,_pfqhdr		* ...
-		bra	pfscan			* go look at next entry
-*
-pfexit:		move.w	d7,sr			* restore interrupt level
-		movem.l	(a7)+,d3-d7/a3-a5	* restore the registers we used
-		unlk	a6			* deallocate stack frame
-		rts				* return to caller
-*
-		.page
-*
-* ------------------------------------------------------------------------------
-* stop a function
-* ------------------------------------------------------------------------------
-stopfn:		move.b	FH_TMD(a1),d0	* get function control bits
-		andi.w	#MSK_RNVB,d0	* mask for ratio / new new-value bit
-		move.w	d0,d3		* isolate new new-value bit
-		add.w	d3,d3		* ... from function header
-		andi.w	#MSK_ONVB,d3	* ... shift to old new-value bit
-		or.w	d3,d0		* ... and put new bit in old bit	
-		move.w	d0,F_CTL(a3,d1.W)	* stop the function
-		bclr	#I_ACTIVE,FH_TMD(a1)	* reset the active bit
-		bra	pfnext		* go restore registers and exit
-*
-* ------------------------------------------------------------------------------
-* setup for and dispatch to the proper action handler
-* ------------------------------------------------------------------------------
-doact:		clr.w	d2		* get current point index in d2
-		move.b	FH_CPT(a1),d2	* ...
-		lsl.w	#2,d2		* multiply it by the length of a point
-		move.w	d2,d0		* ...  (fast multiply by PT_LEN = 12
-		add.w	d2,d2		* ...   via shift and add)
-		add.w	d0,d2		* ...
-		clr.w	d4		* get jump point # into d4
-		move.b	PT_PAR1(a2,d2.W),d4	* ...
-		clr.w	d3		* get action code in d3
-		move.b	PT_ACT(a2,d2.W),d3	* ...
-		cmpi.b	#MAX_ACT,d3	* check against the limit
-		bgt	stopfn		* stop things if it's a bad action code
-*
-		lsl.w	#2,d3		* develop index to action dispatch table
-		lea	actab,a0	* get the address of the action handler
-		movea.l	0(a0,d3.W),a0	* ...
-*
-* ------------------------------------------------------------------------------
-* At this point we're ready to do the action associated with the point,
-* and the registers are set up,  and will remain,  as follows:
-*
-*	d1	FPU function index	a1	function header base
-*	d2	point table index	a2	point table base
-*					a3	FPU function base
-*	d4	jump point number
-*
-*	d0, d3, d5, and a0 are used as scratch throughout the code.
-*
-* ------------------------------------------------------------------------------
-*
-		jmp	(a0)		* dispatch to action handler
-*
-		.page
-* ------------------------------------------------------------------------------
-* act0 -- AC_NULL -- no action
-* ----    --------------------
-act0:		move.b	FH_PT1(a1),d0	* get first point number
-		add.b	FH_PIF(a1),d0	* add number of points in function
-		subq.b	#1,d0		* make it last point number
-		cmp.b	FH_CPT(a1),d0	* see if we're at the last point
-		beq	stopfn		* stop function if so
-*
-		addq.b	#1,FH_CPT(a1)	* update function header for next point
-		addi.w	#PT_LEN,d2	* advance the point index
-*
-* ------------------------------------------------------------------------------
-* outseg -- output a segment
-* ------    ----------------
-outseg:		move.w	PT_TIM(a2,d2.w),d3	* get packed time
-		move.w	d3,d0			* extract mantissa
-		andi.w	#MSK_MNT,d0		* ...
-		mulu	_timemlt,d0		* multiply by panel time pot value
-		lsr.l	#8,d0			* ... and scale it
-		lsr.l	#7,d0			* ...
-		move.w	d0,F_MNT(a3,d1.W)	* send mantissa to FPU
-		andi.w	#MSK_EXP,d3		* extract exponent code
-		add.w	d3,d3			* look up decoded exponent
-		lea	_expbit,a0		* ... in expbit
-		move.w	0(a0,d3.W),F_EXP(a3,d1.W)	* send exponent to FPU
-		move.w	PT_VAL(a2,d2.W),d3	* get the function value
-*
-		.page
-* ------------------------------------------------------------------------------
-* get the point source, if any
-* ------------------------------------------------------------------------------
-		tst.w	PT_VMLT(a2,d2.W)	* see if we have a point mlt.
-		beq	nosrc			* don't do anything for zero
-*
-		clr.w	d0			* get the source number
-		move.b	PT_VSRC(a2,d2.W),d0	* ...
-		beq	nosrc			* don't do anything for zero
-*
-* ------------------------------------------------------------------------------
-* SM_RAND -- random
-* ------------------------------------------------------------------------------
-		cmpi.w	#SM_RAND,d0		* is this the random source ?
-		bne	srctyp0			* jump if not
-*
-		movem.l	d1-d2/a0-a2,-(a7)	* preserve registers around call
-		move.w	PT_VMLT(a2,d2.W),-(a7)	* pass multiplier to xgetran()
-		jsr	_xgetran		* call for a random number
-		tst.w	(a7)+			* clean up stack
-		movem.l	(a7)+,d1-d2/a0-a2	* restore registers
-		move.w	d0,d5			* put random value in the value register
-		bra	applym			* go apply the multiplier
-*
-		.page
-* ------------------------------------------------------------------------------
-* SM_FREQ -- frequency
-* ------------------------------------------------------------------------------
-srctyp0:	cmpi.w	#SM_FREQ,d0	* is this the frequency source ?
-		bne	srctyp1		* jump if not
-*
-		move.w	(a1),d0		* get the pitch
-		lsr.w	#6,d0		* shift to a word index
-		andi.w	#$01FE,d0	* mask out extraneous bits
-		lea	_ptoftab,a0	* get entry from ptoftab[]
-		move.w	0(a0,d0.W),d5	* ...
-		bra	applym		* go apply the multiplier
-*
-* ------------------------------------------------------------------------------
-* SM_PTCH -- pitch
-* ------------------------------------------------------------------------------
-srctyp1:	cmpi.w	#SM_PTCH,d0	* is this the pitch source ?
-		bne	srctyp2		* jump if not
-*
-		move.w	(a1),d5		* get the pitch as the value
-		bra	applym		* go apply the multiplier
-*
-* ------------------------------------------------------------------------------
-* SM_KVEL -- velocity
-* ------------------------------------------------------------------------------
-srctyp2:	cmpi.w	#SM_KVEL,d0	* is this the key velocity source ?
-		bne	srctyp3		* jump if not
-*
-		move.w	FH_TRG(a1),d0	* get the trigger number
-		add.w	d0,d0		* ... as a word index
-		lea	_veltab,a0	* ... into veltab[]
-		move.w	0(a0,d0.W),d5	* get the velocity from veltab[trg]
-		bra	applym		* go apply the multiplier
-*
-* ------------------------------------------------------------------------------
-* SM_KPRS -- pressure
-* ------------------------------------------------------------------------------
-srctyp3:	cmpi.w	#SM_KPRS,d0	* is this the key pressure source ?
-		bne	srctyp4		* jump if not  (must be an analog input)
-*
-		move.w	FH_TRG(a1),d0	* get the trigger number
-		add.w	d0,d0		* ... as a word index
-		lea	_prstab,a0	* ... into prstab[]
-		move.w	0(a0,d0.W),d5	* get the pressure from prstab[trg]
-		bra	applym		* go apply the multiplier
-*
-		.page
-* ------------------------------------------------------------------------------
-* all other sources come out of the valents[] array
-* ------------------------------------------------------------------------------
-srctyp4:	lea	_vce2grp,a0	* point at vce2grp[]
-		move.w	_curpf_f,d5	* get voice number in d5
-		lsr.w	#3,d5		* ...
-		andi.w	#$001E,d5	* ... as a word index
-		move.w	0(a0,d5.W),d5	* get the group number
-		subq.w	#1,d5		* ...
-		lsl.w	#4,d5		* shift it left a nybble
-		or.w	d5,d0		* OR it into the source number
-		add.w	d0,d0		* make source number a valents[] index
-		move.w	d0,d5		* ... (fast multiply by VALLEN = 10
-		lsl.w	#2,d0		* ...  via shift and add)
-		add.w	d5,d0		* ...
-		lea	_valents,a0	* get base of valents[]
-		move.w	VT_VAL(a0,d0.W),d5	* get value
-*
-* ------------------------------------------------------------------------------
-* apply the multiplier to the source, and add it to the function value
-* ------------------------------------------------------------------------------
-applym:		muls	PT_VMLT(a2,d2.W),d5	* apply the multiplier
-		asr.l	#7,d5		* scale the result
-		asr.l	#8,d5		* ...
-		ext.l	d3		* add the function value
-		add.l	d3,d5		* ...
-		cmpi.l	#VALMAX,d5	* check for overflow
-		ble	srcmlt1		* jump if no overflow
-*
-		move.l	#VALMAX,d5	* limit at VALMAX
-		bra	srcmlt2		* ...
-*
-srcmlt1:	cmpi.l	#VALMIN,d5	* check for underflow
-		bge	srcmlt2		* jump if no underflow
-*
-		move.l	#VALMIN,d5	* limit at VALMIN
-*
-srcmlt2:	move.w	d5,d3		* setup value for output to FPU
-*
-		.page
-* ------------------------------------------------------------------------------
-* adjust the value according to the function type
-* ------------------------------------------------------------------------------
-nosrc:		move.w	d1,d0		* get function type
-		andi.w	#$01E0,d0	* ...
-*
-* ------------------------------------------------------------------------------
-* level or location
-* ------------------------------------------------------------------------------
-		cmpi.w	#P_LEVEL,d0	* see if it's the level
-		beq	outsegl		* jump if so
-*
-		cmpi.w	#P_LOCN,d0	* see if it's the location
-		bne	outsegf		* jump if not
-*
-		tst.w	d3		* check sign of value
-		bpl	outsegc		* jump if positive
-*
-		clr.w	d3		* force negative values to 0
-*
-outsegc:	asr.w	#5,d3		* shift value to LS bits
-		sub.w	#500,d3		* subtract 5.00 from value
-		asl.w	#6,d3		* readjust to MS bits
-		bra	outseg3		* go output the value
-*
-outsegl:	tst.w	d3		* check sign of value
-		bpl	outsegm		* jump if positive
-*
-		clr.w	d3		* limit negative values at 0
-*
-outsegm:	asr.w	#5,d3		* shift value to LS bits
-		sub.w	#500,d3		* subtract 5.00 from value
-		asl.w	#6,d3		* readjust to MS bits
-		bra	outseg3		* go output the value
-*
-		.page
-* ------------------------------------------------------------------------------
-* filter
-* ------------------------------------------------------------------------------
-outsegf:	cmpi.w	#P_FILTER,d0	* see if it's the filter
-		bne	outsegp		* jump if not
-*
-		ext.l	d3		* make function value a long
-		asr.l	#1,d3		* multiply function value by .75
-		move.l	d3,d0		* ...  (fast multiply by .75
-		asr.l	#1,d0		* ...   via shift and add)
-		add.l	d0,d3		* ...
-		move.w	(a1),d0		* add pitch
-		ext.l	d0		* ...
-		add.l	d0,d3		* ...
-		cmpi.l	#VALMAX,d3	* see if it's within limits
-		ble	outsega		* ...
-*
-		move.w	#VALMAX,d3	* limit at VALMAX
-		bra	outseg3		* ...
-*
-outsega:	cmpi.l	#VALMIN,d3	* ...
-		bge	outseg3		* ...
-*
-		move.w	#VALMIN,d3	* limit at VALMIN
-		bra	outseg3		* ...
-*
-		.page
-* ------------------------------------------------------------------------------
-* freq 1..4
-* ------------------------------------------------------------------------------
-outsegp:	cmpi.w	#P_FREQ1,d0	* see if it's freq1
-		beq	outseg0		* go process freq1
-*
-outsegq:	cmpi.w	#P_FREQ2,d0	* see if it's freq2
-		beq	outseg0		* process it if so
-*
-		cmpi.w	#P_FREQ3,d0	* see if it's freq3
-		beq	outseg0		* process it if so
-*
-		cmpi.w	#P_FREQ4,d0	* see if it's freq4
-		bne	outseg3		* jump if not
-*
-outseg0:	ext.l	d3		* scale the point value to cents offset
-		asr.l	#5,d3		* ...
-		sub.l	#500,d3		* ... value - 500
-		asl.l	#LSPCH,d3	* mult. by 2 and scale for 1/2 cent lsb
-		move.w	(a1),d0		* add pitch from function header
-		ext.l	d0		* ...
-		add.l	d0,d3		* ...
-		cmp.l	#PCHMAX,d3	* see if result is valid
-		ble	outseg3		* jump if within pitch limits
-*
-		move.l	#PCHMAX,d3	* limit at maximum pitch
-*
-* ------------------------------------------------------------------------------
-* send the value to the FPU
-* ------------------------------------------------------------------------------
-outseg3:	move.b	FH_TMD(a1),d0	* get hardware bits from function header
-		eor.w	#VAL_BITS,d0	* toggle new value select bits
-		move.b	d0,FH_TMD(a1)	* store updated word
-		btst.l	#VSUBNBIT,d0	* check which value address to use
+
+		.page
+| ------------------------------------------------------------------------------
+| Register usage
+| --------------
+|	d0	scratch
+|	d1	FPU function index
+|	d2	point index from FH_CPT  (idfcpt)
+|	d3	scratch
+|	d4	jump point number from PT_PAR1  (ippar1)
+|	d5	scratch
+
+|	a0	scratch
+|	a1	function header base
+|	a2	point table base
+|	a3	FPU base
+
+| ------------------------------------------------------------------------------
+| FPU definitions
+| ---------------
+
+UPD_BIT		=	0x0001			| update bit  (1 = update)
+INT_BIT		=	0x0002			| int. bit    (0 = disable)
+RAT_BIT		=	0x0004			| ratio bit   (0 = ratio)
+
+VSUBNBIT	=	3			| new value select bit number
+VAL_BITS	=	0x0018			| new value select bit mask
+
+MSK_RNVB	=	0x000C			| new value / ratio bits
+MSK_ONVB	=	0x0010			| old new value bit
+
+FKILL		=	0x0014			| kill value for function
+FSEND		=	0x0015			| send new value to function
+
+CLREXP		=	0x8000			| clear value for time exponent
+CLRMNT		=	0x8000			| clear value for time mantissa
+
+| ------------------------------------------------------------------------------
+| Miscellaneous definitions
+| -------------------------
+
+PCHMAX		=	21920			| maximum pitch value
+VALMAX		=	32000			| maximum value to send to FPU
+VALMIN		=	-32000			| minimum value to send to FPU
+
+LSPCH		=	2			| left shift for sources to freq
+
+VALLEN		=	10			| length of the 'valent' struct
+VT_VAL		=	8			| value offset in 'valent'
+
+		.page
+| ------------------------------------------------------------------------------
+| FPU addresses
+| -------------
+
+FPUBASE		=	0x180000		| FPU base address
+
+FPUWST		=	FPUBASE			| FPU waveshape base
+FPUFUNC		=	FPUBASE+0x4000		| FPU function base
+FPUINT1		=	FPUBASE+0x4000		| FPU int. input address (R/O)
+FPUINT2		=	FPUBASE+0x6000		| FPU int. reset address (W/O)
+FPUCFG		=	FPUBASE+0x5FE0		| FPU config. data address (W/O)
+
+F_CTL		=	0x00			| control word
+F_VAL10		=	0x02			| new value "10"
+F_CV1		=	0x08			| control voltage 1
+F_SF1		=	0x0A			| scale factor 1
+F_CV2		=	0x0C			| control voltage 2
+F_SF2		=	0x0E			| scale factor 2
+F_CV3		=	0x10			| control voltage 3
+F_SF3		=	0x12			| scale factor 3
+F_MNT		=	0x14			| time mantissa
+F_EXP		=	0x16			| time exponent
+F_VAL01		=	0x1C			| new value "01"
+
+P_FREQ1		=	0x0020			| frequency 1
+P_FREQ2		=	0x0060			| frequency 2
+P_FREQ3		=	0x00A0			| frequency 3
+P_FREQ4		=	0x00E0			| frequency 4
+P_FILTER	=	0x0140			| filter
+P_FILTRQ	=	0x00C0			| filter q
+
+P_INDEX1	=	0x0120			| index 1
+P_INDEX2	=	0x0160			| index 2
+P_INDEX3	=	0x0180			| index 3
+P_INDEX4	=	0x01A0			| index 4
+P_INDEX5	=	0x01C0			| index 5
+P_INDEX6	=	0x01E0			| index 6
+
+P_LEVEL		=	0x0040			| level
+
+P_LOCN		=	0x0080			| location
+P_DYNAM		=	0x0100			| dynamics
+
+		.page
+| ------------------------------------------------------------------------------
+| Structure definitions
+| ------------------------------------------------------------------------------
+| The following MUST match the idfnhdr structure definition in instdsp.h:
+
+FH_LEN		=	12		| length of the idfnhdr structure
+
+FH_PCH		=	0		| WORD - pitch offset
+FH_MLT		=	2		| WORD - overall value multiplier
+FH_SRC		=	4		| BYTE - overall value source
+FH_PIF		=	5		| BYTE - # of points in the function
+FH_PT1		=	6		| BYTE - index of first point
+FH_TMD		=	7		| BYTE - trigger mode / control bits
+FH_CPT		=	8		| BYTE - current point
+FH_PRM		=	9		| BYTE - misc. function parameter
+FH_TRG		=	10		| WORD - trigger
+
+I_ACTIVE	=	1		| 'Active' bit number        (in FH_TMD)
+
+MSK_CTL		=	0x001C		| mask for FPU hardware bits (in FH_TMD)
+
+| ------------------------------------------------------------------------------
+| The following MUST match the instpnt structure definition in instdsp.h:
+
+PT_LEN		=	12		| length of the instpnt structure
+
+PT_TIM		=	0		| WORD - time (packed)
+PT_VAL		=	2		| WORD - value
+PT_VMLT		=	4		| WORD - value multiplier
+PT_VSRC		=	6		| BYTE - value source
+PT_ACT		=	7		| BYTE - action
+PT_PAR1		=	8		| BYTE - parameter 1
+PT_PAR2		=	9		| BYTE - parameter 2
+PT_PAR3		=	10		| BYTE - parameter 3
+PT_PAD		=	11		| BYTE - padding for even boundary
+
+MSK_MNT		=	0xFFF0		| mask for mantissa  (in PT_TIM)
+MSK_EXP		=	0x000F		| mask for exponent  (in PT_TIM)
+
+MAX_ACT		=	7		| maximum action code value
+
+| ------------------------------------------------------------------------------
+| Source definitions -- must match those in 'smdefs.h'
+
+SM_RAND		=	1		| random
+SM_PTCH		=	5		| pitch
+SM_KPRS		=	6		| key pressure
+SM_KVEL		=	7		| key velocity
+SM_FREQ		=	10		| frequency
+
+		.page
+
+| Layout of pflist entries	32 bytes each
+| ------------------------
+PF_NEXT		=	0		| LONG - next entry pointer
+PF_TRIG		=	4		| WORD - trigger number
+PF_FUNC		=	6		| WORD - fpuifnc value
+PF_D1		=	8		| LONG - d1
+PF_D2		=	12		| LONG - d2
+PF_D4		=	16		| LONG - d4
+PF_A1		=	20		| LONG - a1
+PF_A2		=	24		| LONG - a2
+PF_A3		=	28		| LONG - a3
+
+| Parameter offset
+| ----------------
+TRIG		=	8		| WORD - trigger number
+
+| Register equates
+| ----------------
+RCUR		=	a4		| current pflist entry pointer
+RPRV		=	a5		| previous pflist entry pointer
+
+		.page
+| ------------------------------------------------------------------------------
+| _procpfl() -- process pendant functions
+
+|	void
+|	procpfl(trig);
+|	unsigned trig;
+
+|		Processes pendant (sustained) functions by restarting them
+|	when the trigger (trig) that's sustaining them is released.
+|	Invoked by key release processing in msm() and localkb().
+
+| ------------------------------------------------------------------------------
+
+_procpfl:	nop				| FOR DEBUGGING PATCH
+
+		link	a6,#0			| allocate stack frame
+		movem.l	d3-d7/a3-a5,-(a7)	| preserve registers we use
+
+		move.w	sr,d7			| save interrupt state
+		move.w	#0x2200,sr		| turn off FPU interrupts
+
+		move.w	TRIG(a6),d6		| get trigger we're processing
+		move.w	d6,_curpf_t		| ...
+		movea.l	#_pflist,RPRV		| point at 'previous' pflist entry
+		bra	pfscan			| go scan the chain
+
+pfpass:		movea.l	RCUR,RPRV		| point at previous entry
+
+pfscan:		move.l	(RPRV),d5		| get next pflist entry pointer
+		beq	pfexit			| done if no more
+
+		movea.l	d5,RCUR			| point at  current entry
+		move.l	d5,_curpf_l		| ...
+
+		cmp.w	PF_TRIG(RCUR),d6	| see if this entry is wanted
+		bne	pfpass			| jump if not
+
+		movem.l	PF_D1(RCUR),d1-d2/d4/a1-a3	| restore processing state
+		move.w	PF_FUNC(RCUR),_curpf_f		| ...
+
+		btst	#I_ACTIVE,FH_TMD(a1)	| see if function is active
+		bne	doact			| continue function if so
+
+		bra	stopfn			| stop function if not
+
+pfnext:		move.l	(RCUR),(RPRV)		| remove entry from pflist
+		move.l	_pfqhdr,(RCUR)		| chain entry to free list
+		move.l	RCUR,_pfqhdr		| ...
+		bra	pfscan			| go look at next entry
+
+pfexit:		move.w	d7,sr			| restore interrupt level
+		movem.l	(a7)+,d3-d7/a3-a5	| restore the registers we used
+		unlk	a6			| deallocate stack frame
+		rts				| return to caller
+
+		.page
+
+| ------------------------------------------------------------------------------
+| stop a function
+| ------------------------------------------------------------------------------
+stopfn:		move.b	FH_TMD(a1),d0	| get function control bits
+		andi.w	#MSK_RNVB,d0	| mask for ratio / new new-value bit
+		move.w	d0,d3		| isolate new new-value bit
+		add.w	d3,d3		| ... from function header
+		andi.w	#MSK_ONVB,d3	| ... shift to old new-value bit
+		or.w	d3,d0		| ... and put new bit in old bit
+		move.w	d0,F_CTL(a3,d1.W)	| stop the function
+		bclr	#I_ACTIVE,FH_TMD(a1)	| reset the active bit
+		bra	pfnext		| go restore registers and exit
+
+| ------------------------------------------------------------------------------
+| setup for and dispatch to the proper action handler
+| ------------------------------------------------------------------------------
+doact:		clr.w	d2		| get current point index in d2
+		move.b	FH_CPT(a1),d2	| ...
+		lsl.w	#2,d2		| multiply it by the length of a point
+		move.w	d2,d0		| ...  (fast multiply by PT_LEN = 12
+		add.w	d2,d2		| ...   via shift and add)
+		add.w	d0,d2		| ...
+		clr.w	d4		| get jump point # into d4
+		move.b	PT_PAR1(a2,d2.W),d4	| ...
+		clr.w	d3		| get action code in d3
+		move.b	PT_ACT(a2,d2.W),d3	| ...
+		cmpi.b	#MAX_ACT,d3	| check against the limit
+		bgt	stopfn		| stop things if it's a bad action code
+
+		lsl.w	#2,d3		| develop index to action dispatch table
+		lea	actab,a0	| get the address of the action handler
+		movea.l	0(a0,d3.W),a0	| ...
+
+| ------------------------------------------------------------------------------
+| At this point we're ready to do the action associated with the point,
+| and the registers are set up,  and will remain,  as follows:
+
+|	d1	FPU function index	a1	function header base
+|	d2	point table index	a2	point table base
+|					a3	FPU function base
+|	d4	jump point number
+
+|	d0, d3, d5, and a0 are used as scratch throughout the code.
+
+| ------------------------------------------------------------------------------
+
+		jmp	(a0)		| dispatch to action handler
+
+		.page
+| ------------------------------------------------------------------------------
+| act0 -- AC_NULL -- no action
+| ----    --------------------
+act0:		move.b	FH_PT1(a1),d0	| get first point number
+		add.b	FH_PIF(a1),d0	| add number of points in function
+		subq.b	#1,d0		| make it last point number
+		cmp.b	FH_CPT(a1),d0	| see if we're at the last point
+		beq	stopfn		| stop function if so
+
+		addq.b	#1,FH_CPT(a1)	| update function header for next point
+		addi.w	#PT_LEN,d2	| advance the point index
+
+| ------------------------------------------------------------------------------
+| outseg -- output a segment
+| ------    ----------------
+outseg:		move.w	PT_TIM(a2,d2.w),d3	| get packed time
+		move.w	d3,d0			| extract mantissa
+		andi.w	#MSK_MNT,d0		| ...
+		mulu	_timemlt,d0		| multiply by panel time pot value
+		lsr.l	#8,d0			| ... and scale it
+		lsr.l	#7,d0			| ...
+		move.w	d0,F_MNT(a3,d1.W)	| send mantissa to FPU
+		andi.w	#MSK_EXP,d3		| extract exponent code
+		add.w	d3,d3			| look up decoded exponent
+		lea	_expbit,a0		| ... in expbit
+		move.w	0(a0,d3.W),F_EXP(a3,d1.W)	| send exponent to FPU
+		move.w	PT_VAL(a2,d2.W),d3	| get the function value
+
+		.page
+| ------------------------------------------------------------------------------
+| get the point source, if any
+| ------------------------------------------------------------------------------
+		tst.w	PT_VMLT(a2,d2.W)	| see if we have a point mlt.
+		beq	nosrc			| don't do anything for zero
+
+		clr.w	d0			| get the source number
+		move.b	PT_VSRC(a2,d2.W),d0	| ...
+		beq	nosrc			| don't do anything for zero
+
+| ------------------------------------------------------------------------------
+| SM_RAND -- random
+| ------------------------------------------------------------------------------
+		cmpi.w	#SM_RAND,d0		| is this the random source ?
+		bne	srctyp0			| jump if not
+
+		movem.l	d1-d2/a0-a2,-(a7)	| preserve registers around call
+		move.w	PT_VMLT(a2,d2.W),-(a7)	| pass multiplier to xgetran()
+		jsr	_xgetran		| call for a random number
+		tst.w	(a7)+			| clean up stack
+		movem.l	(a7)+,d1-d2/a0-a2	| restore registers
+		move.w	d0,d5			| put random value in the value register
+		bra	applym			| go apply the multiplier
+
+		.page
+| ------------------------------------------------------------------------------
+| SM_FREQ -- frequency
+| ------------------------------------------------------------------------------
+srctyp0:	cmpi.w	#SM_FREQ,d0	| is this the frequency source ?
+		bne	srctyp1		| jump if not
+
+		move.w	(a1),d0		| get the pitch
+		lsr.w	#6,d0		| shift to a word index
+		andi.w	#0x01FE,d0	| mask out extraneous bits
+		lea	_ptoftab,a0	| get entry from ptoftab[]
+		move.w	0(a0,d0.W),d5	| ...
+		bra	applym		| go apply the multiplier
+
+| ------------------------------------------------------------------------------
+| SM_PTCH -- pitch
+| ------------------------------------------------------------------------------
+srctyp1:	cmpi.w	#SM_PTCH,d0	| is this the pitch source ?
+		bne	srctyp2		| jump if not
+
+		move.w	(a1),d5		| get the pitch as the value
+		bra	applym		| go apply the multiplier
+
+| ------------------------------------------------------------------------------
+| SM_KVEL -- velocity
+| ------------------------------------------------------------------------------
+srctyp2:	cmpi.w	#SM_KVEL,d0	| is this the key velocity source ?
+		bne	srctyp3		| jump if not
+
+		move.w	FH_TRG(a1),d0	| get the trigger number
+		add.w	d0,d0		| ... as a word index
+		lea	_veltab,a0	| ... into veltab[]
+		move.w	0(a0,d0.W),d5	| get the velocity from veltab[trg]
+		bra	applym		| go apply the multiplier
+
+| ------------------------------------------------------------------------------
+| SM_KPRS -- pressure
+| ------------------------------------------------------------------------------
+srctyp3:	cmpi.w	#SM_KPRS,d0	| is this the key pressure source ?
+		bne	srctyp4		| jump if not  (must be an analog input)
+
+		move.w	FH_TRG(a1),d0	| get the trigger number
+		add.w	d0,d0		| ... as a word index
+		lea	_prstab,a0	| ... into prstab[]
+		move.w	0(a0,d0.W),d5	| get the pressure from prstab[trg]
+		bra	applym		| go apply the multiplier
+
+		.page
+| ------------------------------------------------------------------------------
+| all other sources come out of the valents[] array
+| ------------------------------------------------------------------------------
+srctyp4:	lea	_vce2grp,a0	| point at vce2grp[]
+		move.w	_curpf_f,d5	| get voice number in d5
+		lsr.w	#3,d5		| ...
+		andi.w	#0x001E,d5	| ... as a word index
+		move.w	0(a0,d5.W),d5	| get the group number
+		subq.w	#1,d5		| ...
+		lsl.w	#4,d5		| shift it left a nybble
+		or.w	d5,d0		| OR it into the source number
+		add.w	d0,d0		| make source number a valents[] index
+		move.w	d0,d5		| ... (fast multiply by VALLEN = 10
+		lsl.w	#2,d0		| ...  via shift and add)
+		add.w	d5,d0		| ...
+		lea	_valents,a0	| get base of valents[]
+		move.w	VT_VAL(a0,d0.W),d5	| get value
+
+| ------------------------------------------------------------------------------
+| apply the multiplier to the source, and add it to the function value
+| ------------------------------------------------------------------------------
+applym:		muls	PT_VMLT(a2,d2.W),d5	| apply the multiplier
+		asr.l	#7,d5		| scale the result
+		asr.l	#8,d5		| ...
+		ext.l	d3		| add the function value
+		add.l	d3,d5		| ...
+		cmpi.l	#VALMAX,d5	| check for overflow
+		ble	srcmlt1		| jump if no overflow
+
+		move.l	#VALMAX,d5	| limit at VALMAX
+		bra	srcmlt2		| ...
+
+srcmlt1:	cmpi.l	#VALMIN,d5	| check for underflow
+		bge	srcmlt2		| jump if no underflow
+
+		move.l	#VALMIN,d5	| limit at VALMIN
+
+srcmlt2:	move.w	d5,d3		| setup value for output to FPU
+
+		.page
+| ------------------------------------------------------------------------------
+| adjust the value according to the function type
+| ------------------------------------------------------------------------------
+nosrc:		move.w	d1,d0		| get function type
+		andi.w	#0x01E0,d0	| ...
+
+| ------------------------------------------------------------------------------
+| level or location
+| ------------------------------------------------------------------------------
+		cmpi.w	#P_LEVEL,d0	| see if it's the level
+		beq	outsegl		| jump if so
+
+		cmpi.w	#P_LOCN,d0	| see if it's the location
+		bne	outsegf		| jump if not
+
+		tst.w	d3		| check sign of value
+		bpl	outsegc		| jump if positive
+
+		clr.w	d3		| force negative values to 0
+
+outsegc:	asr.w	#5,d3		| shift value to LS bits
+		sub.w	#500,d3		| subtract 5.00 from value
+		asl.w	#6,d3		| readjust to MS bits
+		bra	outseg3		| go output the value
+
+outsegl:	tst.w	d3		| check sign of value
+		bpl	outsegm		| jump if positive
+
+		clr.w	d3		| limit negative values at 0
+
+outsegm:	asr.w	#5,d3		| shift value to LS bits
+		sub.w	#500,d3		| subtract 5.00 from value
+		asl.w	#6,d3		| readjust to MS bits
+		bra	outseg3		| go output the value
+
+		.page
+| ------------------------------------------------------------------------------
+| filter
+| ------------------------------------------------------------------------------
+outsegf:	cmpi.w	#P_FILTER,d0	| see if it's the filter
+		bne	outsegp		| jump if not
+
+		ext.l	d3		| make function value a long
+		asr.l	#1,d3		| multiply function value by .75
+		move.l	d3,d0		| ...  (fast multiply by .75
+		asr.l	#1,d0		| ...   via shift and add)
+		add.l	d0,d3		| ...
+		move.w	(a1),d0		| add pitch
+		ext.l	d0		| ...
+		add.l	d0,d3		| ...
+		cmpi.l	#VALMAX,d3	| see if it's within limits
+		ble	outsega		| ...
+
+		move.w	#VALMAX,d3	| limit at VALMAX
+		bra	outseg3		| ...
+
+outsega:	cmpi.l	#VALMIN,d3	| ...
+		bge	outseg3		| ...
+
+		move.w	#VALMIN,d3	| limit at VALMIN
+		bra	outseg3		| ...
+
+		.page
+| ------------------------------------------------------------------------------
+| freq 1..4
+| ------------------------------------------------------------------------------
+outsegp:	cmpi.w	#P_FREQ1,d0	| see if it's freq1
+		beq	outseg0		| go process freq1
+
+outsegq:	cmpi.w	#P_FREQ2,d0	| see if it's freq2
+		beq	outseg0		| process it if so
+
+		cmpi.w	#P_FREQ3,d0	| see if it's freq3
+		beq	outseg0		| process it if so
+
+		cmpi.w	#P_FREQ4,d0	| see if it's freq4
+		bne	outseg3		| jump if not
+
+outseg0:	ext.l	d3		| scale the point value to cents offset
+		asr.l	#5,d3		| ...
+		sub.l	#500,d3		| ... value - 500
+		asl.l	#LSPCH,d3	| mult. by 2 and scale for 1/2 cent lsb
+		move.w	(a1),d0		| add pitch from function header
+		ext.l	d0		| ...
+		add.l	d0,d3		| ...
+		cmp.l	#PCHMAX,d3	| see if result is valid
+		ble	outseg3		| jump if within pitch limits
+
+		move.l	#PCHMAX,d3	| limit at maximum pitch
+
+| ------------------------------------------------------------------------------
+| send the value to the FPU
+| ------------------------------------------------------------------------------
+outseg3:	move.b	FH_TMD(a1),d0	| get hardware bits from function header
+		eor.w	#VAL_BITS,d0	| toggle new value select bits
+		move.b	d0,FH_TMD(a1)	| store updated word
+		btst.l	#VSUBNBIT,d0	| check which value address to use
 		beq	outseg1
-*
-		move.w	d3,F_VAL01(a3,d1.W)	* send value to FPU
+
+		move.w	d3,F_VAL01(a3,d1.W)	| send value to FPU
 		bra	outseg2
-*
-outseg1:	move.w	d3,F_VAL10(a3,d1.W)	* send value to FPU
-*
-outseg2:	andi.w	#MSK_CTL,d0		* mask off software bits
-		ori.w	#UPD_BIT+INT_BIT,d0	* set the update & !lastseg bits
-		move.w	d0,F_CTL(a3,d1.W)	* send control word to FPU
-		bra	pfnext			* done -- exit
-*
-		.page
-*
-* ------------------------------------------------------------------------------
-* act2 -- AC_ENBL -- stop if key is up
-* ----    ----------------------------
-act2:		move.w	_curpf_f,d0	* get voice as a word index
-		lsr.w	#3,d0		* ...
-		andi.w	#$001E,d0	* ...
-		lea	_vce2trg,a0	* check to see if voice is free
-		move.w	0(a0,d0.W),d0	* ...
-		cmpi.w	#-1,d0		* ...
-		beq	stopfn		* if so, stop the function
-*
-		btst	#15,d0		* see if voice is held
-		bne	act0		* continue if so
-*
-		btst	#14,d0		* ...
-		bne	act0		* ...
-*
-		lea	_trgtab,a0	* check trigger table entry
-		tst.b	0(a0,d0.W)	* ...
-		bne	act0		* if trigger is active, continue
-*
-		bra	stopfn		* if not, stop the function
-*
-* ------------------------------------------------------------------------------
-* act3 -- AC_JUMP -- unconditional jump
-* ----    -----------------------------
-act3:		cmp.b	FH_PIF(a1),d4	* check jump point against limit
-		bcc	stopfn		* stop function if jump point invalid
-*
-		clr.w	d2		* get index of first point
-		move.b	FH_PT1(a1),d2	* ...
-		add.b	d4,d2		* add jump point
-		move.b	d2,FH_CPT(a1)	* make it the current point
-		lsl.w	#2,d2		* develop new point index in d2
-		move.w	d2,d0		* ... (fast multiply by PT_LEN = 12
-		add.w	d2,d2		* ...  via shift and add)
-		add.w	d0,d2		* ...
-		bra	outseg		* output the segment
-*
-		.page
-*
-* ------------------------------------------------------------------------------
-* act4 -- AC_LOOP -- jump to point PT_PAR1 PT_PAR2 times
-* ----    ----------------------------------------------
-act4:		tst.b	PT_PAR3(a2,d2.W)	* check counter
-		bne	act4a			* jump if it's running
-*
-		move.b	PT_PAR2(a2,d2.W),d0	* get parameter
-		subi.w	#90,d0			* put parameter in random range
-		bmi	act4b			* treat as normal if < 90
-*
-		movem.l	d1-d2/a0-a2,-(a7)	* get ranged random number
-		move.w	d0,-(a7)		* ...
-		jsr	_irand			* ...
-		tst.w	(a7)+			* ...
-		movem.l	(a7)+,d1-d2/a0-a2	* ...
-		move.b	d0,PT_PAR3(a2,d2.w)	* set counter
-		beq	act0			* next segment if cntr set to 0
-*
-		bra	act3			* else jump to the point
-*
-act4b:		move.b	PT_PAR2(a2,d2.W),PT_PAR3(a2,d2.W)	* set counter
-		beq	act0			* next segment if cntr set to 0
-*
-		bra	act3			* else jump to the point
-*
-act4a:		subq.b	#1,PT_PAR3(a2,d2.W)	* decrement counter
-		beq	act0			* next segment if cntr ran out
-*
-		bra	act3			* jump if it's still non-zero
-*
-* ------------------------------------------------------------------------------
-* act5 -- AC_KYUP -- jump if key is up
-* ----    ----------------------------
-act5:		move.w	_curpf_f,d0	* get voice as a word index
-		lsr.w	#3,d0		* ...
-		andi.w	#$001E,d0	* ...
-		lea	_vce2trg,a0	* check to see if voice is free
-		move.w	0(a0,d0.W),d0	* ...
-		cmpi.w	#-1,d0		* ...
-		beq	act3		* if so (inactive), do the jump
-*
-		btst	#15,d0		* see if voice is held
-		bne	act0		* continue if so
-*
-		btst	#14,d0		* ...
-		bne	act0		* ...
-*
-		lea	_trgtab,a0	* check trigger table entry
-		tst.b	0(a0,d0.W)	* see if the trigger is active
-		beq	act3		* if not, do the jump
-*
-		bra	act0		* if so, do next segment
-*
-		.page
-*
-* ------------------------------------------------------------------------------
-* act6 -- AC_KYDN -- jump if key is down
-* ----    ------------------------------
-act6:		move.w	_curpf_f,d0	* get voice as a word index
-		lsr.w	#3,d0		* ...
-		andi.w	#$001E,d0	* ...
-		lea	_vce2trg,a0	* check to see if voice is free
-		move.w	0(a0,d0.W),d0	* ...
-		cmpi.w	#-1,d0		* ...
-		beq	act0		* if so (inactive), continue
-*
-		btst	#15,d0		* see if voice is held
-		bne	act3		* do jump if so
-*
-		btst	#14,d0		* ...
-		bne	act3		* ...
-*
-		lea	_trgtab,a0	* check trigger table entry
-		tst.b	0(a0,d0.W)	* see if the trigger is active
-		bne	act3		* if so, do the jump
-*
-		bra	act0		* if not, do next segment
-*
-* ------------------------------------------------------------------------------
-act7:		bra	act0		* AC_HERE: treat act7 as AC_NULL
-*
-		.page
-*
-* act1 -- AC_SUST -- pause if key is down (sustain)
-* ----    -----------------------------------------
-act1:		move.w	_curpf_f,d0	* get voice as a word index
-		lsr.w	#3,d0		* ...
-		andi.w	#$001E,d0	* ...
-		lea	_vce2trg,a0	* point at voice to trigger table
-		move.w	0(a0,d0.W),d0	* get trigger table entry
-		cmpi.w	#-1,d0		* see if voice is free
-		beq	act0		* treat as no-op if so
-*
-		btst	#15,d0		* see if voice is held by a pedal
-		bne	act1a		* sustain if so
-*
-		btst	#14,d0		* see if voice is sustained by a pedal
-		bne	act1a		* sustain if so
-*
-		lea	_trgtab,a0	* point at trigger table
-		tst.b	0(a0,d0.W)	* check trigger status
-		beq	act0		* continue if not active
-*
-act1a:		move.l	_pfqhdr,d3	* see if any pflist entries remain
-		beq	act0		* no-op if not  (shouldn't happen ...)
-*
-		move.b	FH_PT1(a1),d0	* get first point number
-		add.b	FH_PIF(a1),d0	* add base to first point
-		subq.b	#1,d0		* make d0 last point number
-		cmp.b	FH_CPT(a1),d0	* check current point number
-		beq	stopfn		* done if this is the last point
-*
-		addq.b	#1,FH_CPT(a1)		* update current point number
-		addi.w	#PT_LEN,d2		* update point index
-		movea.l	d3,a0			* acquire a new pflist entry
-		move.l	(a0),_pfqhdr		* ...
-		move.l	_pflist,(a0)		* ...
-		move.l	a0,_pflist		* ...
-		move.w	FH_TRG(a1),PF_TRIG(a0)	* set trigger number in entry
-		move.w	_curpf_f,PF_FUNC(a0)	* set v/p word in entry
-		movem.l	d1-d2/d4/a1-a3,PF_D1(a0)	* set registers in entry
-		move.b	FH_TMD(a1),d0		* stop the function
-		andi.w	#MSK_RNVB,d0		* ...
-		move.w	d0,d3			* ...
-		add.w	d3,d3			* ...
-		andi.w	#MSK_ONVB,d3		* ...
-		or.w	d3,d0			* ...
-		move.w	d0,F_CTL(a3,d1.W)	* ...
-		bra	pfnext			* go do next list entry
-*
-		.page
-* ------------------------------------------------------------------------------
+
+outseg1:	move.w	d3,F_VAL10(a3,d1.W)	| send value to FPU
+
+outseg2:	andi.w	#MSK_CTL,d0		| mask off software bits
+		ori.w	#UPD_BIT+INT_BIT,d0	| set the update & !lastseg bits
+		move.w	d0,F_CTL(a3,d1.W)	| send control word to FPU
+		bra	pfnext			| done -- exit
+
+		.page
+
+| ------------------------------------------------------------------------------
+| act2 -- AC_ENBL -- stop if key is up
+| ----    ----------------------------
+act2:		move.w	_curpf_f,d0	| get voice as a word index
+		lsr.w	#3,d0		| ...
+		andi.w	#0x001E,d0	| ...
+		lea	_vce2trg,a0	| check to see if voice is free
+		move.w	0(a0,d0.W),d0	| ...
+		cmpi.w	#-1,d0		| ...
+		beq	stopfn		| if so, stop the function
+
+		btst	#15,d0		| see if voice is held
+		bne	act0		| continue if so
+
+		btst	#14,d0		| ...
+		bne	act0		| ...
+
+		lea	_trgtab,a0	| check trigger table entry
+		tst.b	0(a0,d0.W)	| ...
+		bne	act0		| if trigger is active, continue
+
+		bra	stopfn		| if not, stop the function
+
+| ------------------------------------------------------------------------------
+| act3 -- AC_JUMP -- unconditional jump
+| ----    -----------------------------
+act3:		cmp.b	FH_PIF(a1),d4	| check jump point against limit
+		bcc	stopfn		| stop function if jump point invalid
+
+		clr.w	d2		| get index of first point
+		move.b	FH_PT1(a1),d2	| ...
+		add.b	d4,d2		| add jump point
+		move.b	d2,FH_CPT(a1)	| make it the current point
+		lsl.w	#2,d2		| develop new point index in d2
+		move.w	d2,d0		| ... (fast multiply by PT_LEN = 12
+		add.w	d2,d2		| ...  via shift and add)
+		add.w	d0,d2		| ...
+		bra	outseg		| output the segment
+
+		.page
+
+| ------------------------------------------------------------------------------
+| act4 -- AC_LOOP -- jump to point PT_PAR1 PT_PAR2 times
+| ----    ----------------------------------------------
+act4:		tst.b	PT_PAR3(a2,d2.W)	| check counter
+		bne	act4a			| jump if it's running
+
+		move.b	PT_PAR2(a2,d2.W),d0	| get parameter
+		subi.w	#90,d0			| put parameter in random range
+		bmi	act4b			| treat as normal if < 90
+
+		movem.l	d1-d2/a0-a2,-(a7)	| get ranged random number
+		move.w	d0,-(a7)		| ...
+		jsr	_irand			| ...
+		tst.w	(a7)+			| ...
+		movem.l	(a7)+,d1-d2/a0-a2	| ...
+		move.b	d0,PT_PAR3(a2,d2.w)	| set counter
+		beq	act0			| next segment if cntr set to 0
+
+		bra	act3			| else jump to the point
+
+act4b:		move.b	PT_PAR2(a2,d2.W),PT_PAR3(a2,d2.W)	| set counter
+		beq	act0			| next segment if cntr set to 0
+
+		bra	act3			| else jump to the point
+
+act4a:		subq.b	#1,PT_PAR3(a2,d2.W)	| decrement counter
+		beq	act0			| next segment if cntr ran out
+
+		bra	act3			| jump if it's still non-zero
+
+| ------------------------------------------------------------------------------
+| act5 -- AC_KYUP -- jump if key is up
+| ----    ----------------------------
+act5:		move.w	_curpf_f,d0	| get voice as a word index
+		lsr.w	#3,d0		| ...
+		andi.w	#0x001E,d0	| ...
+		lea	_vce2trg,a0	| check to see if voice is free
+		move.w	0(a0,d0.W),d0	| ...
+		cmpi.w	#-1,d0		| ...
+		beq	act3		| if so (inactive), do the jump
+
+		btst	#15,d0		| see if voice is held
+		bne	act0		| continue if so
+
+		btst	#14,d0		| ...
+		bne	act0		| ...
+
+		lea	_trgtab,a0	| check trigger table entry
+		tst.b	0(a0,d0.W)	| see if the trigger is active
+		beq	act3		| if not, do the jump
+
+		bra	act0		| if so, do next segment
+
+		.page
+
+| ------------------------------------------------------------------------------
+| act6 -- AC_KYDN -- jump if key is down
+| ----    ------------------------------
+act6:		move.w	_curpf_f,d0	| get voice as a word index
+		lsr.w	#3,d0		| ...
+		andi.w	#0x001E,d0	| ...
+		lea	_vce2trg,a0	| check to see if voice is free
+		move.w	0(a0,d0.W),d0	| ...
+		cmpi.w	#-1,d0		| ...
+		beq	act0		| if so (inactive), continue
+
+		btst	#15,d0		| see if voice is held
+		bne	act3		| do jump if so
+
+		btst	#14,d0		| ...
+		bne	act3		| ...
+
+		lea	_trgtab,a0	| check trigger table entry
+		tst.b	0(a0,d0.W)	| see if the trigger is active
+		bne	act3		| if so, do the jump
+
+		bra	act0		| if not, do next segment
+
+| ------------------------------------------------------------------------------
+act7:		bra	act0		| AC_HERE: treat act7 as AC_NULL
+
+		.page
+
+| act1 -- AC_SUST -- pause if key is down (sustain)
+| ----    -----------------------------------------
+act1:		move.w	_curpf_f,d0	| get voice as a word index
+		lsr.w	#3,d0		| ...
+		andi.w	#0x001E,d0	| ...
+		lea	_vce2trg,a0	| point at voice to trigger table
+		move.w	0(a0,d0.W),d0	| get trigger table entry
+		cmpi.w	#-1,d0		| see if voice is free
+		beq	act0		| treat as no-op if so
+
+		btst	#15,d0		| see if voice is held by a pedal
+		bne	act1a		| sustain if so
+
+		btst	#14,d0		| see if voice is sustained by a pedal
+		bne	act1a		| sustain if so
+
+		lea	_trgtab,a0	| point at trigger table
+		tst.b	0(a0,d0.W)	| check trigger status
+		beq	act0		| continue if not active
+
+act1a:		move.l	_pfqhdr,d3	| see if any pflist entries remain
+		beq	act0		| no-op if not  (shouldn't happen ...)
+
+		move.b	FH_PT1(a1),d0	| get first point number
+		add.b	FH_PIF(a1),d0	| add base to first point
+		subq.b	#1,d0		| make d0 last point number
+		cmp.b	FH_CPT(a1),d0	| check current point number
+		beq	stopfn		| done if this is the last point
+
+		addq.b	#1,FH_CPT(a1)		| update current point number
+		addi.w	#PT_LEN,d2		| update point index
+		movea.l	d3,a0			| acquire a new pflist entry
+		move.l	(a0),_pfqhdr		| ...
+		move.l	_pflist,(a0)		| ...
+		move.l	a0,_pflist		| ...
+		move.w	FH_TRG(a1),PF_TRIG(a0)	| set trigger number in entry
+		move.w	_curpf_f,PF_FUNC(a0)	| set v/p word in entry
+		movem.l	d1-d2/d4/a1-a3,PF_D1(a0)	| set registers in entry
+		move.b	FH_TMD(a1),d0		| stop the function
+		andi.w	#MSK_RNVB,d0		| ...
+		move.w	d0,d3			| ...
+		add.w	d3,d3			| ...
+		andi.w	#MSK_ONVB,d3		| ...
+		or.w	d3,d0			| ...
+		move.w	d0,F_CTL(a3,d1.W)	| ...
+		bra	pfnext			| go do next list entry
+
+		.page
+| ------------------------------------------------------------------------------
 		.data
-* ------------------------------------------------------------------------------
-*
-* actab -- action code dispatch table
-* -----    --------------------------
-actab:		dc.l	act0	* 0 - AC_NULL:  no action
-		dc.l	act1	* 1 - AC_SUST:  sustain
-		dc.l	act2	* 2 - AC_ENBL:  enable
-		dc.l	act3	* 3 - AC_JUMP:  unconditional jump
-		dc.l	act4	* 4 - AC_LOOP:  jump n times      (loop)
-		dc.l	act5	* 5 - AC_KYUP:  jump if key up    (enable jump)
-		dc.l	act6	* 6 - AC_KYDN:  jump if key down  (sustain jump)
-		dc.l	act7	* 7 - AC_HERE:  here on key up
-*
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+
+| actab -- action code dispatch table
+| -----    --------------------------
+actab:		dc.l	act0	| 0 - AC_NULL:  no action
+		dc.l	act1	| 1 - AC_SUST:  sustain
+		dc.l	act2	| 2 - AC_ENBL:  enable
+		dc.l	act3	| 3 - AC_JUMP:  unconditional jump
+		dc.l	act4	| 4 - AC_LOOP:  jump n times      (loop)
+		dc.l	act5	| 5 - AC_KYUP:  jump if key up    (enable jump)
+		dc.l	act6	| 6 - AC_KYDN:  jump if key down  (sustain jump)
+		dc.l	act7	| 7 - AC_HERE:  here on key up
+
+| ------------------------------------------------------------------------------
 		.bss
-* ------------------------------------------------------------------------------
-*
-* ----------------- local variables --------------------------------------------
-*
-_curpf_f:	ds.w	1	* interrupting voice & parameter from FPU
-*
-* ----------------- debug variables --------------------------------------------
-*
-_curpf_t:	ds.w	1	* current trigger
-*
-_curpf_l:	ds.l	1	* current pflist entry
-*
-* ------------------------------------------------------------------------------
-*
+| ------------------------------------------------------------------------------
+
+| ----------------- local variables --------------------------------------------
+
+_curpf_f:	ds.w	1	| interrupting voice & parameter from FPU
+
+| ----------------- debug variables --------------------------------------------
+
+_curpf_t:	ds.w	1	| current trigger
+
+_curpf_l:	ds.l	1	| current pflist entry
+
+| ------------------------------------------------------------------------------
+
 		.end
Index: ram/sedisp.s
===================================================================
--- ram/sedisp.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ ram/sedisp.s	(revision 08e1da1cabca094217491629d328ae7146816782)
@@ -1,25 +1,25 @@
-* ------------------------------------------------------------------------------
-* sedisp.s -- score event display driver
-* Version 43 -- 1988-09-26 -- D.N. Lynx Crowe
-*
-*	se_disp(ep, sd, gdstb, cf)
-*	struct s_entry *ep;
-*	short sd;
-*	struct gdsel *gdstb[];
-*	short cf;
-*
-*		Displays the event at 'ep', scrolling in direction 'sd', by
-*		updating 'gdstb'.  Uses the accidental code in 'ac_code', and
-*		the note type table 'nsvtab'.  Checks 'cf' to determine if
-*		we're displaying in the center of the screen.
-*		Allocates gdsel events as needed for new events.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| sedisp.s -- score event display driver
+| Version 43 -- 1988-09-26 -- D.N. Lynx Crowe
+
+|	se_disp(ep, sd, gdstb, cf)
+|	struct s_entry |ep;
+|	short sd;
+|	struct gdsel |gdstb[];
+|	short cf;
+
+|		Displays the event at 'ep', scrolling in direction 'sd', by
+|		updating 'gdstb'.  Uses the accidental code in 'ac_code', and
+|		the note type table 'nsvtab'.  Checks 'cf' to determine if
+|		we're displaying in the center of the screen.
+|		Allocates gdsel events as needed for new events.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_se_disp
-*
+
 		.xdef	_ac_code
 		.xdef	numstr
-*
+
 		.xref	_dclkmd
 		.xref	_dsgmodz
@@ -29,5 +29,5 @@
 		.xref	_vputc
 		.xref	_vputs
-*
+
 		.xref	_angroup
 		.xref	_ctrsw
@@ -49,1181 +49,1181 @@
 		.xref	_vrbw15
 		.xref	_vrcw
-*
-		.page
-*
-* parameter offsets
-* -----------------
-* for se_disp:
-* ------------
-P_EP		.equ	8		* LONG - event pointer
-P_SD		.equ	12		* WORD - scroll direction
-P_SL		.equ	14		* LONG - slice control table pointer
-P_CF		.equ	18		* WORD - center slice flag
-*
-* for vputa:
-* ----------
-ROW		.equ	4		* WORD - 'row' parameter offset
-COL		.equ	6		* WORD - 'col' parameter offset
-ATR		.equ	8		* WORD - 'atr' parameter offset
-*
-* Character field attributes for highlighting
-* -------------------------------------------
-AT01		.equ	$0054
-AT04		.equ	$0053
-AT05		.equ	$0054
-AT06		.equ	$0053
-AT07		.equ	$0054
-AT08		.equ	$0053
-AT09		.equ	$0054
-AT10		.equ	$0053
-AT11		.equ	$0052
-AT12		.equ	$0052
-*
-* Special character equates
-* -------------------------
-SP_M1		.equ	$A1			* -1
-SP_P1		.equ	$A0			* +1
-*
-		.page
-*
-* event structure offsets
-* -----------------------
-*		      offset		 length
-*		      ------             ------
-E_TIME		.equ	0		* LONG
-E_SIZE		.equ	4		* BYTE
-E_TYPE		.equ	5		* BYTE
-E_DATA1		.equ	6		* BYTE
-E_NOTE		.equ	6		* BYTE
-E_DATA2		.equ	7		* BYTE
-E_GROUP		.equ	7		* BYTE
-E_BAK		.equ	8		* LONG
-E_FWD		.equ	12		* LONG
-E_DN		.equ	16		* LONG
-E_VEL		.equ	16		* WORD
-E_DATA4		.equ	18		* WORD
-E_UP		.equ	20		* LONG
-E_LFT		.equ	24		* LONG
-E_RGT		.equ	28		* LONG
-*
-N_ETYPES	.equ	25		* number of event types
-*
-* gdsel structure definitions
-* ---------------------------
-G_NEXT		.equ	0		* long - 'next' field	(struct gdsel *)
-G_NOTE		.equ	4		* word - 'note' field	(short)
-G_CODE		.equ	6		* word - 'code' field	(short)
-*
-NATCH_B		.equ	3		* uslice note code:  'begin natural'
-NOTE_E		.equ	6		* uslice note code:  'end note'
-*
-NGDSEL		.equ	17		* number of event slots in gdstb
-*
-BARFLAG		.equ	4*(NGDSEL-1)	* offset to the bar marker flag
-*
-		.page
-*
-* A few words about se_disp:
-* --------------------------
-* se_disp has to be very fast, so it's written in assembly language,
-* rather than C, which is usually pretty good, but not quite good enough
-* for this application.  The faster this routine runs, the higher the
-* tempo we can keep up with.  If this code is fast enough, we end up
-* hardware limited by the maximum rate of the timer, and the VSDD update rate.
-*
-_se_disp:	link	a6,#0			* allocate and link stack frame
-		movea.l	P_EP(a6),a0		* get event pointer 'ep' into a0
-		move.b	E_TYPE(a0),d1		* get event type into d1.W
-		andi.w	#$007F,d1		* mask off new-note flag
-		cmp.b	#N_ETYPES,d1		* see if it's valid
-		blt	seds1			* jump if it is
-*
-dsexit:		unlk	a6			* done -- unlink stack frames
-		rts				* return to caller
-*
-seds1:		lea	sddtab,a1		* get base of dispatch table
-		lsl.w	#2,d1			* multiplty event by 4 for index
-		movea.l	0(a1,d1.W),a2		* get address of event routine
-		jmp	(a2)			* jump to event display routine
-*
-* On entry, the individual display routines only depend on a0 pointing at the
-* event they were dispatched for.  Registers a6 and a7 have their usual meaning,
-* a6 = frame pointer, a7 = stack pointer.
-*
-* d0..d2 are used for scratch, as are a0..a2, and are not saved by this code.
-*
-		.page
-*
-* dsnbx -- dispatch to begin / end based on sd
-* -----    -----------------------------------
-dsnbx:		tst.w	P_SD(a7)		* check direction
-		bne	dsne			* treat as end if going backward
-*
-* dsnb -- display note begin
-* ----    ------------------
-dsnb:		move.b	E_TYPE(a0),d1		* get event type
-		move.w	d1,d2			* save in d2
-		andi.w	#$007F,d1		* clear new-note flag
-		move.b	d1,E_TYPE(a0)		* store type back in event
-		clr.w	d0			* get group number
-		move.b	E_GROUP(a0),d0		* ... in d0
-		move.w	d0,d1			* save group in d1
-		add.w	d0,d0			* make d0 a word offset
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	dsexit			* done if not enabled
-*
-		tst.w	P_CF(a6)		* check center slice flag
-		beq	dsnb0			* jump if not center slice
-*
-		tst.w	_velflag		* see if we display velocity
-		beq	dsnvx			* jump if not
-*
-		move.w	d2,-(a7)		* save new-note flag on stack
-		move.w	d1,-(a7)		* save group number on stack
-		move.w	E_VEL(a0),d0		* get velocity
-		move.w	d1,d2			* point into lastvel[]
-		add.w	d2,d2			* ...
-		lea	_lastvel,a1		* ...
-		move.w	d0,0(a1,d2.W)		* update lastvel[group]
-		ext.l	d0			* scale
-		divu	#252,d0			* ...
-		cmpi.w	#100,d0			* convert MS digit
-		bcs	dsnv0			* ...
-*
-		move.b	#'1',numstr		* ...
-		subi.w	#100,d0			* ...
-		bra	dsnv1			* ...
-*
-dsnv0:		move.b	#'0',numstr		* ...
-*
-dsnv1:		ext.l	d0			* convert middle & LS digits
-		divu	#10,d0			* ...
-		addi.l	#$00300030,d0		* ...
-		move.b	d0,numstr+1		* ...
-		swap	d0			* ...
-		move.b	d0,numstr+2		* ...
-		clr.b	numstr+3		* terminate string
-		move.w	d1,d0			* col = group
-		asl.w	#2,d0			* ... * 5
-		add.w	d1,d0			* ...
-		add.w	#6,d0			* ... + 6
-		move.l	a0,-(a7)		* save event pointer on stack
-		move.w	#AT11,-(a7)		* put attribute on stack
-		move.l	#numstr,-(a7)		* put string address on stack
-		move.w	d0,-(a7)		* put column on stack
-		move.w	#5,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put VSDD address on stack
-		jsr	_vputs			* update the screen
-		add.l	#14,a7			* clean up stack
-		movea.l	(a7)+,a0		* restore event pointer
-*
-		.page
-*
-		move.w	(a7)+,d0		* get group from stack
-		cmpi.w	#12,d0			* see which byte it's in
-		bcc	dsnv2			* jump if in MS byte
-*
-		bset	d0,_vrbw12+1		* set group bit in LS byte
-		bra	dsnv3			* ...
-*
-dsnv2:		bset	d0,_vrbw12		* set group bit in MS byte
-*
-dsnv3:		bset	#4,_vrcw		* set video reset type bit
-		move.w	(a7)+,d2		* get new-note flag from stack
-*
-dsnvx:		btst.l	#7,d2			* check new-note flag
-		beq	dsexit			* done if not set
-*
-dsnb0:		clr.w	d1			* get note number nn (0..127)
-		move.b	E_NOTE(a0),d1		* ... in d1
-		sub.w	#21,d1			* subtract base of piano scale
-		bmi	dsexit			* done if not displayable
-*
-		cmp.w	#87,d1			* see if it's too high
-		bgt	dsexit			* done if not displayable
-*
-		move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		clr.w	d2			* d2 = ep->group
-		move.b	E_GROUP(a0),d2		* ...
-		lsl.w	#2,d2			* ... * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[ep->group]
-		move.l	a1,0(a2,d2.W)		* gdstb[ep->group] = gdsp
-		move.w	d1,G_NOTE(a1)		* gdsp->note = nn
-		lea	_nsvtab,a2		* a2 points at nsvtab
-		tst.b	0(a2,d1.W)		* check nsvtab[nn]
-		beq	dsnb1			* jump if natural note
-*
-		move.b	_ac_code,d1		* setup for an accidental note
-		bra	dsnb2			* ...
-*
-dsnb1:		move.b	#NATCH_B,d1		* setup for a natural note
-*
-dsnb2:		move.w	d1,G_CODE(a1)		* gdsp->code = note type
-		bra	dsexit			* done
-*
-		.page
-*
-* dsnex -- dispatch to end/begin based on sd
-* -----    ---------------------------------
-dsnex:		tst.w	P_SD(a7)		* check direction
-		bne	dsnb			* treat as begin if going backward
-*
-* dsne -- display note end
-* ----    ----------------
-dsne:		move.b	E_TYPE(a0),d1		* get event type
-		move.w	d1,d2			* save in d2
-		andi.w	#$007F,d1		* clear new-note flag
-		move.b	d1,E_TYPE(a0)		* store type back in event
-		clr.w	d0			* get group number
-		move.b	E_GROUP(a0),d0		* ... in d0
-		add.w	d0,d0			* ... as a word offset
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	dsexit			* done if not enabled
-*
-		tst.w	P_CF(a6)		* check center slice flag
-		beq	dsne3			* jump if not center slice
-*
-		btst.l	#7,d2			* check new-note flag
-		beq	dsexit			* done if not set
-*
-dsne3:		move.b	E_NOTE(a0),d1		* d1 = note number nn (0..127)
-		sub.w	#21,d1			* subtract base of piano scale
-		bmi	dsexit			* done if not displayable
-*
-		cmp.w	#87,d1			* see if it's too high
-		bgt	dsexit			* done if not displayable
-*
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		clr.w	d2			* get group in d2
-		move.b	E_GROUP(a0),d2		* ...
-		lsl.w	#2,d2			* ... * 4
-		move.l	0(a2,d2.W),d0		* check gdstb[ep->group]
+
+		.page
+
+| parameter offsets
+| -----------------
+| for se_disp:
+| ------------
+P_EP		=	8		| LONG - event pointer
+P_SD		=	12		| WORD - scroll direction
+P_SL		=	14		| LONG - slice control table pointer
+P_CF		=	18		| WORD - center slice flag
+
+| for vputa:
+| ----------
+ROW		=	4		| WORD - 'row' parameter offset
+COL		=	6		| WORD - 'col' parameter offset
+ATR		=	8		| WORD - 'atr' parameter offset
+
+| Character field attributes for highlighting
+| -------------------------------------------
+AT01		=	0x0054
+AT04		=	0x0053
+AT05		=	0x0054
+AT06		=	0x0053
+AT07		=	0x0054
+AT08		=	0x0053
+AT09		=	0x0054
+AT10		=	0x0053
+AT11		=	0x0052
+AT12		=	0x0052
+
+| Special character equates
+| -------------------------
+SP_M1		=	0xA1			| -1
+SP_P1		=	0xA0			| +1
+
+		.page
+
+| event structure offsets
+| -----------------------
+|		      offset		 length
+|		      ------             ------
+E_TIME		=	0		| LONG
+E_SIZE		=	4		| BYTE
+E_TYPE		=	5		| BYTE
+E_DATA1		=	6		| BYTE
+E_NOTE		=	6		| BYTE
+E_DATA2		=	7		| BYTE
+E_GROUP		=	7		| BYTE
+E_BAK		=	8		| LONG
+E_FWD		=	12		| LONG
+E_DN		=	16		| LONG
+E_VEL		=	16		| WORD
+E_DATA4		=	18		| WORD
+E_UP		=	20		| LONG
+E_LFT		=	24		| LONG
+E_RGT		=	28		| LONG
+
+N_ETYPES	=	25		| number of event types
+
+| gdsel structure definitions
+| ---------------------------
+G_NEXT		=	0		| long - 'next' field	(struct gdsel |)
+G_NOTE		=	4		| word - 'note' field	(short)
+G_CODE		=	6		| word - 'code' field	(short)
+
+NATCH_B		=	3		| uslice note code:  'begin natural'
+NOTE_E		=	6		| uslice note code:  'end note'
+
+NGDSEL		=	17		| number of event slots in gdstb
+
+BARFLAG		=	4|(NGDSEL-1)	| offset to the bar marker flag
+
+		.page
+
+| A few words about se_disp:
+| --------------------------
+| se_disp has to be very fast, so it's written in assembly language,
+| rather than C, which is usually pretty good, but not quite good enough
+| for this application.  The faster this routine runs, the higher the
+| tempo we can keep up with.  If this code is fast enough, we end up
+| hardware limited by the maximum rate of the timer, and the VSDD update rate.
+
+_se_disp:	link	a6,#0			| allocate and link stack frame
+		movea.l	P_EP(a6),a0		| get event pointer 'ep' into a0
+		move.b	E_TYPE(a0),d1		| get event type into d1.W
+		andi.w	#0x007F,d1		| mask off new-note flag
+		cmp.b	#N_ETYPES,d1		| see if it's valid
+		blt	seds1			| jump if it is
+
+dsexit:		unlk	a6			| done -- unlink stack frames
+		rts				| return to caller
+
+seds1:		lea	sddtab,a1		| get base of dispatch table
+		lsl.w	#2,d1			| multiplty event by 4 for index
+		movea.l	0(a1,d1.W),a2		| get address of event routine
+		jmp	(a2)			| jump to event display routine
+
+| On entry, the individual display routines only depend on a0 pointing at the
+| event they were dispatched for.  Registers a6 and a7 have their usual meaning,
+| a6 = frame pointer, a7 = stack pointer.
+
+| d0..d2 are used for scratch, as are a0..a2, and are not saved by this code.
+
+		.page
+
+| dsnbx -- dispatch to begin / end based on sd
+| -----    -----------------------------------
+dsnbx:		tst.w	P_SD(a7)		| check direction
+		bne	dsne			| treat as end if going backward
+
+| dsnb -- display note begin
+| ----    ------------------
+dsnb:		move.b	E_TYPE(a0),d1		| get event type
+		move.w	d1,d2			| save in d2
+		andi.w	#0x007F,d1		| clear new-note flag
+		move.b	d1,E_TYPE(a0)		| store type back in event
+		clr.w	d0			| get group number
+		move.b	E_GROUP(a0),d0		| ... in d0
+		move.w	d0,d1			| save group in d1
+		add.w	d0,d0			| make d0 a word offset
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	dsexit			| done if not enabled
+
+		tst.w	P_CF(a6)		| check center slice flag
+		beq	dsnb0			| jump if not center slice
+
+		tst.w	_velflag		| see if we display velocity
+		beq	dsnvx			| jump if not
+
+		move.w	d2,-(a7)		| save new-note flag on stack
+		move.w	d1,-(a7)		| save group number on stack
+		move.w	E_VEL(a0),d0		| get velocity
+		move.w	d1,d2			| point into lastvel[]
+		add.w	d2,d2			| ...
+		lea	_lastvel,a1		| ...
+		move.w	d0,0(a1,d2.W)		| update lastvel[group]
+		ext.l	d0			| scale
+		divu	#252,d0			| ...
+		cmpi.w	#100,d0			| convert MS digit
+		bcs	dsnv0			| ...
+
+		move.b	#'1',numstr		| ...
+		subi.w	#100,d0			| ...
+		bra	dsnv1			| ...
+
+dsnv0:		move.b	#'0',numstr		| ...
+
+dsnv1:		ext.l	d0			| convert middle & LS digits
+		divu	#10,d0			| ...
+		addi.l	#0x00300030,d0		| ...
+		move.b	d0,numstr+1		| ...
+		swap	d0			| ...
+		move.b	d0,numstr+2		| ...
+		clr.b	numstr+3		| terminate string
+		move.w	d1,d0			| col = group
+		asl.w	#2,d0			| ... | 5
+		add.w	d1,d0			| ...
+		add.w	#6,d0			| ... + 6
+		move.l	a0,-(a7)		| save event pointer on stack
+		move.w	#AT11,-(a7)		| put attribute on stack
+		move.l	#numstr,-(a7)		| put string address on stack
+		move.w	d0,-(a7)		| put column on stack
+		move.w	#5,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put VSDD address on stack
+		jsr	_vputs			| update the screen
+		add.l	#14,a7			| clean up stack
+		movea.l	(a7)+,a0		| restore event pointer
+
+		.page
+
+		move.w	(a7)+,d0		| get group from stack
+		cmpi.w	#12,d0			| see which byte it's in
+		bcc	dsnv2			| jump if in MS byte
+
+		bset	d0,_vrbw12+1		| set group bit in LS byte
+		bra	dsnv3			| ...
+
+dsnv2:		bset	d0,_vrbw12		| set group bit in MS byte
+
+dsnv3:		bset	#4,_vrcw		| set video reset type bit
+		move.w	(a7)+,d2		| get new-note flag from stack
+
+dsnvx:		btst.l	#7,d2			| check new-note flag
+		beq	dsexit			| done if not set
+
+dsnb0:		clr.w	d1			| get note number nn (0..127)
+		move.b	E_NOTE(a0),d1		| ... in d1
+		sub.w	#21,d1			| subtract base of piano scale
+		bmi	dsexit			| done if not displayable
+
+		cmp.w	#87,d1			| see if it's too high
+		bgt	dsexit			| done if not displayable
+
+		move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		clr.w	d2			| d2 = ep->group
+		move.b	E_GROUP(a0),d2		| ...
+		lsl.w	#2,d2			| ... | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[ep->group]
+		move.l	a1,0(a2,d2.W)		| gdstb[ep->group] = gdsp
+		move.w	d1,G_NOTE(a1)		| gdsp->note = nn
+		lea	_nsvtab,a2		| a2 points at nsvtab
+		tst.b	0(a2,d1.W)		| check nsvtab[nn]
+		beq	dsnb1			| jump if natural note
+
+		move.b	_ac_code,d1		| setup for an accidental note
+		bra	dsnb2			| ...
+
+dsnb1:		move.b	#NATCH_B,d1		| setup for a natural note
+
+dsnb2:		move.w	d1,G_CODE(a1)		| gdsp->code = note type
+		bra	dsexit			| done
+
+		.page
+
+| dsnex -- dispatch to end/begin based on sd
+| -----    ---------------------------------
+dsnex:		tst.w	P_SD(a7)		| check direction
+		bne	dsnb			| treat as begin if going backward
+
+| dsne -- display note end
+| ----    ----------------
+dsne:		move.b	E_TYPE(a0),d1		| get event type
+		move.w	d1,d2			| save in d2
+		andi.w	#0x007F,d1		| clear new-note flag
+		move.b	d1,E_TYPE(a0)		| store type back in event
+		clr.w	d0			| get group number
+		move.b	E_GROUP(a0),d0		| ... in d0
+		add.w	d0,d0			| ... as a word offset
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	dsexit			| done if not enabled
+
+		tst.w	P_CF(a6)		| check center slice flag
+		beq	dsne3			| jump if not center slice
+
+		btst.l	#7,d2			| check new-note flag
+		beq	dsexit			| done if not set
+
+dsne3:		move.b	E_NOTE(a0),d1		| d1 = note number nn (0..127)
+		sub.w	#21,d1			| subtract base of piano scale
+		bmi	dsexit			| done if not displayable
+
+		cmp.w	#87,d1			| see if it's too high
+		bgt	dsexit			| done if not displayable
+
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		clr.w	d2			| get group in d2
+		move.b	E_GROUP(a0),d2		| ...
+		lsl.w	#2,d2			| ... | 4
+		move.l	0(a2,d2.W),d0		| check gdstb[ep->group]
 		beq	dsexit
-*
-dsne0:		movea.l	d0,a1			* a1 = gdsp
-*
-dsne1:		cmp.w	G_NOTE(a1),d1		* compare nn to gdsp->note
-		bne	dsne2			* jump if not the one we want
-*
-		move.w	#NOTE_E,G_CODE(a1)	* gdsp->code = NOTE_E  (end note)
-*
-dsne2:		move.l	G_NEXT(a1),d0		* get gdsp->next
-		beq	dsexit			* done if next = NULL
-*
-		bra	dsne0			* loop for next one
-*
-		.page
-*
-* dssbgn -- display section begin
-* ------    ---------------------
-dssbgn:		tst.w	P_CF(a6)		* center update ?
-		beq	dsbgn0			* jump if not
-*
-		clr.w	d1			* get section number
-		move.b	E_DATA1(a0),d1		* ... from the event
-		addq.w	#1,d1			* ... adjusted for display
-		ext.l	d1			* ... as a long in d1
-		divu	#10,d1			* divide by 10 for conversion
-		add.l	#$00300030,d1		* add '0' for ASCII conversion
-		move.b	d1,numstr		* put MS byte in work area
-		swap	d1			* swap register halves
-		move.b	d1,numstr+1		* put LS byte in work area
-		clr.b	numstr+2		* terminate string
-		move.w	#AT01,-(a7)		* put attribute on stack
-		move.l	#numstr,-(a7)		* put buffer address on stack
-		move.w	#6,-(a7)		* put column on stack
-		move.w	#0,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put sbase on stack
-		jsr	_vputs			* update the screen
-		add.l	#14,a7			* clean up stack
-		bset	#4,_vrcw+1		* set video reset type bit
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-dsbgn0:		move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#48,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$1111,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#0,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dssend -- display section end
-* ------    -------------------
-dssend:		tst.w	P_CF(a6)		* center update ?
-		beq	dssend0			* jump if not
-*
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-dssend0:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#48,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$1111,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#2,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-* dsbeat -- display beat
-* ------    ------------
-dsbeat:		tst.w	P_CF(a6)		* center update ?
-		bne	dsexit			* done if so
-*
-		move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#48,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$1111,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#1,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dstune -- display tuning
-* ------    --------------
-dstune:		tst.w	P_CF(a6)		* center update ?
-		beq	dstune0			* jump if not
-*
-		clr.w	d1			* get current tuning
-		move.b	E_DATA1(a0),d1		* ...
-		add.w	#$0030,d1		* add '0' for ASCII conversion
-		move.w	#AT05,-(a7)		* put attribute on stack
-		move.w	d1,-(a7)		* put character on stack
-		move.w	#19,-(a7)		* put column on stack
-		move.w	#1,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put sbase on stack
-		jsr	_vputc			* display character
-		add.l	#12,a7			* clean up stack
-		bset	#1,_vrcw+1		* set video reset type bit
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-dstune0:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#52,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$CCCC,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#3,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[priority] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dstrns -- display transposition
-* ------    ---------------------
-dstrns:		clr.w	d0			* get group number
-		move.b	E_DATA1(a0),d0		* ... in d0
-		add.w	d0,d0			* ... as a word offset
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	dsexit			* done if not enabled
-*
-		tst.w	P_CF(a6)		* center update
-		beq	dstrns0			* jump if not
-*
-		move.w	E_LFT(a0),d1		* get transposition value
-		bpl	dstrns1			* jump if positive
-*
-		move.b	#'-',numstr		* note negative sign
-		neg.w	d1			* make number positive
-		bra	dstrns2			* ...
-*
-dstrns1:	move.b	#'+',numstr		* note positive sign
-*
-dstrns2:	cmpi.w	#1000,d1		* is number GE 1000 ?
-		bcs	dstrns3			* jump if not
-*
-		subi.w	#1000,d1		* adjust number
-		cmpi.b	#'-',numstr		* was number negative
-		bne	dstrns4			* jump if not
-*
-		move.b	#SP_M1,numstr		* set -1 in numstr
-		bra	dstrns3			* ...
-*
-dstrns4:	move.b	#SP_P1,numstr		* set +1 in numstr
-*
-dstrns3:	ext.l	d1			* make d1 a long
-		divu	#100,d1			* convert 1st digit
-		addi.w	#$0030,d1		* ... to ASCII
-		move.b	d1,numstr+1		* ... in numstr
-		swap	d1			* convert 2nd digit
-		ext.l	d1			* ...
-		divu	#10,d1			* ...
-		addi.w	#$0030,d1		* ... to ASCII
-		move.b	d1,numstr+2		* ... in numstr
-		swap	d1			* convert 3rd digit
-		addi.w	#$0030,d1		* ... to ASCII
-		move.b	d1,numstr+3		* ... in numstr
-		clr.b	numstr+4		* terminate numstr
-*
-		.page
-*
-		move.w	d0,d1			* get group number
-		asr.w	#1,d1			* ... in d1
-		move.w	d1,-(a7)		* save group number on stack
-		add.w	d0,d0			* calculate column
-		add.w	d0,d1			* ... = 5 * group
-		addi.w	#5,d1			* ... + 5
-		move.w	#AT11,-(a7)		* vputs(obj8, 3, col, numstr, atr11)
-		move.l	#numstr,-(a7)		* ...
-		move.w	d1,-(a7)		* ...
-		move.w	#3,-(a7)		* ...
-		move.l	_obj8,-(a7)		* ...
-		jsr	_vputs			* ...
-		add.l	#14,a7			* ...
-		move.w	(a7)+,d0		* get group number
-		cmpi.w	#8,d0			* see which byte it's in
-		bcc	dstrns5			* jump if in MS byte
-*
-		bset	d0,_vrbw09+1		* set group bit in LS byte
-		bra	dstrns6			* ...
-*
-dstrns5:	sub.w	#8,d0			* adjust for byte
-		bset	d0,_vrbw09		* set group bit in MS byte
-*
-dstrns6:	bset	#1,_vrcw		* set video reset type bit
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-dstrns0:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#52,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$9999,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#4,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dsdyn -- display dynamics
-* -----    ----------------
-dsdyn:		clr.w	d0			* get group number
-		move.b	E_DATA1(a0),d0		* ... in d0
-		add.w	d0,d0			* ... as a word offset
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	dsexit			* done if not enabled
-*
-		tst.w	P_CF(a6)		* center update ?
-		beq	dsdyn00			* jump if not
-*
-		clr.w	d0			* get dynamics
-		move.b	E_DATA2(a0),d0		* ... in d0
-		move.w	d0,-(a7)		* save dyanmics
-		clr.w	d1			* get group number
-		move.b	E_DATA1(a0),d1		* ... in d1
-		move.w	d1,-(a7)		* save group number
-		move.w	(a7),d0			* col = group number
-		add.w	d0,d0			* ... * 5
-		add.w	d0,d0			* ...
-		move.w	(a7)+,d2		* ...  (d2 = group number)
-		add.w	d2,d0			* ...
-		add.w	#6,d0			* ... + 6
-		move.w	(a7)+,d1		* get dynamics
-		add.w	#$0030,d1		* add '0' for ASCII conversion
-		move.w	d2,-(a7)		* save group number
-		move.w	#AT11,-(a7)		* put attribute on stack
-		move.w	d1,-(a7)		* put digit on stack
-		move.w	d0,-(a7)		* put column on stack
-		move.w	#4,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put object address on stack
-		jsr	_vputc			* update the screen
-		add.l	#12,a7			* clean up stack
-		move.w	(a7)+,d0		* get group number
-		cmp.w	#8,d0			* see which word it's in
-		bcc	dsdyn1			* jump if in MS word
-*
-		bset	d0,_vrbw10+1		* set group bit in LS byte
-		bra	dsdyn2			* ...
-*
-dsdyn1:		sub.w	#8,d0			* adjust for for byte
-		bset	d0,_vrbw10		* set group bit in MS byte
-*
-dsdyn2:		bset	#2,_vrcw		* set video reset type bit
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-		.page
-dsdyn00:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#52,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$9999,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#5,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dslocn -- display location
-* ------    ----------------
-dslocn:		clr.w	d0			* get group number
-		move.b	E_DATA1(a0),d0		* ... in d0
-		add.w	d0,d0			* ... as a word offset
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	dsexit			* done if not enabled
-*
-		tst.w	P_CF(a6)		* center update ?
-		beq	dsloc00			* jump if not
-*
-		clr.w	d0			* get location
-		move.b	E_DATA2(a0),d0		* ... in d0
-		move.w	d0,-(a7)		* save location
-		clr.w	d1			* get group number
-		move.b	E_DATA1(a0),d1		* ... in d1
-		move.w	d1,-(a7)		* save group number
-		move.w	(a7),d0			* col = group number
-		add.w	d0,d0			* ... * 5
-		add.w	d0,d0			* ...
-		move.w	(a7)+,d2		* ...  (d2 = group number)
-		add.w	d2,d0			* ...
-		add.w	#8,d0			* ... + 8
-		move.w	(a7)+,d1		* get location
-		add.w	#$0031,d1		* add '0' for ASCII conversion
-		move.w	d2,-(a7)		* save group number
-		move.w	#AT11,-(a7)		* put attribute on stack
-		move.w	d1,-(a7)		* put character on stack
-		move.w	d0,-(a7)		* put column on stack
-		move.w	#4,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put object address on stack
-		jsr	_vputc			* update the screen
-		add.l	#12,a7			* clean up stack
-		move.w	(a7)+,d0		* get group number
-		cmp.w	#8,d0			* see which word it's in
-		bcc	dslocn1			* jump if in MS word
-*
-		bset	d0,_vrbw11+1		* set group bit in LS byte
-		bra	dslocn2			* ...
-*
-dslocn1:	sub.w	#8,d0			* adjust for for byte
-		bset	d0,_vrbw11		* set group bit in MS byte
-*
-dslocn2:	bset	#3,_vrcw		* set video reset type bit
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-		.page
-dsloc00:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#52,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$9999,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#5,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dsanrs -- display analog resolution
-* ------    -------------------------
-dsanrs:		move.b	E_DATA1(a0),d1		* get var / group
-		move.w	d1,d0			* extract group number
-		andi.w	#$000F,d0		* ... in d0
-		add.w	d0,d0			* ... as a word offset
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	dsexit			* done if not enabled
-*
-		tst.w	P_CF(a6)		* center update ?
-		beq	dsanrs0			* jump if not
-*
-		move.w	_angroup,d2		* see if we display
-		bmi	dsexit			* jump if not
-*
-		subq.w	#1,d2			* adust selected group number
-		move.w	d1,d0			* extract group from event
-		andi.w	#$000F,d0		* ...
-		cmp.w	d0,d2			* see if we display
-		bne	dsexit			* jump if not
-*
-		lsr.w	#4,d1			* extract variable number
-		andi.w	#$000F,d1		* ...
-		move.w	d1,-(a7)		* save variable number
-		move.w	d1,d0			* calculate display offset
-		lsl.w	#3,d0			* ... (var * 9) + 6
-		add.w	d0,d1			* ... in d1
-		addq.w	#6,d1			* ...
-		move.b	E_DATA2(a0),d0		* get resolution
-		addi.w	#$0030,d0		* convert for display
-		move.w	#AT12,-(a7)		* put attribute on stack
-		move.w	d0,-(a7)		* put character on stack
-		move.w	d1,-(a7)		* put column on stack
-		move.w	#7,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put sbase on stack
-		jsr	_vputc			* update the screen
-		add.l	#12,a7			* clean up stack
-		move.w	(a7)+,d0		* get variable number
-		bset	d0,_vrbw13+1		* set variable bit
-		bset	#5,_vrcw		* set video reset type bit
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-		.page
-dsanrs0:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#52,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$9999,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#6,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dsanvl -- display analog value
-* ------    --------------------
-dsanvl:		move.w	_angroup,d2		* see if we display
-		bmi	dsexit			* jump if not
-*
-		move.b	E_DATA1(a0),d1		* get var / group
-		move.w	d1,d0			* extract group number
-		andi.w	#$000F,d0		* ... in d0
-		add.w	d0,d0			* ... as a word offset
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	dsexit			* done if not enabled
-*
-		tst.w	P_CF(a6)		* center update ?
-		beq	dsanvl0			* jump if not
-*
-		subq.w	#1,d2			* adust group number
-		move.w	d1,d0			* extract group
-		andi.w	#$000F,d0		* ...
-		cmp.w	d0,d2			* see if we display
-		bne	dsexit			* jump if not
-*
-		lsr.w	#4,d1			* extract variable number
-		andi.w	#$000F,d1		* ...
-		move.w	d1,-(a7)		* save variable number
-		move.w	d1,d0			* calculate display offset
-		lsl.w	#3,d0			* ... (var * 9) + 8
-		add.w	d0,d1			* ... in d1
-		addi.w	#8,d1			* ...
-		move.w	E_DN(a0),d0		* get value
-		asr.w	#5,d0			* adjust to low 11 bits
-		bpl	dsanvl1			* jump if positive
-*
-		move.b	#'-',numstr		* set sign = '-'
-		neg.w	d0			* make value positive
+
+dsne0:		movea.l	d0,a1			| a1 = gdsp
+
+dsne1:		cmp.w	G_NOTE(a1),d1		| compare nn to gdsp->note
+		bne	dsne2			| jump if not the one we want
+
+		move.w	#NOTE_E,G_CODE(a1)	| gdsp->code = NOTE_E  (end note)
+
+dsne2:		move.l	G_NEXT(a1),d0		| get gdsp->next
+		beq	dsexit			| done if next = NULL
+
+		bra	dsne0			| loop for next one
+
+		.page
+
+| dssbgn -- display section begin
+| ------    ---------------------
+dssbgn:		tst.w	P_CF(a6)		| center update ?
+		beq	dsbgn0			| jump if not
+
+		clr.w	d1			| get section number
+		move.b	E_DATA1(a0),d1		| ... from the event
+		addq.w	#1,d1			| ... adjusted for display
+		ext.l	d1			| ... as a long in d1
+		divu	#10,d1			| divide by 10 for conversion
+		add.l	#0x00300030,d1		| add '0' for ASCII conversion
+		move.b	d1,numstr		| put MS byte in work area
+		swap	d1			| swap register halves
+		move.b	d1,numstr+1		| put LS byte in work area
+		clr.b	numstr+2		| terminate string
+		move.w	#AT01,-(a7)		| put attribute on stack
+		move.l	#numstr,-(a7)		| put buffer address on stack
+		move.w	#6,-(a7)		| put column on stack
+		move.w	#0,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put sbase on stack
+		jsr	_vputs			| update the screen
+		add.l	#14,a7			| clean up stack
+		bset	#4,_vrcw+1		| set video reset type bit
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+dsbgn0:		move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#48,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x1111,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#0,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dssend -- display section end
+| ------    -------------------
+dssend:		tst.w	P_CF(a6)		| center update ?
+		beq	dssend0			| jump if not
+
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+dssend0:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#48,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x1111,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#2,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+| dsbeat -- display beat
+| ------    ------------
+dsbeat:		tst.w	P_CF(a6)		| center update ?
+		bne	dsexit			| done if so
+
+		move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#48,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x1111,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#1,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dstune -- display tuning
+| ------    --------------
+dstune:		tst.w	P_CF(a6)		| center update ?
+		beq	dstune0			| jump if not
+
+		clr.w	d1			| get current tuning
+		move.b	E_DATA1(a0),d1		| ...
+		add.w	#0x0030,d1		| add '0' for ASCII conversion
+		move.w	#AT05,-(a7)		| put attribute on stack
+		move.w	d1,-(a7)		| put character on stack
+		move.w	#19,-(a7)		| put column on stack
+		move.w	#1,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put sbase on stack
+		jsr	_vputc			| display character
+		add.l	#12,a7			| clean up stack
+		bset	#1,_vrcw+1		| set video reset type bit
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+dstune0:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#52,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0xCCCC,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#3,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[priority] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dstrns -- display transposition
+| ------    ---------------------
+dstrns:		clr.w	d0			| get group number
+		move.b	E_DATA1(a0),d0		| ... in d0
+		add.w	d0,d0			| ... as a word offset
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	dsexit			| done if not enabled
+
+		tst.w	P_CF(a6)		| center update
+		beq	dstrns0			| jump if not
+
+		move.w	E_LFT(a0),d1		| get transposition value
+		bpl	dstrns1			| jump if positive
+
+		move.b	#'-',numstr		| note negative sign
+		neg.w	d1			| make number positive
+		bra	dstrns2			| ...
+
+dstrns1:	move.b	#'+',numstr		| note positive sign
+
+dstrns2:	cmpi.w	#1000,d1		| is number GE 1000 ?
+		bcs	dstrns3			| jump if not
+
+		subi.w	#1000,d1		| adjust number
+		cmpi.b	#'-',numstr		| was number negative
+		bne	dstrns4			| jump if not
+
+		move.b	#SP_M1,numstr		| set -1 in numstr
+		bra	dstrns3			| ...
+
+dstrns4:	move.b	#SP_P1,numstr		| set +1 in numstr
+
+dstrns3:	ext.l	d1			| make d1 a long
+		divu	#100,d1			| convert 1st digit
+		addi.w	#0x0030,d1		| ... to ASCII
+		move.b	d1,numstr+1		| ... in numstr
+		swap	d1			| convert 2nd digit
+		ext.l	d1			| ...
+		divu	#10,d1			| ...
+		addi.w	#0x0030,d1		| ... to ASCII
+		move.b	d1,numstr+2		| ... in numstr
+		swap	d1			| convert 3rd digit
+		addi.w	#0x0030,d1		| ... to ASCII
+		move.b	d1,numstr+3		| ... in numstr
+		clr.b	numstr+4		| terminate numstr
+
+		.page
+
+		move.w	d0,d1			| get group number
+		asr.w	#1,d1			| ... in d1
+		move.w	d1,-(a7)		| save group number on stack
+		add.w	d0,d0			| calculate column
+		add.w	d0,d1			| ... = 5 | group
+		addi.w	#5,d1			| ... + 5
+		move.w	#AT11,-(a7)		| vputs(obj8, 3, col, numstr, atr11)
+		move.l	#numstr,-(a7)		| ...
+		move.w	d1,-(a7)		| ...
+		move.w	#3,-(a7)		| ...
+		move.l	_obj8,-(a7)		| ...
+		jsr	_vputs			| ...
+		add.l	#14,a7			| ...
+		move.w	(a7)+,d0		| get group number
+		cmpi.w	#8,d0			| see which byte it's in
+		bcc	dstrns5			| jump if in MS byte
+
+		bset	d0,_vrbw09+1		| set group bit in LS byte
+		bra	dstrns6			| ...
+
+dstrns5:	sub.w	#8,d0			| adjust for byte
+		bset	d0,_vrbw09		| set group bit in MS byte
+
+dstrns6:	bset	#1,_vrcw		| set video reset type bit
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+dstrns0:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#52,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x9999,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#4,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dsdyn -- display dynamics
+| -----    ----------------
+dsdyn:		clr.w	d0			| get group number
+		move.b	E_DATA1(a0),d0		| ... in d0
+		add.w	d0,d0			| ... as a word offset
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	dsexit			| done if not enabled
+
+		tst.w	P_CF(a6)		| center update ?
+		beq	dsdyn00			| jump if not
+
+		clr.w	d0			| get dynamics
+		move.b	E_DATA2(a0),d0		| ... in d0
+		move.w	d0,-(a7)		| save dyanmics
+		clr.w	d1			| get group number
+		move.b	E_DATA1(a0),d1		| ... in d1
+		move.w	d1,-(a7)		| save group number
+		move.w	(a7),d0			| col = group number
+		add.w	d0,d0			| ... | 5
+		add.w	d0,d0			| ...
+		move.w	(a7)+,d2		| ...  (d2 = group number)
+		add.w	d2,d0			| ...
+		add.w	#6,d0			| ... + 6
+		move.w	(a7)+,d1		| get dynamics
+		add.w	#0x0030,d1		| add '0' for ASCII conversion
+		move.w	d2,-(a7)		| save group number
+		move.w	#AT11,-(a7)		| put attribute on stack
+		move.w	d1,-(a7)		| put digit on stack
+		move.w	d0,-(a7)		| put column on stack
+		move.w	#4,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put object address on stack
+		jsr	_vputc			| update the screen
+		add.l	#12,a7			| clean up stack
+		move.w	(a7)+,d0		| get group number
+		cmp.w	#8,d0			| see which word it's in
+		bcc	dsdyn1			| jump if in MS word
+
+		bset	d0,_vrbw10+1		| set group bit in LS byte
+		bra	dsdyn2			| ...
+
+dsdyn1:		sub.w	#8,d0			| adjust for for byte
+		bset	d0,_vrbw10		| set group bit in MS byte
+
+dsdyn2:		bset	#2,_vrcw		| set video reset type bit
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+		.page
+dsdyn00:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#52,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x9999,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#5,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dslocn -- display location
+| ------    ----------------
+dslocn:		clr.w	d0			| get group number
+		move.b	E_DATA1(a0),d0		| ... in d0
+		add.w	d0,d0			| ... as a word offset
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	dsexit			| done if not enabled
+
+		tst.w	P_CF(a6)		| center update ?
+		beq	dsloc00			| jump if not
+
+		clr.w	d0			| get location
+		move.b	E_DATA2(a0),d0		| ... in d0
+		move.w	d0,-(a7)		| save location
+		clr.w	d1			| get group number
+		move.b	E_DATA1(a0),d1		| ... in d1
+		move.w	d1,-(a7)		| save group number
+		move.w	(a7),d0			| col = group number
+		add.w	d0,d0			| ... | 5
+		add.w	d0,d0			| ...
+		move.w	(a7)+,d2		| ...  (d2 = group number)
+		add.w	d2,d0			| ...
+		add.w	#8,d0			| ... + 8
+		move.w	(a7)+,d1		| get location
+		add.w	#0x0031,d1		| add '0' for ASCII conversion
+		move.w	d2,-(a7)		| save group number
+		move.w	#AT11,-(a7)		| put attribute on stack
+		move.w	d1,-(a7)		| put character on stack
+		move.w	d0,-(a7)		| put column on stack
+		move.w	#4,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put object address on stack
+		jsr	_vputc			| update the screen
+		add.l	#12,a7			| clean up stack
+		move.w	(a7)+,d0		| get group number
+		cmp.w	#8,d0			| see which word it's in
+		bcc	dslocn1			| jump if in MS word
+
+		bset	d0,_vrbw11+1		| set group bit in LS byte
+		bra	dslocn2			| ...
+
+dslocn1:	sub.w	#8,d0			| adjust for for byte
+		bset	d0,_vrbw11		| set group bit in MS byte
+
+dslocn2:	bset	#3,_vrcw		| set video reset type bit
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+		.page
+dsloc00:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#52,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x9999,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#5,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dsanrs -- display analog resolution
+| ------    -------------------------
+dsanrs:		move.b	E_DATA1(a0),d1		| get var / group
+		move.w	d1,d0			| extract group number
+		andi.w	#0x000F,d0		| ... in d0
+		add.w	d0,d0			| ... as a word offset
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	dsexit			| done if not enabled
+
+		tst.w	P_CF(a6)		| center update ?
+		beq	dsanrs0			| jump if not
+
+		move.w	_angroup,d2		| see if we display
+		bmi	dsexit			| jump if not
+
+		subq.w	#1,d2			| adust selected group number
+		move.w	d1,d0			| extract group from event
+		andi.w	#0x000F,d0		| ...
+		cmp.w	d0,d2			| see if we display
+		bne	dsexit			| jump if not
+
+		lsr.w	#4,d1			| extract variable number
+		andi.w	#0x000F,d1		| ...
+		move.w	d1,-(a7)		| save variable number
+		move.w	d1,d0			| calculate display offset
+		lsl.w	#3,d0			| ... (var | 9) + 6
+		add.w	d0,d1			| ... in d1
+		addq.w	#6,d1			| ...
+		move.b	E_DATA2(a0),d0		| get resolution
+		addi.w	#0x0030,d0		| convert for display
+		move.w	#AT12,-(a7)		| put attribute on stack
+		move.w	d0,-(a7)		| put character on stack
+		move.w	d1,-(a7)		| put column on stack
+		move.w	#7,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put sbase on stack
+		jsr	_vputc			| update the screen
+		add.l	#12,a7			| clean up stack
+		move.w	(a7)+,d0		| get variable number
+		bset	d0,_vrbw13+1		| set variable bit
+		bset	#5,_vrcw		| set video reset type bit
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+		.page
+dsanrs0:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#52,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x9999,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#6,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dsanvl -- display analog value
+| ------    --------------------
+dsanvl:		move.w	_angroup,d2		| see if we display
+		bmi	dsexit			| jump if not
+
+		move.b	E_DATA1(a0),d1		| get var / group
+		move.w	d1,d0			| extract group number
+		andi.w	#0x000F,d0		| ... in d0
+		add.w	d0,d0			| ... as a word offset
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	dsexit			| done if not enabled
+
+		tst.w	P_CF(a6)		| center update ?
+		beq	dsanvl0			| jump if not
+
+		subq.w	#1,d2			| adust group number
+		move.w	d1,d0			| extract group
+		andi.w	#0x000F,d0		| ...
+		cmp.w	d0,d2			| see if we display
+		bne	dsexit			| jump if not
+
+		lsr.w	#4,d1			| extract variable number
+		andi.w	#0x000F,d1		| ...
+		move.w	d1,-(a7)		| save variable number
+		move.w	d1,d0			| calculate display offset
+		lsl.w	#3,d0			| ... (var | 9) + 8
+		add.w	d0,d1			| ... in d1
+		addi.w	#8,d1			| ...
+		move.w	E_DN(a0),d0		| get value
+		asr.w	#5,d0			| adjust to low 11 bits
+		bpl	dsanvl1			| jump if positive
+
+		move.b	#'-',numstr		| set sign = '-'
+		neg.w	d0			| make value positive
 		bra	dsanvl2
-*
-dsanvl1:	move.b	#'+',numstr		* set sign = '+'
-*
-		.page
-dsanvl2:	ext.l	d0			* convert MS digit
-		divu	#1000,d0		* ...
-		add.w	#$0030,d0		* ...
-		move.b	d0,numstr+1		* ...
-		swap	d0			* convert middle digit
-		ext.l	d0			* ...
-		divu	#100,d0			* ...
-		add.w	#$0030,d0		* ...
-		move.b	d0,numstr+2		* ...
-		move.b	#'.',numstr+3		* insert decimal point
-		swap	d0			* convert LS digit
-		ext.l	d0			* ...
-		divu	#10,d0			* ...
-		add.w	#$0030,d0		* ...
-		move.b	d0,numstr+4		* ...
-		clr.b	numstr+5		* terminate string
-		move.w	#AT12,-(a7)		* put attribute on stack
-		move.l	#numstr,-(a7)		* put buffer address on stack
-		move.w	d1,-(a7)		* put column on stack
-		move.w	#7,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put sbase on stack
-		jsr	_vputs			* update the screen
-		add.l	#14,a7			* clean up stack
-		move.w	(a7)+,d0		* get variable number
-		bset	d0,_vrbw14+1		* set variable bit
-		bset	#6,_vrcw		* set video reset type bit
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-dsanvl0:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#52,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$9999,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#6,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dsasgn -- display assignment
-* ------    ------------------
-dsasgn:		tst.w	P_CF(a6)		* center update ?
-		beq	dsasgn0			* jump if not
-*
-		move.l	a0,-(a7)		* stash a0
-		jsr	_mpcupd			* update changed stuff
-		movea.l	(a7)+,a0		* restore a0
-		clr.w	d1			* get assignment
-		move.b	E_DATA1(a0),d1		* ... from the event
-		ext.l	d1			* ... as a long in d1
-		divu	#10,d1			* divide by 10 for conversion
-		add.l	#$00300030,d1		* add '0' for ASCII conversion
-		move.b	d1,numstr		* put MS byte in work area
-		swap	d1			* swap register halves
-		move.b	d1,numstr+1		* put LS byte in work area
-		clr.b	numstr+2		* terminate string
-		move.w	#AT04,-(a7)		* put attribute on stack
-		move.l	#numstr,-(a7)		* put buffer address on stack
-		move.w	#11,-(a7)		* put column on stack
-		move.w	#1,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put sbase on stack
-		jsr	_vputs			* update the screen
-		add.l	#14,a7			* clean up stack
-		bset	#0,_vrcw+1		* set video reset type bit
-		tst.w	_ctrsw			* update center for scupd ?
-	 	beq	dsexit			* done if not
-*
-dsasgn0:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#56,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$3333,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#3,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dstmpo -- display tempo
-* ------    -------------
-dstmpo:		tst.w	P_CF(a6)		* center update ?
-		beq	dstmpo0			* jump if not
-*
-		clr.w	d1			* get tempo
-		move.b	E_DATA1(a0),d1		* ... from event
-		ext.l	d1			* ... as a long in d1
-		divu	#10,d1			* divide by 10 for conversion
-		swap	d1			* swap register halves
-		add.w	#$0030,d1		* add '0' for ASCII conversion
-		move.b	d1,numstr+2		* put LS byte in work area
-		swap	d1			* swap register halves
-		ext.l	d1			* divide again
-		divu	#10,d1			* ...
-		add.l	#$00300030,d1		* add '0' for ASCII conversion
-		move.b	d1,numstr		* put MS byte in work area
-		swap	d1			* swap register halves
-		move.b	d1,numstr+1		* put middle byte in work area
-		clr.b	numstr+3		* terminate string
-		move.w	#AT06,-(a7)		* put attribute on stack
-		move.l	#numstr,-(a7)		* put buffer address on stack
-		move.w	#27,-(a7)		* put column on stack
-		move.w	#1,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put sbase on stack
-		jsr	_vputs			* display tempo
-		add.l	#14,a7			* clean up stack
-		bset	#2,_vrcw+1		* set video reset type bit
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-dstmpo0:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#56,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$3333,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#4,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dsstop -- display stop
-* ------    ------------
-dsstop:		tst.w	P_CF(a6)		* center update ?
-		beq	dsstop0			* jump if not
-*
-		jsr	_dclkmd			* show that clock is stopped
-		move.w	#AT08,-(a7)		* put attribute on stack
-		move.w	#40,-(a7)		* put 1st column on stack
-		move.w	#1,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put sbase on stack
-		jsr	_vputa			* hilite first column
-		move.w	#41,COL(a7)		* put 2nd column on stack
-		jsr	_vputa			* hilite second column
-		move.w	#42,COL(a7)		* put 3rd column on stack
-		jsr	_vputa			* hilite third column
-		move.w	#43,COL(a7)		* put 4th column on stack
-		jsr	_vputa			* hilite fourth column
-		add.l	#10,a7			* clean up stack
-		bset	#7,_vrcw		* set video reset type bits
-		bset	#0,_vrbw15		* ...
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-dsstop0:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#56,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$3333,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#5,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dsnext -- display next
-* ------    ------------
-dsnext:		tst.w	P_CF(a6)		* center update ?
-		beq	dsnext0			* jump if not
-*
-		move.w	#AT08,-(a7)		* put attribute on stack
-		move.w	#45,-(a7)		* put 1st column on stack
-		move.w	#1,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put sbase on stack
-		jsr	_vputa			* hilite first column
-		move.w	#46,COL(a7)		* put 2nd column on stack
-		jsr	_vputa			* hilite second column
-		move.w	#47,COL(a7)		* put 3rd column on stack
-		jsr	_vputa			* hilite third column
-		move.w	#48,COL(a7)		* put 4th column on stack
-		jsr	_vputa			* hilite fourth column
-		add.l	#10,a7			* clean up stack
-		bset	#7,_vrcw		* set video reset type bits
-		bset	#1,_vrbw15		* ...
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-dsnext0:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#56,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$3333,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#5,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dsgrp -- display group status
-* -----    --------------------
-dsgrp:		tst.w	P_CF(a6)		* center update ?
-		beq	dsgrp0			* jump if not
-*
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-dsgrp0:		move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#60,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$9999,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#3,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dsinst -- display instrument
-* ------    ------------------
-dsinst:		clr.w	d0			* get group number
-		move.b	E_DATA1(a0),d0		* ... in d0
-		add.w	d0,d0			* ... as a word offset
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	dsexit			* done if not enabled
-*
-		tst.w	P_CF(a6)		* center update ?
-		beq	dsins00			* jump if not
-*
-		lea	_ins2grp,a1		* point at ins2grp[]
-		clr.w	d0			* get instrument number
-		move.b	E_DATA2(a0),d0		* ... in d0
-		move.w	d0,-(a7)		* save instrument number
-		clr.w	d1			* get group number
-		move.b	E_DATA1(a0),d1		* ... in d1
-		move.w	d1,-(a7)		* save group number
-		move.w	(a7),d0			* col = group number
-		add.w	d0,d0			* ... * 5
-		add.w	d0,d0			* ...
-		move.w	(a7)+,d2		* ...  (d2 = group number)
-		add.w	d2,d0			* ...
-		add.w	#7,d0			* ... + 7
-		clr.l	d1			* get instrument number
-		move.w	(a7)+,d1		* ... as a long in d1
-		divu	#10,d1			* divide by 10 for conversion
-		add.l	#$00300030,d1		* add '0' for ASCII conversion
-		move.b	d1,numstr		* put MS byte in work area
-		swap	d1			* swap register halves
-		move.b	d1,numstr+1		* put LS byte in work area
-		clr.b	numstr+2		* terminate string
-		move.w	d2,-(a7)		* save group number
-		move.w	#AT11,-(a7)		* put attribute on stack
-		move.l	#numstr,-(a7)		* put buffer address on stack
-		move.w	d0,-(a7)		* put column on stack
-		move.w	#2,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put object address on stack
-		jsr	_vputs			* update the screen
-		add.l	#14,a7			* clean up stack
-*
-		.page
-		move.w	(a7)+,d0		* get group number
-		cmp.w	#8,d0			* see which word it's in
-		bcc	dsinst1			* jump if in MS word
-*
-		bset	d0,_vrbw08+1		* set group bit in LS byte
-		bra	dsinst2			* ...
-*
-dsinst1:	sub.w	#8,d0			* adjust for for byte
-		bset	d0,_vrbw08		* set group bit in MS byte
-*
-dsinst2:	bset	#0,_vrcw		* set video reset type bit
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-dsins00:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#60,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$9999,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#3,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dsintp -- display interpolation
-* ------    ---------------------
-dsintp:		tst.w	P_CF(a6)		* center update ?
-		beq	dsintp0			* jump if not
-*
-		move.w	E_DATA1(a0),-(a7)	* get interpolate value
-		jsr	_fromfpu		* convert to milliseconds
-		tst.w	(a7)+			* ...
-		andi.l	#$0000FFFF,d0		* clear high bits
-		divu	#10000,d0		* convert 1st digit
-		addi.w	#$0030,d0		* ... to ASCII
-		move.b	d0,numstr		* ... in numstr
-		swap	d0			* convert 2nd digit
-		ext.l	d0			* ...
-		divu	#1000,d0		* ...
-		addi.w	#$0030,d0		* ... to ASCII
-		move.b	d0,numstr+1		* ... in numstr
-		move.b	#'.',numstr+2		* insert decimal point
-		swap	d0			* convert 3rd digit
-		ext.l	d0			* ...
-		divu	#100,d0			* ...
-		addi.w	#$0030,d0		* ... to ASCII
-		move.b	d0,numstr+3		* ... in numstr
-		clr.b	numstr+4		* terminate numstr
-		move.w	#AT07,-(a7)		* vputs(obj8, 1, 35, numstr, AT07)
-		move.l	#numstr,-(a7)		* ...
-		move.w	#35,-(a7)		* ...
-		move.w	#1,-(a7)		* ...
-		move.l	_obj8,-(a7)		* ...
-		jsr	_vputs			* ...
-		add.l	#14,a7			* ...
-		bset	#3,_vrcw+1		* set video reset bit
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-dsintp0:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#60,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$CCCC,G_NOTE(a1)	* gdsp->note = COLOR
-		move.w	#4,G_CODE(a1)		* gdsp->code = PATTERN
-		move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dspnch -- display punch in/out
-* ------    --------------------
-dspnch:		tst.w	P_CF(a6)		* center update ?
-		beq	dspnch0			* jump if not
-*
-		tst.w	E_DATA1(a0)		* punch in ?
-		beq	dspnch1			* jump if not
-*
-		move.w	#AT09,-(a7)		* put attribute on stack
-		move.w	#50,-(a7)		* put 1st col on stack
-		move.w	#1,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put object address on stack
-		jsr	_vputa			* highlight 1st column
-		move.w	#51,COL(a7)		* put 2nd col on stack
-		jsr	_vputa			* highlight 2nd col
-		add.l	#10,a7			* clean up stack
-		bset	#5,_vrcw+1		* set video reset bit
-		bra	dspnch2			* go do maker update
-*
-dspnch1:	move.w	#AT09,-(a7)		* put attribute on stack
-		move.w	#53,-(a7)		* put 1st col on stack
-		move.w	#1,-(a7)		* put row on stack
-		move.l	_obj8,-(a7)		* put object address on stack
-		jsr	_vputa			* highlight 1st column
-		move.w	#54,COL(a7)		* put 2nd col on stack
-		jsr	_vputa			* highlight 2nd column
-		move.w	#55,COL(a7)		* put 3rd col on stack
-		jsr	_vputa			* highlight 3rd column
-		add.l	#10,a7			* clean up stack
-		bset	#6,_vrcw+1		* set video reset bit
-*
-dspnch2:	jsr	_dsgmodz		* display updated modes
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-dspnch0:	move.l	_gdfsep,d0		* quit if no elements left
-		beq	dsexit			* ...
-*
-		movea.l	d0,a1			* a1 = gdsp
-		move.l	G_NEXT(a1),_gdfsep	* gdfsep = gdsp->next
-		move.w	#60,d2			* d2 = event PRIORITY * 4
-		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	0(a2,d2.W),G_NEXT(a1)	* gdsp->next = gdstb[pri]
-		move.w	#$CCCC,G_NOTE(a1)	* gdsp->note = COLOR
-		tst.w	E_DATA1(a0)		* see which kind we have
-		bne	dspnchi			* jump if 'punch in'
-*
-		move.w	#6,G_CODE(a1)		* gdsp->code = 'out' PATTERN
+
+dsanvl1:	move.b	#'+',numstr		| set sign = '+'
+
+		.page
+dsanvl2:	ext.l	d0			| convert MS digit
+		divu	#1000,d0		| ...
+		add.w	#0x0030,d0		| ...
+		move.b	d0,numstr+1		| ...
+		swap	d0			| convert middle digit
+		ext.l	d0			| ...
+		divu	#100,d0			| ...
+		add.w	#0x0030,d0		| ...
+		move.b	d0,numstr+2		| ...
+		move.b	#'.',numstr+3		| insert decimal point
+		swap	d0			| convert LS digit
+		ext.l	d0			| ...
+		divu	#10,d0			| ...
+		add.w	#0x0030,d0		| ...
+		move.b	d0,numstr+4		| ...
+		clr.b	numstr+5		| terminate string
+		move.w	#AT12,-(a7)		| put attribute on stack
+		move.l	#numstr,-(a7)		| put buffer address on stack
+		move.w	d1,-(a7)		| put column on stack
+		move.w	#7,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put sbase on stack
+		jsr	_vputs			| update the screen
+		add.l	#14,a7			| clean up stack
+		move.w	(a7)+,d0		| get variable number
+		bset	d0,_vrbw14+1		| set variable bit
+		bset	#6,_vrcw		| set video reset type bit
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+dsanvl0:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#52,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x9999,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#6,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dsasgn -- display assignment
+| ------    ------------------
+dsasgn:		tst.w	P_CF(a6)		| center update ?
+		beq	dsasgn0			| jump if not
+
+		move.l	a0,-(a7)		| stash a0
+		jsr	_mpcupd			| update changed stuff
+		movea.l	(a7)+,a0		| restore a0
+		clr.w	d1			| get assignment
+		move.b	E_DATA1(a0),d1		| ... from the event
+		ext.l	d1			| ... as a long in d1
+		divu	#10,d1			| divide by 10 for conversion
+		add.l	#0x00300030,d1		| add '0' for ASCII conversion
+		move.b	d1,numstr		| put MS byte in work area
+		swap	d1			| swap register halves
+		move.b	d1,numstr+1		| put LS byte in work area
+		clr.b	numstr+2		| terminate string
+		move.w	#AT04,-(a7)		| put attribute on stack
+		move.l	#numstr,-(a7)		| put buffer address on stack
+		move.w	#11,-(a7)		| put column on stack
+		move.w	#1,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put sbase on stack
+		jsr	_vputs			| update the screen
+		add.l	#14,a7			| clean up stack
+		bset	#0,_vrcw+1		| set video reset type bit
+		tst.w	_ctrsw			| update center for scupd ?
+	 	beq	dsexit			| done if not
+
+dsasgn0:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#56,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x3333,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#3,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dstmpo -- display tempo
+| ------    -------------
+dstmpo:		tst.w	P_CF(a6)		| center update ?
+		beq	dstmpo0			| jump if not
+
+		clr.w	d1			| get tempo
+		move.b	E_DATA1(a0),d1		| ... from event
+		ext.l	d1			| ... as a long in d1
+		divu	#10,d1			| divide by 10 for conversion
+		swap	d1			| swap register halves
+		add.w	#0x0030,d1		| add '0' for ASCII conversion
+		move.b	d1,numstr+2		| put LS byte in work area
+		swap	d1			| swap register halves
+		ext.l	d1			| divide again
+		divu	#10,d1			| ...
+		add.l	#0x00300030,d1		| add '0' for ASCII conversion
+		move.b	d1,numstr		| put MS byte in work area
+		swap	d1			| swap register halves
+		move.b	d1,numstr+1		| put middle byte in work area
+		clr.b	numstr+3		| terminate string
+		move.w	#AT06,-(a7)		| put attribute on stack
+		move.l	#numstr,-(a7)		| put buffer address on stack
+		move.w	#27,-(a7)		| put column on stack
+		move.w	#1,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put sbase on stack
+		jsr	_vputs			| display tempo
+		add.l	#14,a7			| clean up stack
+		bset	#2,_vrcw+1		| set video reset type bit
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+dstmpo0:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#56,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x3333,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#4,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dsstop -- display stop
+| ------    ------------
+dsstop:		tst.w	P_CF(a6)		| center update ?
+		beq	dsstop0			| jump if not
+
+		jsr	_dclkmd			| show that clock is stopped
+		move.w	#AT08,-(a7)		| put attribute on stack
+		move.w	#40,-(a7)		| put 1st column on stack
+		move.w	#1,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put sbase on stack
+		jsr	_vputa			| hilite first column
+		move.w	#41,COL(a7)		| put 2nd column on stack
+		jsr	_vputa			| hilite second column
+		move.w	#42,COL(a7)		| put 3rd column on stack
+		jsr	_vputa			| hilite third column
+		move.w	#43,COL(a7)		| put 4th column on stack
+		jsr	_vputa			| hilite fourth column
+		add.l	#10,a7			| clean up stack
+		bset	#7,_vrcw		| set video reset type bits
+		bset	#0,_vrbw15		| ...
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+dsstop0:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#56,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x3333,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#5,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dsnext -- display next
+| ------    ------------
+dsnext:		tst.w	P_CF(a6)		| center update ?
+		beq	dsnext0			| jump if not
+
+		move.w	#AT08,-(a7)		| put attribute on stack
+		move.w	#45,-(a7)		| put 1st column on stack
+		move.w	#1,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put sbase on stack
+		jsr	_vputa			| hilite first column
+		move.w	#46,COL(a7)		| put 2nd column on stack
+		jsr	_vputa			| hilite second column
+		move.w	#47,COL(a7)		| put 3rd column on stack
+		jsr	_vputa			| hilite third column
+		move.w	#48,COL(a7)		| put 4th column on stack
+		jsr	_vputa			| hilite fourth column
+		add.l	#10,a7			| clean up stack
+		bset	#7,_vrcw		| set video reset type bits
+		bset	#1,_vrbw15		| ...
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+dsnext0:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#56,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x3333,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#5,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dsgrp -- display group status
+| -----    --------------------
+dsgrp:		tst.w	P_CF(a6)		| center update ?
+		beq	dsgrp0			| jump if not
+
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+dsgrp0:		move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#60,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x9999,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#3,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dsinst -- display instrument
+| ------    ------------------
+dsinst:		clr.w	d0			| get group number
+		move.b	E_DATA1(a0),d0		| ... in d0
+		add.w	d0,d0			| ... as a word offset
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	dsexit			| done if not enabled
+
+		tst.w	P_CF(a6)		| center update ?
+		beq	dsins00			| jump if not
+
+		lea	_ins2grp,a1		| point at ins2grp[]
+		clr.w	d0			| get instrument number
+		move.b	E_DATA2(a0),d0		| ... in d0
+		move.w	d0,-(a7)		| save instrument number
+		clr.w	d1			| get group number
+		move.b	E_DATA1(a0),d1		| ... in d1
+		move.w	d1,-(a7)		| save group number
+		move.w	(a7),d0			| col = group number
+		add.w	d0,d0			| ... | 5
+		add.w	d0,d0			| ...
+		move.w	(a7)+,d2		| ...  (d2 = group number)
+		add.w	d2,d0			| ...
+		add.w	#7,d0			| ... + 7
+		clr.l	d1			| get instrument number
+		move.w	(a7)+,d1		| ... as a long in d1
+		divu	#10,d1			| divide by 10 for conversion
+		add.l	#0x00300030,d1		| add '0' for ASCII conversion
+		move.b	d1,numstr		| put MS byte in work area
+		swap	d1			| swap register halves
+		move.b	d1,numstr+1		| put LS byte in work area
+		clr.b	numstr+2		| terminate string
+		move.w	d2,-(a7)		| save group number
+		move.w	#AT11,-(a7)		| put attribute on stack
+		move.l	#numstr,-(a7)		| put buffer address on stack
+		move.w	d0,-(a7)		| put column on stack
+		move.w	#2,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put object address on stack
+		jsr	_vputs			| update the screen
+		add.l	#14,a7			| clean up stack
+
+		.page
+		move.w	(a7)+,d0		| get group number
+		cmp.w	#8,d0			| see which word it's in
+		bcc	dsinst1			| jump if in MS word
+
+		bset	d0,_vrbw08+1		| set group bit in LS byte
+		bra	dsinst2			| ...
+
+dsinst1:	sub.w	#8,d0			| adjust for for byte
+		bset	d0,_vrbw08		| set group bit in MS byte
+
+dsinst2:	bset	#0,_vrcw		| set video reset type bit
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+dsins00:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#60,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0x9999,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#3,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dsintp -- display interpolation
+| ------    ---------------------
+dsintp:		tst.w	P_CF(a6)		| center update ?
+		beq	dsintp0			| jump if not
+
+		move.w	E_DATA1(a0),-(a7)	| get interpolate value
+		jsr	_fromfpu		| convert to milliseconds
+		tst.w	(a7)+			| ...
+		andi.l	#0x0000FFFF,d0		| clear high bits
+		divu	#10000,d0		| convert 1st digit
+		addi.w	#0x0030,d0		| ... to ASCII
+		move.b	d0,numstr		| ... in numstr
+		swap	d0			| convert 2nd digit
+		ext.l	d0			| ...
+		divu	#1000,d0		| ...
+		addi.w	#0x0030,d0		| ... to ASCII
+		move.b	d0,numstr+1		| ... in numstr
+		move.b	#'.',numstr+2		| insert decimal point
+		swap	d0			| convert 3rd digit
+		ext.l	d0			| ...
+		divu	#100,d0			| ...
+		addi.w	#0x0030,d0		| ... to ASCII
+		move.b	d0,numstr+3		| ... in numstr
+		clr.b	numstr+4		| terminate numstr
+		move.w	#AT07,-(a7)		| vputs(obj8, 1, 35, numstr, AT07)
+		move.l	#numstr,-(a7)		| ...
+		move.w	#35,-(a7)		| ...
+		move.w	#1,-(a7)		| ...
+		move.l	_obj8,-(a7)		| ...
+		jsr	_vputs			| ...
+		add.l	#14,a7			| ...
+		bset	#3,_vrcw+1		| set video reset bit
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+dsintp0:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#60,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0xCCCC,G_NOTE(a1)	| gdsp->note = COLOR
+		move.w	#4,G_CODE(a1)		| gdsp->code = PATTERN
+		move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dspnch -- display punch in/out
+| ------    --------------------
+dspnch:		tst.w	P_CF(a6)		| center update ?
+		beq	dspnch0			| jump if not
+
+		tst.w	E_DATA1(a0)		| punch in ?
+		beq	dspnch1			| jump if not
+
+		move.w	#AT09,-(a7)		| put attribute on stack
+		move.w	#50,-(a7)		| put 1st col on stack
+		move.w	#1,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put object address on stack
+		jsr	_vputa			| highlight 1st column
+		move.w	#51,COL(a7)		| put 2nd col on stack
+		jsr	_vputa			| highlight 2nd col
+		add.l	#10,a7			| clean up stack
+		bset	#5,_vrcw+1		| set video reset bit
+		bra	dspnch2			| go do maker update
+
+dspnch1:	move.w	#AT09,-(a7)		| put attribute on stack
+		move.w	#53,-(a7)		| put 1st col on stack
+		move.w	#1,-(a7)		| put row on stack
+		move.l	_obj8,-(a7)		| put object address on stack
+		jsr	_vputa			| highlight 1st column
+		move.w	#54,COL(a7)		| put 2nd col on stack
+		jsr	_vputa			| highlight 2nd column
+		move.w	#55,COL(a7)		| put 3rd col on stack
+		jsr	_vputa			| highlight 3rd column
+		add.l	#10,a7			| clean up stack
+		bset	#6,_vrcw+1		| set video reset bit
+
+dspnch2:	jsr	_dsgmodz		| display updated modes
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+dspnch0:	move.l	_gdfsep,d0		| quit if no elements left
+		beq	dsexit			| ...
+
+		movea.l	d0,a1			| a1 = gdsp
+		move.l	G_NEXT(a1),_gdfsep	| gdfsep = gdsp->next
+		move.w	#60,d2			| d2 = event PRIORITY | 4
+		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	0(a2,d2.W),G_NEXT(a1)	| gdsp->next = gdstb[pri]
+		move.w	#0xCCCC,G_NOTE(a1)	| gdsp->note = COLOR
+		tst.w	E_DATA1(a0)		| see which kind we have
+		bne	dspnchi			| jump if 'punch in'
+
+		move.w	#6,G_CODE(a1)		| gdsp->code = 'out' PATTERN
 		bra	dspnchx
-*
-dspnchi:	move.w	#5,G_CODE(a1)		* gdsp->code = 'in' PATTERN
-*
-dspnchx:	move.l	a1,0(a2,d2.W)		* gdstb[pri] = gdsp
-		bra	dsexit			* done
-*
-		.page
-*
-* dsbar -- display a bar marker
-* -----    --------------------
-dsbar:		tst.w	P_CF(a6)		* center update ?
-		beq	dsbar0			* jump if not
-*
-		tst.w	_ctrsw			* update center for scupd ?
-		beq	dsexit			* done if not
-*
-dsbar0:		movea.l	P_SL(a6),a2		* a2 points at gdstb
-		move.l	#-1,BARFLAG(a2)		* set the bar marker flag
-		bra	dsexit			* done
-*
-		.page
-*
-* ==============================================================================
+
+dspnchi:	move.w	#5,G_CODE(a1)		| gdsp->code = 'in' PATTERN
+
+dspnchx:	move.l	a1,0(a2,d2.W)		| gdstb[pri] = gdsp
+		bra	dsexit			| done
+
+		.page
+
+| dsbar -- display a bar marker
+| -----    --------------------
+dsbar:		tst.w	P_CF(a6)		| center update ?
+		beq	dsbar0			| jump if not
+
+		tst.w	_ctrsw			| update center for scupd ?
+		beq	dsexit			| done if not
+
+dsbar0:		movea.l	P_SL(a6),a2		| a2 points at gdstb
+		move.l	#-1,BARFLAG(a2)		| set the bar marker flag
+		bra	dsexit			| done
+
+		.page
+
+| ==============================================================================
 		.data
-* ==============================================================================
-*
-* sddtab -- score display dispatch table -- MUST match score.h definitions
-* ------    ----------------------------    ------------------------------
-sddtab:		dc.l	dsexit		* 0	null
-		dc.l	dsexit		* 1	score begin
-		dc.l	dssbgn		* 2	section begin
-		dc.l	dssend		* 3	section end
-		dc.l	dsinst		* 4	instrument change
-		dc.l	dsnbx		* 5	note begin
-		dc.l	dsnex		* 6	note end
-		dc.l	dsstop		* 7	stop
-		dc.l	dsintp		* 8	interpolate
-		dc.l	dstmpo		* 9	tempo
-		dc.l	dstune		* 10	tuning
-		dc.l	dsgrp		* 11	group status
-		dc.l	dslocn		* 12	location
-		dc.l	dsdyn		* 13	dynamics
-		dc.l	dsanvl		* 14	analog value
-		dc.l	dsanrs		* 15	analog resolution
-		dc.l	dsasgn		* 16	I/O assign
-		dc.l	dstrns		* 17	transposition
-		dc.l	dsexit		* 18	repeat
-		dc.l	dspnch		* 19	punch in/out
-		dc.l	dsexit		* 20	polyphonic pressure
-		dc.l	dsexit		* 21	score end
-		dc.l	dsexit		* 22	channel pressure
-		dc.l	dsbar		* 23	bar marker
-		dc.l	dsnext		* 24	next score
-*
-* ==============================================================================
+| ==============================================================================
+
+| sddtab -- score display dispatch table -- MUST match score.h definitions
+| ------    ----------------------------    ------------------------------
+sddtab:		dc.l	dsexit		| 0	null
+		dc.l	dsexit		| 1	score begin
+		dc.l	dssbgn		| 2	section begin
+		dc.l	dssend		| 3	section end
+		dc.l	dsinst		| 4	instrument change
+		dc.l	dsnbx		| 5	note begin
+		dc.l	dsnex		| 6	note end
+		dc.l	dsstop		| 7	stop
+		dc.l	dsintp		| 8	interpolate
+		dc.l	dstmpo		| 9	tempo
+		dc.l	dstune		| 10	tuning
+		dc.l	dsgrp		| 11	group status
+		dc.l	dslocn		| 12	location
+		dc.l	dsdyn		| 13	dynamics
+		dc.l	dsanvl		| 14	analog value
+		dc.l	dsanrs		| 15	analog resolution
+		dc.l	dsasgn		| 16	I/O assign
+		dc.l	dstrns		| 17	transposition
+		dc.l	dsexit		| 18	repeat
+		dc.l	dspnch		| 19	punch in/out
+		dc.l	dsexit		| 20	polyphonic pressure
+		dc.l	dsexit		| 21	score end
+		dc.l	dsexit		| 22	channel pressure
+		dc.l	dsbar		| 23	bar marker
+		dc.l	dsnext		| 24	next score
+
+| ==============================================================================
 		.bss
-* ==============================================================================
-*
-* globals:
-* --------
-_ac_code:	ds.b	1		* accidental code
-*
-* locals:
-* -------
-numstr:		ds.b	65		* video display update work area
-*
-* ------------------------------------------------------------------------------
-*
+| ==============================================================================
+
+| globals:
+| --------
+_ac_code:	ds.b	1		| accidental code
+
+| locals:
+| -------
+numstr:		ds.b	65		| video display update work area
+
+| ------------------------------------------------------------------------------
+
 		.end
Index: ram/seexec.s
===================================================================
--- ram/seexec.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ ram/seexec.s	(revision 08e1da1cabca094217491629d328ae7146816782)
@@ -1,22 +1,22 @@
-* ------------------------------------------------------------------------------
-* seexec.s -- score event execution driver
-* Version 40 -- 1988-10-06 -- D.N. Lynx Crowe
-*
-*	struct s_entry *
-*	se_exec(ep, sd)
-*	struct s_entry *ep;
-*	short sd;
-*
-*		Executes the event at 'ep', scrolling in direction 'sd'.
-*
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| seexec.s -- score event execution driver
+| Version 40 -- 1988-10-06 -- D.N. Lynx Crowe
+
+|	struct s_entry |
+|	se_exec(ep, sd)
+|	struct s_entry |ep;
+|	short sd;
+
+|		Executes the event at 'ep', scrolling in direction 'sd'.
+
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_se_exec
-*
+
 		.xdef	BadEvnt
-*
+
 		.xdef	_xevent
-*
+
 		.xref	_asgvce
 		.xref	_clkset
@@ -31,5 +31,5 @@
 		.xref	_settune
 		.xref	_setv2gi
-*
+
 		.xref	_anrs
 		.xref	_var2src
@@ -48,475 +48,475 @@
 		.xref	_vce2trg
 		.xref	_veltab
-*
-		.page
-*
-* parameter offsets
-* -----------------
-P_EP		.equ	8		* WORD - 'ep' parameter offset
-P_SD		.equ	12		* WORD - 'sd' parameter offset
-*
-* event structure offsets -- MUST match score.h definitions
-* -----------------------    ------------------------------
-*		      offset		 length
-*		      ------             ------
-E_TIME		.equ	0		* LONG
-E_SIZE		.equ	4		* BYTE
-E_TYPE		.equ	5		* BYTE
-E_DATA1		.equ	6		* BYTE
-E_NOTE		.equ	6		* BYTE
-E_DATA2		.equ	7		* BYTE
-E_GROUP		.equ	7		* BYTE
-E_BAK		.equ	8		* LONG
-E_FWD		.equ	12		* LONG
-E_DN		.equ	16		* LONG
-E_VEL		.equ	16		* WORD
-E_DATA4		.equ	18		* WORD
-E_UP		.equ	20		* LONG
-E_LFT		.equ	24		* LONG
-E_RGT		.equ	28		* LONG
-*
-* Miscellaneous constants
-* -----------------------
-N_ETYPES	.equ	25		* number of event types
-*
-M_KSTATE	.equ	$01		* keys status bit
-N_KSTATE	.equ	$FE		* keys status bit complement
-*
-D_BAK		.equ	1		* code for backward scrolling
-*
-LCL_PRT		.equ	2		* 0-origin local port number
-LCL_PCH		.equ	$1080		* port and channel for trigger
-*
-		.page
-*
-* A few words about se_exec:
-*
-* se_exec has to be very fast, so it's written in assembly language,
-* rather than C, which is usually pretty good, but not quite good enough
-* for this application.  The faster this routine runs, the higher the
-* tempo we can keep up with.  If this code is fast enough, we end up
-* hardware limited by the timer.
-*
-_se_exec:	link	a6,#0			* link stack frames
-		movea.l	P_EP(a6),a0		* get event pointer 'ep' into a0
-		move.l	a0,_xevent		* save in xevent
-		move.b	E_TYPE(a0),d1		* get event type into d1.W
-		andi.w	#$007F,d1		* ... and mask off new-data flag
-		cmp.b	#N_ETYPES,d1		* see if it's valid
-		blt	sexc1			* jump if it is
-*
-BadEvnt:	move.l	a0,d0			* setup to return pointer we got
-		bra	done			* exit
-*
-exexit:		movea.l	_xevent,a0		* point at next event
-		move.l	E_FWD(a0),d0		* ...
-*
-done:		unlk	a6			* done -- unlink stack frames
-		rts				* return to caller
-*
-sexc1:		lea	sextab,a1		* get base of dispatch table
-		lsl.w	#2,d1			* multiplty event by 4 for index
-		movea.l	0(a1,d1.W),a2		* get address of event routine
-		jmp	(a2)			* jump to event execution routine
-*
-* On entry, the individual execution routines only depend on a0 pointing at the
-* event they were dispatched for.
-*
-* The usual C function register usage conventions apply:
-*
-* d0..d2 and a0..a2 are used for scratch, and are not preserved.
-*
-* d3..d6 and a3..a5 are register variables, and are preserved.
-* a6 = frame pointer, a7 = stack pointer, and are preserved.
-*
-		.page
-*
-* exnbeg -- execute note begin
-* ------    ------------------
-* If things need to be sped up, we could incorporate the functions of
-* asgvce() here, rather than calling it.  asgvce() could also be re-written in
-* assembly language to make it a shade faster.
-*
-exnbeg:		cmpi.w	#D_BAK,P_SD(a6)		* check direction
-		beq	nendex			* if backward, treat as note end
-*
-nbegex:		clr.w	d1			* clear d1
-		move.b	E_GROUP(a0),d1		* get group number
-		add.w	d1,d1			* ... * 2
-		lea	_grpstat,a1		* point at grpstat
-		tst.w	0(a1,d1.W)		* see if group is enabled
-		beq	exexit			* done if not
-*
-		move.b	E_NOTE(a0),d1		* d1 = note number nn (0..127)
-		move.w	#LCL_PCH,d2		* put port and channel in d2
-		add.w	d1,d2			* d2 = trg 
-		lea	_trgtab,a1		* point at trgtab[trg]
-		move.b	0(a1,d2.W),d0		* ...
-		or.b	#M_KSTATE,d0		* set trigger table entry on
-		move.b	d0,0(a1,d2.W)		* ...
-		lea	_veltab,a1		* point at veltab
-		add.w	d2,d2			* ...
-		move.w	E_VEL(a0),0(a1,d2.W)	* put velocity in veltab
-		move.w	E_VEL(a0),-(a7)		* put velocity on the stack
-		move.w	d1,-(a7)		* put note number on the stack
-		move.w	#1,-(a7)		* put channel on the stack
-		move.w	#LCL_PRT,-(a7)		* put port on the stack
-		move.b	E_GROUP(a0),d1		* d1 = group number  (0..11)
-		move.w	d1,-(a7)		* put group number on the stack
-		jsr	_asgvce			* start the note
-		add.l	#10,a7			* clean up the stack		
-		bra	exexit			* done
-*
-		.page
-*
-* exnend -- execute note end
-* ------    ----------------
-* If things need to be sped up, we could incorporate the functions of
-* procpfl() here, rather than calling it.  procpfl() could also be re-written in
-* assembly language to make it a shade faster.
-*
-exnend:		cmpi.w	#D_BAK,P_SD(a6)		* check direction
-		beq	nbegex			* if backward, treat as beginning
-*
-nendex:		clr.w	d1			* clear d1
-		move.b	E_GROUP(a0),d1		* get group number
-		add.w	d1,d1			* ... * 2
-		lea	_grpstat,a1		* point at grpstat
-		tst.w	0(a1,d1.W)		* check group status
-		beq	exexit			* done if disabled
-*
-		move.b	E_NOTE(a0),d1		* d1 = note number nn (0..127)
-		move.w	#LCL_PCH,d2		* put port and channel in d2
-		add.w	d1,d2			* d2 = trg * 2
-		add.w	d2,d2			* ...
-		lea	_trgtab,a1		* set trigger table entry off
-		move.b	0(a1,d2.W),d0		* ...
-		and.b	#N_KSTATE,d0		* ...
-		move.b	d0,0(a1,d2.W)		* ...
-		bne	exexit			* done if note still active
-*
-		.page
-*
-		lsr.w	#1,d2			* adjust d2
-		clr.w	d1			* set loop index
-		lea	_vce2trg,a2		* point at vce2trg table
-*
-exnend1:	cmp.w	(a2),d2			* see if this voice uses trg
-		bne	exnend2			* jump if not
-*
-		move.w	#-1,(a2)		* set entry to -1
-		move.l	a2,-(a7)		* save a2 on stack
-		move.w	d1,-(a7)		* save d1 on stack
-		move.w	d2,-(a7)		* save d2 on stack
-		lea	_vce2grp,a1		* put group on stack
-		move.w	d1,d0			* ...
-		add.w	d0,d0			* ...
-		move.w	0(a1,d0.W),-(a7)	* ...
-		move.w	d2,-(a7)		* put trg on stack
-		jsr	_procpfl		* process sustained voices
-		addq.l	#4,a7			* clean up stack
-		move.w	(a7)+,d2		* restore d2
-		move.w	(a7)+,d1		* restore d1
-		movea.l	(a7)+,a2		* restore a2
-*
-exnend2:	addq.l	#2,a2			* point at next vce2trg entry
-		addq.w	#1,d1			* loop until all are checked
-		cmp.w	#12,d1			* ...
-		bne	exnend1			* ...
-*
-		bra	exexit			* done
-*
-		.page
-*
-* exsbgn -- execute section begin
-* ------    ---------------------
-exsbgn:		clr.w	d0			* get section number
-		move.b	E_DATA1(a0),d0		* ...
-		move.w	d0,_cursect		* set section number
-		bra	exexit			* done
-*
-* exasgn -- execute assignment event
-* ------    ------------------------
-exasgn:		clr.w	d0			* get assignment
-		move.b	E_DATA1(a0),d0		* ...
-		move.w	d0,-(a7)		* getasg(curasg = asgn)
-		move.w	d0,_curasg		* ...
-		jsr	_getasg			* ...
-		tst.w	(a7)+			* ...
-		bra	exexit			* done
-*
-* extune -- execute tuning event
-* ------    --------------------
-extune:		clr.w	d0			* get tuning
-		move.b	E_DATA1(a0),d0		* ...
-		move.w	d0,-(a7)		* gettun(tuning)
-		jsr	_gettun			* ...
-		tst.w	(a7)+			* ...
-		bra	exexit			* done
-*
-* extrns -- execute transposition event
-* ------    ---------------------------
-extrns:		clr.w	d0			* get group number
-		move.b	E_DATA1(a0),d0		* ...
-		add.w	d0,d0			* ... as an index in d0
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	exexit			* done if disabled
-*
-		lea	_s_trns,a1		* set group transposition
-		move.w	E_LFT(a0),0(a1,d0.W)	* ...
-		jsr	_settune		* ...
-		bra 	exexit			* done
-*
-		.page
-*
-* extmpo -- execute tempo event
-* ------    -------------------
-extmpo:		clr.w	d0			* get tempo
-		move.b	E_DATA1(a0),d0		* ...
-		move.w	d0,-(a7)		* settmpo(tempo)
-		jsr	_settmpo		* ...
-		tst.w	(a7)+			* ...
-		bra	exexit			* done
-*
-* exstop -- execute stop event
-* ------    ------------------
-exstop:		clr.w	-(a7)			* stop the clock
-		jsr	_clkset			* ...
-		tst.w	(a7)+			* ...
-		bra	exexit			* that's all, folks
-*
-* exintp -- execute interpolate event
-* ------    -------------------------
-exintp:		move.w	E_DATA1(a0),_curintp	* set interpolate value
-		bra	exexit			* done
-*
-		.page
-*
-* exinst -- execute instrument change event
-* ------    -------------------------------
-exinst:		clr.w	d0			* get group number
-		move.b	E_DATA1(a0),d0		* ... in d0
-		add.w	d0,d0			* ... as a word offset
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	exexit			* done if not enabled
-*
-		lea	_ins2grp,a1		* point at ins2grp[]
-		clr.w	d0			* get instrument number
-		move.b	E_DATA2(a0),d0		* ... in d0
-		clr.w	d1			* get group number
-		move.b	E_DATA1(a0),d1		* ... in d1
-		move.w	d1,-(a7)		* put group number on stack
-		add.w	d1,d1			* make d1 a word pointer
-		move.w	0(a1,d1.W),d2		* get ins2grp[group]
-		and.w	#$FF00,d2		* mask off GTAG1..GTAG8
-		or.w	d0,d2			* OR in new instrument number
-		move.w	d2,0(a1,d1.W)		* set ins2grp[group]
-		jsr	_setv2gi		* setv2gi(group)
-		tst.w	(a7)+			* clean up stack
-		bra	exexit			* done
-*
-		.page
-*
-* exdyn -- execute dynamics event
-* -----    ----------------------
-exdyn:		clr.w	d0			* get group number
-		move.b	E_DATA1(a0),d0		* ... in d0
-		add.w	d0,d0			* ... as a word offset
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	exexit			* done if not enabled
-*
-		clr.w	d0			* get dynamics
-		move.b	E_DATA2(a0),d0		* ... in d0
-		clr.w	d1			* get group number
-		move.b	E_DATA1(a0),d1		* ... in d1
-		move.w	d0,-(a7)		* setdyn(group, dyn)
-		move.w	d1,-(a7)		* ...
-		jsr	_setdyn			* ...
-		adda.l	#4,a7			* clean up stack
-		bra	exexit			* done
-*
-* exlocn -- execute location event
-* ------    ----------------------
-exlocn:		clr.w	d0			* get group number
-		move.b	E_DATA1(a0),d0		* ... in d0
-		add.w	d0,d0			* ... as a word offset
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	exexit			* done if not enabled
-*
-		clr.w	d0			* get location
-		move.b	E_DATA2(a0),d0		* ... in d0
-		clr.w	d1			* get group number
-		move.b	E_DATA1(a0),d1		* ... in d1
-		move.w	d0,-(a7)		* setloc(group, loc)
-		move.w	d1,-(a7)		* ...
-		jsr	_setloc			* ...
-		adda.l	#4,a7			* clean up stack
-		bra	exexit			* done
-*
-		.page
-*
-* exanrs -- execute analog resolution event
-* ------    -------------------------------
-exanrs:		move.b	E_DATA1(a0),d0		* get group number
-		andi.w	#$000F,d0		* ... in d0
-		add.w	d0,d0			* ... as a word offset
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	exexit			* done if not enabled
-*
-		clr.w	d1			* get variable / group numbers
-		move.b	E_DATA1(a0),d1		* ...
-		add.w	d1,d1			* convert to word index
-		clr.w	d0			* get resolution
-		move.b	E_DATA2(a0),d0		* ... in d0
-		lea	_anrs,a1		* point at resolution table base
-		move.w	d0,0(a1,d1.W)		* save resolution in table
-		bra	exexit			* done
-*
-* exanvl -- execute analog value event
-* ------    --------------------------
-exanvl:		move.b	E_DATA1(a0),d0		* get group number
-		andi.w	#$000F,d0		* ... in d0
-		add.w	d0,d0			* ... as a word offset
-		lea	_grpstat,a1		* check grpstat[grp]
-		tst.w	0(a1,d0.W)		* ...
-		beq	exexit			* done if not enabled
-*
-		move.w	E_DN(a0),-(a7)		* put value on stack
-		clr.w	d2			* get variable / group numbers
-		move.b	E_DATA1(a0),d2		* ... into d2
-		move.w	d2,d1			* extract group number
-		andi.w	#$000F,d1		* ... into d1
-		lsr.w	#3,d2			* extract variable number
-		andi.w	#$001E,d2		* ... as a word index in d2
-		lea	_var2src,a1		* point at variable map
-		move.w	0(a1,d2.W),-(a7)	* put source number on stack
-		move.w	d1,-(a7)		* put group number on stack
-		jsr	_setsv			* setsv(group, src, val)
-		adda.l	#6,a7			* clean up stack
-		bra	exexit			* done
-*
-* exnext -- next score
-* ------    ----------
-exnext:		move.w	#1,_nxtflag		* set next score flag
-		bra	exexit			* done
-*
-		.page
-*
-* expnch -- execute punch in/out
-* ------    --------------------
-expnch:		tst.w	_recsw			* recording ?
-		beq	exexit			* ignore if not
-*
-		tst.w	E_DATA1(a0)		* punch in ?
-		bne	expnch5			* jump if so
-*
-* punch out
-* 
-		lea	_grpmode,a1		* setup for group modes
-		move.w	#11,d0			* ...
-*
-expnch0:	cmpi.w	#2,(a1)			* in record mode ?
-		bne	expnch1			* jump if not
-*
-		clr.w	(a1)			* set to play mode
-*
-expnch1:	addq.l	#2,a1			* point at next entry
-		dbra	d0,expnch0		* loop through all groups
-*
-		lea	_varmode,a1		* setup for variable modes
-		move.w	#5,d1			* set variable count
-*
-expnch4:	clr.w	d0			* clear offset
-*
-expnch2:	cmpi.w	#2,0(a1,d0.W)		* in record mode ?
-		bne	expnch3			* jump if not
-*
-		clr.w	0(a1,d0.W)		* set to play mode
-*
-expnch3:	addq.w	#2,d0			* update offset
-		cmpi.w	#24,d0			* check for final group
-		bne	expnch2			* loop through all groups
-*
-		add.l	#32,a1			* point at next variable
-		dbra	d1,expnch4		* loop through all variables
-*
+
+		.page
+
+| parameter offsets
+| -----------------
+P_EP		=	8		| WORD - 'ep' parameter offset
+P_SD		=	12		| WORD - 'sd' parameter offset
+
+| event structure offsets -- MUST match score.h definitions
+| -----------------------    ------------------------------
+|		      offset		 length
+|		      ------             ------
+E_TIME		=	0		| LONG
+E_SIZE		=	4		| BYTE
+E_TYPE		=	5		| BYTE
+E_DATA1		=	6		| BYTE
+E_NOTE		=	6		| BYTE
+E_DATA2		=	7		| BYTE
+E_GROUP		=	7		| BYTE
+E_BAK		=	8		| LONG
+E_FWD		=	12		| LONG
+E_DN		=	16		| LONG
+E_VEL		=	16		| WORD
+E_DATA4		=	18		| WORD
+E_UP		=	20		| LONG
+E_LFT		=	24		| LONG
+E_RGT		=	28		| LONG
+
+| Miscellaneous constants
+| -----------------------
+N_ETYPES	=	25		| number of event types
+
+M_KSTATE	=	0x01		| keys status bit
+N_KSTATE	=	0xFE		| keys status bit complement
+
+D_BAK		=	1		| code for backward scrolling
+
+LCL_PRT		=	2		| 0-origin local port number
+LCL_PCH		=	0x1080		| port and channel for trigger
+
+		.page
+
+| A few words about se_exec:
+
+| se_exec has to be very fast, so it's written in assembly language,
+| rather than C, which is usually pretty good, but not quite good enough
+| for this application.  The faster this routine runs, the higher the
+| tempo we can keep up with.  If this code is fast enough, we end up
+| hardware limited by the timer.
+
+_se_exec:	link	a6,#0			| link stack frames
+		movea.l	P_EP(a6),a0		| get event pointer 'ep' into a0
+		move.l	a0,_xevent		| save in xevent
+		move.b	E_TYPE(a0),d1		| get event type into d1.W
+		andi.w	#0x007F,d1		| ... and mask off new-data flag
+		cmp.b	#N_ETYPES,d1		| see if it's valid
+		blt	sexc1			| jump if it is
+
+BadEvnt:	move.l	a0,d0			| setup to return pointer we got
+		bra	done			| exit
+
+exexit:		movea.l	_xevent,a0		| point at next event
+		move.l	E_FWD(a0),d0		| ...
+
+done:		unlk	a6			| done -- unlink stack frames
+		rts				| return to caller
+
+sexc1:		lea	sextab,a1		| get base of dispatch table
+		lsl.w	#2,d1			| multiplty event by 4 for index
+		movea.l	0(a1,d1.W),a2		| get address of event routine
+		jmp	(a2)			| jump to event execution routine
+
+| On entry, the individual execution routines only depend on a0 pointing at the
+| event they were dispatched for.
+
+| The usual C function register usage conventions apply:
+
+| d0..d2 and a0..a2 are used for scratch, and are not preserved.
+
+| d3..d6 and a3..a5 are register variables, and are preserved.
+| a6 = frame pointer, a7 = stack pointer, and are preserved.
+
+		.page
+
+| exnbeg -- execute note begin
+| ------    ------------------
+| If things need to be sped up, we could incorporate the functions of
+| asgvce() here, rather than calling it.  asgvce() could also be re-written in
+| assembly language to make it a shade faster.
+
+exnbeg:		cmpi.w	#D_BAK,P_SD(a6)		| check direction
+		beq	nendex			| if backward, treat as note end
+
+nbegex:		clr.w	d1			| clear d1
+		move.b	E_GROUP(a0),d1		| get group number
+		add.w	d1,d1			| ... | 2
+		lea	_grpstat,a1		| point at grpstat
+		tst.w	0(a1,d1.W)		| see if group is enabled
+		beq	exexit			| done if not
+
+		move.b	E_NOTE(a0),d1		| d1 = note number nn (0..127)
+		move.w	#LCL_PCH,d2		| put port and channel in d2
+		add.w	d1,d2			| d2 = trg
+		lea	_trgtab,a1		| point at trgtab[trg]
+		move.b	0(a1,d2.W),d0		| ...
+		or.b	#M_KSTATE,d0		| set trigger table entry on
+		move.b	d0,0(a1,d2.W)		| ...
+		lea	_veltab,a1		| point at veltab
+		add.w	d2,d2			| ...
+		move.w	E_VEL(a0),0(a1,d2.W)	| put velocity in veltab
+		move.w	E_VEL(a0),-(a7)		| put velocity on the stack
+		move.w	d1,-(a7)		| put note number on the stack
+		move.w	#1,-(a7)		| put channel on the stack
+		move.w	#LCL_PRT,-(a7)		| put port on the stack
+		move.b	E_GROUP(a0),d1		| d1 = group number  (0..11)
+		move.w	d1,-(a7)		| put group number on the stack
+		jsr	_asgvce			| start the note
+		add.l	#10,a7			| clean up the stack
+		bra	exexit			| done
+
+		.page
+
+| exnend -- execute note end
+| ------    ----------------
+| If things need to be sped up, we could incorporate the functions of
+| procpfl() here, rather than calling it.  procpfl() could also be re-written in
+| assembly language to make it a shade faster.
+
+exnend:		cmpi.w	#D_BAK,P_SD(a6)		| check direction
+		beq	nbegex			| if backward, treat as beginning
+
+nendex:		clr.w	d1			| clear d1
+		move.b	E_GROUP(a0),d1		| get group number
+		add.w	d1,d1			| ... | 2
+		lea	_grpstat,a1		| point at grpstat
+		tst.w	0(a1,d1.W)		| check group status
+		beq	exexit			| done if disabled
+
+		move.b	E_NOTE(a0),d1		| d1 = note number nn (0..127)
+		move.w	#LCL_PCH,d2		| put port and channel in d2
+		add.w	d1,d2			| d2 = trg | 2
+		add.w	d2,d2			| ...
+		lea	_trgtab,a1		| set trigger table entry off
+		move.b	0(a1,d2.W),d0		| ...
+		and.b	#N_KSTATE,d0		| ...
+		move.b	d0,0(a1,d2.W)		| ...
+		bne	exexit			| done if note still active
+
+		.page
+
+		lsr.w	#1,d2			| adjust d2
+		clr.w	d1			| set loop index
+		lea	_vce2trg,a2		| point at vce2trg table
+
+exnend1:	cmp.w	(a2),d2			| see if this voice uses trg
+		bne	exnend2			| jump if not
+
+		move.w	#-1,(a2)		| set entry to -1
+		move.l	a2,-(a7)		| save a2 on stack
+		move.w	d1,-(a7)		| save d1 on stack
+		move.w	d2,-(a7)		| save d2 on stack
+		lea	_vce2grp,a1		| put group on stack
+		move.w	d1,d0			| ...
+		add.w	d0,d0			| ...
+		move.w	0(a1,d0.W),-(a7)	| ...
+		move.w	d2,-(a7)		| put trg on stack
+		jsr	_procpfl		| process sustained voices
+		addq.l	#4,a7			| clean up stack
+		move.w	(a7)+,d2		| restore d2
+		move.w	(a7)+,d1		| restore d1
+		movea.l	(a7)+,a2		| restore a2
+
+exnend2:	addq.l	#2,a2			| point at next vce2trg entry
+		addq.w	#1,d1			| loop until all are checked
+		cmp.w	#12,d1			| ...
+		bne	exnend1			| ...
+
+		bra	exexit			| done
+
+		.page
+
+| exsbgn -- execute section begin
+| ------    ---------------------
+exsbgn:		clr.w	d0			| get section number
+		move.b	E_DATA1(a0),d0		| ...
+		move.w	d0,_cursect		| set section number
+		bra	exexit			| done
+
+| exasgn -- execute assignment event
+| ------    ------------------------
+exasgn:		clr.w	d0			| get assignment
+		move.b	E_DATA1(a0),d0		| ...
+		move.w	d0,-(a7)		| getasg(curasg = asgn)
+		move.w	d0,_curasg		| ...
+		jsr	_getasg			| ...
+		tst.w	(a7)+			| ...
+		bra	exexit			| done
+
+| extune -- execute tuning event
+| ------    --------------------
+extune:		clr.w	d0			| get tuning
+		move.b	E_DATA1(a0),d0		| ...
+		move.w	d0,-(a7)		| gettun(tuning)
+		jsr	_gettun			| ...
+		tst.w	(a7)+			| ...
+		bra	exexit			| done
+
+| extrns -- execute transposition event
+| ------    ---------------------------
+extrns:		clr.w	d0			| get group number
+		move.b	E_DATA1(a0),d0		| ...
+		add.w	d0,d0			| ... as an index in d0
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	exexit			| done if disabled
+
+		lea	_s_trns,a1		| set group transposition
+		move.w	E_LFT(a0),0(a1,d0.W)	| ...
+		jsr	_settune		| ...
+		bra 	exexit			| done
+
+		.page
+
+| extmpo -- execute tempo event
+| ------    -------------------
+extmpo:		clr.w	d0			| get tempo
+		move.b	E_DATA1(a0),d0		| ...
+		move.w	d0,-(a7)		| settmpo(tempo)
+		jsr	_settmpo		| ...
+		tst.w	(a7)+			| ...
+		bra	exexit			| done
+
+| exstop -- execute stop event
+| ------    ------------------
+exstop:		clr.w	-(a7)			| stop the clock
+		jsr	_clkset			| ...
+		tst.w	(a7)+			| ...
+		bra	exexit			| that's all, folks
+
+| exintp -- execute interpolate event
+| ------    -------------------------
+exintp:		move.w	E_DATA1(a0),_curintp	| set interpolate value
+		bra	exexit			| done
+
+		.page
+
+| exinst -- execute instrument change event
+| ------    -------------------------------
+exinst:		clr.w	d0			| get group number
+		move.b	E_DATA1(a0),d0		| ... in d0
+		add.w	d0,d0			| ... as a word offset
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	exexit			| done if not enabled
+
+		lea	_ins2grp,a1		| point at ins2grp[]
+		clr.w	d0			| get instrument number
+		move.b	E_DATA2(a0),d0		| ... in d0
+		clr.w	d1			| get group number
+		move.b	E_DATA1(a0),d1		| ... in d1
+		move.w	d1,-(a7)		| put group number on stack
+		add.w	d1,d1			| make d1 a word pointer
+		move.w	0(a1,d1.W),d2		| get ins2grp[group]
+		and.w	#0xFF00,d2		| mask off GTAG1..GTAG8
+		or.w	d0,d2			| OR in new instrument number
+		move.w	d2,0(a1,d1.W)		| set ins2grp[group]
+		jsr	_setv2gi		| setv2gi(group)
+		tst.w	(a7)+			| clean up stack
+		bra	exexit			| done
+
+		.page
+
+| exdyn -- execute dynamics event
+| -----    ----------------------
+exdyn:		clr.w	d0			| get group number
+		move.b	E_DATA1(a0),d0		| ... in d0
+		add.w	d0,d0			| ... as a word offset
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	exexit			| done if not enabled
+
+		clr.w	d0			| get dynamics
+		move.b	E_DATA2(a0),d0		| ... in d0
+		clr.w	d1			| get group number
+		move.b	E_DATA1(a0),d1		| ... in d1
+		move.w	d0,-(a7)		| setdyn(group, dyn)
+		move.w	d1,-(a7)		| ...
+		jsr	_setdyn			| ...
+		adda.l	#4,a7			| clean up stack
+		bra	exexit			| done
+
+| exlocn -- execute location event
+| ------    ----------------------
+exlocn:		clr.w	d0			| get group number
+		move.b	E_DATA1(a0),d0		| ... in d0
+		add.w	d0,d0			| ... as a word offset
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	exexit			| done if not enabled
+
+		clr.w	d0			| get location
+		move.b	E_DATA2(a0),d0		| ... in d0
+		clr.w	d1			| get group number
+		move.b	E_DATA1(a0),d1		| ... in d1
+		move.w	d0,-(a7)		| setloc(group, loc)
+		move.w	d1,-(a7)		| ...
+		jsr	_setloc			| ...
+		adda.l	#4,a7			| clean up stack
+		bra	exexit			| done
+
+		.page
+
+| exanrs -- execute analog resolution event
+| ------    -------------------------------
+exanrs:		move.b	E_DATA1(a0),d0		| get group number
+		andi.w	#0x000F,d0		| ... in d0
+		add.w	d0,d0			| ... as a word offset
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	exexit			| done if not enabled
+
+		clr.w	d1			| get variable / group numbers
+		move.b	E_DATA1(a0),d1		| ...
+		add.w	d1,d1			| convert to word index
+		clr.w	d0			| get resolution
+		move.b	E_DATA2(a0),d0		| ... in d0
+		lea	_anrs,a1		| point at resolution table base
+		move.w	d0,0(a1,d1.W)		| save resolution in table
+		bra	exexit			| done
+
+| exanvl -- execute analog value event
+| ------    --------------------------
+exanvl:		move.b	E_DATA1(a0),d0		| get group number
+		andi.w	#0x000F,d0		| ... in d0
+		add.w	d0,d0			| ... as a word offset
+		lea	_grpstat,a1		| check grpstat[grp]
+		tst.w	0(a1,d0.W)		| ...
+		beq	exexit			| done if not enabled
+
+		move.w	E_DN(a0),-(a7)		| put value on stack
+		clr.w	d2			| get variable / group numbers
+		move.b	E_DATA1(a0),d2		| ... into d2
+		move.w	d2,d1			| extract group number
+		andi.w	#0x000F,d1		| ... into d1
+		lsr.w	#3,d2			| extract variable number
+		andi.w	#0x001E,d2		| ... as a word index in d2
+		lea	_var2src,a1		| point at variable map
+		move.w	0(a1,d2.W),-(a7)	| put source number on stack
+		move.w	d1,-(a7)		| put group number on stack
+		jsr	_setsv			| setsv(group, src, val)
+		adda.l	#6,a7			| clean up stack
+		bra	exexit			| done
+
+| exnext -- next score
+| ------    ----------
+exnext:		move.w	#1,_nxtflag		| set next score flag
+		bra	exexit			| done
+
+		.page
+
+| expnch -- execute punch in/out
+| ------    --------------------
+expnch:		tst.w	_recsw			| recording ?
+		beq	exexit			| ignore if not
+
+		tst.w	E_DATA1(a0)		| punch in ?
+		bne	expnch5			| jump if so
+
+| punch out
+
+		lea	_grpmode,a1		| setup for group modes
+		move.w	#11,d0			| ...
+
+expnch0:	cmpi.w	#2,(a1)			| in record mode ?
+		bne	expnch1			| jump if not
+
+		clr.w	(a1)			| set to play mode
+
+expnch1:	addq.l	#2,a1			| point at next entry
+		dbra	d0,expnch0		| loop through all groups
+
+		lea	_varmode,a1		| setup for variable modes
+		move.w	#5,d1			| set variable count
+
+expnch4:	clr.w	d0			| clear offset
+
+expnch2:	cmpi.w	#2,0(a1,d0.W)		| in record mode ?
+		bne	expnch3			| jump if not
+
+		clr.w	0(a1,d0.W)		| set to play mode
+
+expnch3:	addq.w	#2,d0			| update offset
+		cmpi.w	#24,d0			| check for final group
+		bne	expnch2			| loop through all groups
+
+		add.l	#32,a1			| point at next variable
+		dbra	d1,expnch4		| loop through all variables
+
 		bra	exexit
-*
-		.page
-*
-* punch in
-*
-expnch5:	lea	_grpmode,a1		* setup for group modes
-		move.w	#11,d0			* ...
-*
-expnch6:	cmpi.w	#1,(a1)			* in standby mode ?
-		bne	expnch7			* jump if not
-*
-		move.w	#2,(a1)			* set to record mode
-*
-expnch7:	addq.l	#2,a1			* point at next entry
-		dbra	d0,expnch6		* loop through all groups
-*
-		lea	_varmode,a1		* setup for variable modes
-		move.w	#5,d1			* set variable count
-*
-expnch10:	clr.w	d0			* clear offset
-*
-expnch8:	cmpi.w	#1,0(a1,d0.W)		* in standby mode ?
-		bne	expnch9			* jump if not
-*
-		move.w	#2,0(a1,d0.W)		* set to record mode
-*
-expnch9:	addq.w	#2,d0			* update offset
-		cmpi.w	#24,d0			* check for final group
-		bne	expnch8			* loop through all groups
-*
-		adda.l	#32,a1			* point at next variable
-		dbra	d1,expnch10		* loop through all variables
-*
+
+		.page
+
+| punch in
+
+expnch5:	lea	_grpmode,a1		| setup for group modes
+		move.w	#11,d0			| ...
+
+expnch6:	cmpi.w	#1,(a1)			| in standby mode ?
+		bne	expnch7			| jump if not
+
+		move.w	#2,(a1)			| set to record mode
+
+expnch7:	addq.l	#2,a1			| point at next entry
+		dbra	d0,expnch6		| loop through all groups
+
+		lea	_varmode,a1		| setup for variable modes
+		move.w	#5,d1			| set variable count
+
+expnch10:	clr.w	d0			| clear offset
+
+expnch8:	cmpi.w	#1,0(a1,d0.W)		| in standby mode ?
+		bne	expnch9			| jump if not
+
+		move.w	#2,0(a1,d0.W)		| set to record mode
+
+expnch9:	addq.w	#2,d0			| update offset
+		cmpi.w	#24,d0			| check for final group
+		bne	expnch8			| loop through all groups
+
+		adda.l	#32,a1			| point at next variable
+		dbra	d1,expnch10		| loop through all variables
+
 		bra	exexit
-*
-		.page
-*
-* sextab -- score execution dispatch table -- MUST match score.h definitions
-* ------    ----------------------------------------------------------------
-sextab:		dc.l	exexit		* 0	null
-		dc.l	exexit		* 1	score begin
-		dc.l	exsbgn		* 2	section begin
-		dc.l	exexit		* 3	section end
-		dc.l	exinst		* 4	instrument change
-		dc.l	exnbeg		* 5	note begin
-		dc.l	exnend		* 6	note end
-		dc.l	exstop		* 7	stop
-		dc.l	exintp		* 8	interpolate
-		dc.l	extmpo		* 9	tempo
-		dc.l	extune		* 10	tuning
-		dc.l	exexit		* 11	group status
-		dc.l	exlocn		* 12	location
-		dc.l	exdyn		* 13	dynamics
-		dc.l	exanvl		* 14	analog value
-		dc.l	exanrs		* 15	analog resolution
-		dc.l	exasgn		* 16	I/O assign
-		dc.l	extrns		* 17	transposition
-		dc.l	exexit		* 18	repeat
-		dc.l	expnch		* 19	punch in/out
-		dc.l	exexit		* 20	-unused- (polyphonic pressure)
-		dc.l	exexit		* 21	score end
-		dc.l	exexit		* 22	-unused- (channel pressure)
-		dc.l	exexit		* 23	bar marker
-		dc.l	exnext		* 24	next score
-*
+
+		.page
+
+| sextab -- score execution dispatch table -- MUST match score.h definitions
+| ------    ----------------------------------------------------------------
+sextab:		dc.l	exexit		| 0	null
+		dc.l	exexit		| 1	score begin
+		dc.l	exsbgn		| 2	section begin
+		dc.l	exexit		| 3	section end
+		dc.l	exinst		| 4	instrument change
+		dc.l	exnbeg		| 5	note begin
+		dc.l	exnend		| 6	note end
+		dc.l	exstop		| 7	stop
+		dc.l	exintp		| 8	interpolate
+		dc.l	extmpo		| 9	tempo
+		dc.l	extune		| 10	tuning
+		dc.l	exexit		| 11	group status
+		dc.l	exlocn		| 12	location
+		dc.l	exdyn		| 13	dynamics
+		dc.l	exanvl		| 14	analog value
+		dc.l	exanrs		| 15	analog resolution
+		dc.l	exasgn		| 16	I/O assign
+		dc.l	extrns		| 17	transposition
+		dc.l	exexit		| 18	repeat
+		dc.l	expnch		| 19	punch in/out
+		dc.l	exexit		| 20	-unused- (polyphonic pressure)
+		dc.l	exexit		| 21	score end
+		dc.l	exexit		| 22	-unused- (channel pressure)
+		dc.l	exexit		| 23	bar marker
+		dc.l	exnext		| 24	next score
+
 		.bss
-*
-* Variable storage areas
-* ----------------------
-* globals:
-* --------
-_xevent:	ds.l	1		* next event pointer
-*
+
+| Variable storage areas
+| ----------------------
+| globals:
+| --------
+_xevent:	ds.l	1		| next event pointer
+
 		.end
Index: ram/serintr.s
===================================================================
--- ram/serintr.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ ram/serintr.s	(revision 08e1da1cabca094217491629d328ae7146816782)
@@ -1,531 +1,531 @@
-* ------------------------------------------------------------------------------
-* serintr.s -- MIDAS-VII serial I/O subroutines
-* Version 4 -- 1988-12-13 -- D.N. Lynx Crowe
-*
-* These subroutines replace those in bios.s in order to add support for
-* MIDAS-VII foot pedal and pulse inputs, and pulse outputs.
-*
-* WARNING:  The code below uses addresses in the bios RAM area.  These addresses
-* correspond to those in PROMS dated 1988-06-20 et seq.  If the bios is changed,
-* the addresses marked with <== may have to be changed.
-* ------------------------------------------------------------------------------
-*
+| ------------------------------------------------------------------------------
+| serintr.s -- MIDAS-VII serial I/O subroutines
+| Version 4 -- 1988-12-13 -- D.N. Lynx Crowe
+
+| These subroutines replace those in bios.s in order to add support for
+| MIDAS-VII foot pedal and pulse inputs, and pulse outputs.
+
+| WARNING:  The code below uses addresses in the bios RAM area.  These addresses
+| correspond to those in PROMS dated 1988-06-20 et seq.  If the bios is changed,
+| the addresses marked with <== may have to be changed.
+| ------------------------------------------------------------------------------
+
 		.text
-*
+
 		.xdef	_setsio
-*
+
 		.xdef	_foot1
 		.xdef	_foot2
 		.xdef	_pulse1
 		.xdef	_pulse2
-*
+
 		.xdef	serintr
-*
+
 		.xdef	serint
 		.xdef	midint
-*
+
 		.xdef	wrapin
 		.xdef	wrapout
-*
+
 		.xdef	serput
 		.xdef	midput
-*
+
 		.xdef	rtschk
-*
+
 		.xdef	rtson
 		.xdef	rtsoff
-*
-* ==============================================================================
-*
-* The following addresses, marked by <==, are bios version dependent:
-*
-RAM		.equ	$00000400	* Beginning of system RAM area	<==
-*
-SR1IOREC	.equ	RAM+$0AB0	* Serial-1 iorec structure	<==
-SR2IOREC	.equ	RAM+$0AD8	* Serial-2 iorec structure	<==
-MC1IOREC	.equ	RAM+$0B00	* MIDI-1 iorec structure	<==
-MC2IOREC	.equ	RAM+$0B28	* MIDI-2 iorec structure	<==
-*
-* End of bios version dependent addresses.
-*
-* ==============================================================================
-*
-		.page
-*
-SERVECT		.equ	$000074		* Level 5 interrupt autovector address
-*
-IPL7		.equ	$0700		* IPL 7 value for sr
-*
-* ACIA I/O Addresses:
-* -------------------
-SR1ACIA		.equ	$3A8001		* Serial-1 ACIA base address
-SR2ACIA		.equ	$3A8009		* Serial-2 ACIA base address
-MC1ACIA		.equ	$3AC001		* MIDI-1 ACIA base address
-MC2ACIA		.equ	$3AC009		* MIDI-2 ACIA base address
-*
-* ACIA Register offsets:
-* ----------------------
-ACIA_IER	.equ	0		* ACIA IER offset
-ACIA_ISR	.equ	0		* ACIA ISR offset
-ACIA_CSR	.equ	2		* ACIA CSR offset
-ACIA_CFR	.equ	2		* ACIA CFR offset
-ACIA_TBR	.equ	4		* ACIA TBR offset
-ACIA_TDR	.equ	6		* ACIA TDR offset
-ACIA_RDR	.equ	6		* ACIA RDR offset
-*
-* iorec structure definitions:
-* ----------------------------
-IORECLN		.equ	40		* Length of an iorec structure
-*
-ibuf		.equ	0		* Input buffer base address
-ibufsize	.equ	4		* Input buffer size  (bytes)
-ibufhd		.equ	6		* Input buffer head index
-ibuftl		.equ	8		* Input buffer tail index
-ibuflow		.equ	10		* Input buffer low water mark
-ibufhi		.equ	12		* Input buffer high water mark
-obuf		.equ	14		* Output buffer base address
-obufsize	.equ	18		* Output buffer size  (bytes)
-obufhd		.equ	20		* Output buffer head index
-obuftl		.equ	22		* Output buffer tail index
-obuflow		.equ	24		* Output buffer low water mark
-obufhi		.equ	26		* Output buffer high water mark
-cfr0		.equ	28		* ACIA CFR, MS bit = 0
-cfr1		.equ	29		* ACIA CFR, MS bit = 1
-flagxon		.equ	30		* XON flag  (non-zero = XOFF sent)
-flagxoff	.equ	31		* XOFF flag  (non-zero = active)
-linedisc	.equ	32		* Line discipline flags
-erbyte		.equ	33		* Last error byte
-isr		.equ	34		* ACIA ISR on interrupt
-csr		.equ	35		* ACIA CSR on interrupt
-errct		.equ	36		* Error count  (FRM/OVR/BRK)
-ibfct		.equ	38		* Input buffer full count
-*
-		.page
-*
-* serintr -- Serial (Serial-1, Serial-2, MIDI-1, MIDI-2) interrupt handler
-* -------    -------------------------------------------------------------
-serintr:	movem.l	d0-d3/a0-a2,-(a7)	* Save registers
-		lea	SR1IOREC,a0		* Point at Serial-1 iorec
-		lea	SR1ACIA,a1		* Point at Serial-1 ACIA
-		movea.l	_foot1,a2		* Point at foot sw. 1 processor
-		bsr	serint			* Go process (possible) int.
-*
-		lea	SR2IOREC,a0		* Point at Serial-2 iorec
-		lea	SR2ACIA,a1		* Point at Serial-2 ACIA
-		movea.l	_foot2,a2		* Point at foot sw. 2 processor
-		bsr	serint			* Go process (possible) int.
-*
-		lea	MC1IOREC,a0		* Point at MIDI-1 iorec
-		lea	MC1ACIA,a1		* Point at MIDI-1 ACIA
-		movea.l	_pulse1,a2		* Point at pulse 1 processor
-		bsr	midint			* Go process (possible) int.
-*
-		lea	MC2IOREC,a0		* Point at MIDI-2 iorec
-		lea	MC2ACIA,a1		* Point at MIDI-2 ACIA
-		movea.l	_pulse2,a2		* Point at pulse 2 processor
-		bsr	midint			* Go process (possible) int.
-*
-		movem.l	(a7)+,d0-d3/a0-a2	* Restore registers
-		rte				* Return from exception
-*
-		.page
-*
-* serint -- Process an interrupt from Serial-1 or Serial-2
-* ------    ----------------------------------------------
-serint:		move.b	ACIA_ISR(a1),isr(a0)	* Get and save ISR
-		move.b	ACIA_CSR(a1),csr(a0)	* Get and save CSR
-*
-		btst.b	#7,isr(a0)		* Was int for this device ?
-		beq	serintx			* Jump if not
-*
-serchk:		btst.b	#1,isr(a0)		* FRM/OVR/BRK error ?
-		bne	sererr			* Jump if so
-*
-		btst.b	#0,isr(a0)		* Receiver interrupt ?
-		bne	serrx			* Jump if so
-*
-sertxq:		btst.b	#6,isr(a0)		* Transmitter interrupt ?
-		bne	sertx			* Jump if so
-*
-serctq:		btst.b	#5,isr(a0)		* CTS interrupt ?
-		bne	sercts			* Jump if so
-*
-serintx:	btst.b	#4,isr(a0)		* DCD interrupt ?
-		bne	calldcd			* Jump if so
-*
-serdone:	rts				* Return to caller
-*
-calldcd:	move.b	csr(a0),d0		* Get CSR interrupt status
-		btst.l	#4,d0			* Check DCD input  (0 = active)
-		bne	calldcd0		* Jump if line was inactive
-*
-		moveq.l	#1,d0			* Set footswitch status to TRUE
-		bra	calldcd1		* ...
-*
-calldcd0:	moveq.l	#0,d0			* Set footswitch status to FALSE
-*
-calldcd1:	move.w	d0,-(a7)		* Call the footswitch processor
-		jsr	(a2)			* ... (*footX)(status)
-		tst.w	(a7)+			* ...
-		rts				* Return to caller
-*
-		.page
-*
-* Handle serial I/O port error
-*
-sererr:		addq.w	#1,errct(a0)		* Update error count
-		move.b	ACIA_RDR(a1),erbyte(a0)	* Get error byte
-		rts				* Return to caller
-*
-*
-* Handle CTS interupt
-*
-sercts:		btst.b	#1,linedisc(a0)		* RTS/CTS mode ?
-		beq	serintx			* Ignore if not
-*
-		btst.b	#5,csr(a0)		* CTS set ?
-		beq	serintx			* Ignore if not
-*
-sercts1:	btst.b	#6,isr(a0)		* TDRE set ?
-		beq	sercts1			* Loop until it is  (!)
-*
-		move.w	obufhd(a0),d2		* Head index to d2
-		cmp.w	obuftl(a0),d2		* Compare to tail index
-		beq	serintx			* Done if buffer empty
-*
-		bsr	wrapout			* Adjust pointer for wraparound
-		move.l	obuf(a0),a2		* Get buffer base in a2
-		move.b	0(a2,d2),ACIA_TDR(a1)	* Send byte on its way
-		move.w	d2,obufhd(a0)		* Save updated head index
-		bra	serintx			* Done
-*
-		.page
-*
-* Handle receiver interrupt
-*
-serrx:		btst.b	#1,linedisc(a0)		* RTS/CTS mode set ?
-		beq	serrx1			* Jump if not
-*
-		bsr	rtsoff			* Turn off RTS
-*
-serrx1:		move.b	ACIA_RDR(a1),d0		* Read data from ACIA
-		btst.b	#1,linedisc(a0)		* RTS/CTS mode set ?
-		bne	serrx3			* Jump if so
-*
-		btst.b	#0,linedisc(a0)		* XON/XOFF mode set ?
-		beq	serrx3			* Jump if not
-*
-		cmpi.b	#$11,d0			* Is this an XON ?
-		bne	serrx2			* Jump if not
-*
-		move.b	#$00,flagxoff(a0)	* Clear flagxoff
-		bra	sertxq			* Done
-*
-serrx2:		cmpi.b	#$13,d0			* Is this an XOFF ?
-		bne	serrx3			* Jump if not
-*
-		move.b	#$FF,flagxoff(a0)	* Set flagxoff
-		bra	sertxq			* Done
-*
-serrx3:		move.w	ibuftl(a0),d1		* Get tail index in d1
-		bsr	wrapin			* Adjust for wraparound
-		cmp.w	ibufhd(a0),d1		* Head = tail ?
-		beq	seribf			* If so, we drop the character
-*
-		.page
-		move.l	ibuf(a0),a2		* Get buffer address
-		move.b	d0,0(a2,d1)		* Stash byte in buffer
-		move.w	d1,ibuftl(a0)		* Save updated tail index
-		move.w	ibuftl(a0),d2		* Tail index to d2
-		move.w	ibufhd(a0),d3		* Head index to d3
-		cmp.w	d3,d2			* Head > Tail ?
-		bhi	rsi_1			* Jump if not
-*
-		add.w	ibufsize(a0),d2		* Add buffer size to tail index
-*
-rsi_1:		sub.w	d3,d2			* Length = (adjusted)Tail - Head
-		cmp.w	ibufhi(a0),d2		* Hit high water mark ?
-		bne	serrx4			* Jump if not
-*
-		btst.b	#1,linedisc(a0)		* RTS/CTS mode set ?
-		bne	sertxq			* Done if so
-*
-		btst.b	#0,linedisc(a0)		* XON/XOFF mode set ?
-		beq	serrx4			* Jump if not
-*
-		tst.b	flagxon(a0)		* XOFF already sent ?
-		bne	serrx4			* Jump if so
-*
-		move.b	#$FF,flagxon(a0)	* Set the flag
-		move.b	#$13,d1			* Send an XOFF
-		bsr	serput			* ...
-*
-serrx4:		btst	#1,linedisc(a0)		* RTS/CTS mode set ?
-		beq	sertxq			* Done if not
-*
-		bsr	rtson			* Turn on RTS
-		bra	sertxq			* Done
-*
-		.page
-*
-* Handle transmitter interrupt
-*
-sertx:		btst.b	#1,linedisc(a0)		* RTS/CTS mode set ?
-		bne	sertx2			* If so, go check CTS
-*
-		btst.b	#0,linedisc(a0)		* XON/XOFF mode set ?
-		beq	sertx1			* Jump if not
-*
-		tst.b	flagxoff(a0)		* Check flagxoff
-		bne	serctq			* Done if set
-*
-sertx1:		move.w	obufhd(a0),d2		* Head index to d2
-		cmp.w	obuftl(a0),d2		* Compare to tail index
-		beq	serctq			* Done if buffer empty
-*
-		bsr	wrapout			* Adjust pointer for wraparound
-		move.l	obuf(a0),a2		* Get buffer base address
-		move.b	0(a2,d2),ACIA_TDR(a1)	* Send byte on its way
-		move.w	d2,obufhd(a0)		* Save updated head index
-		bra	serctq			* Done
-*
-sertx2:		btst.b	#5,csr(a0)		* CTS set in csr ?
-		beq	serctq			* If not, go check for CTS int
-*
-		bra	sertx1			* CTS was set, go transmit
-*
-seribf:		move.b	d0,erbyte(a0)		* Log dropped character
-		addq.w	#1,ibfct(a0)		* ...
-		bra	sertxq			* Go check Tx interrupt
-*
-		.page
-*
-* midint -- Process an interrupt from MIDI-1 or MIDI-2
-* ------    ------------------------------------------
-midint:		move.b	ACIA_ISR(a1),isr(a0)	* Get and save ISR
-		move.b	ACIA_CSR(a1),csr(a0)	* Get and save CSR
-*
-		btst.b	#7,isr(a0)		* Was int for this device ?
-		beq	midintx			* Jump if not
-*
-midchk:		btst.b	#1,isr(a0)		* FRM/OVR/BRK error ?
-		bne	miderr			* Jump if so
-*
-		btst.b	#0,isr(a0)		* Receiver interrupt ?
-		bne	midrx			* Jump if so
-*
-midtxq:		btst.b	#6,isr(a0)		* Transmitter interrupt ?
-		bne	midtx			* Jump if so
-*
-midintx:	btst	#4,isr(a0)		* DCD interrupt ?
-		bne	mididcd			* Jump if so
-*
-mididone:	rts				* Return to caller
-*
-mididcd:	jmp	(a2)			* Exit through the DCD processor
-*
-miderr:		addq.w	#1,errct(a0)		* Update error count
-		move.b	ACIA_RDR(a1),erbyte(a0)	* Get error byte
+
+| ==============================================================================
+
+| The following addresses, marked by <==, are bios version dependent:
+
+RAM		=	0x00000400	| Beginning of system RAM area	<==
+
+SR1IOREC	=	RAM+0x0AB0	| Serial-1 iorec structure	<==
+SR2IOREC	=	RAM+0x0AD8	| Serial-2 iorec structure	<==
+MC1IOREC	=	RAM+0x0B00	| MIDI-1 iorec structure	<==
+MC2IOREC	=	RAM+0x0B28	| MIDI-2 iorec structure	<==
+
+| End of bios version dependent addresses.
+
+| ==============================================================================
+
+		.page
+
+SERVECT		=	0x000074	| Level 5 interrupt autovector address
+
+IPL7		=	0x0700		| IPL 7 value for sr
+
+| ACIA I/O Addresses:
+| -------------------
+SR1ACIA		=	0x3A8001	| Serial-1 ACIA base address
+SR2ACIA		=	0x3A8009	| Serial-2 ACIA base address
+MC1ACIA		=	0x3AC001	| MIDI-1 ACIA base address
+MC2ACIA		=	0x3AC009	| MIDI-2 ACIA base address
+
+| ACIA Register offsets:
+| ----------------------
+ACIA_IER	=	0		| ACIA IER offset
+ACIA_ISR	=	0		| ACIA ISR offset
+ACIA_CSR	=	2		| ACIA CSR offset
+ACIA_CFR	=	2		| ACIA CFR offset
+ACIA_TBR	=	4		| ACIA TBR offset
+ACIA_TDR	=	6		| ACIA TDR offset
+ACIA_RDR	=	6		| ACIA RDR offset
+
+| iorec structure definitions:
+| ----------------------------
+IORECLN		=	40		| Length of an iorec structure
+
+ibuf		=	0		| Input buffer base address
+ibufsize	=	4		| Input buffer size  (bytes)
+ibufhd		=	6		| Input buffer head index
+ibuftl		=	8		| Input buffer tail index
+ibuflow		=	10		| Input buffer low water mark
+ibufhi		=	12		| Input buffer high water mark
+obuf		=	14		| Output buffer base address
+obufsize	=	18		| Output buffer size  (bytes)
+obufhd		=	20		| Output buffer head index
+obuftl		=	22		| Output buffer tail index
+obuflow		=	24		| Output buffer low water mark
+obufhi		=	26		| Output buffer high water mark
+cfr0		=	28		| ACIA CFR, MS bit = 0
+cfr1		=	29		| ACIA CFR, MS bit = 1
+flagxon		=	30		| XON flag  (non-zero = XOFF sent)
+flagxoff	=	31		| XOFF flag  (non-zero = active)
+linedisc	=	32		| Line discipline flags
+erbyte		=	33		| Last error byte
+isr		=	34		| ACIA ISR on interrupt
+csr		=	35		| ACIA CSR on interrupt
+errct		=	36		| Error count  (FRM/OVR/BRK)
+ibfct		=	38		| Input buffer full count
+
+		.page
+
+| serintr -- Serial (Serial-1, Serial-2, MIDI-1, MIDI-2) interrupt handler
+| -------    -------------------------------------------------------------
+serintr:	movem.l	d0-d3/a0-a2,-(a7)	| Save registers
+		lea	SR1IOREC,a0		| Point at Serial-1 iorec
+		lea	SR1ACIA,a1		| Point at Serial-1 ACIA
+		movea.l	_foot1,a2		| Point at foot sw. 1 processor
+		bsr	serint			| Go process (possible) int.
+
+		lea	SR2IOREC,a0		| Point at Serial-2 iorec
+		lea	SR2ACIA,a1		| Point at Serial-2 ACIA
+		movea.l	_foot2,a2		| Point at foot sw. 2 processor
+		bsr	serint			| Go process (possible) int.
+
+		lea	MC1IOREC,a0		| Point at MIDI-1 iorec
+		lea	MC1ACIA,a1		| Point at MIDI-1 ACIA
+		movea.l	_pulse1,a2		| Point at pulse 1 processor
+		bsr	midint			| Go process (possible) int.
+
+		lea	MC2IOREC,a0		| Point at MIDI-2 iorec
+		lea	MC2ACIA,a1		| Point at MIDI-2 ACIA
+		movea.l	_pulse2,a2		| Point at pulse 2 processor
+		bsr	midint			| Go process (possible) int.
+
+		movem.l	(a7)+,d0-d3/a0-a2	| Restore registers
+		rte				| Return from exception
+
+		.page
+
+| serint -- Process an interrupt from Serial-1 or Serial-2
+| ------    ----------------------------------------------
+serint:		move.b	ACIA_ISR(a1),isr(a0)	| Get and save ISR
+		move.b	ACIA_CSR(a1),csr(a0)	| Get and save CSR
+
+		btst.b	#7,isr(a0)		| Was int for this device ?
+		beq	serintx			| Jump if not
+
+serchk:		btst.b	#1,isr(a0)		| FRM/OVR/BRK error ?
+		bne	sererr			| Jump if so
+
+		btst.b	#0,isr(a0)		| Receiver interrupt ?
+		bne	serrx			| Jump if so
+
+sertxq:		btst.b	#6,isr(a0)		| Transmitter interrupt ?
+		bne	sertx			| Jump if so
+
+serctq:		btst.b	#5,isr(a0)		| CTS interrupt ?
+		bne	sercts			| Jump if so
+
+serintx:	btst.b	#4,isr(a0)		| DCD interrupt ?
+		bne	calldcd			| Jump if so
+
+serdone:	rts				| Return to caller
+
+calldcd:	move.b	csr(a0),d0		| Get CSR interrupt status
+		btst.l	#4,d0			| Check DCD input  (0 = active)
+		bne	calldcd0		| Jump if line was inactive
+
+		moveq.l	#1,d0			| Set footswitch status to TRUE
+		bra	calldcd1		| ...
+
+calldcd0:	moveq.l	#0,d0			| Set footswitch status to FALSE
+
+calldcd1:	move.w	d0,-(a7)		| Call the footswitch processor
+		jsr	(a2)			| ... (|footX)(status)
+		tst.w	(a7)+			| ...
+		rts				| Return to caller
+
+		.page
+
+| Handle serial I/O port error
+
+sererr:		addq.w	#1,errct(a0)		| Update error count
+		move.b	ACIA_RDR(a1),erbyte(a0)	| Get error byte
+		rts				| Return to caller
+
+
+| Handle CTS interupt
+
+sercts:		btst.b	#1,linedisc(a0)		| RTS/CTS mode ?
+		beq	serintx			| Ignore if not
+
+		btst.b	#5,csr(a0)		| CTS set ?
+		beq	serintx			| Ignore if not
+
+sercts1:	btst.b	#6,isr(a0)		| TDRE set ?
+		beq	sercts1			| Loop until it is  (!)
+
+		move.w	obufhd(a0),d2		| Head index to d2
+		cmp.w	obuftl(a0),d2		| Compare to tail index
+		beq	serintx			| Done if buffer empty
+
+		bsr	wrapout			| Adjust pointer for wraparound
+		move.l	obuf(a0),a2		| Get buffer base in a2
+		move.b	0(a2,d2),ACIA_TDR(a1)	| Send byte on its way
+		move.w	d2,obufhd(a0)		| Save updated head index
+		bra	serintx			| Done
+
+		.page
+
+| Handle receiver interrupt
+
+serrx:		btst.b	#1,linedisc(a0)		| RTS/CTS mode set ?
+		beq	serrx1			| Jump if not
+
+		bsr	rtsoff			| Turn off RTS
+
+serrx1:		move.b	ACIA_RDR(a1),d0		| Read data from ACIA
+		btst.b	#1,linedisc(a0)		| RTS/CTS mode set ?
+		bne	serrx3			| Jump if so
+
+		btst.b	#0,linedisc(a0)		| XON/XOFF mode set ?
+		beq	serrx3			| Jump if not
+
+		cmpi.b	#0x11,d0		| Is this an XON ?
+		bne	serrx2			| Jump if not
+
+		move.b	#0x00,flagxoff(a0)	| Clear flagxoff
+		bra	sertxq			| Done
+
+serrx2:		cmpi.b	#0x13,d0		| Is this an XOFF ?
+		bne	serrx3			| Jump if not
+
+		move.b	#0xFF,flagxoff(a0)	| Set flagxoff
+		bra	sertxq			| Done
+
+serrx3:		move.w	ibuftl(a0),d1		| Get tail index in d1
+		bsr	wrapin			| Adjust for wraparound
+		cmp.w	ibufhd(a0),d1		| Head = tail ?
+		beq	seribf			| If so, we drop the character
+
+		.page
+		move.l	ibuf(a0),a2		| Get buffer address
+		move.b	d0,0(a2,d1)		| Stash byte in buffer
+		move.w	d1,ibuftl(a0)		| Save updated tail index
+		move.w	ibuftl(a0),d2		| Tail index to d2
+		move.w	ibufhd(a0),d3		| Head index to d3
+		cmp.w	d3,d2			| Head > Tail ?
+		bhi	rsi_1			| Jump if not
+
+		add.w	ibufsize(a0),d2		| Add buffer size to tail index
+
+rsi_1:		sub.w	d3,d2			| Length = (adjusted)Tail - Head
+		cmp.w	ibufhi(a0),d2		| Hit high water mark ?
+		bne	serrx4			| Jump if not
+
+		btst.b	#1,linedisc(a0)		| RTS/CTS mode set ?
+		bne	sertxq			| Done if so
+
+		btst.b	#0,linedisc(a0)		| XON/XOFF mode set ?
+		beq	serrx4			| Jump if not
+
+		tst.b	flagxon(a0)		| XOFF already sent ?
+		bne	serrx4			| Jump if so
+
+		move.b	#0xFF,flagxon(a0)	| Set the flag
+		move.b	#0x13,d1		| Send an XOFF
+		bsr	serput			| ...
+
+serrx4:		btst	#1,linedisc(a0)		| RTS/CTS mode set ?
+		beq	sertxq			| Done if not
+
+		bsr	rtson			| Turn on RTS
+		bra	sertxq			| Done
+
+		.page
+
+| Handle transmitter interrupt
+
+sertx:		btst.b	#1,linedisc(a0)		| RTS/CTS mode set ?
+		bne	sertx2			| If so, go check CTS
+
+		btst.b	#0,linedisc(a0)		| XON/XOFF mode set ?
+		beq	sertx1			| Jump if not
+
+		tst.b	flagxoff(a0)		| Check flagxoff
+		bne	serctq			| Done if set
+
+sertx1:		move.w	obufhd(a0),d2		| Head index to d2
+		cmp.w	obuftl(a0),d2		| Compare to tail index
+		beq	serctq			| Done if buffer empty
+
+		bsr	wrapout			| Adjust pointer for wraparound
+		move.l	obuf(a0),a2		| Get buffer base address
+		move.b	0(a2,d2),ACIA_TDR(a1)	| Send byte on its way
+		move.w	d2,obufhd(a0)		| Save updated head index
+		bra	serctq			| Done
+
+sertx2:		btst.b	#5,csr(a0)		| CTS set in csr ?
+		beq	serctq			| If not, go check for CTS int
+
+		bra	sertx1			| CTS was set, go transmit
+
+seribf:		move.b	d0,erbyte(a0)		| Log dropped character
+		addq.w	#1,ibfct(a0)		| ...
+		bra	sertxq			| Go check Tx interrupt
+
+		.page
+
+| midint -- Process an interrupt from MIDI-1 or MIDI-2
+| ------    ------------------------------------------
+midint:		move.b	ACIA_ISR(a1),isr(a0)	| Get and save ISR
+		move.b	ACIA_CSR(a1),csr(a0)	| Get and save CSR
+
+		btst.b	#7,isr(a0)		| Was int for this device ?
+		beq	midintx			| Jump if not
+
+midchk:		btst.b	#1,isr(a0)		| FRM/OVR/BRK error ?
+		bne	miderr			| Jump if so
+
+		btst.b	#0,isr(a0)		| Receiver interrupt ?
+		bne	midrx			| Jump if so
+
+midtxq:		btst.b	#6,isr(a0)		| Transmitter interrupt ?
+		bne	midtx			| Jump if so
+
+midintx:	btst	#4,isr(a0)		| DCD interrupt ?
+		bne	mididcd			| Jump if so
+
+mididone:	rts				| Return to caller
+
+mididcd:	jmp	(a2)			| Exit through the DCD processor
+
+miderr:		addq.w	#1,errct(a0)		| Update error count
+		move.b	ACIA_RDR(a1),erbyte(a0)	| Get error byte
 		rts
-*
-* Handle receiver interrupt
-*
-midrx:		move.b	ACIA_RDR(a1),d0		* Read data from ACIA
-		move.w	ibuftl(a0),d1		* Get tail index in d1
-		bsr	wrapin			* Adjust for wraparound
-		cmp.w	ibufhd(a0),d1		* Head = tail ?
-		beq	midibf			* If so, we drop the character
-*
-		move.l	ibuf(a0),a2		* Get buffer address
-		move.b	d0,0(a2,d1)		* Stash byte in buffer
-		move.w	d1,ibuftl(a0)		* Save updated tail index
-		bra	midtxq			* Done  (go check tx int)
-*
-		.page
-*
-* Handle transmitter interrupt
-*
-midtx:		move.w	obufhd(a0),d2		* Head index to d2
-		cmp.w	obuftl(a0),d2		* Compare to tail index
-		beq	midintx			* Done if buffer empty
-*
-		bsr	wrapout			* Adjust pointer for wraparound
-		move.l	obuf(a0),a2		* Get buffer base address
-		move.b	0(a2,d2),ACIA_TDR(a1)	* Send byte on its way
-		move.w	d2,obufhd(a0)		* Save updated head index
-		bra	midintx			* Done
-*
-midibf:		move.b	d0,erbyte(a0)		* Log dropped character
-		addq.w	#1,ibfct(a0)		* ...
-		bra	midtxq			* Go check Tx interrupt
-*
-		.page
-*
-* serput -- Output a character to a serial port
-* ------    -----------------------------------
-serput:		move.w	sr,-(a7)		* Save status register
-		ori.w	#IPL7,sr		* DISABLE INTERRUPTS
-		move.b	ACIA_ISR(a1),isr(a0)	* Get ACIA isr
-		move.b	ACIA_CSR(a1),csr(a0)	* Get ACIA csr
-		btst	#0,linedisc(a0)		* XON/XOFF mode ?
-		beq	serpt_1			* Jump if not
-*
-		tst.b	flagxoff(a0)		* XON active ?
-		bne	serpt_2			* Jump if so
-*
-serpt_1:	btst.b	#6,isr(a0)		* Is ACIA still sending ?
-		beq	serpt_2			* Jump if so
-*
-		move.w	obufhd(a0),d2		* Head index to d2
-		cmp.w	obuftl(a0),d2		* Compare to tail index
-		bne	serpt_2			* Jump if buffer not empty
-*
-		move.b	d1,ACIA_TDR(a1)		* Give byte to ACIA to send
-		bra	serpt_3			* Go deal with RTS/CTS if needed
-*
-serpt_2:	move.w	obuftl(a0),d2		* Tail index to d2
-		bsr	wrapout			* Adjust for wraparound
-		cmp.w	obufhd(a0),d2		* Compare to head index
-		beq	serpt_4			* Jump if buffer full
-*
-		move.l	obuf(a0),a2		* Get buffer base address in a2
-		move.b	d1,0(a2,d2)		* Put character in buffer
-		move.w	d2,obuftl(a0)		* Update buffer tail index
-*
-serpt_3:	bsr	serchk			* Check status on our way out
-		bsr	rtschk			* Handle RTS protocol
-		move.w	(a7)+,sr		* RESTORE INTERRUPTS
-		andi	#$FFFE,sr		* Clear carry flag = OK
-		rts				* Return to caller
-*
-serpt_4:	bsr	serchk			* Check status on our way out
-		bsr	rtschk			* Handle RTS protocol
-		move.w	(a7)+,sr		* RESTORE INTERRUPTS
-		ori	#$0001,sr		* Set carry flag = buffer full
-		rts				* Return to caller
-*
-		.page
-*
-* midput -- Output to MIDI
-* ------    --------------
-midput:		move.w	sr,-(a7)		* Save status register
-		ori.w	#IPL7,sr		* DISABLE INTERRUPTS
-		move.b	ACIA_ISR(a1),isr(a0)	* Get ACIA isr
-		move.b	ACIA_CSR(a1),csr(a0)	* Get ACIA csr
-		btst.b	#6,isr(a0)		* Is ACIA still sending ?
-		beq	midpt_2			* Jump if so
-*
-		move.w	obufhd(a0),d2		* Head index to d2
-		cmp.w	obuftl(a0),d2		* Compare to tail index
-		bne	midpt_2			* Jump if buffer not empty
-*
-		move.b	d1,ACIA_TDR(a1)		* Give byte to ACIA to send
-		bra	midpt_3			* Go set final status and exit
-*
-midpt_2:	move.w	obuftl(a0),d2		* Tail index to d2
-		bsr	wrapout			* Adjust for wraparound
-		cmp.w	obufhd(a0),d2		* Compare to head index
-		beq	midpt_4			* Jump if buffer full
-*
-		move.l	obuf(a0),a2		* Get buffer base address in a2
-		move.b	d1,0(a2,d2)		* Put character in buffer
-		move.w	d2,obuftl(a0)		* Update buffer tail index
-*
-midpt_3:	bsr	midchk			* Check status on our way out
-		move.w	(a7)+,sr		* RESTORE INTERRUPTS
-		andi	#$FFFE,sr		* Clear carry flag = OK
-		rts				* Return to caller
-*
-midpt_4:	bsr	midchk			* Check status on our way out
-		move.w	(a7)+,sr		* RESTORE INTERRUPTS
-		ori	#$0001,sr		* Set carry flag = buffer full
-		rts				* Return to caller
-*
-		.page
-*
-* rtschk -- Check RTS mode and turn on RTS if it's enabled
-* ------    ----------------------------------------------
-rtschk:		btst	#1,linedisc(a0)		* RTS/CTS mode set ?
-		beq	rtsexit			* Jump to exit if not
-*
-* rtson -- Turn on RTS line
-* -----    ----------------
-rtson:		move.b	cfr1(a0),d0		* Pick up CFR1 image
-		bclr	#0,d0			* Turn on RTS line  (0 = on)
-		bra	rtscmn			* Join common RTS code below
-*
-* rtsoff -- Turn off RTS line
-* ------    -----------------
-rtsoff:		move.b	cfr1(a0),d0		* Pick up CFR1 image
-		bset	#0,d0			* Turn off RTS line  (1 = off)
-
-rtscmn:		bset	#7,d0			* Make sure MS bit is set
-		move.b	d0,cfr1(a0)		* Update CFR1 image
-		move.b	d0,ACIA_CFR(a1)		* Send CFR to hardware
-*
-rtsexit:	rts				* Return to caller
-*
-		.page
-*
-* wrapin -- Check input pointer for wraparound
-* ------    ----------------------------------
-wrapin:		add.w	#1,d1			* Head index +1
-		cmp.w	ibufsize(a0),d1		* = buffer size ?
-		bcs	wrapin1			* Jump if not
-*
-		moveq.l	#0,d1			* Wraparound
-*
-wrapin1:	rts				* Return to caller
-*
-* wrapout -- Check output pointer for wraparound
-* -------    -----------------------------------
-wrapout:	addq.w	#1,d2			* Tail index +1
-		cmp.w	obufsize(a0),d2		* = buffer size ?
-		bcs	wrapout1		* Jump if not
-*
-		moveq.l	#0,d2			* Wrap around if so
-*
-wrapout1:	rts				* Return to caller
-*
-		.page
-*
-* _setsio -- setsio() -- initialize serial I/O vectors and DCD interrupts
-* -------    ------------------------------------------------------------
-_setsio:	move.w	sr,-(a7)		* Preserve status register
-		ori.w	#$IPL7,sr		* DISABLE INTERRUPTS
-*
-		lea	nulsiox,a0		* Get null return address
-		move.l	a0,_foot1		* Initialize foot1 vector
-		move.l	a0,_foot2		* Initialize foot2 vector
-		move.l	a0,_pulse1		* Initialize pulse1 vector
-		move.l	a0,_pulse2		* Initialize pulse2 vector
-*
-		lea	SR1ACIA,a1		* Point at Serial-1 ACIA
-		move.b	#$90,ACIA_IER(a1)	* Enable DCD interrupts
-*
-		lea	SR2ACIA,a1		* Point at Serial-2 ACIA
-		move.b	#$90,ACIA_IER(a1)	* Enable DCD interrupts
-*
-		lea	MC1ACIA,a1		* Point at MIDI-1 ACIA
-		move.b	#$90,ACIA_IER(a1)	* Enable DCD interrupts
-*
-		lea	MC2ACIA,a1		* Point at MIDI-2 ACIA
-		move.b	#$90,ACIA_IER(a1)	* Enable DCD interrupts
-*
-		lea	serintr,a0		* Initialize interrupt vector
-		move.l	a0,SERVECT		* ... in processor RAM
-*
-		move.w	(a7)+,sr		* RESTORE INTERRUPTS
-*
-nulsiox:	rts				* Return to caller
-*
+
+| Handle receiver interrupt
+
+midrx:		move.b	ACIA_RDR(a1),d0		| Read data from ACIA
+		move.w	ibuftl(a0),d1		| Get tail index in d1
+		bsr	wrapin			| Adjust for wraparound
+		cmp.w	ibufhd(a0),d1		| Head = tail ?
+		beq	midibf			| If so, we drop the character
+
+		move.l	ibuf(a0),a2		| Get buffer address
+		move.b	d0,0(a2,d1)		| Stash byte in buffer
+		move.w	d1,ibuftl(a0)		| Save updated tail index
+		bra	midtxq			| Done  (go check tx int)
+
+		.page
+
+| Handle transmitter interrupt
+
+midtx:		move.w	obufhd(a0),d2		| Head index to d2
+		cmp.w	obuftl(a0),d2		| Compare to tail index
+		beq	midintx			| Done if buffer empty
+
+		bsr	wrapout			| Adjust pointer for wraparound
+		move.l	obuf(a0),a2		| Get buffer base address
+		move.b	0(a2,d2),ACIA_TDR(a1)	| Send byte on its way
+		move.w	d2,obufhd(a0)		| Save updated head index
+		bra	midintx			| Done
+
+midibf:		move.b	d0,erbyte(a0)		| Log dropped character
+		addq.w	#1,ibfct(a0)		| ...
+		bra	midtxq			| Go check Tx interrupt
+
+		.page
+
+| serput -- Output a character to a serial port
+| ------    -----------------------------------
+serput:		move.w	sr,-(a7)		| Save status register
+		ori.w	#IPL7,sr		| DISABLE INTERRUPTS
+		move.b	ACIA_ISR(a1),isr(a0)	| Get ACIA isr
+		move.b	ACIA_CSR(a1),csr(a0)	| Get ACIA csr
+		btst	#0,linedisc(a0)		| XON/XOFF mode ?
+		beq	serpt_1			| Jump if not
+
+		tst.b	flagxoff(a0)		| XON active ?
+		bne	serpt_2			| Jump if so
+
+serpt_1:	btst.b	#6,isr(a0)		| Is ACIA still sending ?
+		beq	serpt_2			| Jump if so
+
+		move.w	obufhd(a0),d2		| Head index to d2
+		cmp.w	obuftl(a0),d2		| Compare to tail index
+		bne	serpt_2			| Jump if buffer not empty
+
+		move.b	d1,ACIA_TDR(a1)		| Give byte to ACIA to send
+		bra	serpt_3			| Go deal with RTS/CTS if needed
+
+serpt_2:	move.w	obuftl(a0),d2		| Tail index to d2
+		bsr	wrapout			| Adjust for wraparound
+		cmp.w	obufhd(a0),d2		| Compare to head index
+		beq	serpt_4			| Jump if buffer full
+
+		move.l	obuf(a0),a2		| Get buffer base address in a2
+		move.b	d1,0(a2,d2)		| Put character in buffer
+		move.w	d2,obuftl(a0)		| Update buffer tail index
+
+serpt_3:	bsr	serchk			| Check status on our way out
+		bsr	rtschk			| Handle RTS protocol
+		move.w	(a7)+,sr		| RESTORE INTERRUPTS
+		andi	#0xFFFE,sr		| Clear carry flag = OK
+		rts				| Return to caller
+
+serpt_4:	bsr	serchk			| Check status on our way out
+		bsr	rtschk			| Handle RTS protocol
+		move.w	(a7)+,sr		| RESTORE INTERRUPTS
+		ori	#0x0001,sr		| Set carry flag = buffer full
+		rts				| Return to caller
+
+		.page
+
+| midput -- Output to MIDI
+| ------    --------------
+midput:		move.w	sr,-(a7)		| Save status register
+		ori.w	#IPL7,sr		| DISABLE INTERRUPTS
+		move.b	ACIA_ISR(a1),isr(a0)	| Get ACIA isr
+		move.b	ACIA_CSR(a1),csr(a0)	| Get ACIA csr
+		btst.b	#6,isr(a0)		| Is ACIA still sending ?
+		beq	midpt_2			| Jump if so
+
+		move.w	obufhd(a0),d2		| Head index to d2
+		cmp.w	obuftl(a0),d2		| Compare to tail index
+		bne	midpt_2			| Jump if buffer not empty
+
+		move.b	d1,ACIA_TDR(a1)		| Give byte to ACIA to send
+		bra	midpt_3			| Go set final status and exit
+
+midpt_2:	move.w	obuftl(a0),d2		| Tail index to d2
+		bsr	wrapout			| Adjust for wraparound
+		cmp.w	obufhd(a0),d2		| Compare to head index
+		beq	midpt_4			| Jump if buffer full
+
+		move.l	obuf(a0),a2		| Get buffer base address in a2
+		move.b	d1,0(a2,d2)		| Put character in buffer
+		move.w	d2,obuftl(a0)		| Update buffer tail index
+
+midpt_3:	bsr	midchk			| Check status on our way out
+		move.w	(a7)+,sr		| RESTORE INTERRUPTS
+		andi	#0xFFFE,sr		| Clear carry flag = OK
+		rts				| Return to caller
+
+midpt_4:	bsr	midchk			| Check status on our way out
+		move.w	(a7)+,sr		| RESTORE INTERRUPTS
+		ori	#0x0001,sr		| Set carry flag = buffer full
+		rts				| Return to caller
+
+		.page
+
+| rtschk -- Check RTS mode and turn on RTS if it's enabled
+| ------    ----------------------------------------------
+rtschk:		btst	#1,linedisc(a0)		| RTS/CTS mode set ?
+		beq	rtsexit			| Jump to exit if not
+
+| rtson -- Turn on RTS line
+| -----    ----------------
+rtson:		move.b	cfr1(a0),d0		| Pick up CFR1 image
+		bclr	#0,d0			| Turn on RTS line  (0 = on)
+		bra	rtscmn			| Join common RTS code below
+
+| rtsoff -- Turn off RTS line
+| ------    -----------------
+rtsoff:		move.b	cfr1(a0),d0		| Pick up CFR1 image
+		bset	#0,d0			| Turn off RTS line  (1 = off)
+
+rtscmn:		bset	#7,d0			| Make sure MS bit is set
+		move.b	d0,cfr1(a0)		| Update CFR1 image
+		move.b	d0,ACIA_CFR(a1)		| Send CFR to hardware
+
+rtsexit:	rts				| Return to caller
+
+		.page
+
+| wrapin -- Check input pointer for wraparound
+| ------    ----------------------------------
+wrapin:		add.w	#1,d1			| Head index +1
+		cmp.w	ibufsize(a0),d1		| = buffer size ?
+		bcs	wrapin1			| Jump if not
+
+		moveq.l	#0,d1			| Wraparound
+
+wrapin1:	rts				| Return to caller
+
+| wrapout -- Check output pointer for wraparound
+| -------    -----------------------------------
+wrapout:	addq.w	#1,d2			| Tail index +1
+		cmp.w	obufsize(a0),d2		| = buffer size ?
+		bcs	wrapout1		| Jump if not
+
+		moveq.l	#0,d2			| Wrap around if so
+
+wrapout1:	rts				| Return to caller
+
+		.page
+
+| _setsio -- setsio() -- initialize serial I/O vectors and DCD interrupts
+| -------    ------------------------------------------------------------
+_setsio:	move.w	sr,-(a7)		| Preserve status register
+		ori.w	#IPL7,sr		| DISABLE INTERRUPTS
+
+		lea	nulsiox,a0		| Get null return address
+		move.l	a0,_foot1		| Initialize foot1 vector
+		move.l	a0,_foot2		| Initialize foot2 vector
+		move.l	a0,_pulse1		| Initialize pulse1 vector
+		move.l	a0,_pulse2		| Initialize pulse2 vector
+
+		lea	SR1ACIA,a1		| Point at Serial-1 ACIA
+		move.b	#0x90,ACIA_IER(a1)	| Enable DCD interrupts
+
+		lea	SR2ACIA,a1		| Point at Serial-2 ACIA
+		move.b	#0x90,ACIA_IER(a1)	| Enable DCD interrupts
+
+		lea	MC1ACIA,a1		| Point at MIDI-1 ACIA
+		move.b	#0x90,ACIA_IER(a1)	| Enable DCD interrupts
+
+		lea	MC2ACIA,a1		| Point at MIDI-2 ACIA
+		move.b	#0x90,ACIA_IER(a1)	| Enable DCD interrupts
+
+		lea	serintr,a0		| Initialize interrupt vector
+		move.l	a0,SERVECT		| ... in processor RAM
+
+		move.w	(a7)+,sr		| RESTORE INTERRUPTS
+
+nulsiox:	rts				| Return to caller
+
 		.bss
-*
-* DCD interrupt processor vectors
-* -------------------------------
-_foot1:		.ds.l	1			* short (*foot1)();
-_foot2:		.ds.l	1			* short (*foot2)();
-_pulse1:	.ds.l	1			* short (*pulse1)();
-_pulse2:	.ds.l	1			* short (*pulse2)();
-*
+
+| DCD interrupt processor vectors
+| -------------------------------
+_foot1:		.ds.l	1			| short (|foot1)();
+_foot2:		.ds.l	1			| short (|foot2)();
+_pulse1:	.ds.l	1			| short (|pulse1)();
+_pulse2:	.ds.l	1			| short (|pulse2)();
+
 		.end
Index: ram/sreset.s
===================================================================
--- ram/sreset.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ ram/sreset.s	(revision 08e1da1cabca094217491629d328ae7146816782)
@@ -1,986 +1,986 @@
-* ------------------------------------------------------------------------------
-* sreset.s -- reset score highlighting
-* Version 14 -- 1988-07-28 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| sreset.s -- reset score highlighting
+| Version 14 -- 1988-07-28 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
 		.text
-*
-		.xdef	_sreset		* sreset()
-*
-		.xref	_vputa		* vputa(sbase, row, col, attrib)
-*
-		.xref	_ndisp		* WORD - display number
-		.xref	_obj8		* LONG - object base address
-		.xref	_vrbw08		* WORD - detail word for bit 8
-		.xref	_vrbw09		* WORD - detail word for bit 9
-		.xref	_vrbw10		* WORD - detail word for bit 10
-		.xref	_vrbw11		* WORD - detail word for bit 11
-		.xref	_vrbw12		* WORD - detail word for bit 12
-		.xref	_vrbw13		* WORD - detail word for bit 13
-		.xref	_vrbw14		* WORD - detail word for bit 14
-		.xref	_vrbw15		* WORD - detail word for bit 15
-		.xref	_vrcw		* WORD - video reset control word
-*
-ROW		.equ	4
-COL		.equ	6
-ATR		.equ	8
-*
-AT01		.equ	$0014
-AT04		.equ	$0013
-AT05		.equ	$0014
-AT06		.equ	$0013
-AT07		.equ	$0014
-AT08		.equ	$0013
-AT09		.equ	$0014
-AT10		.equ	$0013
-AT11		.equ	$0012
-AT12		.equ	$0012
-*
-		.page
-*
-* sreset() -- reset highlighting
-* --------    ------------------
-_sreset:	link	a6,#0		* link stack frame
-		cmp.w	#2,_ndisp	* see if we should update display
-		bne	srsexit		* jump if not
-*
-		move.w	_vrcw,d0	* get and check vrcw
-		bne	srs0		* jump if something to do
-*
-srsexit:	unlk	a6		* unlink stack frame
-		rts			* return to caller
-*
-srs0:		move.w	sr,d1		* <<<<< disable interrupts >>>>>
-		ori.w	#$0700,sr	* ...
-*
-		move.w	_vrcw,vrcw	* make local copies of control variables
-		clr.w	_vrcw		* ... and clear them for the next pass
-		move.w	_vrbw08,vrbw08	* ...
-		clr.w	_vrbw08		* ...
-		move.w	_vrbw09,vrbw09	* ...
-		clr.w	_vrbw09		* ...
-		move.w	_vrbw10,vrbw10	* ...
-		clr.w	_vrbw10		* ...
-		move.w	_vrbw11,vrbw11	* ...
-		clr.w	_vrbw11		* ...
-		move.w	_vrbw12,vrbw12	* ...
-		clr.w	_vrbw12		* ...
-		move.w	_vrbw13,vrbw13	* ...
-		clr.w	_vrbw13		* ...
-		move.w	_vrbw14,vrbw14	* ...
-		clr.w	_vrbw14		* ...
-		move.w	_vrbw15,vrbw15	* ...
-		clr.w	_vrbw15		* ...
-*
-		move.w	d1,sr		* <<<<< restore interrupts >>>>>
-*
-* Setup STACK for subsequent calls to vputa(sbase, row, col, atr):
-*
-*	0(a7)	sbase
-*
-*	4(a7)	row	ROW
-*	6(a7)	col	COL
-*	8(a7)	atr	ATR
-*
-		clr.w	-(a7)		* put dummy attribute on stack
-		clr.w	-(a7)		* put dummy column on stack
-		clr.w	-(a7)		* put dummy row on stack
-		move.l	_obj8,-(a7)	* put sbase on stack
-*
-		.page
-*
-* assignment
-* ----------
-		btst	#0,d0		* assignment ?
-		beq	srs1		* jump if not
-*
-		move.w	#AT04,ATR(a7)	* put attribute on stack
-		move.w	#1,ROW(a7)	* put row on stack
-		move.w	#11,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#12,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	vrcw,d0		* restore vrcw to d0
-*
-* tuning
-* ------
-srs1:		btst	#1,d0		* tuning ?
-		beq	srs2		* jump if not
-*
-		move.w	#AT05,ATR(a7)	* put attribute on stack
-		move.w	#1,ROW(a7)	* put row on stack
-		move.w	#19,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-		move.w	vrcw,d0		* restore vrcw to d0
-*
-* tempo
-* -----
-srs2:		btst	#2,d0		* tempo ?
-		beq	srs3		* jump if not
-*
-		move.w	#AT06,ATR(a7)	* put attribute on stack
-		move.w	#1,ROW(a7)	* put row on stack
-		move.w	#27,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#28,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#29,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	vrcw,d0		* restore vrcw to d0
-*
-		.page
-*
-* interpolate
-* -----------
-srs3:		btst	#3,d0		* interpolate ?
-		beq	srs4		* jump if not
-*
-		move.w	#AT07,ATR(a7)	* put attribute on stack
-		move.w	#1,ROW(a7)	* put row on stack
-		move.w	#35,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#36,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#37,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#38,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-		move.w	vrcw,d0		* restore vrcw to d0
-*
-* section begin
-* -------------
-srs4:		btst	#4,d0		* section begin ?
-		beq	srs5		* jump if not
-*
-		move.w	#AT01,ATR(a7)	* put attribute on stack
-		move.w	#0,ROW(a7)	* put row on stack
-		move.w	#6,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#7,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-*
-		.page
-*
-* punch in
-* --------
-srs5:		btst	#5,d0		* punch in ?
-		beq	srs6		* jump if not
-*
-		move.w	#AT09,ATR(a7)	* put attribute on stack
-		move.w	#1,ROW(a7)	* put row on stack
-		move.w	#50,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#51,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	vrcw,d0		* restore vrcw to d0
-*
-* punch out
-* ---------
-srs6:		btst	#6,d0		* punch out ?
-		beq	srs7		* jump if not
-*
-		move.w	#AT09,ATR(a7)	* put attribute on stack
-		move.w	#1,ROW(a7)	* put row on stack
-		move.w	#53,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#54,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#55,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	vrcw,d0		* restore vrcw to d0
-*
-* Output
-* ------
-srs7:		btst	#7,d0		* output ?
-		beq	srs8		* jump if not
-*
-		move.w	#AT10,ATR(a7)	* put attribute on stack
-		move.w	#1,ROW(a7)	* put row on stack
-		move.w	#57,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#58,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#59,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#60,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-		move.w	#61,COL(a7)	* put 5th column on stack
-		jsr	_vputa		* reset fifth column
-		move.w	#62,COL(a7)	* put 6th column on stack
-		jsr	_vputa		* reset sixth column
-		move.w	vrcw,d0		* restore vrcw to d0
-*
-		.page
-*
-* instrument
-* ----------
-srs8:		btst	#8,d0		* instrument ?
-		beq	srs9		* jump if not
-*
-		move.w	#2,ROW(a7)	* put row on stack
-		move.w	#AT11,ATR(a7)	* put attribute on stack
-		btst	#0,vrbw08+1	* group 1 ?
-		beq	srs8a		* jump if not
-*
-		move.w	#7,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#8,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-*
-srs8a:		btst	#1,vrbw08+1	* group 2 ?
-		beq	srs8b		* jump if not
-*
-		move.w	#12,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first character
-		move.w	#13,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second character
-*
-srs8b:		btst	#2,vrbw08+1	* group 3 ?
-		beq	srs8c		* jump if not
-*
-		move.w	#17,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first character
-		move.w	#18,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second character
-*
-srs8c:		btst	#3,vrbw08+1	* group 4 ?
-		beq	srs8d		* jump if not
-*
-		move.w	#22,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first character
-		move.w	#23,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second character
-*
-		.page
-*
-srs8d:		btst	#4,vrbw08+1	* group 5 ?
-		beq	srs8e		* jump if not
-*
-		move.w	#27,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first character
-		move.w	#28,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second character
-*
-srs8e:		btst	#5,vrbw08+1	* group 6 ?
-		beq	srs8f		* jump if not
-*
-		move.w	#32,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first character
-		move.w	#33,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second character
-*
-srs8f:		btst	#6,vrbw08+1	* group 7 ?
-		beq	srs8g		* jump if not
-*
-		move.w	#37,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first character
-		move.w	#38,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second character
-*
-srs8g:		btst	#7,vrbw08+1	* group 8 ?
-		beq	srs8h		* jump if not
-*
-		move.w	#42,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first character
-		move.w	#43,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second character
-*
-		.page
-*
-srs8h:		btst	#0,vrbw08	* group 9
-		beq	srs8j		* jump if not
-*
-		move.w	#47,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first character
-		move.w	#48,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second character
-*
-srs8j:		btst	#1,vrbw08	* group 10
-		beq	srs8k		* jump if not
-*
-		move.w	#52,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first character
-		move.w	#53,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second character
-*
-srs8k:		btst	#2,vrbw08	* group 11
-		beq	srs8m		* jump if not
-*
-		move.w	#57,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first character
-		move.w	#58,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second character
-*
-srs8m:		btst	#3,vrbw08	* group 12
-		beq	srs8x		* jump if not
-*
-		move.w	#62,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first character
-		move.w	#63,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second character
-*
-srs8x:		move.w	vrcw,d0		* restore vrcw to d0
-*
-		.page
-*
-* transpose
-* ---------
-srs9:		btst	#9,d0		* transpose ?
-		beq	srs10		* jump if not
-*
-		move.w	#AT11,ATR(a7)	* put attribute on stack
-		move.w	#3,ROW(a7)	* put row on stack
-		btst	#0,vrbw09+1	* group 1 ?
-		beq	srs9a		* jump if not
-*
-		move.w	#5,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#6,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#7,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#8,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-srs9a:		btst	#1,vrbw09+1	* group 2 ?
-		beq	srs9b		* jump if not
-*
-		move.w	#10,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#11,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#12,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#13,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-srs9b:		btst	#2,vrbw09+1	* group 3 ?
-		beq	srs9c		* jump if not
-*
-		move.w	#15,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#16,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#17,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#18,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-		.page
-*
-srs9c:		btst	#3,vrbw09+1	* group 4 ?
-		beq	srs9d		* jump if not
-*
-		move.w	#20,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#21,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#22,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#23,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-srs9d:		btst	#4,vrbw09+1	* group 5 ?
-		beq	srs9e		* jump if not
-*
-		move.w	#25,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#26,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#27,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#28,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-srs9e:		btst	#5,vrbw09+1	* group 6 ?
-		beq	srs9f		* jump if not
-*
-		move.w	#30,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#31,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#32,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#33,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-		.page
-*
-srs9f:		btst	#6,vrbw09+1	* group 7 ?
-		beq	srs9g		* jump if not
-*
-		move.w	#35,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#36,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#37,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#38,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-srs9g:		btst	#7,vrbw09+1	* group 8 ?
-		beq	srs9h		* jump if not
-*
-		move.w	#40,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#41,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#42,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#43,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-srs9h:		btst	#0,vrbw09	* group 9
-		beq	srs9j		* jump if not
-*
-		move.w	#45,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#46,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#47,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#48,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-		.page
-*
-srs9j:		btst	#1,vrbw09	* group 10
-		beq	srs9k		* jump if not
-*
-		move.w	#50,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#51,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#52,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#53,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-srs9k:		btst	#2,vrbw09	* group 11
-		beq	srs9m		* jump if not
-*
-		move.w	#55,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#56,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#57,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#58,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-srs9m:		btst	#3,vrbw09	* group 12
-		beq	srs9x		* jump if not
-*
-		move.w	#60,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#61,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#62,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#63,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-srs9x:		move.w	vrcw,d0		* restore vrcw to d0
-*
-		.page
-*
-* dynamics
-* --------
-srs10:		btst	#10,d0		* dynamics ?
-		beq	srs11		* jump if not
-*
-		move.w	#AT11,ATR(a7)	* put attribute on stack
-		move.w	#4,ROW(a7)	* put row on stack
-		btst	#0,vrbw10+1	* group 1 ?
-		beq	srs10a		* jump if not
-*
-		move.w	#6,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs10a:		btst	#1,vrbw10+1	* group 2 ?
-		beq	srs10b		* jump if not
-*
-		move.w	#11,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs10b:		btst	#2,vrbw10+1	* group 3 ?
-		beq	srs10c		* jump if not
-*
-		move.w	#16,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs10c:		btst	#3,vrbw10+1	* group 4 ?
-		beq	srs10d		* jump if not
-*
-		move.w	#21,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-		.page
-*
-srs10d:		btst	#4,vrbw10+1	* group 5 ?
-		beq	srs10e		* jump if not
-*
-		move.w	#26,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs10e:		btst	#5,vrbw10+1	* group 6 ?
-		beq	srs10f		* jump if not
-*
-		move.w	#31,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs10f:		btst	#6,vrbw10+1	* group 7 ?
-		beq	srs10g		* jump if not
-*
-		move.w	#36,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs10g:		btst	#7,vrbw10+1	* group 8 ?
-		beq	srs10h		* jump if not
-*
-		move.w	#41,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-		.page
-*
-srs10h:		btst	#0,vrbw10	* group 9
-		beq	srs10j		* jump if not
-*
-		move.w	#46,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs10j:		btst	#1,vrbw10	* group 10
-		beq	srs10k		* jump if not
-*
-		move.w	#51,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs10k:		btst	#2,vrbw10	* group 11
-		beq	srs10m		* jump if not
-*
-		move.w	#56,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs10m:		btst	#3,vrbw10	* group 12
-		beq	srs10x		* jump if not
-*
-		move.w	#61,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs10x:		move.w	vrcw,d0		* restore vrcw to d0
-*
-		.page
-*
-* location
-* --------
-srs11:		btst	#11,d0		* location ?
-		beq	srs12		* jump if not
-*
-		move.w	#AT11,ATR(a7)	* put attribute on stack
-		move.w	#4,ROW(a7)	* put row on stack
-		btst	#0,vrbw11+1	* group 1 ?
-		beq	srs11a		* jump if not
-*
-		move.w	#8,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs11a:		btst	#1,vrbw11+1	* group 2 ?
-		beq	srs11b		* jump if not
-*
-		move.w	#13,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs11b:		btst	#2,vrbw11+1	* group 3 ?
-		beq	srs11c		* jump if not
-*
-		move.w	#18,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs11c:		btst	#3,vrbw11+1	* group 4 ?
-		beq	srs11d		* jump if not
-*
-		move.w	#23,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-		.page
-*
-srs11d:		btst	#4,vrbw11+1	* group 5 ?
-		beq	srs11e		* jump if not
-*
-		move.w	#28,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs11e:		btst	#5,vrbw11+1	* group 6 ?
-		beq	srs11f		* jump if not
-*
-		move.w	#33,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs11f:		btst	#6,vrbw11+1	* group 7 ?
-		beq	srs11g		* jump if not
-*
-		move.w	#38,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs11g:		btst	#7,vrbw11+1	* group 8 ?
-		beq	srs11h		* jump if not
-*
-		move.w	#43,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-		.page
-*
-srs11h:		btst	#0,vrbw11	* group 9
-		beq	srs11j		* jump if not
-*
-		move.w	#48,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs11j:		btst	#1,vrbw11	* group 10
-		beq	srs11k		* jump if not
-*
-		move.w	#53,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs11k:		btst	#2,vrbw11	* group 11
-		beq	srs11m		* jump if not
-*
-		move.w	#58,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs11m:		btst	#3,vrbw11	* group 12
-		beq	srs11x		* jump if not
-*
-		move.w	#63,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs11x:		move.w	vrcw,d0		* restore vrcw to d0
-*
-		.page
-*
-* velocity
-* --------
-srs12:		btst	#12,d0		* velocity ?
-		beq	srs13		* jump if not
-*
-		move.w	#AT11,ATR(a7)	* put attribute on stack
-		move.w	#5,ROW(a7)	* put row on stack
-		btst	#0,vrbw12+1	* group 1 ?
-		beq	srs12a		* jump if not
-*
-		move.w	#6,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#7,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#8,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-*
-srs12a:		btst	#1,vrbw12+1	* group 2 ?
-		beq	srs12b		* jump if not
-*
-		move.w	#11,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#12,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#13,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-*
-srs12b:		btst	#2,vrbw12+1	* group 3 ?
-		beq	srs12c		* jump if not
-*
-		move.w	#16,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#17,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#18,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-*
-		.page
-*
-srs12c:		btst	#3,vrbw12+1	* group 4 ?
-		beq	srs12d		* jump if not
-*
-		move.w	#21,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#22,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#23,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-*
-srs12d:		btst	#4,vrbw12+1	* group 5 ?
-		beq	srs12e		* jump if not
-*
-		move.w	#26,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#27,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#28,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-*
-srs12e:		btst	#5,vrbw12+1	* group 6 ?
-		beq	srs12f		* jump if not
-*
-		move.w	#31,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#32,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#33,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-*
-		.page
-*
-srs12f:		btst	#6,vrbw12+1	* group 7 ?
-		beq	srs12g		* jump if not
-*
-		move.w	#36,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#37,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#38,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-*
-srs12g:		btst	#7,vrbw12+1	* group 8 ?
-		beq	srs12h		* jump if not
-*
-		move.w	#41,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#42,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#43,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-*
-srs12h:		btst	#0,vrbw12	* group 9
-		beq	srs12j		* jump if not
-*
-		move.w	#46,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#47,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#48,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-*
-		.page
-*
-srs12j:		btst	#1,vrbw12	* group 10
-		beq	srs12k		* jump if not
-*
-		move.w	#51,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#52,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#53,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-*
-srs12k:		btst	#2,vrbw12	* group 11
-		beq	srs12m		* jump if not
-*
-		move.w	#56,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#57,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#58,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-*
-srs12m:		btst	#3,vrbw12	* group 12
-		beq	srs12x		* jump if not
-*
-		move.w	#61,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#62,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#63,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-*
-srs12x:		move.w	vrcw,d0		* restore vrcw to d0
-*
-		.page
-*
-* resolution
-* ----------
-srs13:		btst	#13,d0		* resolution ?
-		beq	srs14		* jump if not
-*
-		move.w	#AT12,ATR(a7)	* put attribute on stack
-		move.w	#7,ROW(a7)	* put row on stack
-		btst	#0,vrbw13+1	* variable 1 ?
-		beq	srs13a		* jump if not
-*
-		move.w	#6,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs13a:		btst	#1,vrbw13+1	* variable 2 ?
-		beq	srs13b		* jump if not
-*
-		move.w	#15,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs13b:		btst	#2,vrbw13+1	* variable 3 ?
-		beq	srs13c		* jump if not
-*
-		move.w	#24,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs13c:		btst	#3,vrbw13+1	* variable 4 ?
-		beq	srs13d		* jump if not
-*
-		move.w	#33,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs13d:		btst	#4,vrbw13+1	* variable 5 ?
-		beq	srs13e		* jump if not
-*
-		move.w	#42,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs13e:		btst	#5,vrbw13+1	* variable 6 ?
-		beq	srs13x		* jump if not
-*
-		move.w	#51,COL(a7)	* put column on stack
-		jsr	_vputa		* reset column
-*
-srs13x:		move.w	vrcw,d0		* restore vrcw to d0
-*
-		.page
-*
-* analog value
-* ------------
-srs14:		btst	#14,d0		* analog value ?
-		beq	srs15		* jump if not
-*
-		move.w	#AT12,ATR(a7)	* put attribute on stack
-		move.w	#7,ROW(a7)	* put row on stack
-		btst	#0,vrbw14+1	* variable 1 ?
-		beq	srs14a		* jump if not
-*
-		move.w	#8,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#9,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#10,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#11,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-		move.w	#12,COL(a7)	* put 5th column on stack
-		jsr	_vputa		* reset fifth column
-*
-srs14a:		btst	#1,vrbw14+1	* variable 2 ?
-		beq	srs14b		* jump if not
-*
-		move.w	#17,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#18,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#19,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#20,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-		move.w	#21,COL(a7)	* put 5th column on stack
-		jsr	_vputa		* reset fifth column
-*
-		.page
-*
-srs14b:		btst	#2,vrbw14+1	* variable 3 ?
-		beq	srs14c		* jump if not
-*
-		move.w	#26,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#27,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#28,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#29,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-		move.w	#30,COL(a7)	* put 5th column on stack
-		jsr	_vputa		* reset fifth column
-*
-srs14c:		btst	#3,vrbw14+1	* variable 4 ?
-		beq	srs14d		* jump if not
-*
-		move.w	#35,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#36,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#37,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#38,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-		move.w	#39,COL(a7)	* put 5th column on stack
-		jsr	_vputa		* reset fifth column
-*
-		.page
-*
-srs14d:		btst	#4,vrbw14+1	* variable 5 ?
-		beq	srs14e		* jump if not
-*
-		move.w	#44,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#45,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#46,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#47,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-		move.w	#48,COL(a7)	* put 5th column on stack
-		jsr	_vputa		* reset fifth column
-*
-srs14e:		btst	#5,vrbw14+1	* variable 6 ?
-		beq	srs14x		* jump if not
-*
-		move.w	#53,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#54,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#55,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#56,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-		move.w	#57,COL(a7)	* put 5th column on stack
-		jsr	_vputa		* reset fifth column
-*
-srs14x:		move.w	vrcw,d0		* restore vrcw to d0
-*
-		.page
-*
-* stop/next
-* ---------
-srs15:		btst	#15,d0		* stop/next ?
-		beq	srs16		* jump if not
-*
-		btst	#0,vrbw15	* stop ?
-		beq	srs15a		* jump if not
-*
-		move.w	#AT08,ATR(a7)	* put attribute on stack
-		move.w	#1,ROW(a7)	* put row on stack
-		move.w	#40,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#41,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#42,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#43,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-srs15a:		btst	#1,vrbw15	* next ?
-		beq	srs16		* jump if not
-*
-		move.w	#AT08,ATR(a7)	* put attribute on stack
-		move.w	#1,ROW(a7)	* put row on stack
-		move.w	#45,COL(a7)	* put 1st column on stack
-		jsr	_vputa		* reset first column
-		move.w	#46,COL(a7)	* put 2nd column on stack
-		jsr	_vputa		* reset second column
-		move.w	#47,COL(a7)	* put 3rd column on stack
-		jsr	_vputa		* reset third column
-		move.w	#48,COL(a7)	* put 4th column on stack
-		jsr	_vputa		* reset fourth column
-*
-srs16:		add.l	#10,a7		* clean up stack
-		bra	srsexit		* done
-*
-		.page
-*
+
+		.xdef	_sreset		| sreset()
+
+		.xref	_vputa		| vputa(sbase, row, col, attrib)
+
+		.xref	_ndisp		| WORD - display number
+		.xref	_obj8		| LONG - object base address
+		.xref	_vrbw08		| WORD - detail word for bit 8
+		.xref	_vrbw09		| WORD - detail word for bit 9
+		.xref	_vrbw10		| WORD - detail word for bit 10
+		.xref	_vrbw11		| WORD - detail word for bit 11
+		.xref	_vrbw12		| WORD - detail word for bit 12
+		.xref	_vrbw13		| WORD - detail word for bit 13
+		.xref	_vrbw14		| WORD - detail word for bit 14
+		.xref	_vrbw15		| WORD - detail word for bit 15
+		.xref	_vrcw		| WORD - video reset control word
+
+ROW		=	4
+COL		=	6
+ATR		=	8
+
+AT01		=	0x0014
+AT04		=	0x0013
+AT05		=	0x0014
+AT06		=	0x0013
+AT07		=	0x0014
+AT08		=	0x0013
+AT09		=	0x0014
+AT10		=	0x0013
+AT11		=	0x0012
+AT12		=	0x0012
+
+		.page
+
+| sreset() -- reset highlighting
+| --------    ------------------
+_sreset:	link	a6,#0		| link stack frame
+		cmp.w	#2,_ndisp	| see if we should update display
+		bne	srsexit		| jump if not
+
+		move.w	_vrcw,d0	| get and check vrcw
+		bne	srs0		| jump if something to do
+
+srsexit:	unlk	a6		| unlink stack frame
+		rts			| return to caller
+
+srs0:		move.w	sr,d1		| <<<<< disable interrupts >>>>>
+		ori.w	#0x0700,sr	| ...
+
+		move.w	_vrcw,vrcw	| make local copies of control variables
+		clr.w	_vrcw		| ... and clear them for the next pass
+		move.w	_vrbw08,vrbw08	| ...
+		clr.w	_vrbw08		| ...
+		move.w	_vrbw09,vrbw09	| ...
+		clr.w	_vrbw09		| ...
+		move.w	_vrbw10,vrbw10	| ...
+		clr.w	_vrbw10		| ...
+		move.w	_vrbw11,vrbw11	| ...
+		clr.w	_vrbw11		| ...
+		move.w	_vrbw12,vrbw12	| ...
+		clr.w	_vrbw12		| ...
+		move.w	_vrbw13,vrbw13	| ...
+		clr.w	_vrbw13		| ...
+		move.w	_vrbw14,vrbw14	| ...
+		clr.w	_vrbw14		| ...
+		move.w	_vrbw15,vrbw15	| ...
+		clr.w	_vrbw15		| ...
+
+		move.w	d1,sr		| <<<<< restore interrupts >>>>>
+
+| Setup STACK for subsequent calls to vputa(sbase, row, col, atr):
+
+|	0(a7)	sbase
+
+|	4(a7)	row	ROW
+|	6(a7)	col	COL
+|	8(a7)	atr	ATR
+
+		clr.w	-(a7)		| put dummy attribute on stack
+		clr.w	-(a7)		| put dummy column on stack
+		clr.w	-(a7)		| put dummy row on stack
+		move.l	_obj8,-(a7)	| put sbase on stack
+
+		.page
+
+| assignment
+| ----------
+		btst	#0,d0		| assignment ?
+		beq	srs1		| jump if not
+
+		move.w	#AT04,ATR(a7)	| put attribute on stack
+		move.w	#1,ROW(a7)	| put row on stack
+		move.w	#11,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#12,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	vrcw,d0		| restore vrcw to d0
+
+| tuning
+| ------
+srs1:		btst	#1,d0		| tuning ?
+		beq	srs2		| jump if not
+
+		move.w	#AT05,ATR(a7)	| put attribute on stack
+		move.w	#1,ROW(a7)	| put row on stack
+		move.w	#19,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+		move.w	vrcw,d0		| restore vrcw to d0
+
+| tempo
+| -----
+srs2:		btst	#2,d0		| tempo ?
+		beq	srs3		| jump if not
+
+		move.w	#AT06,ATR(a7)	| put attribute on stack
+		move.w	#1,ROW(a7)	| put row on stack
+		move.w	#27,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#28,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#29,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	vrcw,d0		| restore vrcw to d0
+
+		.page
+
+| interpolate
+| -----------
+srs3:		btst	#3,d0		| interpolate ?
+		beq	srs4		| jump if not
+
+		move.w	#AT07,ATR(a7)	| put attribute on stack
+		move.w	#1,ROW(a7)	| put row on stack
+		move.w	#35,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#36,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#37,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#38,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+		move.w	vrcw,d0		| restore vrcw to d0
+
+| section begin
+| -------------
+srs4:		btst	#4,d0		| section begin ?
+		beq	srs5		| jump if not
+
+		move.w	#AT01,ATR(a7)	| put attribute on stack
+		move.w	#0,ROW(a7)	| put row on stack
+		move.w	#6,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#7,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+
+		.page
+
+| punch in
+| --------
+srs5:		btst	#5,d0		| punch in ?
+		beq	srs6		| jump if not
+
+		move.w	#AT09,ATR(a7)	| put attribute on stack
+		move.w	#1,ROW(a7)	| put row on stack
+		move.w	#50,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#51,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	vrcw,d0		| restore vrcw to d0
+
+| punch out
+| ---------
+srs6:		btst	#6,d0		| punch out ?
+		beq	srs7		| jump if not
+
+		move.w	#AT09,ATR(a7)	| put attribute on stack
+		move.w	#1,ROW(a7)	| put row on stack
+		move.w	#53,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#54,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#55,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	vrcw,d0		| restore vrcw to d0
+
+| Output
+| ------
+srs7:		btst	#7,d0		| output ?
+		beq	srs8		| jump if not
+
+		move.w	#AT10,ATR(a7)	| put attribute on stack
+		move.w	#1,ROW(a7)	| put row on stack
+		move.w	#57,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#58,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#59,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#60,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+		move.w	#61,COL(a7)	| put 5th column on stack
+		jsr	_vputa		| reset fifth column
+		move.w	#62,COL(a7)	| put 6th column on stack
+		jsr	_vputa		| reset sixth column
+		move.w	vrcw,d0		| restore vrcw to d0
+
+		.page
+
+| instrument
+| ----------
+srs8:		btst	#8,d0		| instrument ?
+		beq	srs9		| jump if not
+
+		move.w	#2,ROW(a7)	| put row on stack
+		move.w	#AT11,ATR(a7)	| put attribute on stack
+		btst	#0,vrbw08+1	| group 1 ?
+		beq	srs8a		| jump if not
+
+		move.w	#7,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#8,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+
+srs8a:		btst	#1,vrbw08+1	| group 2 ?
+		beq	srs8b		| jump if not
+
+		move.w	#12,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first character
+		move.w	#13,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second character
+
+srs8b:		btst	#2,vrbw08+1	| group 3 ?
+		beq	srs8c		| jump if not
+
+		move.w	#17,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first character
+		move.w	#18,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second character
+
+srs8c:		btst	#3,vrbw08+1	| group 4 ?
+		beq	srs8d		| jump if not
+
+		move.w	#22,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first character
+		move.w	#23,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second character
+
+		.page
+
+srs8d:		btst	#4,vrbw08+1	| group 5 ?
+		beq	srs8e		| jump if not
+
+		move.w	#27,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first character
+		move.w	#28,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second character
+
+srs8e:		btst	#5,vrbw08+1	| group 6 ?
+		beq	srs8f		| jump if not
+
+		move.w	#32,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first character
+		move.w	#33,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second character
+
+srs8f:		btst	#6,vrbw08+1	| group 7 ?
+		beq	srs8g		| jump if not
+
+		move.w	#37,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first character
+		move.w	#38,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second character
+
+srs8g:		btst	#7,vrbw08+1	| group 8 ?
+		beq	srs8h		| jump if not
+
+		move.w	#42,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first character
+		move.w	#43,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second character
+
+		.page
+
+srs8h:		btst	#0,vrbw08	| group 9
+		beq	srs8j		| jump if not
+
+		move.w	#47,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first character
+		move.w	#48,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second character
+
+srs8j:		btst	#1,vrbw08	| group 10
+		beq	srs8k		| jump if not
+
+		move.w	#52,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first character
+		move.w	#53,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second character
+
+srs8k:		btst	#2,vrbw08	| group 11
+		beq	srs8m		| jump if not
+
+		move.w	#57,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first character
+		move.w	#58,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second character
+
+srs8m:		btst	#3,vrbw08	| group 12
+		beq	srs8x		| jump if not
+
+		move.w	#62,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first character
+		move.w	#63,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second character
+
+srs8x:		move.w	vrcw,d0		| restore vrcw to d0
+
+		.page
+
+| transpose
+| ---------
+srs9:		btst	#9,d0		| transpose ?
+		beq	srs10		| jump if not
+
+		move.w	#AT11,ATR(a7)	| put attribute on stack
+		move.w	#3,ROW(a7)	| put row on stack
+		btst	#0,vrbw09+1	| group 1 ?
+		beq	srs9a		| jump if not
+
+		move.w	#5,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#6,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#7,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#8,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+srs9a:		btst	#1,vrbw09+1	| group 2 ?
+		beq	srs9b		| jump if not
+
+		move.w	#10,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#11,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#12,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#13,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+srs9b:		btst	#2,vrbw09+1	| group 3 ?
+		beq	srs9c		| jump if not
+
+		move.w	#15,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#16,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#17,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#18,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+		.page
+
+srs9c:		btst	#3,vrbw09+1	| group 4 ?
+		beq	srs9d		| jump if not
+
+		move.w	#20,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#21,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#22,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#23,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+srs9d:		btst	#4,vrbw09+1	| group 5 ?
+		beq	srs9e		| jump if not
+
+		move.w	#25,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#26,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#27,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#28,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+srs9e:		btst	#5,vrbw09+1	| group 6 ?
+		beq	srs9f		| jump if not
+
+		move.w	#30,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#31,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#32,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#33,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+		.page
+
+srs9f:		btst	#6,vrbw09+1	| group 7 ?
+		beq	srs9g		| jump if not
+
+		move.w	#35,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#36,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#37,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#38,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+srs9g:		btst	#7,vrbw09+1	| group 8 ?
+		beq	srs9h		| jump if not
+
+		move.w	#40,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#41,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#42,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#43,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+srs9h:		btst	#0,vrbw09	| group 9
+		beq	srs9j		| jump if not
+
+		move.w	#45,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#46,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#47,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#48,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+		.page
+
+srs9j:		btst	#1,vrbw09	| group 10
+		beq	srs9k		| jump if not
+
+		move.w	#50,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#51,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#52,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#53,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+srs9k:		btst	#2,vrbw09	| group 11
+		beq	srs9m		| jump if not
+
+		move.w	#55,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#56,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#57,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#58,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+srs9m:		btst	#3,vrbw09	| group 12
+		beq	srs9x		| jump if not
+
+		move.w	#60,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#61,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#62,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#63,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+srs9x:		move.w	vrcw,d0		| restore vrcw to d0
+
+		.page
+
+| dynamics
+| --------
+srs10:		btst	#10,d0		| dynamics ?
+		beq	srs11		| jump if not
+
+		move.w	#AT11,ATR(a7)	| put attribute on stack
+		move.w	#4,ROW(a7)	| put row on stack
+		btst	#0,vrbw10+1	| group 1 ?
+		beq	srs10a		| jump if not
+
+		move.w	#6,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs10a:		btst	#1,vrbw10+1	| group 2 ?
+		beq	srs10b		| jump if not
+
+		move.w	#11,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs10b:		btst	#2,vrbw10+1	| group 3 ?
+		beq	srs10c		| jump if not
+
+		move.w	#16,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs10c:		btst	#3,vrbw10+1	| group 4 ?
+		beq	srs10d		| jump if not
+
+		move.w	#21,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+		.page
+
+srs10d:		btst	#4,vrbw10+1	| group 5 ?
+		beq	srs10e		| jump if not
+
+		move.w	#26,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs10e:		btst	#5,vrbw10+1	| group 6 ?
+		beq	srs10f		| jump if not
+
+		move.w	#31,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs10f:		btst	#6,vrbw10+1	| group 7 ?
+		beq	srs10g		| jump if not
+
+		move.w	#36,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs10g:		btst	#7,vrbw10+1	| group 8 ?
+		beq	srs10h		| jump if not
+
+		move.w	#41,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+		.page
+
+srs10h:		btst	#0,vrbw10	| group 9
+		beq	srs10j		| jump if not
+
+		move.w	#46,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs10j:		btst	#1,vrbw10	| group 10
+		beq	srs10k		| jump if not
+
+		move.w	#51,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs10k:		btst	#2,vrbw10	| group 11
+		beq	srs10m		| jump if not
+
+		move.w	#56,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs10m:		btst	#3,vrbw10	| group 12
+		beq	srs10x		| jump if not
+
+		move.w	#61,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs10x:		move.w	vrcw,d0		| restore vrcw to d0
+
+		.page
+
+| location
+| --------
+srs11:		btst	#11,d0		| location ?
+		beq	srs12		| jump if not
+
+		move.w	#AT11,ATR(a7)	| put attribute on stack
+		move.w	#4,ROW(a7)	| put row on stack
+		btst	#0,vrbw11+1	| group 1 ?
+		beq	srs11a		| jump if not
+
+		move.w	#8,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs11a:		btst	#1,vrbw11+1	| group 2 ?
+		beq	srs11b		| jump if not
+
+		move.w	#13,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs11b:		btst	#2,vrbw11+1	| group 3 ?
+		beq	srs11c		| jump if not
+
+		move.w	#18,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs11c:		btst	#3,vrbw11+1	| group 4 ?
+		beq	srs11d		| jump if not
+
+		move.w	#23,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+		.page
+
+srs11d:		btst	#4,vrbw11+1	| group 5 ?
+		beq	srs11e		| jump if not
+
+		move.w	#28,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs11e:		btst	#5,vrbw11+1	| group 6 ?
+		beq	srs11f		| jump if not
+
+		move.w	#33,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs11f:		btst	#6,vrbw11+1	| group 7 ?
+		beq	srs11g		| jump if not
+
+		move.w	#38,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs11g:		btst	#7,vrbw11+1	| group 8 ?
+		beq	srs11h		| jump if not
+
+		move.w	#43,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+		.page
+
+srs11h:		btst	#0,vrbw11	| group 9
+		beq	srs11j		| jump if not
+
+		move.w	#48,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs11j:		btst	#1,vrbw11	| group 10
+		beq	srs11k		| jump if not
+
+		move.w	#53,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs11k:		btst	#2,vrbw11	| group 11
+		beq	srs11m		| jump if not
+
+		move.w	#58,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs11m:		btst	#3,vrbw11	| group 12
+		beq	srs11x		| jump if not
+
+		move.w	#63,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs11x:		move.w	vrcw,d0		| restore vrcw to d0
+
+		.page
+
+| velocity
+| --------
+srs12:		btst	#12,d0		| velocity ?
+		beq	srs13		| jump if not
+
+		move.w	#AT11,ATR(a7)	| put attribute on stack
+		move.w	#5,ROW(a7)	| put row on stack
+		btst	#0,vrbw12+1	| group 1 ?
+		beq	srs12a		| jump if not
+
+		move.w	#6,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#7,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#8,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+
+srs12a:		btst	#1,vrbw12+1	| group 2 ?
+		beq	srs12b		| jump if not
+
+		move.w	#11,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#12,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#13,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+
+srs12b:		btst	#2,vrbw12+1	| group 3 ?
+		beq	srs12c		| jump if not
+
+		move.w	#16,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#17,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#18,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+
+		.page
+
+srs12c:		btst	#3,vrbw12+1	| group 4 ?
+		beq	srs12d		| jump if not
+
+		move.w	#21,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#22,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#23,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+
+srs12d:		btst	#4,vrbw12+1	| group 5 ?
+		beq	srs12e		| jump if not
+
+		move.w	#26,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#27,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#28,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+
+srs12e:		btst	#5,vrbw12+1	| group 6 ?
+		beq	srs12f		| jump if not
+
+		move.w	#31,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#32,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#33,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+
+		.page
+
+srs12f:		btst	#6,vrbw12+1	| group 7 ?
+		beq	srs12g		| jump if not
+
+		move.w	#36,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#37,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#38,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+
+srs12g:		btst	#7,vrbw12+1	| group 8 ?
+		beq	srs12h		| jump if not
+
+		move.w	#41,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#42,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#43,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+
+srs12h:		btst	#0,vrbw12	| group 9
+		beq	srs12j		| jump if not
+
+		move.w	#46,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#47,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#48,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+
+		.page
+
+srs12j:		btst	#1,vrbw12	| group 10
+		beq	srs12k		| jump if not
+
+		move.w	#51,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#52,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#53,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+
+srs12k:		btst	#2,vrbw12	| group 11
+		beq	srs12m		| jump if not
+
+		move.w	#56,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#57,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#58,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+
+srs12m:		btst	#3,vrbw12	| group 12
+		beq	srs12x		| jump if not
+
+		move.w	#61,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#62,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#63,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+
+srs12x:		move.w	vrcw,d0		| restore vrcw to d0
+
+		.page
+
+| resolution
+| ----------
+srs13:		btst	#13,d0		| resolution ?
+		beq	srs14		| jump if not
+
+		move.w	#AT12,ATR(a7)	| put attribute on stack
+		move.w	#7,ROW(a7)	| put row on stack
+		btst	#0,vrbw13+1	| variable 1 ?
+		beq	srs13a		| jump if not
+
+		move.w	#6,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs13a:		btst	#1,vrbw13+1	| variable 2 ?
+		beq	srs13b		| jump if not
+
+		move.w	#15,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs13b:		btst	#2,vrbw13+1	| variable 3 ?
+		beq	srs13c		| jump if not
+
+		move.w	#24,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs13c:		btst	#3,vrbw13+1	| variable 4 ?
+		beq	srs13d		| jump if not
+
+		move.w	#33,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs13d:		btst	#4,vrbw13+1	| variable 5 ?
+		beq	srs13e		| jump if not
+
+		move.w	#42,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs13e:		btst	#5,vrbw13+1	| variable 6 ?
+		beq	srs13x		| jump if not
+
+		move.w	#51,COL(a7)	| put column on stack
+		jsr	_vputa		| reset column
+
+srs13x:		move.w	vrcw,d0		| restore vrcw to d0
+
+		.page
+
+| analog value
+| ------------
+srs14:		btst	#14,d0		| analog value ?
+		beq	srs15		| jump if not
+
+		move.w	#AT12,ATR(a7)	| put attribute on stack
+		move.w	#7,ROW(a7)	| put row on stack
+		btst	#0,vrbw14+1	| variable 1 ?
+		beq	srs14a		| jump if not
+
+		move.w	#8,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#9,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#10,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#11,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+		move.w	#12,COL(a7)	| put 5th column on stack
+		jsr	_vputa		| reset fifth column
+
+srs14a:		btst	#1,vrbw14+1	| variable 2 ?
+		beq	srs14b		| jump if not
+
+		move.w	#17,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#18,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#19,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#20,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+		move.w	#21,COL(a7)	| put 5th column on stack
+		jsr	_vputa		| reset fifth column
+
+		.page
+
+srs14b:		btst	#2,vrbw14+1	| variable 3 ?
+		beq	srs14c		| jump if not
+
+		move.w	#26,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#27,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#28,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#29,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+		move.w	#30,COL(a7)	| put 5th column on stack
+		jsr	_vputa		| reset fifth column
+
+srs14c:		btst	#3,vrbw14+1	| variable 4 ?
+		beq	srs14d		| jump if not
+
+		move.w	#35,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#36,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#37,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#38,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+		move.w	#39,COL(a7)	| put 5th column on stack
+		jsr	_vputa		| reset fifth column
+
+		.page
+
+srs14d:		btst	#4,vrbw14+1	| variable 5 ?
+		beq	srs14e		| jump if not
+
+		move.w	#44,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#45,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#46,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#47,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+		move.w	#48,COL(a7)	| put 5th column on stack
+		jsr	_vputa		| reset fifth column
+
+srs14e:		btst	#5,vrbw14+1	| variable 6 ?
+		beq	srs14x		| jump if not
+
+		move.w	#53,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#54,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#55,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#56,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+		move.w	#57,COL(a7)	| put 5th column on stack
+		jsr	_vputa		| reset fifth column
+
+srs14x:		move.w	vrcw,d0		| restore vrcw to d0
+
+		.page
+
+| stop/next
+| ---------
+srs15:		btst	#15,d0		| stop/next ?
+		beq	srs16		| jump if not
+
+		btst	#0,vrbw15	| stop ?
+		beq	srs15a		| jump if not
+
+		move.w	#AT08,ATR(a7)	| put attribute on stack
+		move.w	#1,ROW(a7)	| put row on stack
+		move.w	#40,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#41,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#42,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#43,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+srs15a:		btst	#1,vrbw15	| next ?
+		beq	srs16		| jump if not
+
+		move.w	#AT08,ATR(a7)	| put attribute on stack
+		move.w	#1,ROW(a7)	| put row on stack
+		move.w	#45,COL(a7)	| put 1st column on stack
+		jsr	_vputa		| reset first column
+		move.w	#46,COL(a7)	| put 2nd column on stack
+		jsr	_vputa		| reset second column
+		move.w	#47,COL(a7)	| put 3rd column on stack
+		jsr	_vputa		| reset third column
+		move.w	#48,COL(a7)	| put 4th column on stack
+		jsr	_vputa		| reset fourth column
+
+srs16:		add.l	#10,a7		| clean up stack
+		bra	srsexit		| done
+
+		.page
+
 		.bss
-*
-* local copies of _vrcw, _vrbw08.._vrbw15
-*
+
+| local copies of _vrcw, _vrbw08.._vrbw15
+
 vrcw:		.ds.w	1
 vrbw08:		.ds.w	1
@@ -992,4 +992,4 @@
 vrbw14:		.ds.w	1
 vrbw15:		.ds.w	1
-*
+
 		.end
Index: ram/timeint.s
===================================================================
--- ram/timeint.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ ram/timeint.s	(revision 08e1da1cabca094217491629d328ae7146816782)
@@ -1,385 +1,385 @@
-* ------------------------------------------------------------------------------
-* timeint.s -- MIDAS-VII timer interrupt handler
-* Version 15 -- 1989-07-20 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-* This code replaces the interrupt handler in bios.s, which is known to
-* have a bug in it, and adds support for the VSDD and an array of programable
-* timers with 1 Ms resolution.
-*
-* WARNING:  There are equates to addresses in the bios EPROM which may change
-* when the bios is reassembled.  If the bios is reassembled be sure to update
-* the equates flagged by "<<<=====".
-*
-* The addresses currently in the equates are for EPROMs dated 1988-04-18 or
-* 1988-06-20 ONLY.
-*
-* ------------------------------------------------------------------------------
-* Hardware timer usage:
-* ---------------------
-*	Timer 1		PLL divider for score clock -- fixed at 64
-*	Timer 2		PLL divider for score clock -- nominally 3200
-*	Timer 3		1 Ms Real Time Clock
-*
-* ------------------------------------------------------------------------------
-*
+| ------------------------------------------------------------------------------
+| timeint.s -- MIDAS-VII timer interrupt handler
+| Version 15 -- 1989-07-20 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+| This code replaces the interrupt handler in bios.s, which is known to
+| have a bug in it, and adds support for the VSDD and an array of programable
+| timers with 1 Ms resolution.
+
+| WARNING:  There are equates to addresses in the bios EPROM which may change
+| when the bios is reassembled.  If the bios is reassembled be sure to update
+| the equates flagged by "<<<=====".
+
+| The addresses currently in the equates are for EPROMs dated 1988-04-18 or
+| 1988-06-20 ONLY.
+
+| ------------------------------------------------------------------------------
+| Hardware timer usage:
+| ---------------------
+|	Timer 1		PLL divider for score clock -- fixed at 64
+|	Timer 2		PLL divider for score clock -- nominally 3200
+|	Timer 3		1 Ms Real Time Clock
+
+| ------------------------------------------------------------------------------
+
 		.text
-*
-		.xdef	_tsetup		* tsetup() -- timer setup function
-		.xdef	timeint		* timer interrupt handler
-*
-		.xdef	_M1IoRec	* MIDI channel 1 IoRec		
-		.xdef	_M2IoRec	* MIDI channel 2 IoRec		
-		.xdef	_S1IoRec	* RS232 channel 1 IoRec		
-		.xdef	_S2IoRec	* RS232 channel 2 IoRec		
-		.xdef	_timers		* timer array -- short timers[NTIMERS]
-		.xdef	_vi_clk		* VSDD scroll delay timer
-		.xdef	_vi_tag		* VSDD VI tag
-*
-		.xref	lclsadr		* score object base address
-		.xref	lclscrl		* score object scroll offset
-		.xref	_v_odtab	* VSDD object descriptor table
-*
-		.page
-* ==============================================================================
-*
-FRAMES		.equ	0		* set non-zero to enable frame pulses
-*
-* Equates to variables in bios.s:
-* -------------------------------
-* These variables are permanently assigned.
-*
-TIMEVEC		.equ	$00000400	* LONG - System timer trap vector
-*
-FC_SW		.equ	$00000420	* WORD - Frame clock switch
-FC_VAL		.equ	$00000422	* LONG - Frame clock value
-*
-HZ_1K		.equ	$0000049A	* LONG - 1000 Hz clock
-HZ_200		.equ	$0000049E	* LONG - 200 Hz clock
-FRCLOCK		.equ	$000004A2	* LONG - 50 Hz clock
-*
-T3COUNT		.equ	$000004AA	* WORD - Timer 3 count
-*
-* ------------------------------------------------------------------------------
-*
-* WARNING:  The address of "FLOCK" depends on the version of the bios EPROM.
-* The address below is for EPROMs dated 1988-04-18 or 1988-06-20 ONLY.
-*
-FLOCK		.equ	$00000E0C	* WORD - Floppy semaphore	<<<=====
-*
-* ==============================================================================
-*
-* Equates to routines in bios.s:
-* ------------------------------
-*
-* WARNING:  The address of "FLOPVBL" depends on the version of the bios EPROM.
-* The address below is for EPROMs dated 1988-04-18 or 1988-06-20 ONLY.
-*
-FLOPVBL		.equ	$001015EE	* floppy VI handler address	<<<=====
-*
-* ==============================================================================
-*
-		.page
-*
-* Hardware address equates:
-* -------------------------
-TI_VEC		.equ	$00000070	* Timer interrupt autovector
-*
-TIMER		.equ	$003A0001	* Timer base address
-M1_ACIA		.equ	$003AC001	* MIDI ACIA channel 1 base address
-*
-* ------------------------------------------------------------------------------
-*
-* Timer register equates:
-* -----------------------
-TIME_CRX	.equ	TIMER		* Control register 1 or 3
-TIME_CR2	.equ	TIMER+2		* Control register 2
-TIME_T1H	.equ	TIMER+4		* Timer 1 high byte
-TIME_T1L	.equ	TIMER+6		* Timer 1 low byte
-TIME_T2H	.equ	TIMER+8		* Timer 2 high byte
-TIME_T2L	.equ	TIMER+10	* Timer 2 low byte
-TIME_T3H	.equ	TIMER+12	* Timer 3 high byte
-TIME_T3L	.equ	TIMER+14	* Timer 3 low byte
-*
-* Serial I/O equates:
-* -------------------
-ACIA_CFR	.equ	2		* CFR offset from ACIA base
-DTR_BIT		.equ	1		* DTR bit in ACIA CFR1
-*
-IO_CFR1		.equ	29		* cfr1 offset in M1IoRec
-*
-* ==============================================================================
-*
-* Miscellaneous equates:
-* ----------------------
-IPL7		.equ	$0700		* IPL mask for interrupt disable
-*
-FCMAX		.equ	$00FFFFFF	* Maximum frame counter value
-FCMIN		.equ	$00000000	* Minimum frame counter value
-*
-NTIMERS		.equ	8		* Number of timers in the timer array
-*
-XBIOS		.equ	14		* XBIOS TRAP number
-X_PIOREC	.equ	0		* X_PIOREC code
-SR1_DEV		.equ	0		* RS232 ACIA channel 1
-SR2_DEV		.equ	1		* RS232 ACIA channel 2
-MC1_DEV		.equ	3		* MIDI ACIA channel 1
-MC2_DEV		.equ	4		* MIDI ACIA channel 2
-* ==============================================================================
-*
-		.page
-* ==============================================================================
-* _tsetup -- tsetup() -- timer setup function
-* ==============================================================================
-*
-_tsetup:	move.w	sr,-(a7)		* Save old interrupt mask
-		ori.w	#IPL7,sr		* Disable interrupts
-*
-		move.w	#SR1_DEV,-(a7)		* Establish S1IoRec
-		move.w	#X_PIOREC,-(a7)		* ...
-		trap	#XBIOS			* ...
-		add.l	#4,a7			* ...
-		move.l	d0,_S1IoRec		* ...
-*
-		move.w	#SR2_DEV,-(a7)		* Establish S2IoRec
-		move.w	#X_PIOREC,-(a7)		* ...
-		trap	#XBIOS			* ...
-		add.l	#4,a7			* ...
-		move.l	d0,_S2IoRec		* ...
-*
-		move.w	#MC1_DEV,-(a7)		* Establish M1IoRec
-		move.w	#X_PIOREC,-(a7)		* ...
-		trap	#XBIOS			* ...
-		add.l	#4,a7			* ...
-		move.l	d0,_M1IoRec		* ...
-*
-		move.w	#MC2_DEV,-(a7)		* Establish M2IoRec
-		move.w	#X_PIOREC,-(a7)		* ...
-		trap	#XBIOS			* ...
-		add.l	#4,a7			* ...
-		move.l	d0,_M2IoRec		* ...
-*
-		.page
-*
-		clr.w	FC_SW			* Stop the frame clock
-		clr.l	FC_VAL			* ... and reset it
-		clr.w	_vi_tag			* Clear VSDD VI tag
-		clr.w	_vi_clk			* Clear VSDD delay timer
-		clr.w	lclsadr			* Clear score scroll address
-		clr.w	lclscrl			* Clear score scroll offset
-*
-		lea	_timers,a0		* Point at timer array
-		move.w	#NTIMERS-1,d0		* Setup to clear timer array
-*
-tclr:		clr.w	(a0)+			* Clear a timer array entry
-		dbra	d0,tclr			* Loop until done
-*
-		move.l	#nullrts,TIMEVEC	* Set timer interrupt vector
-		move.l	#timeint,TI_VEC		* Set timer trap vector
-*
-		move.b	#$00,TIME_T1H		* Setup timer 1  (PLL)
-		move.b	#$1F,TIME_T1L		* ... for divide by 64
-		move.b	#$0C,TIME_T2H		* Setup timer 2  (FC)
-		move.b	#$7F,TIME_T2L		* ... for divide by 3200
-		move.b	#$03,TIME_T3H		* Setup timer 3  (RTC)
-		move.b	#$20,TIME_T3L		* ... for 1Ms interval
-		move.b	#$42,TIME_CRX		* Setup CR3
-		move.b	#$41,TIME_CR2		* Setup CR2
-		move.b	#$81,TIME_CRX		* Setup CR1
-		move.b	#$80,TIME_CRX		* Start the timers
-*
-		move.w	(a7)+,sr		* Restore interrupts
-*
-nullrts:	rts				* Return to caller
-*
-		.page
-* ==============================================================================
-* timeint -- timer interrupt handler
-* ==============================================================================
-*
-timeint:	movem.l	d0-d7/a0-a6,-(a7)	* Save registers
-		move.b	TIME_CR2,d0		* Get timer interrupt status
-* ------------------------------------------------------------------------------
-* process 1 MS timer
-* ------------------------------------------------------------------------------
-		btst.l	#2,d0			* Check timer 3 status
-		beq	tmi02			* Jump if not active
-*
-		move.b	TIME_T3H,d1		* Read timer 3 count
-		lsl.w	#8,d1			* ...
-		move.b	TIME_T3L,d1		* ...
-		move.w	d1,T3COUNT		* ... and save it
-*
-		addq.l	#1,HZ_1K		* Update 1ms clock  (1 KHz)
-*
-		move.l	d0,-(a7)		* Preserve D0
-* ------------------------------------------------------------------------------
-* process VSDD timer
-* ------------------------------------------------------------------------------
-		tst.w	_vi_tag			* Does the VSDD need service ?
-		beq	updtime			* Jump if not
-*
-		move.w	_vi_clk,d0		* Get VSDD scroll delay timer
-		subq.w	#1,d0			* Decrement timer
-		move.w	d0,_vi_clk		* Update timer
-		bne	updtime			* Jump if it's not zero yet
-*
-		move.w	lclsadr,_v_odtab+12	* Update scroll address
-		move.w	lclscrl,_v_odtab+10	* Update scroll offset
-		clr.w	_vi_tag			* Reset the tag
-*
-		.page
-*
-* ------------------------------------------------------------------------------
-* process programable timers
-* ------------------------------------------------------------------------------
-*
-updtime:	move.w	#NTIMERS-1,d0		* Setup timer array counter
-		lea	_timers,a0		* Point at timer array
-*
-tdcr:		move.w	(a0),d1			* Get timer array entry
-		beq	tdcr1			* Jump if already 0
-*
-		subq.w	#1,d1			* Decrement timer
-*
-tdcr1:		move.w	d1,(a0)+		* Store updated timer value
-		dbra	d0,tdcr			* Loop until done
-*
-* ------------------------------------------------------------------------------
-* process timer hook vector
-* ------------------------------------------------------------------------------
-		movea.l	TIMEVEC,a0		* Get RTC vector
-		move.w	#1,-(a7)		* Pass 1 msec on stack
-		jsr	(a0)			* Process RTC vector
-		addq.l	#2,a7			* Clean up stack
-*
-		move.l	(a7)+,d0		* Restore D0
-*
-		.page
-* ------------------------------------------------------------------------------
-* process 5 Ms clock
-* ------------------------------------------------------------------------------
-		move.w	tdiv1,d1		* Update divider
-		addq.w	#1,d1			* ...
-		move.w	d1,tdiv1		* ...
-*
-		cmpi.w	#5,d1			* Do we need to update HZ_200 ?
-		blt	tmi02			* Jump if not
-*
-		addq.l	#1,HZ_200		* Update 5ms clock   (200 Hz)
-* ------------------------------------------------------------------------------
-* process 20 Ms floppy clock
-* ------------------------------------------------------------------------------
-		move.w	tdiv2,d1		* Update divider
-		addq.w	#1,d1			* ...
-		move.w	d1,tdiv2		* ...
-*
-		cmpi.w	#4,d1			* Do we need to update FRCLOCK ?
-		blt	tmi01			* Jump if not
-*
-		addq.l	#1,FRCLOCK		* Update 20 Ms clock  (50 Hz)
-		tst.w	FLOCK			* See if floppy is active
-		bne	tmi00			* Don't call FLOPVBL if so
-*
-		jsr	FLOPVBL			* Check on the floppy
-*
-tmi00:		move.w	#0,tdiv2		* Reset tdiv2
-*
-tmi01:		move.w	#0,tdiv1		* Reset tdiv1
-*
-		.page
-* ------------------------------------------------------------------------------
-* process PLL timers
-* ------------------------------------------------------------------------------
-*
-tmi02:		btst.l	#0,d0			* Check timer 1 int
-		beq	tmi03			* Jump if not set
-*
-		move.b	TIME_T1H,d1		* Read timer 1 to clear int.
-		move.b	TIME_T1L,d1		* ...
-*
-tmi03:		btst.l	#1,d0			* Check for timer 2 int.
-		beq	tmi04			* Jump if not set
-*
-		move.b	TIME_T2H,d1		* Read timer 2 to clear int.
-		move.b	TIME_T2L,d1		* ...
-*
-		.page
-* ------------------------------------------------------------------------------
-* update score frame counter
-* ------------------------------------------------------------------------------
-		tst.w	FC_SW			* Should we update the frame ?
-		beq	tmi04			* Jump if not
-*
-		bmi	tmi05			* Jump if we count down
-*
-		move.l	FC_VAL,d0		* Get the frame count
-		cmp.l	#FCMAX,d0		* See it we've topped out
-		bge	tmi06			* Jump if limit was hit
-*
-		addq.l	#1,d0			* Count up 1 frame
-		move.l	d0,FC_VAL		* Store updated frame count
-*
+
+		.xdef	_tsetup		| tsetup() -- timer setup function
+		.xdef	timeint		| timer interrupt handler
+
+		.xdef	_M1IoRec	| MIDI channel 1 IoRec
+		.xdef	_M2IoRec	| MIDI channel 2 IoRec
+		.xdef	_S1IoRec	| RS232 channel 1 IoRec
+		.xdef	_S2IoRec	| RS232 channel 2 IoRec
+		.xdef	_timers		| timer array -- short timers[NTIMERS]
+		.xdef	_vi_clk		| VSDD scroll delay timer
+		.xdef	_vi_tag		| VSDD VI tag
+
+		.xref	lclsadr		| score object base address
+		.xref	lclscrl		| score object scroll offset
+		.xref	_v_odtab	| VSDD object descriptor table
+
+		.page
+| ==============================================================================
+
+FRAMES		=	0		| set non-zero to enable frame pulses
+
+| Equates to variables in bios.s:
+| -------------------------------
+| These variables are permanently assigned.
+
+TIMEVEC		=	0x00000400	| LONG - System timer trap vector
+
+FC_SW		=	0x00000420	| WORD - Frame clock switch
+FC_VAL		=	0x00000422	| LONG - Frame clock value
+
+HZ_1K		=	0x0000049A	| LONG - 1000 Hz clock
+HZ_200		=	0x0000049E	| LONG - 200 Hz clock
+FRCLOCK		=	0x000004A2	| LONG - 50 Hz clock
+
+T3COUNT		=	0x000004AA	| WORD - Timer 3 count
+
+| ------------------------------------------------------------------------------
+
+| WARNING:  The address of "FLOCK" depends on the version of the bios EPROM.
+| The address below is for EPROMs dated 1988-04-18 or 1988-06-20 ONLY.
+
+FLOCK		=	0x00000E0C	| WORD - Floppy semaphore	<<<=====
+
+| ==============================================================================
+
+| Equates to routines in bios.s:
+| ------------------------------
+
+| WARNING:  The address of "FLOPVBL" depends on the version of the bios EPROM.
+| The address below is for EPROMs dated 1988-04-18 or 1988-06-20 ONLY.
+
+FLOPVBL		=	0x001015EE	| floppy VI handler address	<<<=====
+
+| ==============================================================================
+
+		.page
+
+| Hardware address equates:
+| -------------------------
+TI_VEC		=	0x00000070	| Timer interrupt autovector
+
+TIMER		=	0x003A0001	| Timer base address
+M1_ACIA		=	0x003AC001	| MIDI ACIA channel 1 base address
+
+| ------------------------------------------------------------------------------
+
+| Timer register equates:
+| -----------------------
+TIME_CRX	=	TIMER		| Control register 1 or 3
+TIME_CR2	=	TIMER+2		| Control register 2
+TIME_T1H	=	TIMER+4		| Timer 1 high byte
+TIME_T1L	=	TIMER+6		| Timer 1 low byte
+TIME_T2H	=	TIMER+8		| Timer 2 high byte
+TIME_T2L	=	TIMER+10	| Timer 2 low byte
+TIME_T3H	=	TIMER+12	| Timer 3 high byte
+TIME_T3L	=	TIMER+14	| Timer 3 low byte
+
+| Serial I/O equates:
+| -------------------
+ACIA_CFR	=	2		| CFR offset from ACIA base
+DTR_BIT		=	1		| DTR bit in ACIA CFR1
+
+IO_CFR1		=	29		| cfr1 offset in M1IoRec
+
+| ==============================================================================
+
+| Miscellaneous equates:
+| ----------------------
+IPL7		=	0x0700		| IPL mask for interrupt disable
+
+FCMAX		=	0x00FFFFFF	| Maximum frame counter value
+FCMIN		=	0x00000000	| Minimum frame counter value
+
+NTIMERS		=	8		| Number of timers in the timer array
+
+XBIOS		=	14		| XBIOS TRAP number
+X_PIOREC	=	0		| X_PIOREC code
+SR1_DEV		=	0		| RS232 ACIA channel 1
+SR2_DEV		=	1		| RS232 ACIA channel 2
+MC1_DEV		=	3		| MIDI ACIA channel 1
+MC2_DEV		=	4		| MIDI ACIA channel 2
+| ==============================================================================
+
+		.page
+| ==============================================================================
+| _tsetup -- tsetup() -- timer setup function
+| ==============================================================================
+
+_tsetup:	move.w	sr,-(a7)		| Save old interrupt mask
+		ori.w	#IPL7,sr		| Disable interrupts
+
+		move.w	#SR1_DEV,-(a7)		| Establish S1IoRec
+		move.w	#X_PIOREC,-(a7)		| ...
+		trap	#XBIOS			| ...
+		add.l	#4,a7			| ...
+		move.l	d0,_S1IoRec		| ...
+
+		move.w	#SR2_DEV,-(a7)		| Establish S2IoRec
+		move.w	#X_PIOREC,-(a7)		| ...
+		trap	#XBIOS			| ...
+		add.l	#4,a7			| ...
+		move.l	d0,_S2IoRec		| ...
+
+		move.w	#MC1_DEV,-(a7)		| Establish M1IoRec
+		move.w	#X_PIOREC,-(a7)		| ...
+		trap	#XBIOS			| ...
+		add.l	#4,a7			| ...
+		move.l	d0,_M1IoRec		| ...
+
+		move.w	#MC2_DEV,-(a7)		| Establish M2IoRec
+		move.w	#X_PIOREC,-(a7)		| ...
+		trap	#XBIOS			| ...
+		add.l	#4,a7			| ...
+		move.l	d0,_M2IoRec		| ...
+
+		.page
+
+		clr.w	FC_SW			| Stop the frame clock
+		clr.l	FC_VAL			| ... and reset it
+		clr.w	_vi_tag			| Clear VSDD VI tag
+		clr.w	_vi_clk			| Clear VSDD delay timer
+		clr.w	lclsadr			| Clear score scroll address
+		clr.w	lclscrl			| Clear score scroll offset
+
+		lea	_timers,a0		| Point at timer array
+		move.w	#NTIMERS-1,d0		| Setup to clear timer array
+
+tclr:		clr.w	(a0)+			| Clear a timer array entry
+		dbra	d0,tclr			| Loop until done
+
+		move.l	#nullrts,TIMEVEC	| Set timer interrupt vector
+		move.l	#timeint,TI_VEC		| Set timer trap vector
+
+		move.b	#0x00,TIME_T1H		| Setup timer 1  (PLL)
+		move.b	#0x1F,TIME_T1L		| ... for divide by 64
+		move.b	#0x0C,TIME_T2H		| Setup timer 2  (FC)
+		move.b	#0x7F,TIME_T2L		| ... for divide by 3200
+		move.b	#0x03,TIME_T3H		| Setup timer 3  (RTC)
+		move.b	#0x20,TIME_T3L		| ... for 1Ms interval
+		move.b	#0x42,TIME_CRX		| Setup CR3
+		move.b	#0x41,TIME_CR2		| Setup CR2
+		move.b	#0x81,TIME_CRX		| Setup CR1
+		move.b	#0x80,TIME_CRX		| Start the timers
+
+		move.w	(a7)+,sr		| Restore interrupts
+
+nullrts:	rts				| Return to caller
+
+		.page
+| ==============================================================================
+| timeint -- timer interrupt handler
+| ==============================================================================
+
+timeint:	movem.l	d0-d7/a0-a6,-(a7)	| Save registers
+		move.b	TIME_CR2,d0		| Get timer interrupt status
+| ------------------------------------------------------------------------------
+| process 1 MS timer
+| ------------------------------------------------------------------------------
+		btst.l	#2,d0			| Check timer 3 status
+		beq	tmi02			| Jump if not active
+
+		move.b	TIME_T3H,d1		| Read timer 3 count
+		lsl.w	#8,d1			| ...
+		move.b	TIME_T3L,d1		| ...
+		move.w	d1,T3COUNT		| ... and save it
+
+		addq.l	#1,HZ_1K		| Update 1ms clock  (1 KHz)
+
+		move.l	d0,-(a7)		| Preserve D0
+| ------------------------------------------------------------------------------
+| process VSDD timer
+| ------------------------------------------------------------------------------
+		tst.w	_vi_tag			| Does the VSDD need service ?
+		beq	updtime			| Jump if not
+
+		move.w	_vi_clk,d0		| Get VSDD scroll delay timer
+		subq.w	#1,d0			| Decrement timer
+		move.w	d0,_vi_clk		| Update timer
+		bne	updtime			| Jump if it's not zero yet
+
+		move.w	lclsadr,_v_odtab+12	| Update scroll address
+		move.w	lclscrl,_v_odtab+10	| Update scroll offset
+		clr.w	_vi_tag			| Reset the tag
+
+		.page
+
+| ------------------------------------------------------------------------------
+| process programable timers
+| ------------------------------------------------------------------------------
+
+updtime:	move.w	#NTIMERS-1,d0		| Setup timer array counter
+		lea	_timers,a0		| Point at timer array
+
+tdcr:		move.w	(a0),d1			| Get timer array entry
+		beq	tdcr1			| Jump if already 0
+
+		subq.w	#1,d1			| Decrement timer
+
+tdcr1:		move.w	d1,(a0)+		| Store updated timer value
+		dbra	d0,tdcr			| Loop until done
+
+| ------------------------------------------------------------------------------
+| process timer hook vector
+| ------------------------------------------------------------------------------
+		movea.l	TIMEVEC,a0		| Get RTC vector
+		move.w	#1,-(a7)		| Pass 1 msec on stack
+		jsr	(a0)			| Process RTC vector
+		addq.l	#2,a7			| Clean up stack
+
+		move.l	(a7)+,d0		| Restore D0
+
+		.page
+| ------------------------------------------------------------------------------
+| process 5 Ms clock
+| ------------------------------------------------------------------------------
+		move.w	tdiv1,d1		| Update divider
+		addq.w	#1,d1			| ...
+		move.w	d1,tdiv1		| ...
+
+		cmpi.w	#5,d1			| Do we need to update HZ_200 ?
+		blt	tmi02			| Jump if not
+
+		addq.l	#1,HZ_200		| Update 5ms clock   (200 Hz)
+| ------------------------------------------------------------------------------
+| process 20 Ms floppy clock
+| ------------------------------------------------------------------------------
+		move.w	tdiv2,d1		| Update divider
+		addq.w	#1,d1			| ...
+		move.w	d1,tdiv2		| ...
+
+		cmpi.w	#4,d1			| Do we need to update FRCLOCK ?
+		blt	tmi01			| Jump if not
+
+		addq.l	#1,FRCLOCK		| Update 20 Ms clock  (50 Hz)
+		tst.w	FLOCK			| See if floppy is active
+		bne	tmi00			| Don't call FLOPVBL if so
+
+		jsr	FLOPVBL			| Check on the floppy
+
+tmi00:		move.w	#0,tdiv2		| Reset tdiv2
+
+tmi01:		move.w	#0,tdiv1		| Reset tdiv1
+
+		.page
+| ------------------------------------------------------------------------------
+| process PLL timers
+| ------------------------------------------------------------------------------
+
+tmi02:		btst.l	#0,d0			| Check timer 1 int
+		beq	tmi03			| Jump if not set
+
+		move.b	TIME_T1H,d1		| Read timer 1 to clear int.
+		move.b	TIME_T1L,d1		| ...
+
+tmi03:		btst.l	#1,d0			| Check for timer 2 int.
+		beq	tmi04			| Jump if not set
+
+		move.b	TIME_T2H,d1		| Read timer 2 to clear int.
+		move.b	TIME_T2L,d1		| ...
+
+		.page
+| ------------------------------------------------------------------------------
+| update score frame counter
+| ------------------------------------------------------------------------------
+		tst.w	FC_SW			| Should we update the frame ?
+		beq	tmi04			| Jump if not
+
+		bmi	tmi05			| Jump if we count down
+
+		move.l	FC_VAL,d0		| Get the frame count
+		cmp.l	#FCMAX,d0		| See it we've topped out
+		bge	tmi06			| Jump if limit was hit
+
+		addq.l	#1,d0			| Count up 1 frame
+		move.l	d0,FC_VAL		| Store updated frame count
+
 		.ifne	FRAMES
-		move.w	sr,d1			* Preserve interrupt status
-		ori.w	#$0700,sr		* Disable interrupts
-*
-		movea.l	_M1IoRec,a0		* Point at M1IoRec
-		move.b	IO_CFR1(a0),d0		* Get MIDI-1 CFR1 value
-		or.b	#$80,d0			* Force MSB = 1 for CFR1 output
-		movea.l	#M1_ACIA,a0		* Point at MIDI-1 ACIA channel
-		bchg.l	#DTR_BIT,d0		* Toggle DTR for output
-		move.b	d0,ACIA_CFR(a0)		* Output toggled DTR
-		bchg.l	#DTR_BIT,d0		* Toggle DTR for output
-		move.b	d0,ACIA_CFR(a0)		* Output toggled DTR
-		move.w	d1,sr			* Restore interrupts
+		move.w	sr,d1			| Preserve interrupt status
+		ori.w	#0x0700,sr		| Disable interrupts
+
+		movea.l	_M1IoRec,a0		| Point at M1IoRec
+		move.b	IO_CFR1(a0),d0		| Get MIDI-1 CFR1 value
+		or.b	#0x80,d0		| Force MSB = 1 for CFR1 output
+		movea.l	#M1_ACIA,a0		| Point at MIDI-1 ACIA channel
+		bchg.l	#DTR_BIT,d0		| Toggle DTR for output
+		move.b	d0,ACIA_CFR(a0)		| Output toggled DTR
+		bchg.l	#DTR_BIT,d0		| Toggle DTR for output
+		move.b	d0,ACIA_CFR(a0)		| Output toggled DTR
+		move.w	d1,sr			| Restore interrupts
 		.endc
-*
-		bra	tmi04			* Done
-*
-tmi07:		move.l	#FCMIN,FC_VAL		* Force hard limit, just in case
-		bra	tmi04			* Done
-*
-tmi06:		move.l	#FCMAX,FC_VAL		* Force hard limit, just in case
-		bra	tmi04			* Done
-*
-tmi05:		move.l	FC_VAL,d0		* Get the frame count
-		ble	tmi07			* Done if already counted down
-*
-		subq.l	#1,d0			* Count down 1 frame
-		move.l	d0,FC_VAL		* Store udpated frame count
-		bra	tmi04			* Done
-*
-		nop				* Filler to force equal paths
-*
-tmi04:		movem.l	(a7)+,d0-d7/a0-a6	* Restore registers
-		rte				* Return to interrupted code
-*
-		.page
-* ==============================================================================
+
+		bra	tmi04			| Done
+
+tmi07:		move.l	#FCMIN,FC_VAL		| Force hard limit, just in case
+		bra	tmi04			| Done
+
+tmi06:		move.l	#FCMAX,FC_VAL		| Force hard limit, just in case
+		bra	tmi04			| Done
+
+tmi05:		move.l	FC_VAL,d0		| Get the frame count
+		ble	tmi07			| Done if already counted down
+
+		subq.l	#1,d0			| Count down 1 frame
+		move.l	d0,FC_VAL		| Store udpated frame count
+		bra	tmi04			| Done
+
+		nop				| Filler to force equal paths
+
+tmi04:		movem.l	(a7)+,d0-d7/a0-a6	| Restore registers
+		rte				| Return to interrupted code
+
+		.page
+| ==============================================================================
 		.bss
-* ==============================================================================
-*
-* A note on tdiv1 and tdiv2:
-* --------------------------
-*
-* tdiv1 and tdiv2 are actually defined in the bios,  but since they could move
-* we define them here and ignore the ones in the bios.
-*
-tdiv1:		ds.w	1		* Timer divider 1  (divides HZ_1K)
-tdiv2:		ds.w	1		* Timer divider 2  (divides HZ_200)
-*
-* ------------------------------------------------------------------------------
-*
-_timers:	ds.w	NTIMERS		* Timer array -- short timers[NTIMERS];
-*
-_vi_clk:	ds.w	1		* VSDD scroll delay timer
-_vi_tag:	ds.w	1		* VSDD VI 'needs service' tag
-*
-_S1IoRec:	ds.l	1		* address of RS232 channel 1 IoRec
-_S2IoRec:	ds.l	1		* address of RS232 channel 2 IoRec
-_M1IoRec:	ds.l	1		* address of MIDI channel 1 IoRec
-_M2IoRec:	ds.l	1		* address of MIDI channel 2 IoRec
-* ==============================================================================
-*
+| ==============================================================================
+
+| A note on tdiv1 and tdiv2:
+| --------------------------
+
+| tdiv1 and tdiv2 are actually defined in the bios,  but since they could move
+| we define them here and ignore the ones in the bios.
+
+tdiv1:		ds.w	1		| Timer divider 1  (divides HZ_1K)
+tdiv2:		ds.w	1		| Timer divider 2  (divides HZ_200)
+
+| ------------------------------------------------------------------------------
+
+_timers:	ds.w	NTIMERS		| Timer array -- short timers[NTIMERS];
+
+_vi_clk:	ds.w	1		| VSDD scroll delay timer
+_vi_tag:	ds.w	1		| VSDD VI 'needs service' tag
+
+_S1IoRec:	ds.l	1		| address of RS232 channel 1 IoRec
+_S2IoRec:	ds.l	1		| address of RS232 channel 2 IoRec
+_M1IoRec:	ds.l	1		| address of MIDI channel 1 IoRec
+_M2IoRec:	ds.l	1		| address of MIDI channel 2 IoRec
+| ==============================================================================
+
 		.end
Index: ram/tofpu.s
===================================================================
--- ram/tofpu.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ ram/tofpu.s	(revision 08e1da1cabca094217491629d328ae7146816782)
@@ -1,76 +1,76 @@
-* ------------------------------------------------------------------------------
-* tofpu.s -- convert between millisecond time interval and FPU increment formats
-* Version 9 -- 1987-12-21 -- D.N. Lynx Crowe
-*
-*	unsigned short
-*	tofpu(time)
-*	unsigned short time;
-*
-*		Converts 'time' in milliseconds to FPU format.
-*
-*	unsigned short
-*	fromfpu(fputime)
-*	unsigned short fputime;
-*
-*		Converts 'fputime' from FPU format to milliseconds.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| tofpu.s -- convert between millisecond time interval and FPU increment formats
+| Version 9 -- 1987-12-21 -- D.N. Lynx Crowe
+
+|	unsigned short
+|	tofpu(time)
+|	unsigned short time;
+
+|		Converts 'time' in milliseconds to FPU format.
+
+|	unsigned short
+|	fromfpu(fputime)
+|	unsigned short fputime;
+
+|		Converts 'fputime' from FPU format to milliseconds.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_tofpu
 		.xdef	_fromfpu
-*
-TIME		.equ	8		* WORD - time argument  (either format)
-*
-TCYCL		.equ	$3B000000	* LONG - scaled FPU cycle time  (.4608)
-*
+
+TIME		=	8		| WORD - time argument  (either format)
+
+TCYCL		=	0x3B000000	| LONG - scaled FPU cycle time  (.4608)
+
 		.page
-_tofpu:		link	a6,#0		* link stack frames
-		move.w	TIME(a6),d1	* get time interval
-		beq	notime		* jump if zero time
-*
-		clr.w	d2		* clear shift count
-*
-sloop:		btst	#15,d1		* see if MSB is set yet
-		bne	gotexp		* jump if so
-*
-		lsl.w	d1		* shift time left a bit
-		addq.w	#1,d2		* increment the shift count
-		cmpi.w	#15,d2		* see if we've hit the maximum
-		bne	sloop		* try again if not
-*
-gotexp:		move.l	#TCYCL,d0	* divide FPU cycle time by shifted value
-		divu	d1,d0		* ...
-		andi.w	#$FFF0,d0	* mask result
-		or.w	d2,d0		* set the exponent
-*
-finis:		unlk	a6		* unlink stack frames
-		rts			* return to caller
-*
-notime:		clr.w	d0		* zero time is zero ...
-		bra	finis		* return value for zero time
-*
+_tofpu:		link	a6,#0		| link stack frames
+		move.w	TIME(a6),d1	| get time interval
+		beq	notime		| jump if zero time
+
+		clr.w	d2		| clear shift count
+
+sloop:		btst	#15,d1		| see if MSB is set yet
+		bne	gotexp		| jump if so
+
+		lsl.w	#1,d1		| shift time left a bit
+		addq.w	#1,d2		| increment the shift count
+		cmpi.w	#15,d2		| see if we've hit the maximum
+		bne	sloop		| try again if not
+
+gotexp:		move.l	#TCYCL,d0	| divide FPU cycle time by shifted value
+		divu	d1,d0		| ...
+		andi.w	#0xFFF0,d0	| mask result
+		or.w	d2,d0		| set the exponent
+
+finis:		unlk	a6		| unlink stack frames
+		rts			| return to caller
+
+notime:		clr.w	d0		| zero time is zero ...
+		bra	finis		| return value for zero time
+
 		.page
-_fromfpu:	link	a6,#0		* link stack frames
-		move.w	TIME(a6),d1	* get FPU formatted time
-		beq	zerotime	* done if it's zero
-*
-		move.w	d1,d2		* extract shift count
-		andi.w	#$000F,d2	* ...
-		andi.w	#$FFF0,d1	* extract mantissa
-		beq	zerotime	* ... just in case it's zero  (an error)
-*
-		move.l	#TCYCL,d0	* get FPU cycle time
-		divu	d1,d0		* divide by mantissa
-		bvc	divok		* jump if divide ok
-*
-		move.w	#$FFFF,d0	* jam maximum value for overflow
-*
-divok:		lsr.w	d2,d0		* shift result into position
-*
-byebye:		unlk	a6		* unlink stack frames
-		rts			* return to caller
-*
-zerotime:	clr.l	d0		* return a zero result
-		bra	byebye		* ...
-*
+_fromfpu:	link	a6,#0		| link stack frames
+		move.w	TIME(a6),d1	| get FPU formatted time
+		beq	zerotime	| done if it's zero
+
+		move.w	d1,d2		| extract shift count
+		andi.w	#0x000F,d2	| ...
+		andi.w	#0xFFF0,d1	| extract mantissa
+		beq	zerotime	| ... just in case it's zero  (an error)
+
+		move.l	#TCYCL,d0	| get FPU cycle time
+		divu	d1,d0		| divide by mantissa
+		bvc	divok		| jump if divide ok
+
+		move.w	#0xFFFF,d0	| jam maximum value for overflow
+
+divok:		lsr.w	d2,d0		| shift result into position
+
+byebye:		unlk	a6		| unlink stack frames
+		rts			| return to caller
+
+zerotime:	clr.l	d0		| return a zero result
+		bra	byebye		| ...
+
 		.end
