Index: iolib/hwdefs.s
===================================================================
--- iolib/hwdefs.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ iolib/hwdefs.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,18 +1,18 @@
-* ------------------------------------------------------------------------------
-* hwdefs.s --  External definitions of Buchla 700 I/O addresses
-* Version 14 -- 1988-08-15 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| hwdefs.s --  External definitions of Buchla 700 I/O addresses
+| Version 14 -- 1988-08-15 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_io_time,_io_lcd,_io_ser,_io_midi
 		.xdef	_io_disk,_io_tone,_io_leds,_io_kbrd
 		.xdef	_io_vreg,_io_vraw,_io_vram,_io_fpu
 		.xdef	_lcd_a0,_lcd_a1
-*
+
 		.xdef	_v_regs,_v_odtab,_v_actab
 		.xdef	_v_ct0
 		.xdef	_v_gt1
 		.xdef	_v_score,_v_cgtab
-*
+
 		.xdef	_v_curs0,_v_curs1,_v_curs2,_v_curs3
 		.xdef	_v_curs4,_v_curs5,_v_curs6,_v_curs7
@@ -20,67 +20,67 @@
 		.xdef	_v_win0
 		.xdef	_v_cur
-*
+
 		.xdef	_fc_sw,_fc_val
-*
-* ------------------------------------------------------------------------------
-*
-* Hardware base addresses
-* -----------------------
-_io_fpu		.equ	$180000		* FPU base address
-*
-VB		.equ	$200000		* VSDD base address
-*
-_io_time	.equ	$3A0001		* Timer chip
-_io_lcd		.equ	$3A4001		* LCD controller
-_io_ser		.equ	$3A8001		* Serial ports  (RS232)
-_io_midi	.equ	$3AC001		* MIDI ports
-_io_disk	.equ	$3B0001		* Disk controller
-_io_tone	.equ	$3B4001		* Sound generator chip
-_io_leds	.equ	$3B8001		* LED driver
-_io_kbrd	.equ	$3BC001		* Keyboard / panel processor
-*
-_lcd_a0		.equ	_io_lcd		* LCD port a0
-_lcd_a1		.equ	_io_lcd+2	* LCD port a1
-*
+
+| ------------------------------------------------------------------------------
+
+| Hardware base addresses
+| -----------------------
+_io_fpu		=	0x180000	| FPU base address
+
+VB		=	0x200000	| VSDD base address
+
+_io_time	=	0x3A0001	| Timer chip
+_io_lcd		=	0x3A4001	| LCD controller
+_io_ser		=	0x3A8001	| Serial ports  (RS232)
+_io_midi	=	0x3AC001	| MIDI ports
+_io_disk	=	0x3B0001	| Disk controller
+_io_tone	=	0x3B4001	| Sound generator chip
+_io_leds	=	0x3B8001	| LED driver
+_io_kbrd	=	0x3BC001	| Keyboard / panel processor
+
+_lcd_a0		=	_io_lcd		| LCD port a0
+_lcd_a1		=	_io_lcd+2	| LCD port a1
+
 		.page
-*
-* Video definitions
-* -----------------
-_io_vreg	.equ	VB		* Relocated video registers after setup
-_io_vraw	.equ	VB+$400		* Raw video registers at RESET
-_io_vram	.equ	VB		* Video RAM base address
-*
-* Name			Offset		  Usage			       Bank
-* -------		---------	  -------------------------    ----
-_v_regs		.equ	VB		* Video registers	       0,1
-*
-_v_odtab	.equ	VB+128		* Object Descriptor Table	0
-_v_actab	.equ	VB+256		* Access Table			0
-_v_ct0		.equ	VB+1024		* Character Text-0		0
-_v_gt1		.equ	VB+1304		* Graphics Text-1		0
-_v_score	.equ	VB+8192		* Score object			0
-_v_cgtab	.equ	VB+122880	* Character Generator Table	0
-*
-_v_curs0	.equ	VB+1024		* Cursor object 0  (arrow ULE)	1
-_v_curs1	.equ	VB+1152		* Cursor object 1  (arrow ULO)	1
-_v_curs2	.equ	VB+1280		* Cursor object 2  (arrow URE)	1
-_v_curs3	.equ	VB+1408		* Cursor object 3  (arrow URO)	1
-_v_curs4	.equ	VB+1536		* Cursor object 4  (arrow LLE)	1
-_v_curs5	.equ	VB+1664		* Cursor object 5  (arrow LLO)	1
-_v_curs6	.equ	VB+1792		* Cursor object 6  (arrow LRE)	1
-_v_curs7	.equ	VB+1920		* Cursor object 7  (arrow LRO)	1
-_v_tcur		.equ	VB+2048		* Typewriter cursor		1
-_v_kbobj	.equ	VB+2880		* Keyboard object		1
-_v_lnobj	.equ	VB+4672		* Line object			1
-_v_cur		.equ	VB+6464		* Underline cursor		1
-_v_win0		.equ	VB+16384	* Window-0 object		1
-*
-* BIOS RAM definitions
-* --------------------
-* WARNING: the following addresses must match those of the corresponding
-* variables defined in bios.s or chaos is guaranteed.
-*
-_fc_sw		.equ	$420		* word - Frame counter switch
-_fc_val		.equ	$422		* long - Frame counter value
-*
+
+| Video definitions
+| -----------------
+_io_vreg	=	VB		| Relocated video registers after setup
+_io_vraw	=	VB+0x400	| Raw video registers at RESET
+_io_vram	=	VB		| Video RAM base address
+
+| Name			Offset		  Usage			       Bank
+| -------		---------	  -------------------------    ----
+_v_regs		=	VB		| Video registers	       0,1
+
+_v_odtab	=	VB+128		| Object Descriptor Table	0
+_v_actab	=	VB+256		| Access Table			0
+_v_ct0		=	VB+1024		| Character Text-0		0
+_v_gt1		=	VB+1304		| Graphics Text-1		0
+_v_score	=	VB+8192		| Score object			0
+_v_cgtab	=	VB+122880	| Character Generator Table	0
+
+_v_curs0	=	VB+1024		| Cursor object 0  (arrow ULE)	1
+_v_curs1	=	VB+1152		| Cursor object 1  (arrow ULO)	1
+_v_curs2	=	VB+1280		| Cursor object 2  (arrow URE)	1
+_v_curs3	=	VB+1408		| Cursor object 3  (arrow URO)	1
+_v_curs4	=	VB+1536		| Cursor object 4  (arrow LLE)	1
+_v_curs5	=	VB+1664		| Cursor object 5  (arrow LLO)	1
+_v_curs6	=	VB+1792		| Cursor object 6  (arrow LRE)	1
+_v_curs7	=	VB+1920		| Cursor object 7  (arrow LRO)	1
+_v_tcur		=	VB+2048		| Typewriter cursor		1
+_v_kbobj	=	VB+2880		| Keyboard object		1
+_v_lnobj	=	VB+4672		| Line object			1
+_v_cur		=	VB+6464		| Underline cursor		1
+_v_win0		=	VB+16384	| Window-0 object		1
+
+| BIOS RAM definitions
+| --------------------
+| WARNING: the following addresses must match those of the corresponding
+| variables defined in bios.s or chaos is guaranteed.
+
+_fc_sw		=	0x420		| word - Frame counter switch
+_fc_val		=	0x422		| long - Frame counter value
+
 		.end
Index: iolib/rtraps.s
===================================================================
--- iolib/rtraps.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ iolib/rtraps.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,48 +1,48 @@
-* ------------------------------------------------------------------------------
-* rtraps.s -- define ROMP debug trap
-* Version 7 -- 1988-01-12 -- Copyright 1987, 1988 by D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| rtraps.s -- define ROMP debug trap
+| Version 7 -- 1988-01-12 -- Copyright 1987, 1988 by D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_trap15
-*
+
 		.xref	_rompbp
-*
+
 		.xref	tr1sav,tr13sav,tr14sav
 		.xref	tr1rmp,tr13rmp,tr14rmp
-*
-BUCHLA		.equ	1		* IPL value:  0 = NASA , 1 = Buchla
-*
+
+BUCHLA		=	1		| IPL value:  0 = NASA , 1 = Buchla
+
 		.ifeq	BUCHLA
-IPLEVEL		.equ	$0400		* NASA IPL = 4    (enable 5 and above)
+IPLEVEL		=	0x0400		| NASA IPL = 4    (enable 5 and above)
 		.endc
-*
+
 		.ifne	BUCHLA
-IPLEVEL		.equ	$0200		* Buchla IPL = 2  (enable 3 and above)
+IPLEVEL		=	0x0200		| Buchla IPL = 2  (enable 3 and above)
 		.endc
-*
-IPL7		.equ	$0700		* IPL 7
-*
-* _trap15 -- ROMP debug trap  (used to implement breakpoints)
-* -------    ------------------------------------------------
-_trap15:	ori.w	#IPL7,sr		* Disable interrupts
-		move.w	#0,-(a7)		* Keep stack long aligned
-		movem.l	d0-d7/a0-a7,-(a7)	* Save regs on stack
-		move.l	tr1sav,tr1rmp		* Save trap save areas
-		move.l	tr13sav,tr13rmp		* ...
-		move.l	tr14sav,tr14rmp		* ...
-		move.w	sr,d0			* Get status register
-		andi.w	#$F8FF,d0		* Enable serial I/O interrupts
-		ori.w	#IPLEVEL,d0		* ...
-		move.w	d0,sr			* ...
-		jsr	_rompbp			* Pass control to ROMP
-*
-		ori.w	#IPL7,sr		* Disable interrupts
-		move.l	tr14rmp,tr14sav		* Restore trap save areas
-		move.l	tr13rmp,tr13sav		* ...
-		move.l	tr1rmp,tr1sav		* ...
-		movem.l	(a7)+,d0-d7/a0-a7	* Restore regs
-		addq.l	#2,a7			* Discard alignment filler word
-		rte				* Back to what we interrupted
-*
+
+IPL7		=	0x0700		| IPL 7
+
+| _trap15 -- ROMP debug trap  (used to implement breakpoints)
+| -------    ------------------------------------------------
+_trap15:	ori.w	#IPL7,sr		| Disable interrupts
+		move.w	#0,-(a7)		| Keep stack long aligned
+		movem.l	d0-d7/a0-a7,-(a7)	| Save regs on stack
+		move.l	tr1sav,tr1rmp		| Save trap save areas
+		move.l	tr13sav,tr13rmp		| ...
+		move.l	tr14sav,tr14rmp		| ...
+		move.w	sr,d0			| Get status register
+		andi.w	#0xF8FF,d0		| Enable serial I/O interrupts
+		ori.w	#IPLEVEL,d0		| ...
+		move.w	d0,sr			| ...
+		jsr	_rompbp			| Pass control to ROMP
+
+		ori.w	#IPL7,sr		| Disable interrupts
+		move.l	tr14rmp,tr14sav		| Restore trap save areas
+		move.l	tr13rmp,tr13sav		| ...
+		move.l	tr1rmp,tr1sav		| ...
+		movem.l	(a7)+,d0-d7/a0-a7	| Restore regs
+		addq.l	#2,a7			| Discard alignment filler word
+		rte				| Back to what we interrupted
+
 		.end
Index: iolib/setipl.s
===================================================================
--- iolib/setipl.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ iolib/setipl.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,44 +1,44 @@
-*
-* setipl.s -- Set internal processor interrupt level
-* --------    --------------------------------------
-* Version 2 -- 1988-06-29 -- D.N. Lynx Crowe
-*
-*	short
-*	setipl(arg);
-*	short arg;
-*
-*	Sets processor interrupt level to arg.
-*	Returns old interrupt level, or -1 if arg < 0 or > 7
-*
-*	Assumes you are in supervisor mode.
-*	You get a Privelege Violation TRAP if you aren't.
-*
+
+| setipl.s -- Set internal processor interrupt level
+| --------    --------------------------------------
+| Version 2 -- 1988-06-29 -- D.N. Lynx Crowe
+
+|	short
+|	setipl(arg);
+|	short arg;
+
+|	Sets processor interrupt level to arg.
+|	Returns old interrupt level, or -1 if arg < 0 or > 7
+
+|	Assumes you are in supervisor mode.
+|	You get a Privelege Violation TRAP if you aren't.
+
 		.text
-*
+
 		.xdef	_setipl
-*
-_setipl:	link	a6,#0			* Link up stack frames
-		move.w	8(a6),d0		* Get argument
-		tst.w	d0			* Check lower limit
-		bmi	setipler		* Jump if < 0  (error)
-*
-		cmpi.w	#7,d0			* Check upper limit
-		bgt	setipler		* Jump if > 7  (error)
-*
-		move.w	sr,d1			* Get current level
-		move.w	d1,d2			* ... save for later
-		lsl.w	#8,d0			* Shift argument into position
-		andi.w	#$F8FF,d1		* Mask out old level
-		or.w	d0,d1			* OR in new level
-		move.w	d2,d0			* Setup return of old level
-		lsr.w	#8,d0			* ...
-		andi.l	#$7,d0			* ...
-		move.w	d1,sr			* Set the new interrupt level
-		unlk	a6			* Unlink stack frames
-		rts				* Return to caller
-*
-setipler:	moveq.l	#-1,d0			* Setup to return error code
-		unlk	a6			* Unlink stack frames
-		rts				* Return to caller
-*
+
+_setipl:	link	a6,#0			| Link up stack frames
+		move.w	8(a6),d0		| Get argument
+		tst.w	d0			| Check lower limit
+		bmi	setipler		| Jump if < 0  (error)
+
+		cmpi.w	#7,d0			| Check upper limit
+		bgt	setipler		| Jump if > 7  (error)
+
+		move.w	sr,d1			| Get current level
+		move.w	d1,d2			| ... save for later
+		lsl.w	#8,d0			| Shift argument into position
+		andi.w	#0xF8FF,d1		| Mask out old level
+		or.w	d0,d1			| OR in new level
+		move.w	d2,d0			| Setup return of old level
+		lsr.w	#8,d0			| ...
+		andi.l	#0x7,d0			| ...
+		move.w	d1,sr			| Set the new interrupt level
+		unlk	a6			| Unlink stack frames
+		rts				| Return to caller
+
+setipler:	moveq.l	#-1,d0			| Setup to return error code
+		unlk	a6			| Unlink stack frames
+		rts				| Return to caller
+
 		.end
Index: iolib/setsr.s
===================================================================
--- iolib/setsr.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ iolib/setsr.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,27 +1,27 @@
-*
-* setsr.s -- Set processor status register
-* -------    -----------------------------
-* Version 1 -- 1988-06-29 -- D.N. Lynx Crowe
-*
-*	short
-*	setsr(arg);
-*	short arg;
-*
-*	Sets processor status register to 'arg'.
-*	Returns old status register value.
-*
-*	Assumes you are in supervisor mode.
-*	You get a Privelege Violation TRAP if you aren't.
-*
-*	Coded for speed -- this is as fast as you can get.
-*	No error checking is done -- assumes you know what you're doing.
-*
+
+| setsr.s -- Set processor status register
+| -------    -----------------------------
+| Version 1 -- 1988-06-29 -- D.N. Lynx Crowe
+
+|	short
+|	setsr(arg);
+|	short arg;
+
+|	Sets processor status register to 'arg'.
+|	Returns old status register value.
+
+|	Assumes you are in supervisor mode.
+|	You get a Privelege Violation TRAP if you aren't.
+
+|	Coded for speed -- this is as fast as you can get.
+|	No error checking is done -- assumes you know what you're doing.
+
 		.text
-*
+
 		.xdef	_setsr
-*
-_setsr:		move.w	sr,d0			* Get current sr
-		move.w	4(sp),sr		* Set new sr
-		rts				* Return to caller
-*
+
+_setsr:		move.w	sr,d0			| Get current sr
+		move.w	4(sp),sr		| Set new sr
+		rts				| Return to caller
+
 		.end
Index: iolib/traps.s
===================================================================
--- iolib/traps.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ iolib/traps.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,62 +1,62 @@
-*
-* traps.s -- define trap linkages for C routines
-* -------    -----------------------------------
-* Version 8 -- 1987-06-08 -- D.N. Lynx Crowe
-*
-* Caution:  these are serially re-useable, but NOT reentrant, so
-* don't use them in interrupt processing code.
-*
-* An exception is made for ROMP in _trap15 for breakpoints so that the
-* debug code can be debugged.
-*
+
+| traps.s -- define trap linkages for C routines
+| -------    -----------------------------------
+| Version 8 -- 1987-06-08 -- D.N. Lynx Crowe
+
+| Caution:  these are serially re-useable, but NOT reentrant, so
+| don't use them in interrupt processing code.
+
+| An exception is made for ROMP in _trap15 for breakpoints so that the
+| debug code can be debugged.
+
 		.text
-*
+
 		.xdef	_trap1
 		.xdef	_trap13,_trap14
 		.xdef	_xtrap15
-*
+
 		.xdef	tr1sav,tr13sav,tr14sav
 		.xdef	tr1rmp,tr13rmp,tr14rmp
-*
-* _trap1 -- provide access to BDOS functions
-* ------    --------------------------------
-_trap1:		move.l	(a7)+,tr1sav		* Save return address
-		trap	#1			* Do the trap
-		move.l	tr1sav,-(a7)		* Restore return address
-		rts				* Return to caller
-*
-* _trap13 -- provide access to BIOS functions
-* -------    --------------------------------
-_trap13:	move.l	(a7)+,tr13sav		* Save return address
-		trap	#13			* Do the trap
-		move.l	tr13sav,-(a7)		* Restore return address
-		rts				* Return to caller
-*
-* _trap14 -- provide access to extended BIOS functions
-* -------    -----------------------------------------
-_trap14:	move.l	(a7)+,tr14sav		* Save return address
-		trap	#14			* Do the trap
-		move.l	tr14sav,-(a7)		* Restore return address
-		rts				* Return to caller
-*
-* _xtrap15 -- Setup initial register trap for ROMP
-* --------    ------------------------------------
-_xtrap15:	trap	#15			* TRAP into ROMP
-		rts				* Return  (usually won't happen)
-*
+
+| _trap1 -- provide access to BDOS functions
+| ------    --------------------------------
+_trap1:		move.l	(a7)+,tr1sav		| Save return address
+		trap	#1			| Do the trap
+		move.l	tr1sav,-(a7)		| Restore return address
+		rts				| Return to caller
+
+| _trap13 -- provide access to BIOS functions
+| -------    --------------------------------
+_trap13:	move.l	(a7)+,tr13sav		| Save return address
+		trap	#13			| Do the trap
+		move.l	tr13sav,-(a7)		| Restore return address
+		rts				| Return to caller
+
+| _trap14 -- provide access to extended BIOS functions
+| -------    -----------------------------------------
+_trap14:	move.l	(a7)+,tr14sav		| Save return address
+		trap	#14			| Do the trap
+		move.l	tr14sav,-(a7)		| Restore return address
+		rts				| Return to caller
+
+| _xtrap15 -- Setup initial register trap for ROMP
+| --------    ------------------------------------
+_xtrap15:	trap	#15			| TRAP into ROMP
+		rts				| Return  (usually won't happen)
+
 		.page
-*
-* RAM storage areas
-* -----------------
+
+| RAM storage areas
+| -----------------
 		.bss
 		.even
-*
-tr1sav:		ds.l	1		* Return address for trap1
-tr13sav:	ds.l	1		* Return address for trap13
-tr14sav:	ds.l	1		* Return address for trap14
-*
-tr1rmp:		ds.l	1		* Save area for tr1sav for ROMP
-tr13rmp:	ds.l	1		* Save area for tr13sav for ROMP
-tr14rmp:	ds.l	1		* Save area for tr14sav for ROMP
-*
+
+tr1sav:		ds.l	1		| Return address for trap1
+tr13sav:	ds.l	1		| Return address for trap13
+tr14sav:	ds.l	1		| Return address for trap14
+
+tr1rmp:		ds.l	1		| Save area for tr1sav for ROMP
+tr13rmp:	ds.l	1		| Save area for tr13sav for ROMP
+tr14rmp:	ds.l	1		| Save area for tr14sav for ROMP
+
 		.end
Index: lib700/aldiv.s
===================================================================
--- lib700/aldiv.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ lib700/aldiv.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,16 +1,16 @@
-*
-* aldiv.s -- indirect long divide
-* Version 1 -- 1989-01-24 -- D.N. Lynx Crowe
-*
+
+| aldiv.s -- indirect long divide
+| Version 1 -- 1989-01-24 -- D.N. Lynx Crowe
+
 	.text
-*
+
 	.xdef	aldiv
 	.xdef	_aldiv
-*
+
 	.xref	_ldiv
-*
+
 aldiv:
 _aldiv:
-*
+
 	link	a6,#-2
 	move.l	12(a6),-(a7)
@@ -23,4 +23,4 @@
 	unlk	a6
 	rts
-*
+
 	.end
Index: lib700/almul.s
===================================================================
--- lib700/almul.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ lib700/almul.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,12 +1,12 @@
-*
-* almul.s -- indirect long multiply
-* Version 1 -- 1989-01-24 -- D.N. Lynx Crowe
-*
+
+| almul.s -- indirect long multiply
+| Version 1 -- 1989-01-24 -- D.N. Lynx Crowe
+
 		.text
-*
+
 		.xdef	almul
-*
+
 		.xref	lmul
-*
+
 almul:		move.l	a5,-(a7)
 		movea.l	8(a7),a5
@@ -18,4 +18,4 @@
 		movea.l	(a7)+,a5
 		rts
-*
+
 		.end
Index: lib700/alrem.s
===================================================================
--- lib700/alrem.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ lib700/alrem.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,17 +1,17 @@
-*
-* alrem.s -- indirect long modulus
-* Version 1 -- 1989-01-24 -- D.N. Lynx Crowe
-*
+
+| alrem.s -- indirect long modulus
+| Version 1 -- 1989-01-24 -- D.N. Lynx Crowe
+
 		.text
-*
+
 		.xdef	alrem
 		.xdef	_alrem
-*
+
 		.xref	_ldiv
 		.xref	_ldivr
-*
+
 alrem:
 _alrem:
-*
+
 		link	a6,#-2
 		move.l	12(a6),-(a7)
@@ -25,4 +25,4 @@
 		unlk	a6
 		rts
-*
+
 		.end
Index: lib700/blkfill.s
===================================================================
--- lib700/blkfill.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ lib700/blkfill.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,18 +1,18 @@
-* ------------------------------------------------------------------------------
-* blkfill.s -- block fill function
-* Version 1 -- 1987-08-28 -- D.N. Lynx Crowe
-*
-*	void
-*	blkfill(where, what, count)
-*	char *where;
-*	char what;
-*	short count;
-*
-*		Fills 'count' bytes at 'where' with 'what'.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| blkfill.s -- block fill function
+| Version 1 -- 1987-08-28 -- D.N. Lynx Crowe
+
+|	void
+|	blkfill(where, what, count)
+|	char |where;
+|	char what;
+|	short count;
+
+|		Fills 'count' bytes at 'where' with 'what'.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_blkfill
-*
+
 _blkfill:	link	a6,#0
 		movem.l	d5-d7/a5-a5,-(a7)
@@ -21,16 +21,16 @@
 		move.w	14(a6),d6
 		bra	blkf2
-*
+
 blkf1:		move.b	d7,(a5)+
-*
+
 blkf2:		move.w	d6,d0
 		subq.w	#1,d6
 		tst.w	d0
 		bgt	blkf1
-*
+
 		tst	(a7)+
 		movem.l	(a7)+,d6-d7/a5-a5
 		unlk	a6
 		rts
-*
+
 		.end
Index: lib700/blkmove.s
===================================================================
--- lib700/blkmove.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ lib700/blkmove.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,25 +1,25 @@
-* ------------------------------------------------------------------------------
-* blkmove.s -- block move function
-* Version 1 -- 1987-08-28 -- D.N. Lynx Crowe
-*
-*	void
-*	blkmove(to, from, n)
-*	char *to, *from;
-*	short n;
-*
-*		Copies 'n' bytes from address 'from' to address 'to'.
-*		Treats overlaps of from and to areas intelligently.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| blkmove.s -- block move function
+| Version 1 -- 1987-08-28 -- D.N. Lynx Crowe
+
+|	void
+|	blkmove(to, from, n)
+|	char |to, |from;
+|	short n;
+
+|		Copies 'n' bytes from address 'from' to address 'to'.
+|		Treats overlaps of from and to areas intelligently.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_blkmove
-*
-_blkmove:	link	a6,#$FFFC
+
+_blkmove:	link	a6,#-4
 		move.l	8(a6),d0
 		cmp.l	12(a6),d0
 		bcc	blkm3
-*
+
 		bra	blkm2
-*
+
 blkm1:		movea.l	8(a6),a0
 		movea.l	12(a6),a1
@@ -27,12 +27,12 @@
 		addq.l	#1,8(a6)
 		addq.l	#1,12(a6)
-*
+
 blkm2:		move.w	16(a6),d0
 		subq.w	#1,16(a6)
 		tst.w	d0
 		bne	blkm1
-*
+
 		bra	blkm6
-*
+
 blkm3:		move.w	16(a6),d0
 		ext.l	d0
@@ -40,5 +40,5 @@
 		add.l	d0,12(a6)
 		bra	blkm5
-*
+
 blkm4:		subq.l	#1,8(a6)
 		subq.l	#1,12(a6)
@@ -46,12 +46,12 @@
 		movea.l	12(a6),a1
 		move.b	(a1),(a0)
-*
+
 blkm5:		move.w	16(a6),d0
 		subq.w	#1,16(a6)
 		tst.w	d0
 		bne	blkm4
-*
+
 blkm6:		unlk	a6
 		rts
-*
+
 		.end
Index: lib700/finalone.s
===================================================================
--- lib700/finalone.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ lib700/finalone.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,30 +1,30 @@
-* ------------------------------------------------------------------------------
-* finalone.s -- the last stuff to get loaded
-* Version 4 -- 1987-06-30 -- D.N. Lynx Crowe
-*
-* This is so we can figure out where things got loaded.
-* ------------------------------------------------------------------------------
-*
+| ------------------------------------------------------------------------------
+| finalone.s -- the last stuff to get loaded
+| Version 4 -- 1987-06-30 -- D.N. Lynx Crowe
+
+| This is so we can figure out where things got loaded.
+| ------------------------------------------------------------------------------
+
 		.text
-*
+
 		.xdef	FinalOne
 		.xdef	The_Fini
 		.xdef	Text_End
-*
-*
-* This is the last piece of code in the 'text' segment.
-*
-FinalOne:	rts			* we just need the address here
-*
-Text_End:	rts			* we just need the address here
-*
-* ------------------------------------------------------------------------------
-*
+
+
+| This is the last piece of code in the 'text' segment.
+
+FinalOne:	rts			| we just need the address here
+
+Text_End:	rts			| we just need the address here
+
+| ------------------------------------------------------------------------------
+
 		.data
 		.even
-*
-The_Fini:	dc.w	$FFFF		* last thing in the 'data' segment
-*
-* ------------------------------------------------------------------------------
-*
+
+The_Fini:	dc.w	0xFFFF		| last thing in the 'data' segment
+
+| ------------------------------------------------------------------------------
+
 		.end
Index: lib700/jumpto.s
===================================================================
--- lib700/jumpto.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ lib700/jumpto.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,63 +1,63 @@
-* ------------------------------------------------------------------------------
-* jumpto.s -- miscellaneous ROMP support functions
-* Version 4 -- 1987-10-14 -- D.N. Lynx Crowe
-*
-*	WARNING:
-*	--------
-*		These functions, in general, assume supervisor mode and
-*		'sane' arguments, so no error checking is done.
-*
-*	halt()
-*
-*		Brings the processor to a grinding halt.  Requires external
-*		reset to restart things.  Use only for catastrophic hard halts.
-*
-*	jumpto(addr)
-*	long addr;
-*
-*		Jumps to 'addr'.  No error check is done on 'addr'.
-*
-*	rjumpto(addr)
-*	long addr;
-*
-*		Performs the 68000 'RESET' command, then jumps to 'addr'.
-*		No error check is made on 'addr'.
-*
-*	sjumpto(addr, stack)
-*	long addr, stack;
-*
-*		Sets a7 to 'stack', then jumps to 'addr'.
-*		No error check is done on 'addr'.
-*
-*	xreset()
-*
-*		Performs the 68000 'RESET' command.  This is very dangerous,
-*		and should be used with extreme care regarding such
-*		things as interrupts, device initialization, vectors,
-*		and sundry other reset-related things.
-*
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| jumpto.s -- miscellaneous ROMP support functions
+| Version 4 -- 1987-10-14 -- D.N. Lynx Crowe
+
+|	WARNING:
+|	--------
+|		These functions, in general, assume supervisor mode and
+|		'sane' arguments, so no error checking is done.
+
+|	halt()
+
+|		Brings the processor to a grinding halt.  Requires external
+|		reset to restart things.  Use only for catastrophic hard halts.
+
+|	jumpto(addr)
+|	long addr;
+
+|		Jumps to 'addr'.  No error check is done on 'addr'.
+
+|	rjumpto(addr)
+|	long addr;
+
+|		Performs the 68000 'RESET' command, then jumps to 'addr'.
+|		No error check is made on 'addr'.
+
+|	sjumpto(addr, stack)
+|	long addr, stack;
+
+|		Sets a7 to 'stack', then jumps to 'addr'.
+|		No error check is done on 'addr'.
+
+|	xreset()
+
+|		Performs the 68000 'RESET' command.  This is very dangerous,
+|		and should be used with extreme care regarding such
+|		things as interrupts, device initialization, vectors,
+|		and sundry other reset-related things.
+
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_halt,_jumpto,_rjumpto,_sjumpto,_xreset
-*
+
 		.page
-*
-_halt:		stop	#$2700			* stop dead, interrupts disabled
-		jmp	_halt			* stay stopped if stepped thru
-*
-_jumpto:	movea.l	4(a7),a0		* get jump address
-		jmp	(a0)			* go to the jump address
-*
-_rjumpto:	reset				* reset external devices
-		movea.l	4(a7),a0		* get jump address
-		jmp	(a0)			* go to the jump address
-*
-_sjumpto:	movea.l	4(a7),a0		* get jump address
-		movea.l	8(a7),a7		* set stack pointer
-		jmp	(a0)			* go to the jump address
-*
-_xreset:	reset				* reset external devices
-		rts				* return to caller
-*
+
+_halt:		stop	#0x2700			| stop dead, interrupts disabled
+		jmp	_halt			| stay stopped if stepped thru
+
+_jumpto:	movea.l	4(a7),a0		| get jump address
+		jmp	(a0)			| go to the jump address
+
+_rjumpto:	reset				| reset external devices
+		movea.l	4(a7),a0		| get jump address
+		jmp	(a0)			| go to the jump address
+
+_sjumpto:	movea.l	4(a7),a0		| get jump address
+		movea.l	8(a7),a7		| set stack pointer
+		jmp	(a0)			| go to the jump address
+
+_xreset:	reset				| reset external devices
+		rts				| return to caller
+
 		.end
Index: lib700/ldiv.s
===================================================================
--- lib700/ldiv.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ lib700/ldiv.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,16 +1,16 @@
-* ------------------------------------------------------------------------------
-* ldiv.s -- long division
-* Version 1 -- 1988-01-22
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| ldiv.s -- long division
+| Version 1 -- 1988-01-22
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_ldiv
 		.xdef	ldiv
-*
+
 		.xdef	_ldivr
-*
-ARG1		.equ	8
-ARG2		.equ	12
-*
+
+ARG1		=	8
+ARG2		=	12
+
 _ldiv:
 ldiv:		link	a6,#-2
@@ -21,33 +21,33 @@
 		move.l	ARG2(a6),d6
 		bne	ldiv1
-*
-		move.l	#$80000000,_ldivr
-		move.l	#$80000000,d0
+
+		move.l	#0x80000000,_ldivr
+		move.l	#0x80000000,d0
 		divs	#0,d0
 		bra	ldiv11
-*
+
 ldiv1:		bge	ldiv2
-*
+
 		neg.l	d6
 		addq.w	#1,d3
-*
+
 ldiv2:		tst.l	d7
 		bge	ldiv3
-*
+
 		neg.l	d7
 		addq.w	#1,d3
-*
+
 ldiv3:		cmp.l	d7,d6
 		bgt	ldiv9
-*
+
 		bne	ldiv4
-*
+
 		moveq.l	#1,d5
 		clr.l	d7
 		bra	ldiv9
-*
-ldiv4:		cmp.l	#$10000,d7
+
+ldiv4:		cmp.l	#0x10000,d7
 		bge	ldiv5
-*
+
 		divu	d6,d7
 		move.w	d7,d5
@@ -55,30 +55,30 @@
 		ext.l	d7
 		bra	ldiv9
-*
+
 ldiv5:		moveq.l	#1,d4
-*
+
 ldiv6:		cmp.l	d6,d7
 		bcs	ldiv7
-*
+
 		asl.l	#1,d6
 		asl.l	#1,d7
 		bra	ldiv6
-*
+
 ldiv7:		tst.l	d4
 		beq	ldiv9
-*
+
 		cmp.l	d6,d7
 		bcs	ldiv8
-*
+
 		or.l	d4,d5
 		sub.l	d6,d7
-*
+
 ldiv8:		lsr.l	#1,d4
 		lsr.l	#1,d6
 		bra	ldiv7
-*
+
 ldiv9:		cmp.w	#1,d3
 		bne	ldiv10
-*
+
 		neg.l	d7
 		move.l	d7,_ldivr
@@ -86,16 +86,16 @@
 		neg.l	d0
 		bra	ldiv11
-*
+
 ldiv10:		move.l	d7,_ldivr
 		move.l	d5,d0
-*
+
 ldiv11:		tst.l	(a7)+
 		movem.l	(a7)+,d3-d7
 		unlk	a6
 		rts
-*
+
 		.bss
-*
+
 _ldivr:		.ds.l	1
-*
+
 		.end
Index: lib700/lmul.s
===================================================================
--- lib700/lmul.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ lib700/lmul.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,29 +1,29 @@
-* ------------------------------------------------------------------------------
-* lmul.s -- long multiply
-* Version 2 -- 1989-07-18
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| lmul.s -- long multiply
+| Version 2 -- 1989-07-18
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	lmul
-*
-ARG1		.equ	8
-ARG2		.equ	12
-*
-TEMP		.equ	-4
-*
+
+ARG1		=	8
+ARG2		=	12
+
+TEMP		=	-4
+
 lmul:		link	a6,#-4
 		clr.w	d2
 		tst.l	ARG1(a6)
 		bge	lmul1
-*
+
 		neg.l	ARG1(a6)
 		addq.w	#1,d2
-*
+
 lmul1:		tst.l	ARG2(a6)
 		bge	lmul2
-*
+
 		neg.l	ARG2(a6)
 		addq.w	#1,d2
-*
+
 lmul2:		move.w	ARG1+2(a6),d0
 		mulu	ARG2+2(a6),d0
@@ -39,9 +39,9 @@
 		btst	#0,d2
 		beq	lmul3
-*
+
 		neg.l	d0
-*
+
 lmul3:		unlk	a6
 		rts
-*
+
 		.end
Index: lib700/lrem.s
===================================================================
--- lib700/lrem.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ lib700/lrem.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,17 +1,17 @@
-* ------------------------------------------------------------------------------
-* lrem.s -- long modulo
-* Version 1 -- 1988-01-22
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| lrem.s -- long modulo
+| Version 1 -- 1988-01-22
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_lrem
 		.xdef	lrem
-*
+
 		.xref	ldiv
 		.xref	_ldivr
-*
-ARG1		.equ	8
-ARG2		.equ	12
-*
+
+ARG1		=	8
+ARG2		=	12
+
 _lrem:
 lrem:		link	a6,#-2
@@ -23,4 +23,4 @@
 		unlk	a6
 		rts
-*
+
 		.end
Index: lib700/rand24.s
===================================================================
--- lib700/rand24.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ lib700/rand24.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,118 +1,118 @@
-* ------------------------------------------------------------------------------
-* rand24.s -- generate a 24 bit random number
-* Version 3 -- 1988-04-29 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-* Synopsis:
-*		long
-*		rand24()
-*
-* Based on:
-*		Knuth, Donald E.
-*		The Art of Computer Programming,
-*		Volume 2: Semi-Numerical Algorithms
-*
-* Computes:
-*		S = [S * C] + K
-*
-* Where:
-*		K = 1
-*		C = 3141592621
-*		S = the seed  (if zero, it gets set from the 200 Hz clock)
-*
-* Returns:
-*		S >> 8  (a 24 bit pseudo-random number)
-*
-* Note:  this function has an LSB with an exactly 50% distribution,  so using
-* individual bits is probably not a good idea.  Using more bits makes things
-* appear more random.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| rand24.s -- generate a 24 bit random number
+| Version 3 -- 1988-04-29 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+| Synopsis:
+|		long
+|		rand24()
+
+| Based on:
+|		Knuth, Donald E.
+|		The Art of Computer Programming,
+|		Volume 2: Semi-Numerical Algorithms
+
+| Computes:
+|		S = [S | C] + K
+
+| Where:
+|		K = 1
+|		C = 3141592621
+|		S = the seed  (if zero, it gets set from the 200 Hz clock)
+
+| Returns:
+|		S >> 8  (a 24 bit pseudo-random number)
+
+| Note:  this function has an LSB with an exactly 50% distribution,  so using
+| individual bits is probably not a good idea.  Using more bits makes things
+| appear more random.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_rand24
-*
+
 		.xdef	_rseed
-*
-* equates for things in the BIOS
-*
-RCLOCK		.equ	$49E			* LONG - 200 Hz clock
-*
-* equates for stack offsets
-*
-ARG1		.equ	8			* LONG / WORD - arg1 / MS bits
-ARG1L		.equ	10			* WORD - arg1 LS bits
-ARG2		.equ	12			* LONG / WORD - arg2 / MS bits
-ARG2L		.equ	14			* WORD - arg2 LS bits
-*
-PART		.equ	-4			* LONG - partial product
-*
-PI		.equ	$BB40E62D		* LONG - PI as a hex value
-*
+
+| equates for things in the BIOS
+
+RCLOCK		=	0x49E			| LONG - 200 Hz clock
+
+| equates for stack offsets
+
+ARG1		=	8			| LONG / WORD - arg1 / MS bits
+ARG1L		=	10			| WORD - arg1 LS bits
+ARG2		=	12			| LONG / WORD - arg2 / MS bits
+ARG2L		=	14			| WORD - arg2 LS bits
+
+PART		=	-4			| LONG - partial product
+
+PI		=	0xBB40E62D		| LONG - PI as a hex value
+
 		.page
-*
-* mult32 -- 32 bit signed multiply
-* ------    ----------------------
-mult32:		link	a6,#-4			* link stack frames
-		clr.w	d2			* clear sign flags
-		tst.l	ARG1(a6)		* check sign of 1st argument
-		bge	mult32a			* ...
-*
-		neg.l	ARG1(a6)		* make 1st argument positive
-		addq.w	#1,d2			* log its sign as negative
-*
-mult32a:	tst.l	ARG2(a6)		* check sign of 2nd argument
-		bge	mult32b			* ...
-*
-		neg.l	ARG2(a6)		* make 2nd argument positive
-		addq.w	#1,d2			* log its sign as negative
-*
-mult32b:	move.w	ARG1L(a6),d0		* generate 1st partial product
-		mulu	ARG2L(a6),d0		* ...
-		move.l	d0,PART(a6)		* ...
-		move.w	ARG1(a6),d0		* generate 2nd partial product
-		mulu	ARG2L(a6),d0		* ...
-		move.w	ARG2(a6),d1		* generate 3rd partial product
-		mulu	ARG1L(a6),d1		* ...
-		add.w	d1,d0			* add partial products
-		add.w	PART(a6),d0		* ...
-		move.w	d0,PART(a6)		* ...
-		move.l	PART(a6),d0		* ...
-		btst	#0,d2			* adjust sign of result
-		beq	mult32c			* ...
-*
-		neg.l	d0			* ...
-*
-mult32c:	unlk	a6			* unlink stack frames
-		rts				* return
-*
+
+| mult32 -- 32 bit signed multiply
+| ------    ----------------------
+mult32:		link	a6,#-4			| link stack frames
+		clr.w	d2			| clear sign flags
+		tst.l	ARG1(a6)		| check sign of 1st argument
+		bge	mult32a			| ...
+
+		neg.l	ARG1(a6)		| make 1st argument positive
+		addq.w	#1,d2			| log its sign as negative
+
+mult32a:	tst.l	ARG2(a6)		| check sign of 2nd argument
+		bge	mult32b			| ...
+
+		neg.l	ARG2(a6)		| make 2nd argument positive
+		addq.w	#1,d2			| log its sign as negative
+
+mult32b:	move.w	ARG1L(a6),d0		| generate 1st partial product
+		mulu	ARG2L(a6),d0		| ...
+		move.l	d0,PART(a6)		| ...
+		move.w	ARG1(a6),d0		| generate 2nd partial product
+		mulu	ARG2L(a6),d0		| ...
+		move.w	ARG2(a6),d1		| generate 3rd partial product
+		mulu	ARG1L(a6),d1		| ...
+		add.w	d1,d0			| add partial products
+		add.w	PART(a6),d0		| ...
+		move.w	d0,PART(a6)		| ...
+		move.l	PART(a6),d0		| ...
+		btst	#0,d2			| adjust sign of result
+		beq	mult32c			| ...
+
+		neg.l	d0			| ...
+
+mult32c:	unlk	a6			| unlink stack frames
+		rts				| return
+
 		.page
-*
-* _rand24 -- Generate a random number
-* -------    ------------------------
-_rand24:	link	a6,#0			* Link stack frames
-		tst.l	_rseed			* See if the seed is zero
-		bne	rand01			* Jump if not
-*
-		move.l	RCLOCK,d0		* Pick up the 200 Hz clock
-		moveq.l	#16,d1			* Shift it left
-		asl.l	d1,d0			* ...
-		or.l	RCLOCK,d0		* OR in current 200 Hz clock
-		move.l	d0,_rseed		* Use that as the seed
-*
-rand01:		move.l	#PI,-(a7)		* Put PI on the stack
-		move.l	_rseed,-(a7)		* ... and _rseed, too
-		bsr	mult32			* Multiply them
-		addq.l	#8,a7			* Cleanup stack
-		addq.l	#1,d0			* Add 1 to the result
-		move.l	d0,_rseed		* Save as new seed
-		asr.l	#8,d0			* Make it a 24 bit number
-		and.l	#$00FFFFFF,d0		* ...
-		unlk	a6			* Unlink stack frames
-		rts				* Return to caller
-*
-* ------------------------------------------------------------------------------
+
+| _rand24 -- Generate a random number
+| -------    ------------------------
+_rand24:	link	a6,#0			| Link stack frames
+		tst.l	_rseed			| See if the seed is zero
+		bne	rand01			| Jump if not
+
+		move.l	RCLOCK,d0		| Pick up the 200 Hz clock
+		moveq.l	#16,d1			| Shift it left
+		asl.l	d1,d0			| ...
+		or.l	RCLOCK,d0		| OR in current 200 Hz clock
+		move.l	d0,_rseed		| Use that as the seed
+
+rand01:		move.l	#PI,-(a7)		| Put PI on the stack
+		move.l	_rseed,-(a7)		| ... and _rseed, too
+		bsr	mult32			| Multiply them
+		addq.l	#8,a7			| Cleanup stack
+		addq.l	#1,d0			| Add 1 to the result
+		move.l	d0,_rseed		| Save as new seed
+		asr.l	#8,d0			| Make it a 24 bit number
+		and.l	#0x00FFFFFF,d0		| ...
+		unlk	a6			| Unlink stack frames
+		rts				| Return to caller
+
+| ------------------------------------------------------------------------------
 		.bss
-* ------------------------------------------------------------------------------
-*
-_rseed:		.ds.l	1			* random number seed
-*
+| ------------------------------------------------------------------------------
+
+_rseed:		.ds.l	1			| random number seed
+
 		.end
Index: lib700/setjmp.s
===================================================================
--- lib700/setjmp.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ lib700/setjmp.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,26 +1,26 @@
-* ------------------------------------------------------------------------------
-* setjmp.s -- Unix(tm) compatible setjmp(env) and longjmp(env,ret)
-* Version 3 -- 1987-06-16 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
+| ------------------------------------------------------------------------------
+| setjmp.s -- Unix(tm) compatible setjmp(env) and longjmp(env,ret)
+| Version 3 -- 1987-06-16 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
 		.text
-*
+
 		.xdef	_setjmp,_longjmp
-*
-_setjmp:	movea.l	4(a7),a0		* Get env pointer
-		move.l	(a7),(a0)		* Put return address in env
-		movem.l	d1-d7/a1-a7,4(a0)	* Save registers in env
-		moveq.l	#0,d0			* Set return value to 0
-		rts				* Return to caller
-*
-_longjmp:	move.w	8(a7),d0		* Get ret value
-		bne	lj1			* Jump if non-zero
-*
-		moveq.l	#1,d0			* Force return value to 1
-*
-lj1:		movea.l	4(a7),a0		* Get env pointer
-		movem.l	4(a0),d1-d7/a1-a7	* Restore registers from env
-		move.l	(a0),(a7)		* Get return address from env
-		rts				* Return to caller
-*
+
+_setjmp:	movea.l	4(a7),a0		| Get env pointer
+		move.l	(a7),(a0)		| Put return address in env
+		movem.l	d1-d7/a1-a7,4(a0)	| Save registers in env
+		moveq.l	#0,d0			| Set return value to 0
+		rts				| Return to caller
+
+_longjmp:	move.w	8(a7),d0		| Get ret value
+		bne	lj1			| Jump if non-zero
+
+		moveq.l	#1,d0			| Force return value to 1
+
+lj1:		movea.l	4(a7),a0		| Get env pointer
+		movem.l	4(a0),d1-d7/a1-a7	| Restore registers from env
+		move.l	(a0),(a7)		| Get return address from env
+		rts				| Return to caller
+
 		.end
Index: lib700/uldiv.s
===================================================================
--- lib700/uldiv.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ lib700/uldiv.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,96 +1,96 @@
-* ------------------------------------------------------------------------------
-* uldiv.s -- unsigned long division, with remainder
-* Version 2 -- 1987-06-08 -- D.N. Lynx Crowe
-* Lifted from the Alcyon C library by disassembly so I could fix a bug -
-*	_uldivr must be in the bss segment so the code will work in PROM.
-*
-*	long
-*	uldiv(dividnd, divisor)
-*	long dividnd, divisor;
-*
-*	extern long uldivr;
-*
-*		Divides 'dividnd' by 'divisor', treating both as unsigned
-*		long integers.  Returns the quotient and leaves the
-*		remainder in 'uldivr'.  Produces a divide check on division
-*		by zero, with $80000000 returned for both quotient and
-*		remainder.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| uldiv.s -- unsigned long division, with remainder
+| Version 2 -- 1987-06-08 -- D.N. Lynx Crowe
+| Lifted from the Alcyon C library by disassembly so I could fix a bug -
+|	_uldivr must be in the bss segment so the code will work in PROM.
+
+|	long
+|	uldiv(dividnd, divisor)
+|	long dividnd, divisor;
+
+|	extern long uldivr;
+
+|		Divides 'dividnd' by 'divisor', treating both as unsigned
+|		long integers.  Returns the quotient and leaves the
+|		remainder in 'uldivr'.  Produces a divide check on division
+|		by zero, with 0x80000000 returned for both quotient and
+|		remainder.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_uldiv,_uldivr
-*
-DIVIDEND	.equ	8
-DIVISOR		.equ	12
-*
-_uldiv:		link	a6,#0			* Link stack frames
-		movem.l	d3-d7,-(a7)		* Save registers
-		move.l	DIVIDEND(a6),d7		* d7 = DIVIDEND
-		move.l	DIVISOR(a6),d6		* d6 = DIVISOR
-		tst.l	d6			* Divide by zero ?
-		bne	notdzero		* Jump if not
-*
-		move.l	#$80000000,_uldivr	* Force error result
-		move.l	#$80000000,d0		* ... by dividing
-		divu	#0,d0			* ... by zero
-		bra	ulexit			* ... then exit
-*
-notdzero:	cmp.l	d7,d6			* Divide underflow ?
-		bls	notunflo		* Jump if not
-*
-		move.l	d7,_uldivr		* Remainder = dividend
-		clr.l	d0			* Quotient = 0
-		bra	ulexit			* Exit
-*
-notunflo:	cmp.l	d6,d7			* Is dividend = divisor ?
-		bne	startdiv		* Go start dividing if not
-*
-		moveq.l	#1,d5			* Quotient = 1
-		clr.l	d7			* Remainder = 0
-		bra	setreslt		* Go set result
-*
+
+DIVIDEND	=	8
+DIVISOR		=	12
+
+_uldiv:		link	a6,#0			| Link stack frames
+		movem.l	d3-d7,-(a7)		| Save registers
+		move.l	DIVIDEND(a6),d7		| d7 = DIVIDEND
+		move.l	DIVISOR(a6),d6		| d6 = DIVISOR
+		tst.l	d6			| Divide by zero ?
+		bne	notdzero		| Jump if not
+
+		move.l	#0x80000000,_uldivr	| Force error result
+		move.l	#0x80000000,d0		| ... by dividing
+		divu	#0,d0			| ... by zero
+		bra	ulexit			| ... then exit
+
+notdzero:	cmp.l	d7,d6			| Divide underflow ?
+		bls	notunflo		| Jump if not
+
+		move.l	d7,_uldivr		| Remainder = dividend
+		clr.l	d0			| Quotient = 0
+		bra	ulexit			| Exit
+
+notunflo:	cmp.l	d6,d7			| Is dividend = divisor ?
+		bne	startdiv		| Go start dividing if not
+
+		moveq.l	#1,d5			| Quotient = 1
+		clr.l	d7			| Remainder = 0
+		bra	setreslt		| Go set result
+
 		.page
-*
-startdiv:	moveq.l	#1,d4			* Set result bit in d4
-*
-divloop1:	cmp.l	d6,d7			* Divisor aligned OK ?
-		bcs	divloop2		* Jump if so
-*
-		move.l	d6,d0			* Can we align things better ?
-		asl.l	#1,d0			* ...
-		cmp.l	d0,d6			* ...
-		bhi	divloop2		* Jump if not
-*
-		asl.l	#1,d6			* Shift the divisor
-		asl.l	#1,d4			* Shift the result bit
-		bra	divloop1		* Loop for next bit
-*
-divloop2:	clr.l	d5			* Clear quotient
-*
-divloop3:	tst.l	d4			* More bits to do ?
-		beq	setreslt		* Go set result if not
-*
-		cmp.l	d6,d7			* Can we subtract ?
-		bcs	divloop4		* Jump if not
-*
-		or.l	d4,d5			* Set a bit in the quotient
-		sub.l	d6,d7			* Subtract divisor from dividend
-*
-divloop4:	lsr.l	#1,d4			* Shift the result bit
-		lsr.l	#1,d6			* Shift the divisor
-		bra	divloop3		* Loop for next bit
-*
-setreslt:	move.l	d7,_uldivr		* Store remainder
-		move.l	d5,d0			* Put quotient in d0
-*
-ulexit:		tst.l	(a7)+			* Discard top of stack
-		movem.l	(a7)+,d4-d7		* Restore registers
-		unlk	a6			* Unlink stack frames
-		rts				* Return to caller
-*
+
+startdiv:	moveq.l	#1,d4			| Set result bit in d4
+
+divloop1:	cmp.l	d6,d7			| Divisor aligned OK ?
+		bcs	divloop2		| Jump if so
+
+		move.l	d6,d0			| Can we align things better ?
+		asl.l	#1,d0			| ...
+		cmp.l	d0,d6			| ...
+		bhi	divloop2		| Jump if not
+
+		asl.l	#1,d6			| Shift the divisor
+		asl.l	#1,d4			| Shift the result bit
+		bra	divloop1		| Loop for next bit
+
+divloop2:	clr.l	d5			| Clear quotient
+
+divloop3:	tst.l	d4			| More bits to do ?
+		beq	setreslt		| Go set result if not
+
+		cmp.l	d6,d7			| Can we subtract ?
+		bcs	divloop4		| Jump if not
+
+		or.l	d4,d5			| Set a bit in the quotient
+		sub.l	d6,d7			| Subtract divisor from dividend
+
+divloop4:	lsr.l	#1,d4			| Shift the result bit
+		lsr.l	#1,d6			| Shift the divisor
+		bra	divloop3		| Loop for next bit
+
+setreslt:	move.l	d7,_uldivr		| Store remainder
+		move.l	d5,d0			| Put quotient in d0
+
+ulexit:		tst.l	(a7)+			| Discard top of stack
+		movem.l	(a7)+,d4-d7		| Restore registers
+		unlk	a6			| Unlink stack frames
+		rts				| Return to caller
+
 		.bss
 		.even
-*
+
 _uldivr:	ds.l	1
-*
+
 		.end
Index: libcio/ptcl12.s
===================================================================
--- libcio/ptcl12.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ libcio/ptcl12.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,21 +1,21 @@
-* ------------------------------------------------------------------------------
-* ptcl12.s -- store a cluster entry into the FAT
-* Version 2 -- 1987-10-27 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| ptcl12.s -- store a cluster entry into the FAT
+| Version 2 -- 1987-10-27 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
 		.text
 		.xdef	__ptcl12
-*
-CL		.equ	12
-VAL		.equ	14
-CLA		.equ	d7
-CLP		.equ	d6
-CLT		.equ	d5
-FAT		.equ	a5
-*
+
+CL		=	12
+VAL		=	14
+CLA		=	d7
+CLP		=	d6
+CLT		=	d5
+FAT		=	a5
+
 __ptcl12:	link	A6,#0
 		movem.l	CLT-CLA/FAT-FAT,-(sp)
 		move.l	8(A6),FAT
 		move.w	CL(A6),CLA
-		lsr.w	CLA
+		lsr.w	#1,CLA
 		add.w	CL(A6),CLA
 		move.b	1(FAT,CLA.W),CLP
@@ -24,26 +24,26 @@
 		btst	#0,CL+1(A6)
 		beq	L2
-*
+
 		move.w	CLP,CLT
-		and.w	#$000F,CLT
+		and.w	#0x000F,CLT
 		move.w	VAL(A6),D0
 		lsl.w	#4,D0
 		or.w	D0,CLT
 		bra	L3
-*
+
 L2:		move.w	CLP,CLT
-		and.w	#$F000,CLT
+		and.w	#0xF000,CLT
 		move.w	VAL(A6),D0
-		and.w	#$0FFF,D0
+		and.w	#0x0FFF,D0
 		or.w	D0,CLT
-*
+
 L3:		move.b	CLT,0(FAT,CLA.W)
 		move.w	CLT,D0
 		lsr.w	#8,D0
 		move.b	D0,1(FAT,CLA.W)
-*
+
 L1:		movem.l	(sp)+,CLT-CLA/FAT-FAT
 		unlk	A6
 		rts
-*
+
 		.end
Index: prolog/fsmain.s
===================================================================
--- prolog/fsmain.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ prolog/fsmain.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,125 +1,125 @@
-* ------------------------------------------------------------------------------
-* fsmain.s -- startup code for the Buchla 700 standalone C runtime library
-* Version 3 -- 1987-06-29 -- D.N. Lynx Crowe
-*
-*	This code clears 'bss' space, sets up some global variables,
-*	and calls Croot(), which sets up the file system and calls main().
-*
-*	This routine should be entered with the address of the basepage
-*	as its parameter.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| fsmain.s -- startup code for the Buchla 700 standalone C runtime library
+| Version 3 -- 1987-06-29 -- D.N. Lynx Crowe
+
+|	This code clears 'bss' space, sets up some global variables,
+|	and calls Croot(), which sets up the file system and calls main().
+
+|	This routine should be entered with the address of the basepage
+|	as its parameter.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	start_
-*
+
 		.xref	_Croot
-*
+
 		.xdef	_panic
 		.xdef	_brk
-*
+
 		.xdef	__heap
 		.xdef	__break
 		.xdef	__pmesg
-*
+
 		.xdef	_errno
-*
-p_bbase		.equ	$18		* bss base
-p_blen		.equ	$1C		* bss length
-*
+
+p_bbase		=	0x18		| bss base
+p_blen		=	0x1C		| bss length
+
 		.page
-*
-* start_ -- Initial entry point -- Must be first object file in link statement
-* ------    ------------------------------------------------------------------
-*
-* WARNING:  Hazardous assumptions
-*
-* We assume that: 
-*
-* 	the system has set the stack pointer for us.
-* 	the system passed us a pointer to a valid basepage.
-* 	the stack is above the heap.
-*	BSS is located in RAM.
-*
-* If any of these assumptions is in error, we're in for serious trouble.
-*
-start_:		clr.l	a6		* Clear frame pointer
-		movea.l	4(a7),a1	* Set pointer to base page
-		movea.l	p_bbase(a1),a0	* Setup to clear bss space
-*
-start1:		clr.w	(a0)+		* Clear a word
-		cmpa.l	a0,a7		* See if we're done
-		bne	start1		* Loop if not done yet
-*
-		move.l	p_bbase(a1),d0	* Calculate break address
-		add.l	p_blen(a1),d0	* ...
-		move.l	d0,__break	* Set initial break
-		move.l	d0,__heap	* Set heap start
-*
-		move.l	#0,-(a7)	* Pass NULL to Croot  (no command line)
-		jsr	_Croot		* call Croot() routine
-		addq.l	#4,a7		* ...
-*
-		move.l	#pmsg1,-(a7)	* panic(pmsg1);
-		jsr	_panic		* ...
-		addq.l	#4,a7		* ...
-*
-hstop:		stop	#$2000		* "Die, sucker!"
+
+| start_ -- Initial entry point -- Must be first object file in link statement
+| ------    ------------------------------------------------------------------
+
+| WARNING:  Hazardous assumptions
+
+| We assume that:
+
+| 	the system has set the stack pointer for us.
+| 	the system passed us a pointer to a valid basepage.
+| 	the stack is above the heap.
+|	BSS is located in RAM.
+
+| If any of these assumptions is in error, we're in for serious trouble.
+
+start_:		movea.l	#0,a6		| Clear frame pointer
+		movea.l	4(a7),a1	| Set pointer to base page
+		movea.l	p_bbase(a1),a0	| Setup to clear bss space
+
+start1:		clr.w	(a0)+		| Clear a word
+		cmpa.l	a0,a7		| See if we're done
+		bne	start1		| Loop if not done yet
+
+		move.l	p_bbase(a1),d0	| Calculate break address
+		add.l	p_blen(a1),d0	| ...
+		move.l	d0,__break	| Set initial break
+		move.l	d0,__heap	| Set heap start
+
+		move.l	#0,-(a7)	| Pass NULL to Croot  (no command line)
+		jsr	_Croot		| call Croot() routine
+		addq.l	#4,a7		| ...
+
+		move.l	#pmsg1,-(a7)	| panic(pmsg1);
+		jsr	_panic		| ...
+		addq.l	#4,a7		| ...
+
+hstop:		stop	#0x2000		| "Die, sucker!"
 		bra	hstop
-*
+
 		.page
-*
-* _panic -- hard halt for fatal errors
-* ------    --------------------------
-_panic:		movea.l	4(a7),a0	* Save panic message address
-		move.l	a0,__pmesg	* ...
-*
-		trap	#15		* Invoke ROMP  (we hope ...)
-*
-pstop:		stop	#$2700		* HARD HALT
+
+| _panic -- hard halt for fatal errors
+| ------    --------------------------
+_panic:		movea.l	4(a7),a0	| Save panic message address
+		move.l	a0,__pmesg	| ...
+
+		trap	#15		| Invoke ROMP  (we hope ...)
+
+pstop:		stop	#0x2700		| HARD HALT
 		bra	pstop
-*
+
 		.page
-*
-* _brk -- set break value
-* ----    ---------------
-* WARNING:  This only works if the stack is above the heap.
-*
-_brk:		cmpa.l	__break,a7	* compare current break with stack
-		bcs	pstop		* actual stack overflow!
-*
-		movea.l	4(sp),a0	* get new break
-		move.l	a0,d0		* compare with current stack,
-		adda.l	#$100,a0	* ... including 256-byte slop factor
-		cmpa.l	a0,a7		* if (sp < a0+256)
-		bcs	badbrk		* 	bad break;
-*
-		move.l	d0,__break	* OK break: save the break
-		clr.l	d0		* Set OK return
-		rts			* return
-*
-badbrk:		moveq.l	#-1,d0		* Load return reg
-		rts			* Return
-*
+
+| _brk -- set break value
+| ----    ---------------
+| WARNING:  This only works if the stack is above the heap.
+
+_brk:		cmpa.l	__break,a7	| compare current break with stack
+		bcs	pstop		| actual stack overflow!
+
+		movea.l	4(sp),a0	| get new break
+		move.l	a0,d0		| compare with current stack,
+		adda.l	#0x100,a0	| ... including 256-byte slop factor
+		cmpa.l	a0,a7		| if (sp < a0+256)
+		bcs	badbrk		| 	bad break;
+
+		move.l	d0,__break	| OK break: save the break
+		clr.l	d0		| Set OK return
+		rts			| return
+
+badbrk:		moveq.l	#-1,d0		| Load return reg
+		rts			| Return
+
 		.page
-*
-*************************************************************************
-* 		Data Area						*
-*************************************************************************
-*
+
+|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+| 		Data Area						|
+|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+
 		.data
-*
-pmsg1:		dc.b	'  returned from Croot() ',0
-*
-*************************************************************************
-* 		BSS Area						*
-*************************************************************************
-*
+
+pmsg1:		dc.b	"  returned from Croot() ",0
+
+|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+| 		BSS Area						|
+|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+
 		.bss
 		.even
-*
-__pmesg:	ds.l	1	* panic() message string address
-__heap:		ds.l	1	* Heap start  (initial break)
-__break:	ds.l	1	* Current break location
-_errno:		ds.w	1	* System error number
-*
+
+__pmesg:	ds.l	1	| panic() message string address
+__heap:		ds.l	1	| Heap start  (initial break)
+__break:	ds.l	1	| Current break location
+_errno:		ds.w	1	| System error number
+
 	.end
Index: ram/execins.s
===================================================================
--- ram/execins.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ ram/execins.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -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 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -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 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -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 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -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 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -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 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -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 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -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 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -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 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -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 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -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
Index: rom/bios.s
===================================================================
--- rom/bios.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ rom/bios.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,71 +1,71 @@
-********************************************************************************
-*									       *
-* bios.s -- BIOS for the Buchla 700 and NASA 3D Helmet Display		       *
-* ------    --------------------------------------------------		       *
-*									       *
-* See VM1,VM2 and VDATE for version and date				       *
-* Written by D.N. Lynx Crowe						       *
-*									       *
-* Very loosely based on ideas from:					       *
-*									       *
-*	"Atari ST Internals", by Abacus Software,			       *
-*	"A Hitchhiker's Guide to the BIOS", by Atari,			       *
-* 	"DOS Technical Reference", by IBM,				       *
-*	"DOS/360", by IBM,
-*	"CP/M" , by Digital Research, and, of course,			       *
-*	"Unix (tm)", by AT&T, et al.					       *
-*									       *
-* After all,  Why re-invent the wheel?					       *
-*									       *
-* Some of the functions are the same as Ataris, but quite a few are different, *
-* and our I/O configuration is much different, so BEWARE!  Make no	       *
-* assumptions, and read the documentation and comments very carefully.	       *
-*									       *
-* Especially watch out for the extended BIOS functions.  Most of them	       *
-* are nothing at all like the Atari / GEMDOS extended bios functions,	       *
-* and even the ones that are similar have different numbers.		       *
-********************************************************************************
-*
+||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+|									       |
+| bios.s -- BIOS for the Buchla 700 and NASA 3D Helmet Display		       |
+| ------    --------------------------------------------------		       |
+|									       |
+| See VM1,VM2 and VDATE for version and date				       |
+| Written by D.N. Lynx Crowe						       |
+|									       |
+| Very loosely based on ideas from:					       |
+|									       |
+|	"Atari ST Internals", by Abacus Software,			       |
+|	"A Hitchhiker's Guide to the BIOS", by Atari,			       |
+| 	"DOS Technical Reference", by IBM,				       |
+|	"DOS/360", by IBM,
+|	"CP/M" , by Digital Research, and, of course,			       |
+|	"Unix (tm)", by AT&T, et al.					       |
+|									       |
+| After all,  Why re-invent the wheel?					       |
+|									       |
+| Some of the functions are the same as Ataris, but quite a few are different, |
+| and our I/O configuration is much different, so BEWARE!  Make no	       |
+| assumptions, and read the documentation and comments very carefully.	       |
+|									       |
+| Especially watch out for the extended BIOS functions.  Most of them	       |
+| are nothing at all like the Atari / GEMDOS extended bios functions,	       |
+| and even the ones that are similar have different numbers.		       |
+||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+
 		.text
-*
-* Version and date
-* ----------------
-VM1		.equ	18		* First part of version number
-VM2		.equ	0		* Second part of version number
-VDATE		.equ	$19880620	* Version date
-*
-BUCHLA		.equ	1		* Non-Zero for Buchla 700, 0 for NASA
-NASASIO		.equ	0		* Non-zero for NASA, 0 for Buchla addr.
-*
-FL_SKR		.equ	$00		* Seek rate  (WD1772, 6Ms/step)
-*************************************************************************
-*
-		.page
-*
-		.xref	start_		* Where ROMP starts
-		.xref	_errno		* Start of ROMP bss space
-*
-		.xdef	basepage	* Pseudo base page for romp
-		.xdef	_rsflag		* Register save area overflow flag
-*
+
+| Version and date
+| ----------------
+VM1		=	18		| First part of version number
+VM2		=	0		| Second part of version number
+VDATE		=	0x19880620	| Version date
+
+BUCHLA		=	1		| Non-Zero for Buchla 700, 0 for NASA
+NASASIO		=	0		| Non-zero for NASA, 0 for Buchla addr.
+
+FL_SKR		=	0x00		| Seek rate  (WD1772, 6Ms/step)
+|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+
+		.page
+
+		.xref	start_		| Where ROMP starts
+		.xref	_errno		| Start of ROMP bss space
+
+		.xdef	basepage	| Pseudo base page for romp
+		.xdef	_rsflag		| Register save area overflow flag
+
 		.ifne	BUCHLA
-*
-		.xdef	_hdvini		* Disk init
-*
-		.endc
-*
-		.xdef	_wzcrsh		* ROMP crash flag
-		.xdef	_crshvc		* Crash vector
-		.xdef	_crshsr		* Crash SR
-		.xdef	_crshpc		* Crash PC
-		.xdef	_crshsp		* Crash SP
-		.xdef	_crshus		* Crash USP
-		.xdef	_crshrg		* Crash SP registers
-		.xdef	_crshst		* Crash top of stack
-*
-		.page
-*
+
+		.xdef	_hdvini		| Disk init
+
+		.endc
+
+		.xdef	_wzcrsh		| ROMP crash flag
+		.xdef	_crshvc		| Crash vector
+		.xdef	_crshsr		| Crash SR
+		.xdef	_crshpc		| Crash PC
+		.xdef	_crshsp		| Crash SP
+		.xdef	_crshus		| Crash USP
+		.xdef	_crshrg		| Crash SP registers
+		.xdef	_crshst		| Crash top of stack
+
+		.page
+
 		.ifne	BUCHLA
-*
+
 		.xdef	_hz_1k
 		.xdef	_hz_200
@@ -74,5 +74,5 @@
 		.xdef	t2count
 		.xdef	t3count
-*
+
 		.xdef	nflops
 		.xdef	disknum
@@ -81,10 +81,10 @@
 		.xdef	flock
 		.xdef	fverify
-*
+
 		.xdef	retrycnt
 		.xdef	wpstatus
 		.xdef	wplatch
 		.xdef	bootdev
-*
+
 		.xdef	cdev
 		.xdef	ctrack
@@ -92,1786 +92,1786 @@
 		.xdef	cside
 		.xdef	ccount
-*
+
 		.xdef	cdma
 		.xdef	edma
 		.xdef	tmpdma
 		.xdef	rseed
-*
+
 		.xdef	savptr
-*
+
 		.xdef	flpsrsv
 		.xdef	flpregs
-*
+
 		.xdef	dsb0
 		.xdef	dsb1
-*
+
 		.xdef	dskmode
 		.xdef	dskerrs
 		.xdef	drvbpbs
-*
-		.endc
-*
+
+		.endc
+
 		.xdef	biostop
-*
-		.page
-*
-* Some critical equates:
-* ----------------------
-* Interrupt masks
-* ---------------
-IPL3		.equ	$0300		* IPL 3 value for sr
-IPL4		.equ	$0400		* IPL 4 value for sr
-IPL7		.equ	$0700		* IPL 7 value for sr	(4 for debug)
-*
+
+		.page
+
+| Some critical equates:
+| ----------------------
+| Interrupt masks
+| ---------------
+IPL3		=	0x0300		| IPL 3 value for sr
+IPL4		=	0x0400		| IPL 4 value for sr
+IPL7		=	0x0700		| IPL 7 value for sr	(4 for debug)
+
 		.ifne	BUCHLA
-*
-INITIPL		.equ	IPL3+$2000	* Initial Internal Priority Level
-*
-		.endc
-*
+
+INITIPL		=	IPL3+0x2000	| Initial Internal Priority Level
+
+		.endc
+
 		.ifeq	BUCHLA
-*
-INITIPL		.equ	IPL4+$2000	* Initial Internal Priority Level
-*
-		.endc
-*
-* Memory allocation
-* -----------------
+
+INITIPL		=	IPL4+0x2000	| Initial Internal Priority Level
+
+		.endc
+
+| Memory allocation
+| -----------------
 		.ifeq	BUCHLA
-*
-TPA		.equ	$008000		* Put TPA 32K up from the bottom
-*
-		.endc
-*
+
+TPA		=	0x008000	| Put TPA 32K up from the bottom
+
+		.endc
+
 		.ifne	BUCHLA
-*
-TPA		.equ	$010000		* Put TPA 64K up from the bottom
-*
-		.endc
-*
-SSTACK		.equ	TPA		* Put system stack just below TPA
-*
-p_bbase		.equ	$0018		* Basepage offset to bss base
-p_blen		.equ	$001C		* Basepage offset to bss length
-*
-* It's magic ...
-* --------------
-FMAGIC		.equ	$87654321	* Magic for formatting
-RETRYIT		.equ	$10000		* Magic for re-try from criter
-RSMAGIC		.equ	$78563412	* Magic for register save area OK
-*
-* Miscellaneous constants
-* -----------------------
-FCMAX		.equ	$00FFFFFF	* Maximum frame counter value (24 bits)
-*
-		.page
-*
-* CFR0 Baud Rates:
-* ----------------
-BR_300		.equ	$04
-BR_600		.equ	$05
-BR_1200		.equ	$06
-BR_1800		.equ	$07
-BR_2400		.equ	$08
-BR_3600		.equ	$09
-BR_4800		.equ	$0A
-BR_7200		.equ	$0B
-BR_9600		.equ	$0C
-BR_19K2		.equ	$0D
-BR_EXT		.equ	$0F
-*
-* CFR0 Stop bits (includes TBR select bit):
-* -----------------------------------------
-NSB_1		.equ	$40
-NSB_2		.equ	$60
-*
-* CFR1 Number of Data Bits (includes MSB):
-* ----------------------------------------
-NDB_5		.equ	$80
-NDB_6		.equ	$A0
-NDB_7		.equ	$C0
-NDB_8		.equ	$E0
-*
-* CFR1 Parity Selection:
-* ----------------------
-P_ODD		.equ	$04
-P_EVEN		.equ	$0C
-P_MARK		.equ	$14
-P_SPACE		.equ	$1C
-*
-P_NONE		.equ	$00
-*
-* Line Discipline:
-* ----------------
-L_NUL		.equ	$00		* No protocol
-L_XON		.equ	$01		* XON/XOFF
-L_RTS		.equ	$02		* RTS/CTS
-*
-		.page
-*
-* I/O Buffer Sizes:
-* -----------------
-SR1IBS		.equ	256
-SR1OBS		.equ	256
-SR2IBS		.equ	256
-SR2OBS		.equ	256
-*
+
+TPA		=	0x010000	| Put TPA 64K up from the bottom
+
+		.endc
+
+SSTACK		=	TPA		| Put system stack just below TPA
+
+p_bbase		=	0x0018		| Basepage offset to bss base
+p_blen		=	0x001C		| Basepage offset to bss length
+
+| It's magic ...
+| --------------
+FMAGIC		=	0x87654321	| Magic for formatting
+RETRYIT		=	0x10000		| Magic for re-try from criter
+RSMAGIC		=	0x78563412	| Magic for register save area OK
+
+| Miscellaneous constants
+| -----------------------
+FCMAX		=	0x00FFFFFF	| Maximum frame counter value (24 bits)
+
+		.page
+
+| CFR0 Baud Rates:
+| ----------------
+BR_300		=	0x04
+BR_600		=	0x05
+BR_1200		=	0x06
+BR_1800		=	0x07
+BR_2400		=	0x08
+BR_3600		=	0x09
+BR_4800		=	0x0A
+BR_7200		=	0x0B
+BR_9600		=	0x0C
+BR_19K2		=	0x0D
+BR_EXT		=	0x0F
+
+| CFR0 Stop bits (includes TBR select bit):
+| -----------------------------------------
+NSB_1		=	0x40
+NSB_2		=	0x60
+
+| CFR1 Number of Data Bits (includes MSB):
+| ----------------------------------------
+NDB_5		=	0x80
+NDB_6		=	0xA0
+NDB_7		=	0xC0
+NDB_8		=	0xE0
+
+| CFR1 Parity Selection:
+| ----------------------
+P_ODD		=	0x04
+P_EVEN		=	0x0C
+P_MARK		=	0x14
+P_SPACE		=	0x1C
+
+P_NONE		=	0x00
+
+| Line Discipline:
+| ----------------
+L_NUL		=	0x00		| No protocol
+L_XON		=	0x01		| XON/XOFF
+L_RTS		=	0x02		| RTS/CTS
+
+		.page
+
+| I/O Buffer Sizes:
+| -----------------
+SR1IBS		=	256
+SR1OBS		=	256
+SR2IBS		=	256
+SR2OBS		=	256
+
 		.ifne	BUCHLA
-*
-MC1IBS		.equ	512
-MC1OBS		.equ	256
-MC2IBS		.equ	512
-MC2OBS		.equ	256
-*
-		.endc
-*
-* Line Disciplines:
-* -----------------
-SR1DISC		.equ	L_XON
-SR2DISC		.equ	L_XON
-*
+
+MC1IBS		=	512
+MC1OBS		=	256
+MC2IBS		=	512
+MC2OBS		=	256
+
+		.endc
+
+| Line Disciplines:
+| -----------------
+SR1DISC		=	L_XON
+SR2DISC		=	L_XON
+
 		.ifne	BUCHLA
-*
-MC1DISC		.equ	L_NUL
-MC2DISC		.equ	L_NUL
-*
-		.endc
-*
-* CFR Setings:
-* ------------
-SR1CFR0		.equ	BR_9600+NSB_1
-SR1CFR1		.equ	NDB_8+P_NONE
-SR2CFR0		.equ	BR_9600+NSB_1
-SR2CFR1		.equ	NDB_8+P_NONE
-*
+
+MC1DISC		=	L_NUL
+MC2DISC		=	L_NUL
+
+		.endc
+
+| CFR Setings:
+| ------------
+SR1CFR0		=	BR_9600+NSB_1
+SR1CFR1		=	NDB_8+P_NONE
+SR2CFR0		=	BR_9600+NSB_1
+SR2CFR1		=	NDB_8+P_NONE
+
 		.ifne	BUCHLA
-*
-MC1CFR0		.equ	BR_EXT+NSB_1
-MC1CFR1		.equ	NDB_8+P_NONE
-MC2CFR0		.equ	BR_EXT+NSB_1
-MC2CFR1		.equ	NDB_8+P_NONE
-*
-		.endc
-*
-		.page
-*
-* I/O Addresses:
-* --------------
-VSDDINIT	.equ	$200400		* VSDD initial register base address
-VSDDDATA	.equ	$200000		* VSDD data segment base address
-*
+
+MC1CFR0		=	BR_EXT+NSB_1
+MC1CFR1		=	NDB_8+P_NONE
+MC2CFR0		=	BR_EXT+NSB_1
+MC2CFR1		=	NDB_8+P_NONE
+
+		.endc
+
+		.page
+
+| I/O Addresses:
+| --------------
+VSDDINIT	=	0x200400	| VSDD initial register base address
+VSDDDATA	=	0x200000	| VSDD data segment base address
+
 		.ifeq	BUCHLA
-*
+
 		.ifeq	NASASIO
-*
-SR1ACIA		.equ	$3A8001		* Serial-1 ACIA base address	(BUCHLA)
-SR2ACIA		.equ	$3A8009		* Serial-2 ACIA base address
-*
-		.endc
-*
+
+SR1ACIA		=	0x3A8001	| Serial-1 ACIA base address	(BUCHLA)
+SR2ACIA		=	0x3A8009	| Serial-2 ACIA base address
+
+		.endc
+
 		.ifne	NASASIO
-*
-SR1ACIA		.equ	$398001		* Serial-1 ACIA base address	(NASA)
-SR2ACIA		.equ	$398009		* Serial-2 ACIA base address
-*
-		.endc
-*
-		.endc
-*
+
+SR1ACIA		=	0x398001	| Serial-1 ACIA base address	(NASA)
+SR2ACIA		=	0x398009	| Serial-2 ACIA base address
+
+		.endc
+
+		.endc
+
 		.ifne	BUCHLA
-*
-FPUBASE		.equ	$180000		* FPU base address
-TIMER		.equ	$3A0001		* Timer base address
-LCD		.equ	$3A4001		* LCD driver base address
-SR1ACIA		.equ	$3A8001		* Serial-1 ACIA base address	(BUCHLA)
-SR2ACIA		.equ	$3A8009		* Serial-2 ACIA base address
-MC1ACIA		.equ	$3AC001		* MIDI-1 ACIA base address
-MC2ACIA		.equ	$3AC009		* MIDI-2 ACIA base address
-FLOPPY		.equ	$3B0001		* Floppy controller base address
-PSG		.equ	$3B4001		* Sound chip base address
-LEDS		.equ	$3B8001		* LED driver base address
-ANALOG		.equ	$3BC001		* Analog processor base address
-*
-* FPU address offsets and misc. values
-*
-FPU_CTL		.equ	$4000		* FPU control
-*
-FPU_IN		.equ	$4000		* FPU input address
-FPU_CLR		.equ	$6000		* FPU interrupt reset address
-*
-FPU_RST		.equ	$0015		* FPU reset value
-*
-* PSG address offsets
-*
-PSG_RD		.equ	PSG		* Read PSG data
-PSG_WL		.equ	PSG		* Write PSG address latch
-PSG_WD		.equ	PSG+2		* Write PSG data
-*
-		.endc
-*
-* VSDD data structure offsets
-*
-VSDD_REG	.equ	VSDDDATA	* Registers
-VSDD_AT		.equ	VSDDDATA+$0100	* Access Table
-*
+
+FPUBASE		=	0x180000	| FPU base address
+TIMER		=	0x3A0001	| Timer base address
+LCD		=	0x3A4001	| LCD driver base address
+SR1ACIA		=	0x3A8001	| Serial-1 ACIA base address	(BUCHLA)
+SR2ACIA		=	0x3A8009	| Serial-2 ACIA base address
+MC1ACIA		=	0x3AC001	| MIDI-1 ACIA base address
+MC2ACIA		=	0x3AC009	| MIDI-2 ACIA base address
+FLOPPY		=	0x3B0001	| Floppy controller base address
+PSG		=	0x3B4001	| Sound chip base address
+LEDS		=	0x3B8001	| LED driver base address
+ANALOG		=	0x3BC001	| Analog processor base address
+
+| FPU address offsets and misc. values
+
+FPU_CTL		=	0x4000		| FPU control
+
+FPU_IN		=	0x4000		| FPU input address
+FPU_CLR		=	0x6000		| FPU interrupt reset address
+
+FPU_RST		=	0x0015		| FPU reset value
+
+| PSG address offsets
+
+PSG_RD		=	PSG		| Read PSG data
+PSG_WL		=	PSG		| Write PSG address latch
+PSG_WD		=	PSG+2		| Write PSG data
+
+		.endc
+
+| VSDD data structure offsets
+
+VSDD_REG	=	VSDDDATA	| Registers
+VSDD_AT		=	VSDDDATA+0x0100	| Access Table
+
 		.ifne	BUCHLA
-*
-* Timer registers
-*
-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		* Tiemr 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
-*
-		.endc
-*
-* 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
-*
-		.page
-*
+
+| Timer registers
+
+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		| Tiemr 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
+
+		.endc
+
+| 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
+
+		.page
+
 		.ifne	BUCHLA
-*
-* Floppy register offsets:
-* ------------------------
-DSKCMD		.equ	0		* Command / status
-DSKTRK		.equ	2		* Track
-DSKSEC		.equ	4		* Sector
-DSKDAT		.equ	6		* Data
-*
-* Miscellaneous equates:
-* ----------------------
-FL_NC		.equ	$02		* Non-compensated R/W/F bit
-*
-APISIZE		.equ	256		* Analog processor buffer size
-*
-* Floppy commands:
-* ----------------
-FL_RS		.equ	$80		* Read sector
-FL_RM		.equ	$90		* Read multiple
-FL_WS		.equ	$A0		* Write sector
-FL_WT		.equ	$F0		* Write track  (format)
-FL_FR		.equ	$D0		* Force reset
-FL_SK		.equ	$10		* Seek
-FL_SV		.equ	$14		* Seek w/verify
-*
-		.endc
-*
-		.page
-*
-* 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
-*
-* Error codes:
-* ------------
-ERR01		.equ	-1		* All purpose error
-ERR02		.equ	-2		* Drive not ready
-ERR03		.equ	-3		* Unknown command
-ERR04		.equ	-4		* CRC Error
-ERR05		.equ	-5		* Invalid request
-ERR06		.equ	-6		* Seek error
-ERR07		.equ	-7		* Unknown media
-ERR08		.equ	-8		* Sector not found
-ERR09		.equ	-9		* End of media  (out of paper)
-ERR10		.equ	-10		* Write fault
-ERR11		.equ	-11		* Read fault
-ERR12		.equ	-12		* General mishap
-ERR13		.equ	-13		* Write protected
-ERR14		.equ	-14		* Media changed
-ERR15		.equ	-15		* Unknown device
-ERR16		.equ	-16		* Bad sectors
-ERR17		.equ	-17		* Insert disk
-*
-		.page
-*
-* In the Beginning...
-* -------------------
-*
-* Low PROM -- Contains the initial sp (unused), and the initial pc,
-* as well as some version and creation date stuff and a copyright message,
-* just to be thorough about it.
-*
-begin:		bra.s	biosinit		* Jump to bios init
-*
-vermsg:		dc.b	VM1,VM2			* Version number
-*
-		dc.l	biosinit		* Reset address (bios init)
-*
-created:	dc.l	VDATE			* Creation date
-*
-copyrite:	dc.b	'{Copyright 1988 by '	* Copyright message
-		dc.b	'D.N. Lynx Crowe}',0
-*
-		dc.l	0			* Some padding
-*
+
+| Floppy register offsets:
+| ------------------------
+DSKCMD		=	0		| Command / status
+DSKTRK		=	2		| Track
+DSKSEC		=	4		| Sector
+DSKDAT		=	6		| Data
+
+| Miscellaneous equates:
+| ----------------------
+FL_NC		=	0x02		| Non-compensated R/W/F bit
+
+APISIZE		=	256		| Analog processor buffer size
+
+| Floppy commands:
+| ----------------
+FL_RS		=	0x80		| Read sector
+FL_RM		=	0x90		| Read multiple
+FL_WS		=	0xA0		| Write sector
+FL_WT		=	0xF0		| Write track  (format)
+FL_FR		=	0xD0		| Force reset
+FL_SK		=	0x10		| Seek
+FL_SV		=	0x14		| Seek w/verify
+
+		.endc
+
+		.page
+
+| 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
+
+| Error codes:
+| ------------
+ERR01		=	-1		| All purpose error
+ERR02		=	-2		| Drive not ready
+ERR03		=	-3		| Unknown command
+ERR04		=	-4		| CRC Error
+ERR05		=	-5		| Invalid request
+ERR06		=	-6		| Seek error
+ERR07		=	-7		| Unknown media
+ERR08		=	-8		| Sector not found
+ERR09		=	-9		| End of media  (out of paper)
+ERR10		=	-10		| Write fault
+ERR11		=	-11		| Read fault
+ERR12		=	-12		| General mishap
+ERR13		=	-13		| Write protected
+ERR14		=	-14		| Media changed
+ERR15		=	-15		| Unknown device
+ERR16		=	-16		| Bad sectors
+ERR17		=	-17		| Insert disk
+
+		.page
+
+| In the Beginning...
+| -------------------
+
+| Low PROM -- Contains the initial sp (unused), and the initial pc,
+| as well as some version and creation date stuff and a copyright message,
+| just to be thorough about it.
+
+begin:		bra.s	biosinit		| Jump to bios init
+
+vermsg:		dc.b	VM1,VM2			| Version number
+
+		dc.l	biosinit		| Reset address (bios init)
+
+created:	dc.l	VDATE			| Creation date
+
+copyrite:	dc.b	"{Copyright 1988 by "	| Copyright message
+		dc.b	"D.N. Lynx Crowe}",0
+
+		dc.l	0			| Some padding
+
 		.page
 		.even
-*
-* biosinit -- Setup the defaults for the BIOS
-* --------    -------------------------------
-biosinit:	move.w	#$2700,sr		* Set sup mode, no interrupts
-		move.l	#SSTACK,a7		* Setup supervisor stack pointer
-*
-		lea	badtrap,a1		* Set default trap vector
-		adda.l	#$02000000,a1		* ... with trap # in 31..24
-		lea	8,a0			* ... for traps 2..255
+
+| biosinit -- Setup the defaults for the BIOS
+| --------    -------------------------------
+biosinit:	move.w	#0x2700,sr		| Set sup mode, no interrupts
+		move.l	#SSTACK,a7		| Setup supervisor stack pointer
+
+		lea	badtrap,a1		| Set default trap vector
+		adda.l	#0x02000000,a1		| ... with trap # in 31..24
+		lea	8,a0			| ... for traps 2..255
 		move.l	#253,d1
-*
-binit1:		move.l	a1,(a0)+		* Store trap vector
-		adda.l	#$01000000,a1		* Increment trap #
-		dbf	d1,binit1		* Loop until done
-*
-		lea	biosram,a0		* Clear BIOS ram ...
-		lea	SSTACK-2,a1		* ... from biosram to SSTACK-1
-*
-binit2:		move.w	#0,(a0)+		* Zero a word
-		cmpa.l	a0,a1			* Last one ?
-		bne	binit2			* Loop if not
-*
-		move.l	#rsarea,savptr		* Setup pointer to register area
-		move.l	#RSMAGIC,_rsflag	* Set magic in _rsflag
-*
-		move.l	#nullrts,timevec	* Set timer interrupt vector
-		move.l	#nullrts,critvec	* Set critical error vector
-		move.l	#nullrts,termvec	* Set process terminate vector
-		move.l	#nullrts,resvec3	* Set software vector 3
-		move.l	#nullrts,resvec4	* Set software vector 4
-		move.l	#nullrts,resvec5	* Set software vector 5
-		move.l	#nullrts,resvec6	* Set software vector 6
-		move.l	#nullrts,resvec7	* Set software vector 7
-*
-		move.l	#hardhlt,$0008		* Set bus error vector
-		move.l	#nullrte,$0014		* Set divide error vector
-		move.l	#nullrte,$0018		* Set CHK vector
-		move.l	#nullrte,$001C		* Set TRAPV vector
-		move.l	#nullrte,$0024		* Set trace vector
-*
-		move.l	#nullrte,$0030		* Set reserved vector 12
-		move.l	#nullrte,$0034		* Set reserved vector 13
-		move.l	#nullrte,$0038		* Set reserved vector 14
-*
-		move.l	#nullrte,$003C		* Set uninitialized int. vector
-*
-		move.l	#nullrte,$0040		* Set reserved vector 16
-		move.l	#nullrte,$0044		* Set reserved vector 17
-		move.l	#nullrte,$0048		* Set reserved vector 18
-		move.l	#nullrte,$004C		* Set reserved vector 19
-		move.l	#nullrte,$0050		* Set reserved vector 20
-		move.l	#nullrte,$0054		* Set reserved vector 21
-		move.l	#nullrte,$0058		* Set reserved vector 22
-		move.l	#nullrte,$005C		* Set reserved vector 23
-*
-		move.l	#nullrte,$0060		* Set spurious int. vector
-*
-		move.l	#serintr,$0074		* Set ACIA interrupt vector
-		move.l	#nullrte,$0078		* Set level 6 vector
-		move.l	#nullrte,$007C		* Set level 7 vector
-*
-		move.l	#trap13,$00B4		* Set trap13 vector
-		move.l	#trap14,$00B8		* Set trap14 vector
-*
-		.page
-*
+
+binit1:		move.l	a1,(a0)+		| Store trap vector
+		adda.l	#0x01000000,a1		| Increment trap #
+		dbf	d1,binit1		| Loop until done
+
+		lea	biosram,a0		| Clear BIOS ram ...
+		lea	SSTACK-2,a1		| ... from biosram to SSTACK-1
+
+binit2:		move.w	#0,(a0)+		| Zero a word
+		cmpa.l	a0,a1			| Last one ?
+		bne	binit2			| Loop if not
+
+		move.l	#rsarea,savptr		| Setup pointer to register area
+		move.l	#RSMAGIC,_rsflag	| Set magic in _rsflag
+
+		move.l	#nullrts,timevec	| Set timer interrupt vector
+		move.l	#nullrts,critvec	| Set critical error vector
+		move.l	#nullrts,termvec	| Set process terminate vector
+		move.l	#nullrts,resvec3	| Set software vector 3
+		move.l	#nullrts,resvec4	| Set software vector 4
+		move.l	#nullrts,resvec5	| Set software vector 5
+		move.l	#nullrts,resvec6	| Set software vector 6
+		move.l	#nullrts,resvec7	| Set software vector 7
+
+		move.l	#hardhlt,0x0008		| Set bus error vector
+		move.l	#nullrte,0x0014		| Set divide error vector
+		move.l	#nullrte,0x0018		| Set CHK vector
+		move.l	#nullrte,0x001C		| Set TRAPV vector
+		move.l	#nullrte,0x0024		| Set trace vector
+
+		move.l	#nullrte,0x0030		| Set reserved vector 12
+		move.l	#nullrte,0x0034		| Set reserved vector 13
+		move.l	#nullrte,0x0038		| Set reserved vector 14
+
+		move.l	#nullrte,0x003C		| Set uninitialized int. vector
+
+		move.l	#nullrte,0x0040		| Set reserved vector 16
+		move.l	#nullrte,0x0044		| Set reserved vector 17
+		move.l	#nullrte,0x0048		| Set reserved vector 18
+		move.l	#nullrte,0x004C		| Set reserved vector 19
+		move.l	#nullrte,0x0050		| Set reserved vector 20
+		move.l	#nullrte,0x0054		| Set reserved vector 21
+		move.l	#nullrte,0x0058		| Set reserved vector 22
+		move.l	#nullrte,0x005C		| Set reserved vector 23
+
+		move.l	#nullrte,0x0060		| Set spurious int. vector
+
+		move.l	#serintr,0x0074		| Set ACIA interrupt vector
+		move.l	#nullrte,0x0078		| Set level 6 vector
+		move.l	#nullrte,0x007C		| Set level 7 vector
+
+		move.l	#trap13,0x00B4		| Set trap13 vector
+		move.l	#trap14,0x00B8		| Set trap14 vector
+
+		.page
+
 		.ifne	BUCHLA
-*
-		move.l	#nullfpu,$0068		* Set FPU interrupt vector
-		move.l	#api_int,$006C		* Set analog trap vector
-		move.l	#timeint,$0070		* Set timer trap vector
-*
-		move.l	#_hdvini,hdv_init	* Set disk init vector
-		move.l	#getbpb,hdv_bpb		* Set get BPB vector
-		move.l	#rwabs,hdv_rw		* Set disk I/O vector
-		move.l	#bootload,hdv_boot	* Setup boot load vector
-		move.l	#mediach,hdv_mchg	* Setup media change vector
-*
-		move.w	#$FFFF,fverify		* Set read after write flag
-		move.w	#FL_SKR,seekrate	* Set default seek rate
-		move.w	#$FFFF,booted		* Say we're not booted yet
-		move.l	#buffer,dskbufp		* Setup default disk buffer
-*
-		.page
-*
-		move.b	#7,PSG_WL		* Select PSG R7
-		move.b	#$80,PSG_WD		* Write $80  (port B = output)
-		move.b	#15,PSG_WL		* Select PSG R15
-		move.b	#$00,PSG_WD		* Write $00  (sync enable)
-*
-		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
-*
-		.endc
-*
-		lea	sr1iorec,a0		* Serial-1 iorec address to a0
-		lea	SR1ACIA,a1		* Serial-1 ACIA address to a1
-		lea	sr1dflt,a2		* Serial-1 dflt table addr to a2
-		bsr.w	aciainit		* Go initialize the port
-*
-		lea	sr2iorec,a0		* Serial-2 iorec address to a0
-		lea	SR2ACIA,a1		* Serial-2 ACIA address to a1
-		lea	sr2dflt,a2		* Serial-2 dflt table addr to a2
-		bsr.w	aciainit		* Go initialize the port
-*
+
+		move.l	#nullfpu,0x0068		| Set FPU interrupt vector
+		move.l	#api_int,0x006C		| Set analog trap vector
+		move.l	#timeint,0x0070		| Set timer trap vector
+
+		move.l	#_hdvini,hdv_init	| Set disk init vector
+		move.l	#getbpb,hdv_bpb		| Set get BPB vector
+		move.l	#rwabs,hdv_rw		| Set disk I/O vector
+		move.l	#bootload,hdv_boot	| Setup boot load vector
+		move.l	#mediach,hdv_mchg	| Setup media change vector
+
+		move.w	#0xFFFF,fverify		| Set read after write flag
+		move.w	#FL_SKR,seekrate	| Set default seek rate
+		move.w	#0xFFFF,booted		| Say we're not booted yet
+		move.l	#buffer,dskbufp		| Setup default disk buffer
+
+		.page
+
+		move.b	#7,PSG_WL		| Select PSG R7
+		move.b	#0x80,PSG_WD		| Write 0x80  (port B = output)
+		move.b	#15,PSG_WL		| Select PSG R15
+		move.b	#0x00,PSG_WD		| Write 0x00  (sync enable)
+
+		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
+
+		.endc
+
+		lea	sr1iorec,a0		| Serial-1 iorec address to a0
+		lea	SR1ACIA,a1		| Serial-1 ACIA address to a1
+		lea	sr1dflt,a2		| Serial-1 dflt table addr to a2
+		bsr.w	aciainit		| Go initialize the port
+
+		lea	sr2iorec,a0		| Serial-2 iorec address to a0
+		lea	SR2ACIA,a1		| Serial-2 ACIA address to a1
+		lea	sr2dflt,a2		| Serial-2 dflt table addr to a2
+		bsr.w	aciainit		| Go initialize the port
+
 		.ifne	BUCHLA
-*
-		lea	mc1iorec,a0		* MIDI-1 iorec address to a0
-		lea	MC1ACIA,a1		* MIDI-1 ACIA address to a1
-		lea	mc1dflt,a2		* MIDI-1 dflt table addr to a2
-		bsr.w	aciainit		* Go initialize the port
-*
-		lea	mc2iorec,a0		* MIDI-2 iorec address to a0
-		lea	MC2ACIA,a1		* MIDI-2 ACIA address to a1
-		lea	mc2dflt,a2		* MIDI-2 dflt table addr to a2
-		bsr.w	aciainit		* Go initialize the port
-*
-		.page
-*
-		lea	VSDDINIT,a1		* Setup to load VSDD regs
-		lea	vsddtab,a0		* ... from vsddtab
-		move.w	#15,d0			* ... all 16 registers
-*
-vsddinit:	move.w	(a0)+,(a1)+		* Load the VSDD registers
+
+		lea	mc1iorec,a0		| MIDI-1 iorec address to a0
+		lea	MC1ACIA,a1		| MIDI-1 ACIA address to a1
+		lea	mc1dflt,a2		| MIDI-1 dflt table addr to a2
+		bsr.w	aciainit		| Go initialize the port
+
+		lea	mc2iorec,a0		| MIDI-2 iorec address to a0
+		lea	MC2ACIA,a1		| MIDI-2 ACIA address to a1
+		lea	mc2dflt,a2		| MIDI-2 dflt table addr to a2
+		bsr.w	aciainit		| Go initialize the port
+
+		.page
+
+		lea	VSDDINIT,a1		| Setup to load VSDD regs
+		lea	vsddtab,a0		| ... from vsddtab
+		move.w	#15,d0			| ... all 16 registers
+
+vsddinit:	move.w	(a0)+,(a1)+		| Load the VSDD registers
 		btst.l	#0,d0
 		btst.l	#0,d0
 		btst.l	#0,d0
 		dbf	d0,vsddinit
-*
-		move.w	vsddit02,VSDDINIT	* Enable the video
-*
-		move.l	#api_fum,api_fi		* Clear analog processor fifo
-		move.l	#api_fum,api_fo		* ...
-*
-		move.w	#23,d0			* Setup to clear key LEDs
-		move.b	#$80,d1			* ...
-*
-ledclear:	move.b	d1,LEDS			* Clear a LED
-		addq.b	#1,d1			* Increment LED number
-		dbra	d0,ledclear		* Loop until all are done
-*
-		move.w	#7,d0			* Setup to clear pot LEDs
-		move.b	#$18,d1			* ...
-*
-ledclr2:	move.b	d1,LEDS			* Clear a LED
-		addq.b	#1,d1			* Increment LED number
-		dbra	d0,ledclr2		* Loop until all are done
-*
-		clr.w	fc_sw			* Stop the frame clock
-		clr.l	fc_val			* ... and reset it
-*
-		.page
-*
-		lea	FPUBASE+FPU_CTL,a0	* Point at FPU master level
-		move.w	#$0000,$08(a0)		* Set CV1 to 0
-		addq.w	#1,d0			* Delay
-		addq.w	#1,d0			* ...
-		move.w	#$0000,$0A(a0)		* Set SF1 to 0
-		addq.w	#1,d0			* Delay
-		addq.w	#1,d0			* ...
-		move.w	#$0000,$0C(a0)		* Set CV2 to 0
-		addq.w	#1,d0			* Delay
-		addq.w	#1,d0			* ...
-		move.w	#$0000,$0E(a0)		* Set SF2 to 0
-		addq.w	#1,d0			* Delay
-		addq.w	#1,d0			* ...
-		move.w	#$0000,$10(a0)		* Set CV3 to 0
-		addq.w	#1,d0			* Delay
-		addq.w	#1,d0			* ...
-		move.w	#$0000,$12(a0)		* Set SF3 to 0
-		addq.w	#1,d0			* Delay
-		addq.w	#1,d0			* ...
-		move.w	#$8300,$02(a0)		* Set new value '10' to -10.00
-		addq.w	#1,d0			* Delay
-		addq.w	#1,d0			* ...
-		move.w	#$8300,$1C(a0)		* Set new value '01' to -10.00
-		addq.w	#1,d0			* Delay
-		addq.w	#1,d0			* ...
-		move.w	#$0001,$16(a0)		* Set exponent for shortest time
-		addq.w	#1,d0			* Delay
-		addq.w	#1,d0			* ...
-		move.w	#$FFF0,$14(a0)		* Set mantissa for shortest time
-		addq.w	#1,d0			* Delay
-		addq.w	#1,d0			* ...
-		move.w	#$0005,$00(a0)		* Send control word to FPU
-*
-		.endc
-*
-		.page
-*
-		move.w	#INITIPL,sr		* Enable interrupts
-		lea	basepage,a1		* Pass start_ a pseudo base page
-		move.l	#_errno,p_bbase(a1)	* ...
-		clr.l	p_blen(a1)		* ...
-		move.l	a1,-(a7)		* ...
-		jsr	start_			* Go start ROMP  (we assume ...)
-*
-		jmp	biosinit		* Just in case we return ...
-*
-		.page
-*
+
+		move.w	vsddit02,VSDDINIT	| Enable the video
+
+		move.l	#api_fum,api_fi		| Clear analog processor fifo
+		move.l	#api_fum,api_fo		| ...
+
+		move.w	#23,d0			| Setup to clear key LEDs
+		move.b	#0x80,d1		| ...
+
+ledclear:	move.b	d1,LEDS			| Clear a LED
+		addq.b	#1,d1			| Increment LED number
+		dbra	d0,ledclear		| Loop until all are done
+
+		move.w	#7,d0			| Setup to clear pot LEDs
+		move.b	#0x18,d1		| ...
+
+ledclr2:	move.b	d1,LEDS			| Clear a LED
+		addq.b	#1,d1			| Increment LED number
+		dbra	d0,ledclr2		| Loop until all are done
+
+		clr.w	fc_sw			| Stop the frame clock
+		clr.l	fc_val			| ... and reset it
+
+		.page
+
+		lea	FPUBASE+FPU_CTL,a0	| Point at FPU master level
+		move.w	#0x0000,0x08(a0)	| Set CV1 to 0
+		addq.w	#1,d0			| Delay
+		addq.w	#1,d0			| ...
+		move.w	#0x0000,0x0A(a0)	| Set SF1 to 0
+		addq.w	#1,d0			| Delay
+		addq.w	#1,d0			| ...
+		move.w	#0x0000,0x0C(a0)	| Set CV2 to 0
+		addq.w	#1,d0			| Delay
+		addq.w	#1,d0			| ...
+		move.w	#0x0000,0x0E(a0)	| Set SF2 to 0
+		addq.w	#1,d0			| Delay
+		addq.w	#1,d0			| ...
+		move.w	#0x0000,0x10(a0)	| Set CV3 to 0
+		addq.w	#1,d0			| Delay
+		addq.w	#1,d0			| ...
+		move.w	#0x0000,0x12(a0)	| Set SF3 to 0
+		addq.w	#1,d0			| Delay
+		addq.w	#1,d0			| ...
+		move.w	#0x8300,0x02(a0)	| Set new value '10' to -10.00
+		addq.w	#1,d0			| Delay
+		addq.w	#1,d0			| ...
+		move.w	#0x8300,0x1C(a0)	| Set new value '01' to -10.00
+		addq.w	#1,d0			| Delay
+		addq.w	#1,d0			| ...
+		move.w	#0x0001,0x16(a0)	| Set exponent for shortest time
+		addq.w	#1,d0			| Delay
+		addq.w	#1,d0			| ...
+		move.w	#0xFFF0,0x14(a0)	| Set mantissa for shortest time
+		addq.w	#1,d0			| Delay
+		addq.w	#1,d0			| ...
+		move.w	#0x0005,0x00(a0)	| Send control word to FPU
+
+		.endc
+
+		.page
+
+		move.w	#INITIPL,sr		| Enable interrupts
+		lea	basepage,a1		| Pass start_ a pseudo base page
+		move.l	#_errno,p_bbase(a1)	| ...
+		clr.l	p_blen(a1)		| ...
+		move.l	a1,-(a7)		| ...
+		jsr	start_			| Go start ROMP  (we assume ...)
+
+		jmp	biosinit		| Just in case we return ...
+
+		.page
+
 		.ifne	BUCHLA
-*
-* nullfpu -- Null FPU trap handler
-* -------    ---------------------
-nullfpu:	movem.l	d0-d0/a0-a0,-(a7)	* Save registers
-		movea.l	#FPUBASE,a0		* Setup FPU base address in a0
-		move.w	FPU_IN(a0),d0		* Read FPU interrupt port
-		andi.l	#$000000FF,d0		* Mask for voice & parameter
-		lsl.l	#5,d0			* Shift for word offset
-		addi.l	#FPU_CTL,d0		* Add FPU control offset
-		move.w	#FPU_RST,0(a0,d0.L)	* Reset the function
-		clr.w	FPU_CLR(a0)		* Clear the interrupt
-		movem.l	(a7)+,d0-d0/a0-a0	* Restore registers
-		rte				* Return to interrupted code
-*
-		.endc
-*
-		.page
-*
-* hardhlt -- Bus error trap handler
-* -------    ----------------------
-hardhlt:	stop	#$2700			* stop dead -- system is AFU
-		bra	hardhlt			* ...
-*
-* badtrap -- Bad trap handler
-* -------    ----------------
-badtrap:	move.w	(a7)+,_crshsr		* Get crash SR
-		move.l	(a7)+,_crshpc		* Get crash PC
-		move.l	a7,_crshsp		* Get crash SP
-		bsr	badtr1			* Get TRAP PC with vector number
+
+| nullfpu -- Null FPU trap handler
+| -------    ---------------------
+nullfpu:	movem.l	d0-d0/a0-a0,-(a7)	| Save registers
+		movea.l	#FPUBASE,a0		| Setup FPU base address in a0
+		move.w	FPU_IN(a0),d0		| Read FPU interrupt port
+		andi.l	#0x000000FF,d0		| Mask for voice & parameter
+		lsl.l	#5,d0			| Shift for word offset
+		addi.l	#FPU_CTL,d0		| Add FPU control offset
+		move.w	#FPU_RST,0(a0,d0.L)	| Reset the function
+		clr.w	FPU_CLR(a0)		| Clear the interrupt
+		movem.l	(a7)+,d0-d0/a0-a0	| Restore registers
+		rte				| Return to interrupted code
+
+		.endc
+
+		.page
+
+| hardhlt -- Bus error trap handler
+| -------    ----------------------
+hardhlt:	stop	#0x2700			| stop dead -- system is AFU
+		bra	hardhlt			| ...
+
+| badtrap -- Bad trap handler
+| -------    ----------------
+badtrap:	move.w	(a7)+,_crshsr		| Get crash SR
+		move.l	(a7)+,_crshpc		| Get crash PC
+		move.l	a7,_crshsp		| Get crash SP
+		bsr	badtr1			| Get TRAP PC with vector number
 		nop
-*
-badtr1:		move.l	(a7)+,_crshvc		* Save for analysis of vector #
-		movem.l	d0-d7/a0-a7,_crshrg	* Save crash registers
-		move.l	usp,a0			* Preserve crash USP
-		move.l	a0,_crshus		* ...
-		move.l	a7,d0			* Get SP
-		andi.l	#$FFFFFFFE,d0		* ... make sure it's even
-		movea.l	d0,a1			* ...
-		move.w	#15,d0			* Save top 16 words
-		lea	_crshst,a0		* ... of crash stack in _crshst
-*
-badtr2:		move.w	(a1)+,(a0)+		* Save a stack value
-		dbf	d0,badtr2		* Loop until all are saved
-*
-		clr.l	d0			* Get TRAP number
-		move.b	_crshvc,d0		* ... as LS byte of d0
-		move.l	_crshpc,a0		* Save crash PC in a0
-		move.w	#$FFFF,_wzcrsh		* Indicate we crashed
-		move.l	#rsarea,savptr		* Restore system save pointer
-		move.l	#SSTACK,a7		* Reset the stack pointer
-		move.l	#RSMAGIC,_rsflag	* ... and the stack sentinel
-		trap	#15			* TRAP to ROMP
-*
-		jmp	biosinit		* Recover with a cold start
-*
-		.page
-*
+
+badtr1:		move.l	(a7)+,_crshvc		| Save for analysis of vector #
+		movem.l	d0-d7/a0-a7,_crshrg	| Save crash registers
+		move.l	usp,a0			| Preserve crash USP
+		move.l	a0,_crshus		| ...
+		move.l	a7,d0			| Get SP
+		andi.l	#0xFFFFFFFE,d0		| ... make sure it's even
+		movea.l	d0,a1			| ...
+		move.w	#15,d0			| Save top 16 words
+		lea	_crshst,a0		| ... of crash stack in _crshst
+
+badtr2:		move.w	(a1)+,(a0)+		| Save a stack value
+		dbf	d0,badtr2		| Loop until all are saved
+
+		clr.l	d0			| Get TRAP number
+		move.b	_crshvc,d0		| ... as LS byte of d0
+		move.l	_crshpc,a0		| Save crash PC in a0
+		move.w	#0xFFFF,_wzcrsh		| Indicate we crashed
+		move.l	#rsarea,savptr		| Restore system save pointer
+		move.l	#SSTACK,a7		| Reset the stack pointer
+		move.l	#RSMAGIC,_rsflag	| ... and the stack sentinel
+		trap	#15			| TRAP to ROMP
+
+		jmp	biosinit		| Recover with a cold start
+
+		.page
+
 		.ifne	BUCHLA
-*
-* timeint -- Timer interrupt handler
-* -------    -----------------------
-timeint:	movem.l	d0-d7/a0-a6,-(a7)	* Save registers
-		move.b	TIME_CR2,d0		* Get timer interrupt status
-		btst.l	#2,d0			* Check timer 3 status
-		beq	tmi02			* Jump if not active
-*
-		move.b	TIME_T3H,d1		* Read timer 1 count
-		lsl.l	#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.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)
-*
-		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
-*
-		bsr	flopvbl			* Check on the floppy
-*
-tmi00:		move.w	#0,tdiv2		* Reset tdiv2
-*
-tmi01:		move.w	#0,tdiv1		* Reset tdiv1
-*
-		.page
-*
-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.
-		lsl.l	#8,d1			* ...
-		move.b	TIME_T1L,d1		* ...
-		move.w	d1,t1count		* ... and save the count
-*
-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.
-		lsl.l	#8,d1			* ...
-		move.b	TIME_T2L,d1		* ...
-		move.w	d1,t2count		* ... and save the count
-*
-		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
-		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
-		beq	tmi04			* Done if already zero
-*
-		subq.l	#1,d0			* Count down 1 frame
-		move.l	d0,fc_val		* Store udpated frame count
-*
-		movea.l	timevec,a0		* Do RTC vector
-		move.w	#1,-(a7)		* ... pass 1 msec on stack
-		jsr	(a0)			* ...
-		addq.l	#4,a7			* ...
-*
-tmi04:		movem.l	(a7)+,d0-d7/a0-a6		* Restore registers
-		rte				* Return to interrupted code
-*
-		.endc
-*
-		.page
-*
-* trap14 -- Extended BIOS entry point
-* ------    -------------------------
-trap14:		lea	t14tab,a0		* Setup trap 14 table address
-		bra	trapent			* Go process trap
-*
-* trap13 -- Main BIOS entry point
-* ------    ---------------------
-trap13:		lea	t13tab,a0		* Setup trap 13 table address
-*
-trapent:	move.l	savptr,a1		* Get save area pointer
-		move.w	(a7)+,d0		* Status register to D0
-		move.w	d0,-(a1)		* Save in save area
-		move.l	(a7)+,-(a1)		* Stash PC in save area
-		movem.l	d3-d7/a3-a7,-(a1)	* Save parameter register
-		move.l	a1,savptr		* Update save pointer
-		btst	#13,d0			* Were we in sup. mode ?
-		bne	trwzsup			* Jump if so
-*
-		move.l	usp,a7			* Move user sp to stack ptr.
-*
-trwzsup:	move.w	(a7)+,d0		* Get function number from stack
-		cmp.w	(a0)+,d0		* Check against limit
-		bge	trpexit			* Jump if it's invalid
-*
-		lsl.w	#2,d0			* Multiply by 4 for use as index
-		move.l	0(a0,d0),d0		* Get routine address
-		move.l	d0,a0			* ... into a0
-		bpl	trpnind			* Jump if it's indirect
-*
-		move.l	(a0),a0			* Use indirect value
-*
-trpnind:	sub.l	a5,a5			* Clear a5
-		jsr	(a0)			* Execute the routine
-*
-trpexit:	move.l	savptr,a1		* Get SAVPTR into a1
-		movem.l	(a1)+,d3-d7/a3-a7	* Restore registers
-		move.l	(a1)+,-(a7)		* Push return onto stack
-		move.w	(a1)+,-(a7)		* Push status onto stack
-		move.l	a1,savptr		* Update SAVPTR
-*
-* nullrte -- null rte
-* -------    --------
-nullrte:	rte				* Return to interrupted code
-*
-* nullrts -- null return
-* -------    -----------
-nullrts:	rts				* Just return to the caller
-*
-		.page
-*
-* bconstat -- Get character device input status
-* --------    ---------------------------------
-bconstat:	lea	cdt01,a0		* Point at status table
-		bra	condisp			* Jump to dispatcher
-*
-* bconin -- Get input from character device
-* ------    -------------------------------
-bconin:		lea	cdt02,a0		* Point at input table
-		bra	condisp			* Jump to dispatcher
-*
-* bconout -- Output to character device
-* -------    --------------------------
-bconout:	lea	cdt03,a0		* Point at output table
-		bra	condisp			* Jump to dispatcher
-*
-* bcostat -- Get character device output status
-* -------    ----------------------------------
-bcostat:	lea	cdt04,a0		* Point at status table
-*
-* condisp -- Character device function dispatcher
-* -------    ------------------------------------
-condisp:	move.w	4(a7),d0		* Get device number
-		lsl.w	#2,d0			* ... times 4 for pointer
-		move.l	0(a0,d0),a0		* Get routine address
-		jmp	(a0)			* Jump to it
-*
-		.page
-*
-* sr1ist -- Check CON (Serial-1) input buffer status
-* ------    ----------------------------------------
-sr1ist:		lea	sr1iorec,a0		* Address of iorec to a0
-		lea	SR1ACIA,a1		* Address of ACIA to a1
-		bra	chkist			* Go check buffer status
-*
-* sr2ist -- Check AUX (Serial-2) input buffer status
-* ------    ----------------------------------------
-sr2ist:		lea	sr2iorec,a0		* Address of iorec to a0
-		lea	SR2ACIA,a1		* Address of ACIA to a1
-*
+
+| timeint -- Timer interrupt handler
+| -------    -----------------------
+timeint:	movem.l	d0-d7/a0-a6,-(a7)	| Save registers
+		move.b	TIME_CR2,d0		| Get timer interrupt status
+		btst.l	#2,d0			| Check timer 3 status
+		beq	tmi02			| Jump if not active
+
+		move.b	TIME_T3H,d1		| Read timer 1 count
+		lsl.l	#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.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)
+
+		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
+
+		bsr	flopvbl			| Check on the floppy
+
+tmi00:		move.w	#0,tdiv2		| Reset tdiv2
+
+tmi01:		move.w	#0,tdiv1		| Reset tdiv1
+
+		.page
+
+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.
+		lsl.l	#8,d1			| ...
+		move.b	TIME_T1L,d1		| ...
+		move.w	d1,t1count		| ... and save the count
+
+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.
+		lsl.l	#8,d1			| ...
+		move.b	TIME_T2L,d1		| ...
+		move.w	d1,t2count		| ... and save the count
+
+		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
+		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
+		beq	tmi04			| Done if already zero
+
+		subq.l	#1,d0			| Count down 1 frame
+		move.l	d0,fc_val		| Store udpated frame count
+
+		movea.l	timevec,a0		| Do RTC vector
+		move.w	#1,-(a7)		| ... pass 1 msec on stack
+		jsr	(a0)			| ...
+		addq.l	#4,a7			| ...
+
+tmi04:		movem.l	(a7)+,d0-d7/a0-a6		| Restore registers
+		rte				| Return to interrupted code
+
+		.endc
+
+		.page
+
+| trap14 -- Extended BIOS entry point
+| ------    -------------------------
+trap14:		lea	t14tab,a0		| Setup trap 14 table address
+		bra	trapent			| Go process trap
+
+| trap13 -- Main BIOS entry point
+| ------    ---------------------
+trap13:		lea	t13tab,a0		| Setup trap 13 table address
+
+trapent:	move.l	savptr,a1		| Get save area pointer
+		move.w	(a7)+,d0		| Status register to D0
+		move.w	d0,-(a1)		| Save in save area
+		move.l	(a7)+,-(a1)		| Stash PC in save area
+		movem.l	d3-d7/a3-a7,-(a1)	| Save parameter register
+		move.l	a1,savptr		| Update save pointer
+		btst	#13,d0			| Were we in sup. mode ?
+		bne	trwzsup			| Jump if so
+
+		move.l	usp,a7			| Move user sp to stack ptr.
+
+trwzsup:	move.w	(a7)+,d0		| Get function number from stack
+		cmp.w	(a0)+,d0		| Check against limit
+		bge	trpexit			| Jump if it's invalid
+
+		lsl.w	#2,d0			| Multiply by 4 for use as index
+		move.l	0(a0,d0),d0		| Get routine address
+		move.l	d0,a0			| ... into a0
+		bpl	trpnind			| Jump if it's indirect
+
+		move.l	(a0),a0			| Use indirect value
+
+trpnind:	sub.l	a5,a5			| Clear a5
+		jsr	(a0)			| Execute the routine
+
+trpexit:	move.l	savptr,a1		| Get SAVPTR into a1
+		movem.l	(a1)+,d3-d7/a3-a7	| Restore registers
+		move.l	(a1)+,-(a7)		| Push return onto stack
+		move.w	(a1)+,-(a7)		| Push status onto stack
+		move.l	a1,savptr		| Update SAVPTR
+
+| nullrte -- null rte
+| -------    --------
+nullrte:	rte				| Return to interrupted code
+
+| nullrts -- null return
+| -------    -----------
+nullrts:	rts				| Just return to the caller
+
+		.page
+
+| bconstat -- Get character device input status
+| --------    ---------------------------------
+bconstat:	lea	cdt01,a0		| Point at status table
+		bra	condisp			| Jump to dispatcher
+
+| bconin -- Get input from character device
+| ------    -------------------------------
+bconin:		lea	cdt02,a0		| Point at input table
+		bra	condisp			| Jump to dispatcher
+
+| bconout -- Output to character device
+| -------    --------------------------
+bconout:	lea	cdt03,a0		| Point at output table
+		bra	condisp			| Jump to dispatcher
+
+| bcostat -- Get character device output status
+| -------    ----------------------------------
+bcostat:	lea	cdt04,a0		| Point at status table
+
+| condisp -- Character device function dispatcher
+| -------    ------------------------------------
+condisp:	move.w	4(a7),d0		| Get device number
+		lsl.w	#2,d0			| ... times 4 for pointer
+		move.l	0(a0,d0),a0		| Get routine address
+		jmp	(a0)			| Jump to it
+
+		.page
+
+| sr1ist -- Check CON (Serial-1) input buffer status
+| ------    ----------------------------------------
+sr1ist:		lea	sr1iorec,a0		| Address of iorec to a0
+		lea	SR1ACIA,a1		| Address of ACIA to a1
+		bra	chkist			| Go check buffer status
+
+| sr2ist -- Check AUX (Serial-2) input buffer status
+| ------    ----------------------------------------
+sr2ist:		lea	sr2iorec,a0		| Address of iorec to a0
+		lea	SR2ACIA,a1		| Address of ACIA to a1
+
 		.ifne	BUCHLA
-*
-		bra	chkist			* Go check buffer status
-*
-* mc1ist -- Check MC1 (MIDI-1) input buffer status
-* ------    --------------------------------------
-mc1ist:		lea	mc1iorec,a0		* Address of iorec to a0
-		lea	MC1ACIA,a1		* Address of ACIA to a1
-		bra	chkist			* Go check buffer status
-*
-* mc2ist -- Check MC2 (MIDI-2) input buffer status
-* ------    --------------------------------------
-mc2ist:		lea	mc2iorec,a0		* Address of iorec to a0
-		lea	MC2ACIA,a1		* Address of ACIA to a1
-*
-		.endc
-*
-* chkist -- Check input buffer status
-* ------    -------------------------
-chkist:		moveq.l	#-1,d0			* Default to "Input available"
-		lea	ibufhd(a0),a2		* Head index to a2
-		lea	ibuftl(a0),a3		* Tail index to a3
-		cmpm.w	(a3)+,(a2)+		* Buffer clear ?
-		bne	chkist1			* Jump if not
-*
-		moveq.l	#0,d0			* Set to "Buffer empty"
-*
-chkist1:	rts				* Return to caller
-*
-		.page
-*
-* sr1ost -- Check CON (Serial-1) output buffer status
-* ------    -----------------------------------------
-sr1ost:		lea	sr1iorec,a0		* Address of iorec to a0
-		bra	chkost			* Go check buffer status
-*
-* sr2ost -- Check AUX (Serial-2) output buffer status
-* ------    -----------------------------------------
-sr2ost:		lea	sr2iorec,a0		* Address of iorec to a0
-*
+
+		bra	chkist			| Go check buffer status
+
+| mc1ist -- Check MC1 (MIDI-1) input buffer status
+| ------    --------------------------------------
+mc1ist:		lea	mc1iorec,a0		| Address of iorec to a0
+		lea	MC1ACIA,a1		| Address of ACIA to a1
+		bra	chkist			| Go check buffer status
+
+| mc2ist -- Check MC2 (MIDI-2) input buffer status
+| ------    --------------------------------------
+mc2ist:		lea	mc2iorec,a0		| Address of iorec to a0
+		lea	MC2ACIA,a1		| Address of ACIA to a1
+
+		.endc
+
+| chkist -- Check input buffer status
+| ------    -------------------------
+chkist:		moveq.l	#-1,d0			| Default to "Input available"
+		lea	ibufhd(a0),a2		| Head index to a2
+		lea	ibuftl(a0),a3		| Tail index to a3
+		cmpm.w	(a3)+,(a2)+		| Buffer clear ?
+		bne	chkist1			| Jump if not
+
+		moveq.l	#0,d0			| Set to "Buffer empty"
+
+chkist1:	rts				| Return to caller
+
+		.page
+
+| sr1ost -- Check CON (Serial-1) output buffer status
+| ------    -----------------------------------------
+sr1ost:		lea	sr1iorec,a0		| Address of iorec to a0
+		bra	chkost			| Go check buffer status
+
+| sr2ost -- Check AUX (Serial-2) output buffer status
+| ------    -----------------------------------------
+sr2ost:		lea	sr2iorec,a0		| Address of iorec to a0
+
 		.ifne	BUCHLA
-*
-		bra	chkost			* Go check buffer status
-*
-* mc1ost -- Check MC1 (MIDI-1) output buffer status
-* ------    ---------------------------------------
-mc1ost:		lea	mc1iorec,a0		* Address of iorec to a0
-		bra	chkost			* Go check buffer status
-*
-* mc2ost -- Check MC2 (MIDI-2) output buffer status
-* ------    ---------------------------------------
-mc2ost:		lea	mc2iorec,a0		* Address of iorec to a0
-*
-		.endc
-*
-* chkost -- Check output buffer status
-* ------    --------------------------
-chkost:		moveq.l	#-1,d0			* Default to "Output OK"
-		move.w	obuftl(a0),d2		* Tail index to d2
-		bsr	wrapout			* Test for pointer wraparound
-		cmp.w	obufhd(a0),d2		* Compare with head index
-		bne	chkost1			* Jump if not equal
-*
-		moveq.l	#0,d0			* Set to "Buffer full"
-*
-chkost1:	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
-*
-* sr1inp -- Get input from Serial-1  (wait on busy)
-* ------    ---------------------------------------
-sr1inp:		lea	sr1iorec,a0		* Serial-1 iorec address
-		lea	SR1ACIA,a1		* Serial-1 ACIA base
-		bra	serinp			* Go get a byte
-*
-* sr2inp -- Get input from Serial-2  (wait on busy)
-* ------    ---------------------------------------
-sr2inp:		lea	sr2iorec,a0		* Serial-2 iorec address
-		lea	SR2ACIA,a1		* Serial-2 ACIA base
-*
-* serinp -- Get a byte from a serial port  (with handshaking)
-* ------    -------------------------------------------------
-serinp:		bsr	chkist			* Check input status
-		tst.w	d0			* Character ready ?
-		beq	serinp			* Loop until one is ...
-*
-		bsr	getser			* Get a byte from the buffer
-		and.w	#$FFFF,d0		* Isolate LS bits 7..0
-		rts				* Return to caller
-*
-		.page
-*
+
+		bra	chkost			| Go check buffer status
+
+| mc1ost -- Check MC1 (MIDI-1) output buffer status
+| ------    ---------------------------------------
+mc1ost:		lea	mc1iorec,a0		| Address of iorec to a0
+		bra	chkost			| Go check buffer status
+
+| mc2ost -- Check MC2 (MIDI-2) output buffer status
+| ------    ---------------------------------------
+mc2ost:		lea	mc2iorec,a0		| Address of iorec to a0
+
+		.endc
+
+| chkost -- Check output buffer status
+| ------    --------------------------
+chkost:		moveq.l	#-1,d0			| Default to "Output OK"
+		move.w	obuftl(a0),d2		| Tail index to d2
+		bsr	wrapout			| Test for pointer wraparound
+		cmp.w	obufhd(a0),d2		| Compare with head index
+		bne	chkost1			| Jump if not equal
+
+		moveq.l	#0,d0			| Set to "Buffer full"
+
+chkost1:	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
+
+| sr1inp -- Get input from Serial-1  (wait on busy)
+| ------    ---------------------------------------
+sr1inp:		lea	sr1iorec,a0		| Serial-1 iorec address
+		lea	SR1ACIA,a1		| Serial-1 ACIA base
+		bra	serinp			| Go get a byte
+
+| sr2inp -- Get input from Serial-2  (wait on busy)
+| ------    ---------------------------------------
+sr2inp:		lea	sr2iorec,a0		| Serial-2 iorec address
+		lea	SR2ACIA,a1		| Serial-2 ACIA base
+
+| serinp -- Get a byte from a serial port  (with handshaking)
+| ------    -------------------------------------------------
+serinp:		bsr	chkist			| Check input status
+		tst.w	d0			| Character ready ?
+		beq	serinp			| Loop until one is ...
+
+		bsr	getser			| Get a byte from the buffer
+		and.w	#0xFFFF,d0		| Isolate LS bits 7..0
+		rts				| Return to caller
+
+		.page
+
 		.ifne	BUCHLA
-*
-* mc1inp -- Get input from MIDI-1  (wait on busy)
-* ------    -------------------------------------
-mc1inp:		lea	mc1iorec,a0		* MIDI-1 iorec address
-		lea	MC1ACIA,a1		* MIDI-1 ACIA base
-		bra	midinp			* Go get a byte
-*
-* mc2inp -- Get input from MIDI-2  (wait on busy)
-* ------    -------------------------------------
-mc2inp:		lea	mc2iorec,a0		* MIDI-2 iorec address
-		lea	MC2ACIA,a1		* MIDI-2 ACIA base
-*
-* midinp -- Get input from a MIDI port  (no handshaking)
-* ------    --------------------------------------------
-midinp:		bsr	chkist			* Check input status
-		tst.w	d0			* Character ready ?
-		beq	midinp			* Loop until one is ...
-*
-		move.w	sr,-(a7)		* Save status register
-		ori.w	#IPL7,sr		* Set IPL = 7  (disable ints)
-		move.w	ibufhd(a0),d1		* Head index to d1
-		cmp.w	ibuftl(a0),d1		* Compare to tail index
-		beq	midin_1			* Jump if (somehow) empty
-*
-		addq.w	#1,d1			* Increment head index
-		cmp.w	ibufsize(a0),d1		* Did pointer wrap around ?
-		bcs	midin_2			* Jump if not
-*
-		moveq.l	#0,d1			* Wraparound
-*
-midin_2:	move.l	ibuf(a0),a2		* Get buffer base address in a2
-		moveq.l	#0,d0			* Clear MS bits of d0
-		move.b	0(a2,d1),d0		* Get character from buffer
-		move.w	d1,ibufhd(a0)		* Update buffer head index
-*
-midin_1:	move.w	(a7)+,sr		* Restore status
-		rts				* Return to caller
-*
-		.endc
-*
-		.page
-*
-* getser -- Get a byte from a serial port buffer  (with handshaking)
-* ------    --------------------------------------------------------
-getser:		move.w	sr,-(a7)		* Save status register
-		ori.w	#IPL7,sr		* Set IPL = 7  (disable ints)
-		move.w	ibufhd(a0),d1		* Get input buffer head index
-		cmp.w	ibuftl(a0),d1		* Compare tail index
-		beq	rs_mt			* Jump if buffer empty
-*
-		bsr	wrapin			* Adjust pointer for wraparound
-		move.l	ibuf(a0),a2		* Get buffer address
-		moveq.l	#0,d0			* Clear out MS bits of d0
-		move.b	0(a2,d1),d0		* Get character from buffer
-		move.w	d1,ibufhd(a0)		* Update head index
-		move.w	(a7)+,sr		* Restore status
-		andi	#$FFFE,sr		* Clear carry = OK
-		bra	rs_xnf			* Go do XON/XOFF check
-*
-rs_mt:		move.w	(a7)+,sr		* Restore status
-		ori	#$0001,sr		* Set carry = no character there
-*
-rs_xnf:		btst	#0,linedisc(a0)		* Check for XON/XOFF mode
-		beq	rs_exit			* Jump if not enabled
-*
-		tst.b	flagxon(a0)		* XON active ?
-		beq	rs_exit			* Jump if not
-*
-		bsr	rsilen			* Get length of buffer used
-		cmp.w	ibuflow(a0),d2		* At low water mark ?
-		bne	rs_exit			* Jump if not
-*
-		move.b	#$11,d1			* Send an XON
-		bsr	serput			* ...
-		clr.b	flagxon(a0)		* Clear XON flag
-*
-rs_exit:	rts				* Return to caller
-*
-		.page
-*
-* sr1out -- Output to serial-1
-* ------    ------------------
-sr1out:		lea	sr1iorec,a0		* Serial-1 iorec address to a0
-		lea	SR1ACIA,a1		* Serial-1 ACIA address to a1
-		move.w	6(a7),d1		* Get data byte from stack
-		bsr	serput			* Attempt to output
-		bcs	sr1out			* Try until it works ...
-*
-		rts				* Return to caller
-*
-* sr2out -- Output to Serial-2
-* ------    ------------------
-sr2out:		lea	sr2iorec,a0		* Serial-2 iorec address to a0
-		lea	SR2ACIA,a1		* Serial-2 ACIA address to a1
-		move.w	6(a7),d1		* Get data byte from stack
-		bsr	serput			* Attempt to output
-		bcs	sr2out			* Try until it works ...
-*
-		rts				* Return to caller
-*
+
+| mc1inp -- Get input from MIDI-1  (wait on busy)
+| ------    -------------------------------------
+mc1inp:		lea	mc1iorec,a0		| MIDI-1 iorec address
+		lea	MC1ACIA,a1		| MIDI-1 ACIA base
+		bra	midinp			| Go get a byte
+
+| mc2inp -- Get input from MIDI-2  (wait on busy)
+| ------    -------------------------------------
+mc2inp:		lea	mc2iorec,a0		| MIDI-2 iorec address
+		lea	MC2ACIA,a1		| MIDI-2 ACIA base
+
+| midinp -- Get input from a MIDI port  (no handshaking)
+| ------    --------------------------------------------
+midinp:		bsr	chkist			| Check input status
+		tst.w	d0			| Character ready ?
+		beq	midinp			| Loop until one is ...
+
+		move.w	sr,-(a7)		| Save status register
+		ori.w	#IPL7,sr		| Set IPL = 7  (disable ints)
+		move.w	ibufhd(a0),d1		| Head index to d1
+		cmp.w	ibuftl(a0),d1		| Compare to tail index
+		beq	midin_1			| Jump if (somehow) empty
+
+		addq.w	#1,d1			| Increment head index
+		cmp.w	ibufsize(a0),d1		| Did pointer wrap around ?
+		bcs	midin_2			| Jump if not
+
+		moveq.l	#0,d1			| Wraparound
+
+midin_2:	move.l	ibuf(a0),a2		| Get buffer base address in a2
+		moveq.l	#0,d0			| Clear MS bits of d0
+		move.b	0(a2,d1),d0		| Get character from buffer
+		move.w	d1,ibufhd(a0)		| Update buffer head index
+
+midin_1:	move.w	(a7)+,sr		| Restore status
+		rts				| Return to caller
+
+		.endc
+
+		.page
+
+| getser -- Get a byte from a serial port buffer  (with handshaking)
+| ------    --------------------------------------------------------
+getser:		move.w	sr,-(a7)		| Save status register
+		ori.w	#IPL7,sr		| Set IPL = 7  (disable ints)
+		move.w	ibufhd(a0),d1		| Get input buffer head index
+		cmp.w	ibuftl(a0),d1		| Compare tail index
+		beq	rs_mt			| Jump if buffer empty
+
+		bsr	wrapin			| Adjust pointer for wraparound
+		move.l	ibuf(a0),a2		| Get buffer address
+		moveq.l	#0,d0			| Clear out MS bits of d0
+		move.b	0(a2,d1),d0		| Get character from buffer
+		move.w	d1,ibufhd(a0)		| Update head index
+		move.w	(a7)+,sr		| Restore status
+		andi	#0xFFFE,sr		| Clear carry = OK
+		bra	rs_xnf			| Go do XON/XOFF check
+
+rs_mt:		move.w	(a7)+,sr		| Restore status
+		ori	#0x0001,sr		| Set carry = no character there
+
+rs_xnf:		btst	#0,linedisc(a0)		| Check for XON/XOFF mode
+		beq	rs_exit			| Jump if not enabled
+
+		tst.b	flagxon(a0)		| XON active ?
+		beq	rs_exit			| Jump if not
+
+		bsr	rsilen			| Get length of buffer used
+		cmp.w	ibuflow(a0),d2		| At low water mark ?
+		bne	rs_exit			| Jump if not
+
+		move.b	#0x11,d1		| Send an XON
+		bsr	serput			| ...
+		clr.b	flagxon(a0)		| Clear XON flag
+
+rs_exit:	rts				| Return to caller
+
+		.page
+
+| sr1out -- Output to serial-1
+| ------    ------------------
+sr1out:		lea	sr1iorec,a0		| Serial-1 iorec address to a0
+		lea	SR1ACIA,a1		| Serial-1 ACIA address to a1
+		move.w	6(a7),d1		| Get data byte from stack
+		bsr	serput			| Attempt to output
+		bcs	sr1out			| Try until it works ...
+
+		rts				| Return to caller
+
+| sr2out -- Output to Serial-2
+| ------    ------------------
+sr2out:		lea	sr2iorec,a0		| Serial-2 iorec address to a0
+		lea	SR2ACIA,a1		| Serial-2 ACIA address to a1
+		move.w	6(a7),d1		| Get data byte from stack
+		bsr	serput			| Attempt to output
+		bcs	sr2out			| Try until it works ...
+
+		rts				| Return to caller
+
 		.ifne	BUCHLA
-*
-* mc1out -- Output to MIDI-1
-* ------    ----------------
-mc1out:		lea	mc1iorec,a0		* MIDI-1 iorec address to a0
-		lea	MC1ACIA,a1		* MIDI-1 ACIA address to a1
-		move.w	6(a7),d1		* Get data byte from stack
-		bsr	midput			* Attempt to output
-		bcs	mc1out			* Try until it works ...
-*
-		rts				* Return to caller
-*
-* mc2out -- Output to MIDI-2
-* ------    ----------------
-mc2out:		lea	mc2iorec,a0		* MIDI-2 iorec address to a0
-		lea	MC2ACIA,a1		* MIDI-2 ACIA address to a1
-		move.w	6(a7),d1		* Get data byte from stack
-		bsr	midput			* Attempt to output
-		bcs	mc2out			* Try until it works ...
-*
-		rts				* Return to caller
-*
-		.endc
-*
-		.page
-*
-* serput -- Output a character to a serial port
-* ------    -----------------------------------
-serput:		move.w	sr,-(a7)		* Save status register
-		ori.w	#IPL7,sr		* Set IPL = 7  (disable ints)
-		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 status register
-		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 status register
-		ori	#$0001,sr		* Set carry flag = buffer full
-		rts				* Return to caller
-*
-		.page
-*
+
+| mc1out -- Output to MIDI-1
+| ------    ----------------
+mc1out:		lea	mc1iorec,a0		| MIDI-1 iorec address to a0
+		lea	MC1ACIA,a1		| MIDI-1 ACIA address to a1
+		move.w	6(a7),d1		| Get data byte from stack
+		bsr	midput			| Attempt to output
+		bcs	mc1out			| Try until it works ...
+
+		rts				| Return to caller
+
+| mc2out -- Output to MIDI-2
+| ------    ----------------
+mc2out:		lea	mc2iorec,a0		| MIDI-2 iorec address to a0
+		lea	MC2ACIA,a1		| MIDI-2 ACIA address to a1
+		move.w	6(a7),d1		| Get data byte from stack
+		bsr	midput			| Attempt to output
+		bcs	mc2out			| Try until it works ...
+
+		rts				| Return to caller
+
+		.endc
+
+		.page
+
+| serput -- Output a character to a serial port
+| ------    -----------------------------------
+serput:		move.w	sr,-(a7)		| Save status register
+		ori.w	#IPL7,sr		| Set IPL = 7  (disable ints)
+		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 status register
+		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 status register
+		ori	#0x0001,sr		| Set carry flag = buffer full
+		rts				| Return to caller
+
+		.page
+
 		.ifne	BUCHLA
-*
-* midput -- Output to MIDI
-* ------    --------------
-midput:		move.w	sr,-(a7)		* Save status register
-		ori.w	#IPL7,sr		* Set IPL = 7  (diable ints)
-		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 status register
-		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 status register
-		ori	#$0001,sr		* Set carry flag = buffer full
-		rts				* Return to caller
-*
-		.endc
-*
-		.page
-*
-* rtschk -- Check RTS mode and turn on RTS if it's enabled
-* ------    ----------------------------------------------
-rtschk:		btst	#1,linedisc(a0)		* RTS/CTS mode set ?
-		beq	rts_1			* Jump if not
-*
-		bsr	rtson			* Turn on RTS
-*
-rts_1:		rts				* Return to caller
-*
-* rsilen -- Get length of portion of input buffer that's been used so far
-* ------    -------------------------------------------------------------
-rsilen:		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
-		rts				* Return to caller
-*
-* rtson -- Turn on RTS line
-* -----    ----------------
-rtson:		move.b	cfr1(a0),d0		* Pick up CFR1 image
-		bclr	#0,d0			* Turn on RTS line  (active low)
-		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
-		rts				* Return to caller
-*
-* rtsoff -- Turn off RTS line
-* ------    -----------------
-rtsoff:		move.b	cfr1(a0),d0		* Pick up CFR1 image
-		bset	#0,d0			* Turn off RTS line  (active low)
-		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
+
+| midput -- Output to MIDI
+| ------    --------------
+midput:		move.w	sr,-(a7)		| Save status register
+		ori.w	#IPL7,sr		| Set IPL = 7  (diable ints)
+		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 status register
+		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 status register
+		ori	#0x0001,sr		| Set carry flag = buffer full
+		rts				| Return to caller
+
+		.endc
+
+		.page
+
+| rtschk -- Check RTS mode and turn on RTS if it's enabled
+| ------    ----------------------------------------------
+rtschk:		btst	#1,linedisc(a0)		| RTS/CTS mode set ?
+		beq	rts_1			| Jump if not
+
+		bsr	rtson			| Turn on RTS
+
+rts_1:		rts				| Return to caller
+
+| rsilen -- Get length of portion of input buffer that's been used so far
+| ------    -------------------------------------------------------------
+rsilen:		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
+		rts				| Return to caller
+
+| rtson -- Turn on RTS line
+| -----    ----------------
+rtson:		move.b	cfr1(a0),d0		| Pick up CFR1 image
+		bclr	#0,d0			| Turn on RTS line  (active low)
+		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
+		rts				| Return to caller
+
+| rtsoff -- Turn off RTS line
+| ------    -----------------
+rtsoff:		move.b	cfr1(a0),d0		| Pick up CFR1 image
+		bset	#0,d0			| Turn off RTS line  (active low)
+		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
 		rts
-*
-		.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
-		bsr	serint			* Go process (possible) int.
-*
-		lea	sr2iorec,a0		* Point at Serial-2 iorec
-		lea	SR2ACIA,a1		* Point at Serial-2 ACIA
-		bsr	serint			* Go process (possible) int.
-*
+
+		.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
+		bsr	serint			| Go process (possible) int.
+
+		lea	sr2iorec,a0		| Point at Serial-2 iorec
+		lea	SR2ACIA,a1		| Point at Serial-2 ACIA
+		bsr	serint			| Go process (possible) int.
+
 		.ifne	BUCHLA
-*
-		lea	mc1iorec,a0		* Point at MIDI-1 iorec
-		lea	MC1ACIA,a1		* Point at MIDI-1 ACIA
-		bsr	midint			* Go process (possible) int.
-*
-		lea	mc2iorec,a0		* Point at MIDI-2 iorec
-		lea	MC2ACIA,a1		* Point at MIDI-2 ACIA
-		bsr	midint			* Go process (possible) int.
-*
-		.endc
-*
-		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:	rts				* Return to caller
-*
-sererr:		addq.w	#1,errct(a0)		* Update error count
-		move.b	ACIA_RDR(a1),erbyte(a0)	* Get error byte
+
+		lea	mc1iorec,a0		| Point at MIDI-1 iorec
+		lea	MC1ACIA,a1		| Point at MIDI-1 ACIA
+		bsr	midint			| Go process (possible) int.
+
+		lea	mc2iorec,a0		| Point at MIDI-2 iorec
+		lea	MC2ACIA,a1		| Point at MIDI-2 ACIA
+		bsr	midint			| Go process (possible) int.
+
+		.endc
+
+		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:	rts				| Return to caller
+
+sererr:		addq.w	#1,errct(a0)		| Update error count
+		move.b	ACIA_RDR(a1),erbyte(a0)	| Get error byte
 		rts
-*
-* 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.w	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
+
+| 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.w	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
 		rts
-*
-		.page
-*
-* Handle receiver interrupt
-*
-serrx:		btst.b	#1,linedisc(a0)		* RTS/CTS mode set ?
-		beq	serrx1			* Jump if not
-*
-		bsr.w	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.w	wrapin			* Adjust for wraparound
-		cmp.w	ibufhd(a0),d1		* Head = tail ?
-		beq	seribf			* 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
-		bsr	rsilen			* Get length of buffer used
-		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.w	serput			* ...
-*
-		.page
-*
-serrx4:		btst	#1,linedisc(a0)		* RTS/CTS mode set ?
-		beq	sertxq			* Done if not
-*
-		bsr	rtson			* Turn on RTS
+
+		.page
+
+| Handle receiver interrupt
+
+serrx:		btst.b	#1,linedisc(a0)		| RTS/CTS mode set ?
+		beq	serrx1			| Jump if not
+
+		bsr.w	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.w	wrapin			| Adjust for wraparound
+		cmp.w	ibufhd(a0),d1		| Head = tail ?
+		beq	seribf			| 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
+		bsr	rsilen			| Get length of buffer used
+		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.w	serput			| ...
+
+		.page
+
+serrx4:		btst	#1,linedisc(a0)		| RTS/CTS mode set ?
+		beq	sertxq			| Done if not
+
+		bsr	rtson			| Turn on RTS
 		bra	sertxq
-*
-* 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
-*
+
+| 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
+
 		.ifne	BUCHLA
-*
-* 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:	rts				* Return to caller
-*
-miderr:		addq.w	#1,errct(a0)		* Update error count
-		move.b	ACIA_RDR(a1),erbyte(a0)	* Get error byte
+
+| 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:	rts				| Return to caller
+
+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.w	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
-*
-		.endc
-*
-		.page
-*
-* setexec -- Set an exception vector
-* -------    -----------------------
-setexec:	move.w	4(a7),d0		* Get vector number
-		lsl.w	#2,d0			* .. times 4
-		sub.l	a0,a0			* Clear a0
-		lea	0(a0,d0),a0		* Get address of old vector
-		move.l	(a0),d0			* Move old vector to d0
-		move.l	6(a7),d1		* Pick up new vector
-		bmi	setexec1		* Don't set if = -1
-*
-		move.l	d1,(a0)			* Set new vector
-*
-setexec1:	rts				* Return to caller
-*
-* piorec -- Get pointer to iorec structure
-* ------    ------------------------------
-piorec:		moveq.l	#0,d1			* Clear out d1
-		move.w	4(a7),d1		* Get device number
-		move.w	sr,-(a7)		* Save status register
-		ori.w	#IPL7,sr		* Set IPL = 7  (no ints)
-		lea	iortab,a2		* Get base address of table
-		asl.l	#2,d1			* Device # times 4 for index
-		move.l	0(a2,d1),d0		* Get iorec address from table
-		move.w	(a7)+,sr		* Restore status register
-		rts				* Return to caller
-*
-		.page
-*
-* setport -- Set ACIA parameters  (unit, mode, baud, CFR0, CFR1)
-* -------    ---------------------------------------------------
-setport:	moveq.l	#0,d1			* Clear out d1
-		move.w	4(a7),d1		* Get device number
-		asl.l	#3,d1			* Times 8 for index
-		ori.w	#IPL7,sr		* Set IPL = 7  (no ints)
-		lea	aciatab,a2		* Get base of table
-		move.l	0(a2,d1),d0		* Get iorec address
-		move.l	4(a2,d1),d2		* Get ACIA address
-		movea.l	d0,a0			* Setup a0 = iorec address
-		movea.l	d2,a1			* Setup a1 = ACIA address
-		tst.w	6(a7)			* Change mode ?
-		bmi	setpt1			* Jump if not
-*
-		move.b	7(a7),linedisc(a0)	* Set line discipline  (mode)
-*
-setpt1:		tst.w	8(a7)			* Change baud rate ?
-		bmi	setpt2			* Jump if not
-*
-		moveq.l	#0,d1			* Clear out d1
-		move.w	8(a7),d1		* Get baud rate index
-		lea	brtable,a2		* Get base of baud rate table
-		move.b	0(a2,d1),d2		* Get baud rate code from table
-		move.b	cfr0(a0),d0		* Get current CFR0
-		andi.w	#$0070,d0		* Mask off old baud rate code
-		or.w	d2,d0			* OR in new baud rate code
-		move.b	d0,cfr0(a0)		* Update CFR0 in table
-		move.b	d0,ACIA_CFR(a1)		* Update hardware
-*
-setpt2:		tst.w	10(a7)			* Change CFR0 ?
-		bmi	setpt3			* Jump if not
-*
-		move.b	11(a7),cfr0(a0)		* Update CFR0 in table
-		move.b	cfr0(a0),ACIA_CFR(a1)	* Update CFR0 in hardware
-*
-setpt3:		tst.w	12(a7)			* Change CFR1 ?
-		bmi	setpt4			* Jump if not
-*
-		bset.b	#7,13(a7)		* Force D7 = 1 in argument
-		move.b	13(a7),cfr1(a0)		* Update CFR1 in table
-		move.b	cfr1(a0),ACIA_CFR(a1)	* Update CFR1 in hardware
-*
-setpt4:		rts				* Return to caller
-*
-		.page
-*
-* aciainit -- Initialize an ACIA port
-* --------    -----------------------
-aciainit:	move.w	#IORECLN,d0		* Setup byte count for move
-		move.l	a0,-(a7)		* Save iorec base
-*
-aciai_1:	move.b	(a2)+,(a0)+		* Move the default to the iorec
-		dbf	d0,aciai_1		* ...
-*
-		move.l	(a7)+,a0		* Restore iorec base
-		move.b	cfr0(a0),ACIA_CFR(a1)	* Setup CFR0
-		move.b	cfr1(a0),ACIA_CFR(a1)	* Setup CFR1
-		move.b	ACIA_RDR(a1),d0		* Clear RDR
-		move.b	#$7F,ACIA_IER(a1)	* Disable all interrupts
-		btst.b	#1,linedisc(a0)		* Are we in RTS/CTS mode ?
-		bne	aciai_2			* Jump if so
-*
-		move.b	#$C3,ACIA_IER(a1)	* Enable TDRE, RDRF
-		bra	aciai_3			* Go return
-*
-aciai_2:	move.b	#$E3,ACIA_IER(a1)	* Enable interrupts we want
-*
-aciai_3:	rts				* Return to caller
-*
-		.page
-*
+
+| 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.w	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
+
+		.endc
+
+		.page
+
+| setexec -- Set an exception vector
+| -------    -----------------------
+setexec:	move.w	4(a7),d0		| Get vector number
+		lsl.w	#2,d0			| .. times 4
+		sub.l	a0,a0			| Clear a0
+		lea	0(a0,d0),a0		| Get address of old vector
+		move.l	(a0),d0			| Move old vector to d0
+		move.l	6(a7),d1		| Pick up new vector
+		bmi	setexec1		| Don't set if = -1
+
+		move.l	d1,(a0)			| Set new vector
+
+setexec1:	rts				| Return to caller
+
+| piorec -- Get pointer to iorec structure
+| ------    ------------------------------
+piorec:		moveq.l	#0,d1			| Clear out d1
+		move.w	4(a7),d1		| Get device number
+		move.w	sr,-(a7)		| Save status register
+		ori.w	#IPL7,sr		| Set IPL = 7  (no ints)
+		lea	iortab,a2		| Get base address of table
+		asl.l	#2,d1			| Device # times 4 for index
+		move.l	0(a2,d1),d0		| Get iorec address from table
+		move.w	(a7)+,sr		| Restore status register
+		rts				| Return to caller
+
+		.page
+
+| setport -- Set ACIA parameters  (unit, mode, baud, CFR0, CFR1)
+| -------    ---------------------------------------------------
+setport:	moveq.l	#0,d1			| Clear out d1
+		move.w	4(a7),d1		| Get device number
+		asl.l	#3,d1			| Times 8 for index
+		ori.w	#IPL7,sr		| Set IPL = 7  (no ints)
+		lea	aciatab,a2		| Get base of table
+		move.l	0(a2,d1),d0		| Get iorec address
+		move.l	4(a2,d1),d2		| Get ACIA address
+		movea.l	d0,a0			| Setup a0 = iorec address
+		movea.l	d2,a1			| Setup a1 = ACIA address
+		tst.w	6(a7)			| Change mode ?
+		bmi	setpt1			| Jump if not
+
+		move.b	7(a7),linedisc(a0)	| Set line discipline  (mode)
+
+setpt1:		tst.w	8(a7)			| Change baud rate ?
+		bmi	setpt2			| Jump if not
+
+		moveq.l	#0,d1			| Clear out d1
+		move.w	8(a7),d1		| Get baud rate index
+		lea	brtable,a2		| Get base of baud rate table
+		move.b	0(a2,d1),d2		| Get baud rate code from table
+		move.b	cfr0(a0),d0		| Get current CFR0
+		andi.w	#0x0070,d0		| Mask off old baud rate code
+		or.w	d2,d0			| OR in new baud rate code
+		move.b	d0,cfr0(a0)		| Update CFR0 in table
+		move.b	d0,ACIA_CFR(a1)		| Update hardware
+
+setpt2:		tst.w	10(a7)			| Change CFR0 ?
+		bmi	setpt3			| Jump if not
+
+		move.b	11(a7),cfr0(a0)		| Update CFR0 in table
+		move.b	cfr0(a0),ACIA_CFR(a1)	| Update CFR0 in hardware
+
+setpt3:		tst.w	12(a7)			| Change CFR1 ?
+		bmi	setpt4			| Jump if not
+
+		bset.b	#7,13(a7)		| Force D7 = 1 in argument
+		move.b	13(a7),cfr1(a0)		| Update CFR1 in table
+		move.b	cfr1(a0),ACIA_CFR(a1)	| Update CFR1 in hardware
+
+setpt4:		rts				| Return to caller
+
+		.page
+
+| aciainit -- Initialize an ACIA port
+| --------    -----------------------
+aciainit:	move.w	#IORECLN,d0		| Setup byte count for move
+		move.l	a0,-(a7)		| Save iorec base
+
+aciai_1:	move.b	(a2)+,(a0)+		| Move the default to the iorec
+		dbf	d0,aciai_1		| ...
+
+		move.l	(a7)+,a0		| Restore iorec base
+		move.b	cfr0(a0),ACIA_CFR(a1)	| Setup CFR0
+		move.b	cfr1(a0),ACIA_CFR(a1)	| Setup CFR1
+		move.b	ACIA_RDR(a1),d0		| Clear RDR
+		move.b	#0x7F,ACIA_IER(a1)	| Disable all interrupts
+		btst.b	#1,linedisc(a0)		| Are we in RTS/CTS mode ?
+		bne	aciai_2			| Jump if so
+
+		move.b	#0xC3,ACIA_IER(a1)	| Enable TDRE, RDRF
+		bra	aciai_3			| Go return
+
+aciai_2:	move.b	#0xE3,ACIA_IER(a1)	| Enable interrupts we want
+
+aciai_3:	rts				| Return to caller
+
+		.page
+
 		.ifne	BUCHLA
-*
-* fastcopy -- Copy disk sector quickly
-* --------    ------------------------
-fastcopy:	move.l	4(a7),a0		* Get source pointer
-		move.l	8(a7),a1		* Get destination pointer
-		move.w	$3F,d0			* 512 bytes  (63+1)*8
-*
-fastcpy1:	move.b	(a0)+,(a1)+		* Move 8 bytes
-		move.b	(a0)+,(a1)+		* ...
-		move.b	(a0)+,(a1)+		* ...
-		move.b	(a0)+,(a1)+		* ...
-		move.b	(a0)+,(a1)+		* ...
-		move.b	(a0)+,(a1)+		* ...
-		move.b	(a0)+,(a1)+		* ...
-		move.b	(a0)+,(a1)+		* ...
-		dbra	d0,fastcpy1		* Loop until all bytes are moved
-*
-		rts				* Return to caller
-*
-		.page
-*
-* _hdvini -- Drive initialization
-* -------    --------------------
-_hdvini:	link	a6,#-18			* Reserve space on stack
-		movem.l	d3-d7/a3-a5,-(a7)	* Preserve registers
-		move.l	#300,maxactim		* maxactim = 300 * 20ms
-		clr.w	d0			* Put zeros in ...
-		move.w	d0,nflops		* ... nflops
-		move.w	d0,dskmode		* ... dskmode
-		move.w	d0,-2(a6)		* Start with drive A
-		bra	hdvilp			* ...
-*
-hdvilp1:	movea.l	#dskmode,a0		* Get dskmode address in a0
-		movea.w	-2(a6),a1		* Drive number in a1
-		adda.l	a1,a0			* Point at dskmode for drive
-		clr.b	(a0)			* Clear flag in dskmode
-		clr.w	-(a7)			* Push arguments onto stack
-		clr.w	-(a7)			* ...
-		clr.w	-(a7)			* ...
-		move.w	-2(a6),-(a7)		* Push drive number onto stack
-		clr.l	-(a7)			* ... filler
-		clr.l	-(a7)			* ... filler
-		jsr	flopini			* Initialize drive
-		adda.l	#16,a7			* Cleanup stack
-		move.w	d0,-(a7)		* Save error code on stack
-		movea.w	-2(a6),a0		* Get drive number
-		adda.l	a0,a0			* ... times 2
-		adda.l	#dskerrs,a0		* Add base of dskerrs
-		move.w	(a7)+,(a0)		* Move error code off of stack
-		bne	hdvind			* Jump if drive not present
-*
-		addq.w	#1,nflops		* Update number of drives
-		or.l	#3,drvbits		* Setup drive bits
-*
-hdvind:		addq.w	#1,-2(a6)		* Increment drive number
-*
-hdvilp:		cmp.w	#2,-2(a6)		* See if it's 2 yet
-		blt	hdvilp1			* Loop until it is
-*
-		movem.l	(a7)+,d3-d7/a3-a5	* Restore registers
-		unlk	a6			* Release temporary stack space
-		rts				* Return to caller
-*
-* drvmap -- get drive map
-* ------    -------------
-drvmap:		move.l	drvbits,d0		* Get drive bits
-		rts				* Return to caller
-*
-		.page
-*
-* getbpb -- get BIOS parameter block
-* ------    ------------------------
-getbpb:		link	a6,#-12			* Reserve space for temporaries
-		movem.l	d5-d7/a4-a5,-(a7)	* Save registers on stack
-		cmp.w	#2,8(a6)		* Check drive number
-		blt	gbpb1			* Jump if OK
-*
-		clr.l	d0			* Set drive number to 0
-		bra	gbpber			* Go flag error
-*
-gbpb1:		move.w	8(a6),d0		* Get drive number
-		asl.w	#5,d0			* ... times 32
-		ext.l	d0			* ... extend sign
-		move.l	d0,a5			* Move to a5
-		add.l	#drvbpbs,a5		* Add base of drive bpb are
-		move.l	a5,a4			* Save in a4
-*
-gbpbrds:	move.w	#1,(a7)			* floprd count = 1,
-		clr.w	-(a7)			* ... side = 0,
-		clr.w	-(a7)			* ... track = 0,
-		move.w	#1,-(a7)		* ... sector = 1,
-		move.w	8(a6),-(a7)		* ... drive #,
-		clr.l	-(a7)			* ... filler
-		move.l	#buffer,-(a7)		* ... buffer address,
-		jsr	floprd			* Go read the sector
-		add.l	#16,a7			* Cleanup stack
-		move.l	d0,-12(a6)		* Save error code
-		tst.l	-12(a6)			* ... and test it
-		bge	gbpb2			* Jump if OK
-*
-		move.w	8(a6),(a7)		* Put drive number on stack
-		move.l	-12(a6),d0		* Get error code
-		move.w	d0,-(a7)		* ... and put it on the stack
-		jsr	criter			* Go do critical error routine
-		addq.l	#2,a7			* Cleanup stack
-		move.l	d0,-12(a6)		* Save error code
-*
-gbpb2:		move.l	-12(a6),d0		* Get error code
-		cmp.l	#RETRYIT,d0		* Magic number for retry ?
-		beq	gbpbrds			* Re-read if so
-*
-		tst.l	-12(a6)			* Test error code
-		bge	gbpb3			* Jump if OK
-*
-		clr.l	d0			* Set code in d0
-		bra	gbpber			* Go set error code
-*
-		.page
-*
-gbpb3:		move.l	#buffer+11,(a7)		* Bytes per sector
-		bsr	itom			* Convert 8086 to 68K format
-		move.w	d0,d7			* Save bytes per sector
-		beq	gbpb4			* Jump if zero
-*
-		move.b	buffer+13,d6		* Sectors per cluster
-		ext.w	d6			* ... sign extended
-		and.w	#$FF,d6			* ... and trimmed
-		bne	gbpb5			* Jump if non-zero
-*
-gbpb4:		clr.l	d0			* Set error code
-		bra	gbpber			* ...
-*
-gbpb5:		move.w	d7,(a4)			* Set recsize
-		move.w	d6,2(a4)		* Set clsiz
-		move.l	#buffer+22,(a7)		* Convert sectors per fat
-		bsr	itom			* ...
-		move.w	d0,8(a4)		* Set fsiz
-		move.w	8(a4),d0		* Get fsiz
-		addq.w	#1,d0			* ... plus 1
-		move.w	d0,10(a4)		* Set fatrec
-		move.w	(a4),d0			* Get recsize
-		muls.w	2(a4),d0		* ... times clsiz
-		move.w	d0,4(a4)		* Set clsizb
-		move.l	#buffer+17,(a7)		* Convert number of dir ents
-		bsr	itom			* ...
-		asl.w	#5,d0			* ... times 32
-		ext.l	d0			* ... sign extended
-		divs.w	(a4),d0			* ... / recsize
-		move.w	d0,6(a4)		* Set rdlen
-		move.w	10(a4),d0		* Get fatrec
-		add.w	6(a4),d0		* ... + rdlen
-		add.w	8(a4),d0		* ... + fsiz
-		move.w	d0,12(a4)		* Set datrec
-		move.l	#buffer+19,(a7)		* Get number of sectors
-		bsr	itom			* ... convert
-		sub.w	12(a4),d0		* ... - datrec
-		ext.l	d0			* ... sign extended
-		divs.w	2(a4),d0		* ... / clsiz
-		move.w	d0,14(a4)		* Set numcl
-*
-		.page
-*
-		move.l	#buffer+26,(a7)		* Convert number of heads
-		bsr	itom			* ...
-		move.w	d0,20(a5)		* Set dnsides
-		move.l	#buffer+24,(a7)		* Convert sectors per track
-		bsr	itom			* ...
-		move.w	d0,24(a5)		* Set dspt
-		move.w	20(a5),d0		* Get dnsides
-		muls.w	24(a5),d0		* ... * dspt
-		move.w	d0,22(a5)		* Set dspc
-		move.l	#buffer+28,(a7)		* Convert number of hidden sects
-		bsr	itom			* ...
-		move.w	d0,26(a5)		* Set dhidden
-		move.l	#buffer+19,(a7)		* Convert sectors on disk
-		bsr	itom			* ...
-		ext.l	d0			* ... sign extended
-		divs.w	22(a5),d0		* ... / dspc
-		move.w	d0,18(a5)		* Set dntracks
-		clr.w	d7			* Counter = 0
-		bra	gbpblpt			* Jump to end of loop
-*
-gbpb6:		move.l	a5,a0			* Get buffer pointer
-		move.w	d7,a1			* Loop count to a1
-		add.l	a1,a0			* ... + bpb address
-		move.w	d7,a1			* Loop count to a1
-		add.l	#buffer,a1		* ... + buffer address
-		move.b	8(a1),28(a0)		* Copy a s/n byte
-		addq.w	#1,d7			* Update loop count
-*
-gbpblpt:	cmp.w	#3,d7			* Moved 3 bytes ?
-		blt	gbpb6			* Loop if not
-*
-		.page
-*
-		move.l	#cdev,a0		* Address of cdev table
-		move.w	8(a6),a1		* ... plus drive number
-		add.l	a1,a0			* ... to a0
-		move.l	#wpstatus,a1		* Address of wpstatus table
-		move.w	8(a6),a2		* ... plus drive number
-		add.l	a2,a1			* ... to a1
-		move.b	(a1),(a0)		* Move wpstatus to cdev
+
+| fastcopy -- Copy disk sector quickly
+| --------    ------------------------
+fastcopy:	move.l	4(a7),a0		| Get source pointer
+		move.l	8(a7),a1		| Get destination pointer
+		move.w	0x3F,d0			| 512 bytes  (63+1)|8
+
+fastcpy1:	move.b	(a0)+,(a1)+		| Move 8 bytes
+		move.b	(a0)+,(a1)+		| ...
+		move.b	(a0)+,(a1)+		| ...
+		move.b	(a0)+,(a1)+		| ...
+		move.b	(a0)+,(a1)+		| ...
+		move.b	(a0)+,(a1)+		| ...
+		move.b	(a0)+,(a1)+		| ...
+		move.b	(a0)+,(a1)+		| ...
+		dbra	d0,fastcpy1		| Loop until all bytes are moved
+
+		rts				| Return to caller
+
+		.page
+
+| _hdvini -- Drive initialization
+| -------    --------------------
+_hdvini:	link	a6,#-18			| Reserve space on stack
+		movem.l	d3-d7/a3-a5,-(a7)	| Preserve registers
+		move.l	#300,maxactim		| maxactim = 300 | 20ms
+		clr.w	d0			| Put zeros in ...
+		move.w	d0,nflops		| ... nflops
+		move.w	d0,dskmode		| ... dskmode
+		move.w	d0,-2(a6)		| Start with drive A
+		bra	hdvilp			| ...
+
+hdvilp1:	movea.l	#dskmode,a0		| Get dskmode address in a0
+		movea.w	-2(a6),a1		| Drive number in a1
+		adda.l	a1,a0			| Point at dskmode for drive
+		clr.b	(a0)			| Clear flag in dskmode
+		clr.w	-(a7)			| Push arguments onto stack
+		clr.w	-(a7)			| ...
+		clr.w	-(a7)			| ...
+		move.w	-2(a6),-(a7)		| Push drive number onto stack
+		clr.l	-(a7)			| ... filler
+		clr.l	-(a7)			| ... filler
+		jsr	flopini			| Initialize drive
+		adda.l	#16,a7			| Cleanup stack
+		move.w	d0,-(a7)		| Save error code on stack
+		movea.w	-2(a6),a0		| Get drive number
+		adda.l	a0,a0			| ... times 2
+		adda.l	#dskerrs,a0		| Add base of dskerrs
+		move.w	(a7)+,(a0)		| Move error code off of stack
+		bne	hdvind			| Jump if drive not present
+
+		addq.w	#1,nflops		| Update number of drives
+		or.l	#3,drvbits		| Setup drive bits
+
+hdvind:		addq.w	#1,-2(a6)		| Increment drive number
+
+hdvilp:		cmp.w	#2,-2(a6)		| See if it's 2 yet
+		blt	hdvilp1			| Loop until it is
+
+		movem.l	(a7)+,d3-d7/a3-a5	| Restore registers
+		unlk	a6			| Release temporary stack space
+		rts				| Return to caller
+
+| drvmap -- get drive map
+| ------    -------------
+drvmap:		move.l	drvbits,d0		| Get drive bits
+		rts				| Return to caller
+
+		.page
+
+| getbpb -- get BIOS parameter block
+| ------    ------------------------
+getbpb:		link	a6,#-12			| Reserve space for temporaries
+		movem.l	d5-d7/a4-a5,-(a7)	| Save registers on stack
+		cmp.w	#2,8(a6)		| Check drive number
+		blt	gbpb1			| Jump if OK
+
+		clr.l	d0			| Set drive number to 0
+		bra	gbpber			| Go flag error
+
+gbpb1:		move.w	8(a6),d0		| Get drive number
+		asl.w	#5,d0			| ... times 32
+		ext.l	d0			| ... extend sign
+		move.l	d0,a5			| Move to a5
+		add.l	#drvbpbs,a5		| Add base of drive bpb are
+		move.l	a5,a4			| Save in a4
+
+gbpbrds:	move.w	#1,(a7)			| floprd count = 1,
+		clr.w	-(a7)			| ... side = 0,
+		clr.w	-(a7)			| ... track = 0,
+		move.w	#1,-(a7)		| ... sector = 1,
+		move.w	8(a6),-(a7)		| ... drive #,
+		clr.l	-(a7)			| ... filler
+		move.l	#buffer,-(a7)		| ... buffer address,
+		jsr	floprd			| Go read the sector
+		add.l	#16,a7			| Cleanup stack
+		move.l	d0,-12(a6)		| Save error code
+		tst.l	-12(a6)			| ... and test it
+		bge	gbpb2			| Jump if OK
+
+		move.w	8(a6),(a7)		| Put drive number on stack
+		move.l	-12(a6),d0		| Get error code
+		move.w	d0,-(a7)		| ... and put it on the stack
+		jsr	criter			| Go do critical error routine
+		addq.l	#2,a7			| Cleanup stack
+		move.l	d0,-12(a6)		| Save error code
+
+gbpb2:		move.l	-12(a6),d0		| Get error code
+		cmp.l	#RETRYIT,d0		| Magic number for retry ?
+		beq	gbpbrds			| Re-read if so
+
+		tst.l	-12(a6)			| Test error code
+		bge	gbpb3			| Jump if OK
+
+		clr.l	d0			| Set code in d0
+		bra	gbpber			| Go set error code
+
+		.page
+
+gbpb3:		move.l	#buffer+11,(a7)		| Bytes per sector
+		bsr	itom			| Convert 8086 to 68K format
+		move.w	d0,d7			| Save bytes per sector
+		beq	gbpb4			| Jump if zero
+
+		move.b	buffer+13,d6		| Sectors per cluster
+		ext.w	d6			| ... sign extended
+		and.w	#0xFF,d6		| ... and trimmed
+		bne	gbpb5			| Jump if non-zero
+
+gbpb4:		clr.l	d0			| Set error code
+		bra	gbpber			| ...
+
+gbpb5:		move.w	d7,(a4)			| Set recsize
+		move.w	d6,2(a4)		| Set clsiz
+		move.l	#buffer+22,(a7)		| Convert sectors per fat
+		bsr	itom			| ...
+		move.w	d0,8(a4)		| Set fsiz
+		move.w	8(a4),d0		| Get fsiz
+		addq.w	#1,d0			| ... plus 1
+		move.w	d0,10(a4)		| Set fatrec
+		move.w	(a4),d0			| Get recsize
+		muls.w	2(a4),d0		| ... times clsiz
+		move.w	d0,4(a4)		| Set clsizb
+		move.l	#buffer+17,(a7)		| Convert number of dir ents
+		bsr	itom			| ...
+		asl.w	#5,d0			| ... times 32
+		ext.l	d0			| ... sign extended
+		divs.w	(a4),d0			| ... / recsize
+		move.w	d0,6(a4)		| Set rdlen
+		move.w	10(a4),d0		| Get fatrec
+		add.w	6(a4),d0		| ... + rdlen
+		add.w	8(a4),d0		| ... + fsiz
+		move.w	d0,12(a4)		| Set datrec
+		move.l	#buffer+19,(a7)		| Get number of sectors
+		bsr	itom			| ... convert
+		sub.w	12(a4),d0		| ... - datrec
+		ext.l	d0			| ... sign extended
+		divs.w	2(a4),d0		| ... / clsiz
+		move.w	d0,14(a4)		| Set numcl
+
+		.page
+
+		move.l	#buffer+26,(a7)		| Convert number of heads
+		bsr	itom			| ...
+		move.w	d0,20(a5)		| Set dnsides
+		move.l	#buffer+24,(a7)		| Convert sectors per track
+		bsr	itom			| ...
+		move.w	d0,24(a5)		| Set dspt
+		move.w	20(a5),d0		| Get dnsides
+		muls.w	24(a5),d0		| ... | dspt
+		move.w	d0,22(a5)		| Set dspc
+		move.l	#buffer+28,(a7)		| Convert number of hidden sects
+		bsr	itom			| ...
+		move.w	d0,26(a5)		| Set dhidden
+		move.l	#buffer+19,(a7)		| Convert sectors on disk
+		bsr	itom			| ...
+		ext.l	d0			| ... sign extended
+		divs.w	22(a5),d0		| ... / dspc
+		move.w	d0,18(a5)		| Set dntracks
+		clr.w	d7			| Counter = 0
+		bra	gbpblpt			| Jump to end of loop
+
+gbpb6:		move.l	a5,a0			| Get buffer pointer
+		move.w	d7,a1			| Loop count to a1
+		add.l	a1,a0			| ... + bpb address
+		move.w	d7,a1			| Loop count to a1
+		add.l	#buffer,a1		| ... + buffer address
+		move.b	8(a1),28(a0)		| Copy a s/n byte
+		addq.w	#1,d7			| Update loop count
+
+gbpblpt:	cmp.w	#3,d7			| Moved 3 bytes ?
+		blt	gbpb6			| Loop if not
+
+		.page
+
+		move.l	#cdev,a0		| Address of cdev table
+		move.w	8(a6),a1		| ... plus drive number
+		add.l	a1,a0			| ... to a0
+		move.l	#wpstatus,a1		| Address of wpstatus table
+		move.w	8(a6),a2		| ... plus drive number
+		add.l	a2,a1			| ... to a1
+		move.b	(a1),(a0)		| Move wpstatus to cdev
 		beq	gbpb7
-*
-		moveq.l	#1,d0			* Set status = "Uncertain"
+
+		moveq.l	#1,d0			| Set status = "Uncertain"
 		bra	gbpb8
-*
-gbpb7:		clr.w	d0			* Set status = "Unchanged"
-*
-gbpb8:		move.l	#dskmode,a1		* Update dskmode table
-		move.w	8(a6),a2		* ...
-		add.l	a2,a1			* ...
-		move.b	d0,(a1)			* ...
-		move.l	a5,d0			* Setup to return bpb pointer
-*
-gbpber:		tst.l	(a7)+			* Pop garbage off top of stack
-		movem.l	(a7)+,d6-d7/a4-a5	* Restore registers
+
+gbpb7:		clr.w	d0			| Set status = "Unchanged"
+
+gbpb8:		move.l	#dskmode,a1		| Update dskmode table
+		move.w	8(a6),a2		| ...
+		add.l	a2,a1			| ...
+		move.b	d0,(a1)			| ...
+		move.l	a5,d0			| Setup to return bpb pointer
+
+gbpber:		tst.l	(a7)+			| Pop garbage off top of stack
+		movem.l	(a7)+,d6-d7/a4-a5	| Restore registers
 		unlk	a6
 		rts
-*
-		.page
-*
-* mediach -- check for media change
-* -------    ----------------------
-mediach:	link	a6,#0			* Create scratch on stack
-		movem.l	d6-d7/a5,-(a7)		* Save registers on stack
-		cmp.w	#2,8(a6)		* Check drive number
-		blt	media1			* Jump if OK
-*
-		moveq.l	#ERR15,d0		* Error -- "unknown device"
-		bra	media2			* ...
-*
-media1:		move.w	8(a6),d7		* Get drive number in d7
-		movea.w	d7,a5			* Point into dskmode table
-		add.l	#dskmode,a5		* ...
-		cmp.b	#2,(a5)			* Definitely changed ?
-		bne	media3			* Jump if not
-*
-		moveq.l	#2,d0			* Setup to return "Changed"
-		bra	media2			* Done -- go return to caller
-*
-media3:		move.l	#wplatch,a0		* Check wplatch for drive
-		tst.b	0(a0,d7)		* ...
-		beq	media4			* Jump if not set
-*
-		move.b	#1,(a5)			* Set dskmode to "Uncertain"
-*
-media4:		move.l	_hz_200,d0		* Get time in d0
-		movea.w	d7,a1			* Calculate acctim table address
-		add.l	a1,a1			* ... = drive # * 4
-		add.l	a1,a1			* ...
-		add.l	#acctim,a1		* ... + acctim base address
-		move.l	(a1),d1			* Get acctim for drive
-		sub.l	d1,d0			* Subtract from current time
-		cmp.l	maxactim,d0		* Timed out ?
-		bge	media5			* Jump if so
-*
-		clr.w	d0			* Setup to return "Unchanged"
+
+		.page
+
+| mediach -- check for media change
+| -------    ----------------------
+mediach:	link	a6,#0			| Create scratch on stack
+		movem.l	d6-d7/a5,-(a7)		| Save registers on stack
+		cmp.w	#2,8(a6)		| Check drive number
+		blt	media1			| Jump if OK
+
+		moveq.l	#ERR15,d0		| Error -- "unknown device"
+		bra	media2			| ...
+
+media1:		move.w	8(a6),d7		| Get drive number in d7
+		movea.w	d7,a5			| Point into dskmode table
+		add.l	#dskmode,a5		| ...
+		cmp.b	#2,(a5)			| Definitely changed ?
+		bne	media3			| Jump if not
+
+		moveq.l	#2,d0			| Setup to return "Changed"
+		bra	media2			| Done -- go return to caller
+
+media3:		move.l	#wplatch,a0		| Check wplatch for drive
+		tst.b	0(a0,d7)		| ...
+		beq	media4			| Jump if not set
+
+		move.b	#1,(a5)			| Set dskmode to "Uncertain"
+
+media4:		move.l	_hz_200,d0		| Get time in d0
+		movea.w	d7,a1			| Calculate acctim table address
+		add.l	a1,a1			| ... = drive # | 4
+		add.l	a1,a1			| ...
+		add.l	#acctim,a1		| ... + acctim base address
+		move.l	(a1),d1			| Get acctim for drive
+		sub.l	d1,d0			| Subtract from current time
+		cmp.l	maxactim,d0		| Timed out ?
+		bge	media5			| Jump if so
+
+		clr.w	d0			| Setup to return "Unchanged"
 		bra	media2
-*
-media5:		move.b	(a5),d0			* Return status from dskmode
+
+media5:		move.b	(a5),d0			| Return status from dskmode
 		ext.w	d0
-*
-media2:		tst.l	(a7)+			* Pop extra stack word
-		movem.l	(a7)+,d7/a5		* Restore registers
+
+media2:		tst.l	(a7)+			| Pop extra stack word
+		movem.l	(a7)+,d7/a5		| Restore registers
 		unlk	a6
-		rts				* Return to caller
-*
-		.page
-*
-* rwabs -- read / write sector(s)
-* -----    ----------------------
-rwabs:		link	a6,#-4			* Reserve stack for temps
-		movem.l	d4-d7/a5,-(a7)		* Save registers on stack
-		cmp.w	#2,18(a6)		* Drive number
+		rts				| Return to caller
+
+		.page
+
+| rwabs -- read / write sector(s)
+| -----    ----------------------
+rwabs:		link	a6,#-4			| Reserve stack for temps
+		movem.l	d4-d7/a5,-(a7)		| Save registers on stack
+		cmp.w	#2,18(a6)		| Drive number
 		blt	rwabs1
-*
-		moveq.l	#ERR15,d0		* ERROR -- "unknown device"
+
+		moveq.l	#ERR15,d0		| ERROR -- "unknown device"
 		bra	rwabser
-*
-rwabs1:		move.w	18(a6),d6		* Save drive number
-		cmp.w	#2,8(a6)		* Check rwflag
+
+rwabs1:		move.w	18(a6),d6		| Save drive number
+		cmp.w	#2,8(a6)		| Check rwflag
 		bge	rwabs7
-*
+
 		move.w	d6,d0
 		asl.w	#5,d0
@@ -1880,1143 +1880,1143 @@
 		add.l	#drvbpbs,a5
 		move.w	d6,(a7)
-		bsr	mediach			* Test for media change
-		move.w	d0,d7			* Save status
-		cmp.w	#2,d7			* Disk changed ?
-		bne	rwabs2			* Jump if not
-*
-		moveq.l	#ERR14,d0		* ERROR -- "media changed"
-		bra	rwabser			* ...
-*
-rwabs2:		cmp.w	#1,d7			* Disk possibly changed ?
+		bsr	mediach			| Test for media change
+		move.w	d0,d7			| Save status
+		cmp.w	#2,d7			| Disk changed ?
+		bne	rwabs2			| Jump if not
+
+		moveq.l	#ERR14,d0		| ERROR -- "media changed"
+		bra	rwabser			| ...
+
+rwabs2:		cmp.w	#1,d7			| Disk possibly changed ?
 		bne	rwabs7
-*
-rwabs3:		move.w	#1,(a7)			* floprd count = 1,
-		clr.w	-(a7)			* ... side = 0,
-		clr.w	-(a7)			* ... track = 0,
-		move.w	#1,-(a7)		* ... sector = 1,
-		move.w	d6,-(a7)		* ... drive number,
-		clr.l	-(a7)			* ... filler,
-		move.l	#buffer,-(a7)		* ... buffer address,
-		jsr	floprd			* Read boot sector
-		add.l	#16,a7			* Cleanup stack
-		move.l	d0,-4(a6)		* Save error number
-		tst.l	-4(a6)			* ... and test it
-		bge	rwabs11			* Jump if OK
-*
-		.page
-*
+
+rwabs3:		move.w	#1,(a7)			| floprd count = 1,
+		clr.w	-(a7)			| ... side = 0,
+		clr.w	-(a7)			| ... track = 0,
+		move.w	#1,-(a7)		| ... sector = 1,
+		move.w	d6,-(a7)		| ... drive number,
+		clr.l	-(a7)			| ... filler,
+		move.l	#buffer,-(a7)		| ... buffer address,
+		jsr	floprd			| Read boot sector
+		add.l	#16,a7			| Cleanup stack
+		move.l	d0,-4(a6)		| Save error number
+		tst.l	-4(a6)			| ... and test it
+		bge	rwabs11			| Jump if OK
+
+		.page
+
 		move.w	d6,(a7)
 		move.l	-4(a6),d0
 		move.w	d0,-(a7)
-		jsr	criter			* Call critical error code
-		addq.l	#2,a7			* Cleanup stack
+		jsr	criter			| Call critical error code
+		addq.l	#2,a7			| Cleanup stack
 		move.l	d0,-4(a6)
-*
+
 rwabs11:	move.l	-4(a6),d0
 		cmp.l	#RETRYIT,d0
-		beq	rwabs3			* Read again
-*
-		tst.l	-4(a6)			* Test error number
-		bge	rwabs4			* OK ?
-*
+		beq	rwabs3			| Read again
+
+		tst.l	-4(a6)			| Test error number
+		bge	rwabs4			| OK ?
+
 		move.l	-4(a6),d0
-		bra	rwabser			* ERROR
-*
-rwabs4:		clr.w	d7			* Clear media change status
+		bra	rwabser			| ERROR
+
+rwabs4:		clr.w	d7			| Clear media change status
 		bra	rwabs10
-*
-rwabs6:		move.l	#buffer,a0		* Address of sector buffer to a0
-		move.b	8(a0,d7),d0		* Serial number
+
+rwabs6:		move.l	#buffer,a0		| Address of sector buffer to a0
+		move.b	8(a0,d7),d0		| Serial number
 		ext.w	d0
-		move.b	28(a5,d7),d1		* Compare to old one
+		move.b	28(a5,d7),d1		| Compare to old one
 		ext.w	d1
 		cmp.w	d1,d0
-		beq	rwabs5			* Jump if they're the same
-*
-		moveq.l	#ERR14,d0		* ERROR -- "media changed"
+		beq	rwabs5			| Jump if they're the same
+
+		moveq.l	#ERR14,d0		| ERROR -- "media changed"
 		bra	rwabser
-*
-rwabs5:		addq.w	#1,d7			* Next byte of serial number
-*
-rwabs10:	cmp.w	#3,d7			* All 3 bytes checked ?
-		blt	rwabs6			* Loop if not
-*
-		.page
-*
-		move.w	d6,a0			* Point at wplatch for drive
-		add.l	#wplatch,a0		* ...
-		move.w	d6,a1			* Point at wpstatus for drive
-		add.l	#wpstatus,a1		* ...
-		move.b	(a1),(a0)		* Move wpstatus to wplatch
-		bne	rwabs9			* Jump if set
-*
-		move.w	d6,a0			* Set dskmode to "Unchanged"
-		add.l	#dskmode,a0		* ...
-		clr.b	(a0)			* ...
-*
-rwabs7:		tst.w	nflops			* Test nflops
+
+rwabs5:		addq.w	#1,d7			| Next byte of serial number
+
+rwabs10:	cmp.w	#3,d7			| All 3 bytes checked ?
+		blt	rwabs6			| Loop if not
+
+		.page
+
+		move.w	d6,a0			| Point at wplatch for drive
+		add.l	#wplatch,a0		| ...
+		move.w	d6,a1			| Point at wpstatus for drive
+		add.l	#wpstatus,a1		| ...
+		move.b	(a1),(a0)		| Move wpstatus to wplatch
+		bne	rwabs9			| Jump if set
+
+		move.w	d6,a0			| Set dskmode to "Unchanged"
+		add.l	#dskmode,a0		| ...
+		clr.b	(a0)			| ...
+
+rwabs7:		tst.w	nflops			| Test nflops
 		bne	rwabs8
-*
-		moveq.l	#ERR02,d0		* ERROR -- "drive not ready"
+
+		moveq.l	#ERR02,d0		| ERROR -- "drive not ready"
 		bra	rwabser
-*
-rwabs8:		cmp.w	#1,8(a6)		* Check rwflag
+
+rwabs8:		cmp.w	#1,8(a6)		| Check rwflag
 		ble	rwabs9
-*
-		subq.w	#2,8(a6)		* Adjust to 0|1
-*
-rwabs9:		move.w	14(a6),(a7)		* Setup count,
-		move.w	d6,-(a7)		* ... drive,
-		move.w	16(a6),-(a7)		* ... recno,
-		move.l	10(a6),-(a7)		* ... buffer,
-		move.w	8(a6),-(a7)		* ... rwflag
-		bsr	floprw			* Call floprw
-*
-		add.l	#10,a7			* Cleanup stack
-*
-rwabser:	tst.l	(a7)+			* Pop stack scratch
-		movem.l	(a7)+,d5-d7/a5		* Restore registers
-		unlk	a6			* Release temporaries
-		rts				* Return to caller
-*
-		.page
-*
-* floprw -- Floppy read / write driver
-* ------    --------------------------
-floprw:		link	a6,#-6			* Reserve space for temps
-		movem.l	d2-d7/a5,-(a7)		* Save registers
-		move.w	16(a6),d0		* Drive number to d0
-		asl.w	#5,d0			* Shift ( *32 )
-		ext.l	d0			* Sign extend it, too
-		move.l	d0,a5			* Result in a5
-		add.l	#drvbpbs,a5		* Add base of BPB table
-		btst	#0,13(a6)		* Buffer address even ?
-		bne	floprw01		* Jump if not
-*
-		clr.w	d0			* Clear odd flag
-		bra	floprw02		* Go save the flag
-*
-floprw01:	moveq.l	#1,d0			* Set odd flag
-*
-floprw02:	move.w	d0,-2(a6)		* Save it
-		tst.w	22(a5)			* dspc set ?
-		bne	floprw20		* Jump if so
-*
-		moveq.l	#9,d0			* Assume 9
-		move.w	d0,22(a5)		* ... and make it the default
-		move.w	d0,24(a5)		* ... for dspt and dspc
-*
+
+		subq.w	#2,8(a6)		| Adjust to 0|1
+
+rwabs9:		move.w	14(a6),(a7)		| Setup count,
+		move.w	d6,-(a7)		| ... drive,
+		move.w	16(a6),-(a7)		| ... recno,
+		move.l	10(a6),-(a7)		| ... buffer,
+		move.w	8(a6),-(a7)		| ... rwflag
+		bsr	floprw			| Call floprw
+
+		add.l	#10,a7			| Cleanup stack
+
+rwabser:	tst.l	(a7)+			| Pop stack scratch
+		movem.l	(a7)+,d5-d7/a5		| Restore registers
+		unlk	a6			| Release temporaries
+		rts				| Return to caller
+
+		.page
+
+| floprw -- Floppy read / write driver
+| ------    --------------------------
+floprw:		link	a6,#-6			| Reserve space for temps
+		movem.l	d2-d7/a5,-(a7)		| Save registers
+		move.w	16(a6),d0		| Drive number to d0
+		asl.w	#5,d0			| Shift ( |32 )
+		ext.l	d0			| Sign extend it, too
+		move.l	d0,a5			| Result in a5
+		add.l	#drvbpbs,a5		| Add base of BPB table
+		btst	#0,13(a6)		| Buffer address even ?
+		bne	floprw01		| Jump if not
+
+		clr.w	d0			| Clear odd flag
+		bra	floprw02		| Go save the flag
+
+floprw01:	moveq.l	#1,d0			| Set odd flag
+
+floprw02:	move.w	d0,-2(a6)		| Save it
+		tst.w	22(a5)			| dspc set ?
+		bne	floprw20		| Jump if so
+
+		moveq.l	#9,d0			| Assume 9
+		move.w	d0,22(a5)		| ... and make it the default
+		move.w	d0,24(a5)		| ... for dspt and dspc
+
 floprw20:	bra	floprw18
-*
-floprw03:	tst.w	-2(a6)			* Is odd flag set ?
-		beq	floprw04		* Jump if not
-*
-		move.l	#buffer,d0		* Point to sector buffer
+
+floprw03:	tst.w	-2(a6)			| Is odd flag set ?
+		beq	floprw04		| Jump if not
+
+		move.l	#buffer,d0		| Point to sector buffer
 		bra	floprw05
-*
-floprw04:	move.l	10(a6),d0		* Get buffer address
-*
-floprw05:	move.l	d0,-6(a6)		* ... and save
-		move.w	14(a6),d6		* Get recno  (lsn)
-		ext.l	d6			* Extend it to long
-		divs.w	22(a5),d6		* Divide by dspc for track #
-		move.w	14(a6),d4		* Get recno
-		ext.l	d4			* Extend to long
-		divs.w	22(a5),d4		* Divide by dspc
-		swap	d4			* Use remainder as sector number
-		cmp.w	24(a5),d4		* Compare with dspt
-		bge	floprw06		* Greater than or equal ?
-*
-		clr.l	d5			* Use side 0
+
+floprw04:	move.l	10(a6),d0		| Get buffer address
+
+floprw05:	move.l	d0,-6(a6)		| ... and save
+		move.w	14(a6),d6		| Get recno  (lsn)
+		ext.l	d6			| Extend it to long
+		divs.w	22(a5),d6		| Divide by dspc for track #
+		move.w	14(a6),d4		| Get recno
+		ext.l	d4			| Extend to long
+		divs.w	22(a5),d4		| Divide by dspc
+		swap	d4			| Use remainder as sector number
+		cmp.w	24(a5),d4		| Compare with dspt
+		bge	floprw06		| Greater than or equal ?
+
+		clr.l	d5			| Use side 0
 		bra	floprw07
-*
-floprw06:	moveq.l	#1,d5			* Use side 1
-		sub.w	24(a5),d4		* Subtract dspt from sector #
-*
-		.page
-*
-floprw07:	tst.w	-2(a6)			* Is odd flag set ?
-		beq	floprw08		* Jump if not
-*
-		moveq.l	#1,d3			* Set counter to 1
+
+floprw06:	moveq.l	#1,d5			| Use side 1
+		sub.w	24(a5),d4		| Subtract dspt from sector #
+
+		.page
+
+floprw07:	tst.w	-2(a6)			| Is odd flag set ?
+		beq	floprw08		| Jump if not
+
+		moveq.l	#1,d3			| Set counter to 1
 		bra	floprw10
-*
-floprw08:	move.w	24(a5),d0		* Get dspt
-		sub.w	d4,d0			* Subtract sector number
-		cmp.w	18(a6),d0		* Compare with number of sectors
-		bge	floprw09		* Jump if greater than or eq to
-*
-		move.w	24(a5),d3		* Get dspt
-		sub.w	d4,d3			* Subtract sector number
+
+floprw08:	move.w	24(a5),d0		| Get dspt
+		sub.w	d4,d0			| Subtract sector number
+		cmp.w	18(a6),d0		| Compare with number of sectors
+		bge	floprw09		| Jump if greater than or eq to
+
+		move.w	24(a5),d3		| Get dspt
+		sub.w	d4,d3			| Subtract sector number
 		bra	floprw10
-*
-floprw09:	move.w	18(a6),d3		* Count = number of sectors
-*
-floprw10:	addq.w	#1,d4			* Adjust sector number (1 org)
-*
-floprw11:	tst.w	8(a6)			* Test r/w flag
-		beq	floprw14		* Jump if it's a read
-*
-		move.l	-6(a6),d0		* Get buffer pointer
-		cmp.l	10(a6),d0		* See if it's = buffer addr
-		beq	floprw12		* Jump if so
-*
-		move.l	-6(a6),(a7)		* Get source address
-		move.l	10(a6),-(a7)		* Destination address
-		jsr	fastcopy		* Copy the sector
-		addq.l	#4,a7			* Cleanup stack
-*
-floprw12:	move.w	d3,(a7)			* Number of sectors
-		move.w	d5,-(a7)		* Side number
-		move.w	d6,-(a7)		* Track number
-		move.w	d4,-(a7)		* Sector number
-		move.w	16(a6),-(a7)		* Drive number
-		clr.l	-(a7)			* Filler
-		move.l	-6(a6),-(a7)		* Buffer address
-		jsr	flopwr			* Write sector
-		add.l	#16,a7			* Cleaup stack
-		move.l	d0,d7			* Save error code in d7
-		tst.l	d7			* Errors ?
-		bne	floprw13		* Jump if so
-*
-		.page
-*
-		tst.w	fverify			* Verify after write ?
-		beq	floprw13		* Jump if not
-*
-		move.w	d3,(a7)			* Number of sectors
-		move.w	d5,-(a7)		* Side number
-		move.w	d6,-(a7)		* Track number
-		move.w	d4,-(a7)		* Sector number
-		move.w	16(a6),-(a7)		* Drive number
-		clr.l	-(a7)			* Filler
-		move.l	#buffer,-(a7)		* Buffer address
-		jsr	flopver			* Verify sector(s)
-		add.l	#16,a7			* Cleanup stack
-		move.l	d0,d7			* Save error code in d7
-		tst.l	d7			* Errors ?
-		bne	floprw13		* Jump if so
-*
-		move.l	#buffer,(a7)		* Address of sector buffer
-		bsr	itom			* Convert first word of buffer
-		tst.w	d0			* Bad sectors ?
-		beq	floprw13		* Jump if not
-*
-		moveq.l	#ERR16,d7		* ERROR -- "Bad sectors"
-*
+
+floprw09:	move.w	18(a6),d3		| Count = number of sectors
+
+floprw10:	addq.w	#1,d4			| Adjust sector number (1 org)
+
+floprw11:	tst.w	8(a6)			| Test r/w flag
+		beq	floprw14		| Jump if it's a read
+
+		move.l	-6(a6),d0		| Get buffer pointer
+		cmp.l	10(a6),d0		| See if it's = buffer addr
+		beq	floprw12		| Jump if so
+
+		move.l	-6(a6),(a7)		| Get source address
+		move.l	10(a6),-(a7)		| Destination address
+		jsr	fastcopy		| Copy the sector
+		addq.l	#4,a7			| Cleanup stack
+
+floprw12:	move.w	d3,(a7)			| Number of sectors
+		move.w	d5,-(a7)		| Side number
+		move.w	d6,-(a7)		| Track number
+		move.w	d4,-(a7)		| Sector number
+		move.w	16(a6),-(a7)		| Drive number
+		clr.l	-(a7)			| Filler
+		move.l	-6(a6),-(a7)		| Buffer address
+		jsr	flopwr			| Write sector
+		add.l	#16,a7			| Cleaup stack
+		move.l	d0,d7			| Save error code in d7
+		tst.l	d7			| Errors ?
+		bne	floprw13		| Jump if so
+
+		.page
+
+		tst.w	fverify			| Verify after write ?
+		beq	floprw13		| Jump if not
+
+		move.w	d3,(a7)			| Number of sectors
+		move.w	d5,-(a7)		| Side number
+		move.w	d6,-(a7)		| Track number
+		move.w	d4,-(a7)		| Sector number
+		move.w	16(a6),-(a7)		| Drive number
+		clr.l	-(a7)			| Filler
+		move.l	#buffer,-(a7)		| Buffer address
+		jsr	flopver			| Verify sector(s)
+		add.l	#16,a7			| Cleanup stack
+		move.l	d0,d7			| Save error code in d7
+		tst.l	d7			| Errors ?
+		bne	floprw13		| Jump if so
+
+		move.l	#buffer,(a7)		| Address of sector buffer
+		bsr	itom			| Convert first word of buffer
+		tst.w	d0			| Bad sectors ?
+		beq	floprw13		| Jump if not
+
+		moveq.l	#ERR16,d7		| ERROR -- "Bad sectors"
+
 floprw13:	bra	floprw15
-*
-		.page
-*
-floprw14:	move.w	d3,(a7)			* Number of sectors
-		move.w	d5,-(a7)		* Side number
-		move.w	d6,-(a7)		* Track number
-		move.w	d4,-(a7)		* Sector number
-		move.w	16(a6),-(a7)		* Drive number
-		clr.l	-(a7)			* Filler
-		move.l	-6(a6),-(a7)		* Sector buffer
-		jsr	floprd			* Read floppy sector(s)
-		add.l	#16,a7			* Cleanup stack
-		move.l	d0,d7			* Save error code in d7
-		move.l	-6(a6),d0		* User buffer address
-		cmp.l	10(a6),d0		* Is it the desired buffer ?
-		beq	floprw15		* Jump if so
-*
-		move.l	10(a6),(a7)		* Push source address
-		move.l	-6(a6),-(a7)		* Push destination address
-		jsr	fastcopy		* Copy the sector
-		addq.l	#4,a7			* Cleanup stack
-*
-floprw15:	tst.l	d7			* Error code set ?
-		bge	floprw16		* Jump if not
-*
-		move.w	16(a6),(a7)		* Push drive number
-		move.l	d7,d0			* Error code
-		move.w	d0,-(a7)		* ... onto stack
-		jsr	criter			* Call critical error handler
-		addq.l	#2,a7			* Cleanup stack
-		move.l	d0,d7			* Get error code
-*
-floprw16:	cmp.l	#RETRYIT,d7		* Re-try ?
-		beq	floprw11		* Jump if so
-*
-		tst.l	d7			* Check error code
-		bge	floprw17		* Jump if no error
-*
-		move.l	d7,d0			* Error code is the result
+
+		.page
+
+floprw14:	move.w	d3,(a7)			| Number of sectors
+		move.w	d5,-(a7)		| Side number
+		move.w	d6,-(a7)		| Track number
+		move.w	d4,-(a7)		| Sector number
+		move.w	16(a6),-(a7)		| Drive number
+		clr.l	-(a7)			| Filler
+		move.l	-6(a6),-(a7)		| Sector buffer
+		jsr	floprd			| Read floppy sector(s)
+		add.l	#16,a7			| Cleanup stack
+		move.l	d0,d7			| Save error code in d7
+		move.l	-6(a6),d0		| User buffer address
+		cmp.l	10(a6),d0		| Is it the desired buffer ?
+		beq	floprw15		| Jump if so
+
+		move.l	10(a6),(a7)		| Push source address
+		move.l	-6(a6),-(a7)		| Push destination address
+		jsr	fastcopy		| Copy the sector
+		addq.l	#4,a7			| Cleanup stack
+
+floprw15:	tst.l	d7			| Error code set ?
+		bge	floprw16		| Jump if not
+
+		move.w	16(a6),(a7)		| Push drive number
+		move.l	d7,d0			| Error code
+		move.w	d0,-(a7)		| ... onto stack
+		jsr	criter			| Call critical error handler
+		addq.l	#2,a7			| Cleanup stack
+		move.l	d0,d7			| Get error code
+
+floprw16:	cmp.l	#RETRYIT,d7		| Re-try ?
+		beq	floprw11		| Jump if so
+
+		tst.l	d7			| Check error code
+		bge	floprw17		| Jump if no error
+
+		move.l	d7,d0			| Error code is the result
 		bra	floprw19
-*
-		.page
-*
-floprw17:	move.w	d3,d0			* Sector counter to d0
-		ext.l	d0			* Sign extend
-		moveq.l	#9,d1			* Times 512
-		asl.l	d1,d0			* ...
-		add.l	d0,10(a6)		* Update buffer address
-		add.w	d3,14(a6)		* Update sector number
-		sub.w	d3,18(a6)		* Update sector count
-*
-floprw18:	tst.w	18(a6)			* More sectors ?
-		bne	floprw03		* Jump if so
-*
-		clr.l	d0			* Set "no error" as result
-*
-floprw19:	tst.l	(a7)+			* Test top of stack
-		movem.l	(a7)+,d3-d7/a5		* Restore registers
-		unlk	a6			* Release stack space
-		rts				* Return to caller
-*
-		.page
-*
-* itom -- Convert 8086 integer format to 680000 integer format
-* ----    ----------------------------------------------------
-itom:		link	a6,#-4			* Reserve stack for temps
-		move.l	8(a6),a0		* Address of the number to a0
-		move.b	1(a0),d0		* Get high byte
-		ext.w	d0			* Make it a word
-		and.w	#$FF,d0			* Isolate bits 0..7
-		asl.w	#8,d0			* Shift in bits 8..15
-		move.l	8(a6),a1		* Address of the number to a1
-		move.b	(a1),d1			* Get low byte
-		ext.w	d1			* Extend to word
-		and.w	#$FF,d1			* Isolate bits 0..7
-		or.w	d1,d0			* Combine with bits 8..15
-		unlk	a6			* Release stack space
-		rts				* Return to caller
-*
-		.page
-*
-* flopini -- Initialize floppy drive
-* -------    -----------------------
-flopini:	lea	dsb0,a1			* Point to dsb for drive A
-		tst.w	12(a7)			* Drive A wanted ?
-		beq	flopin01		* Jump if so
-*
-		lea	dsb1,a1			* Drive B dsb address to a1
-*
-flopin01:	move.w	seekrate,2(a1)		* Get seek rate
-		moveq.l	#ERR01,d0		* Set default error number
-		clr.w	0(a1)			* Set track number to 0
-		bsr	floplock		* Setup floppy parameters
-		bsr	select			* Select drive and side
-		move.w	#$FF00,0(a1)
-		bsr	restore			* Restore the drive
+
+		.page
+
+floprw17:	move.w	d3,d0			| Sector counter to d0
+		ext.l	d0			| Sign extend
+		moveq.l	#9,d1			| Times 512
+		asl.l	d1,d0			| ...
+		add.l	d0,10(a6)		| Update buffer address
+		add.w	d3,14(a6)		| Update sector number
+		sub.w	d3,18(a6)		| Update sector count
+
+floprw18:	tst.w	18(a6)			| More sectors ?
+		bne	floprw03		| Jump if so
+
+		clr.l	d0			| Set "no error" as result
+
+floprw19:	tst.l	(a7)+			| Test top of stack
+		movem.l	(a7)+,d3-d7/a5		| Restore registers
+		unlk	a6			| Release stack space
+		rts				| Return to caller
+
+		.page
+
+| itom -- Convert 8086 integer format to 680000 integer format
+| ----    ----------------------------------------------------
+itom:		link	a6,#-4			| Reserve stack for temps
+		move.l	8(a6),a0		| Address of the number to a0
+		move.b	1(a0),d0		| Get high byte
+		ext.w	d0			| Make it a word
+		and.w	#0xFF,d0		| Isolate bits 0..7
+		asl.w	#8,d0			| Shift in bits 8..15
+		move.l	8(a6),a1		| Address of the number to a1
+		move.b	(a1),d1			| Get low byte
+		ext.w	d1			| Extend to word
+		and.w	#0xFF,d1		| Isolate bits 0..7
+		or.w	d1,d0			| Combine with bits 8..15
+		unlk	a6			| Release stack space
+		rts				| Return to caller
+
+		.page
+
+| flopini -- Initialize floppy drive
+| -------    -----------------------
+flopini:	lea	dsb0,a1			| Point to dsb for drive A
+		tst.w	12(a7)			| Drive A wanted ?
+		beq	flopin01		| Jump if so
+
+		lea	dsb1,a1			| Drive B dsb address to a1
+
+flopin01:	move.w	seekrate,2(a1)		| Get seek rate
+		moveq.l	#ERR01,d0		| Set default error number
+		clr.w	0(a1)			| Set track number to 0
+		bsr	floplock		| Setup floppy parameters
+		bsr	select			| Select drive and side
+		move.w	#0xFF00,0(a1)
+		bsr	restore			| Restore the drive
 		moveq.l	#6,d7
 		bsr	hseek1
 		bne	flopin02
-*
-		bsr	restore			* Restore the drive
-		beq	flopok			* Jump if no error
-*
-flopin02:	bra	flopfail		* Jump to error handler
-*
-		.page
-*
-* floprd -- Read floppy
-* ------    -----------
-floprd:		bsr	change			* Disk changed ?
-		moveq.l	#ERR11,d0		* Set to "read error"
-		bsr	floplock		* Set parameters
-*
-floprd01:	bsr	select			* Select drive and side
-		bsr	go2track		* Position on track
-		bne	floprd02		* Try again on error
-*
-		move.w	#ERR01,deferr		* Set default error
-		move.l	edma(a5),a0		* Get final DMA address
-		move.l	cdma(a5),a2		* Get first DMA address
-		move.l	#$40000,d7		* Set timeout counter
-		move.b	#FL_RM,DSKCMD(a6)	* Start readng the disk
-*
-floprd03:	btst	#0,DSKCMD(a6)		* Disk busy yet ?
-		bne	floprd05		* Jump if so
-*
-		subq.l	#1,d7			* Decrement timeout counter
-		beq	floprd04		* Jump if timed out
-*
-		bra	floprd03		* Go try for busy again
-*
-floprd05:	move.l	#$40000,d7		* Reset timeout counter
-		bra	floprd09		* Go join main read loop
-*
-floprd07:	subq.l	#1,d7			* Decrement timeout counter
-		beq	floprd04		* Jump if timed out
-*
-		btst	#0,DSKCMD(a6)		* Done yet ?
-		beq	floprd08		* Jump if so
-*
-floprd09:	btst	#1,DSKCMD(a6)		* DRQ set ?
-		beq	floprd07		* Jump if not
-*
-		move.b	DSKDAT(a6),(a2)+	* Read the byte into the buffer
-		cmp.l	a0,a2			* Done reading ?
-		bne	floprd07		* Jump if not
-*
-		.page
-*
-floprd08:	move.b	DSKCMD(a6),d0		* Read final status into d0
-		and.b	#$1C,d0			* Mask for error bits
-		beq	flopok			* Jump if no errors
-*
-		bsr	errbits			* Determine error code
-*
-floprd02:	cmp.w	#1,retrycnt(a5)		* Re-try ?
-		bne	floprd06		* Jump if not
-*
-		bsr	reseek			* Home and repeat the seek
-*
-floprd06:	subq.w	#1,retrycnt(a5)		* Update re-try count
-		bpl	floprd01		* Re-try if count still >0
-*
-		bra	flopfail		* Failure
-*
-floprd04:	move.w	#ERR02,curerr(a5)	* Set error code "not ready"
-		bsr	rs1772			* Reset the WD1772
-		bra	floprd02		* See if it can be retried
-*
-		.page
-*
-* errbits -- Develop error code for floppy I/O error
-* -------    ---------------------------------------
-errbits:	moveq.l	#ERR13,d1		* Write protect ?
-		btst	#6,d0			* ...
-		bne	errbits1		* Jump if so
-*
-		moveq.l	#ERR08,d1		* Record not found ?
-		btst	#4,d0			* ...
-		bne	errbits1		* Jump if so
-*
-		moveq.l	#ERR04,d1		* CRC error ?
-		btst	#3,d0			* ...
-		bne	errbits1		* Jump if so
-*
-		moveq.l	#ERR12,d1		* Lost data ?
-		btst	#2,d0			* ...
-		bne	errbits1		* Jump if so
-*
-		move.w	deferr(a5),d1		* Use default error
-*
-errbits1:	move.w	d1,curerr(a5)		* ... as curerr
-		rts				* Return to caller
-*
-		.page
-*
-* flopwr -- Floppy write
-* ------    ------------
-flopwr:		bsr	change			* Check for disk change
-		moveq.l	#ERR10,d0		* Set write error
-		bsr	floplock		* Set parameters
-		move.w	csect(a5),d0		* Get sector number in d0
-		subq.w	#1,d0			* ... -1
-		or.w	ctrack(a5),d0		* OR with track number
-		or.w	cside(a5),d0		* OR with side number
-		bne	flopwr01		* Jump if not boot sector
-*
-		moveq.l	#2,d0			* Media change
-		bsr	setdmode		* Set to "unsure"
-*
-flopwr01:	bsr	select			* Select drive and side
-		bsr	go2track		* Seek
-		bne	flopwr06		* Re-try on error
-*
-flopwr02:	move.w	#ERR01,curerr(a5)	* Set for default error
-		move.l	cdma(a5),a2		* Get I/O address
-		move.l	#$40000,d7		* Set timeout counter
-		move.w	ctrack(a5),d0		* Get track number
-		cmpi.w	#40,d0			* See if we need precomp
-		bcs	flopwr10		* Jump if not
-*
-		move.b	#FL_WS,DSKCMD(a6)	* Write with precomp
-		bra	flopwr08		* Go join main write loop
-*
-flopwr10:	move.b	#FL_WS+FL_NC,DSKCMD(a6)	* Write  (no precomp)
-*
-		.page
-*
-flopwr08:	btst	#0,DSKCMD(a6)		* Busy yet ?
-		bne	flopwr09		* Jump if so
-*
-		subq.l	#1,d7			* Decrement tiemout count
-		bne	flopwr08		* Jump if not timed out
-*
-flopwr13:	bsr	rs1772			* Reset WD1772
-		bra	flopwr05		* See if we can retry
-*
-flopwr11:	btst	#0,DSKCMD(a6)		* Done ?
-		beq	flopwr04		* Jump if so
-*
-flopwr09:	btst	#1,DSKCMD(a6)		* DRQ set ?
-		bne	flopwr12		* Jump if so
-*
-		subq.l	#1,d7			* Decrement timeout counter
-		beq	flopwr13		* Jump if timed out
-*
-		bra	flopwr11		* Jump if not
-*
-flopwr12:	move.b	(a2)+,DSKDAT(a6)	* Write byte to floppy
-		bra	flopwr11		* Go get the next one
-*
-		.page
-*
-flopwr04:	move.b	DSKCMD(a6),d0		* Get floppy status
-		bsr	errbits			* Set error code
-		btst	#6,d0			* Write protect error ?
-		bne	flopfail		* Fail if so
-*
-		and.b	#$5C,d0			* Mask error bits
-		bne	flopwr05		* Jump if an error occurred
-*
-		addq.w	#1,csect(a5)		* Update sector number
-		add.l	#512,cdma(a5)		* Update DMA address
-		subq.w	#1,ccount(a5)		* Decrement sector count
-		beq	flopok			* Jump if zero -- done
-*
-		bsr	select1			* Set sector and DMA pointer
-		bra	flopwr02		* Write next sector
-*
-flopwr05:	cmp.w	#1,retrycnt(a5)		* Second re-try ?
-		bne	flopwr07		* Jump if not
-*
-flopwr06:	bsr	reseek			* Restore and re-seek
-*
-flopwr07:	subq.w	#1,retrycnt(a5)		* Update re-try count
-		bpl	flopwr01		* Re-try if still >0
-*
-		bra	flopfail		* ... else fail
-*
-		.page
-*
-* flopfmt -- Format a track on the floppy
-* -------    ----------------------------
-flopfmt:	cmp.l	#FMAGIC,22(a7)		* Is the magic right ?
-		bne	flopfail		* Fail immediately if not
-*
-		bsr	change			* Check for disk change
-		moveq.l	#ERR01,d0		* Set default error number
-		bsr	floplock		* Set parameters
-		bsr	select			* Select drive and side
-		move.w	14(a7),spt(a5)		* Set sectors per track,
-		move.w	20(a7),interlv(a5)	* ... interleave,
-		move.w	26(a7),virgin(a5)	* ... initial data,
-		moveq.l	#2,d0			* Disk changed
-		bsr	setdmode		* ...
-		bsr	hseek			* Seek
-		bne	flopfail		* Fail if seek error occurs
-*
-		move.w	ctrack(a5),0(a1)	* Current track to DSB
-		move.w	#ERR01,curerr(a5)	* Default to curerr
-		bsr	fmtrack			* Format the track
-		bne	flopfail		* Fail if error occurs
-*
-		move.w	spt(a5),ccount(a5)	* Use spt as ccount
-		move.w	#1,csect(a5)		* Start with sector 1
-		bsr	verify1			* Verify the sector
-		move.l	cdma(a5),a2		* Get bad sector list
-		tst.w	(a2)			* Any bad ones ?
-		beq	flopok			* Jump if not
-*
-		move.w	#ERR16,curerr(a5)	* ERROR -- "bad sectors"
+
+		bsr	restore			| Restore the drive
+		beq	flopok			| Jump if no error
+
+flopin02:	bra	flopfail		| Jump to error handler
+
+		.page
+
+| floprd -- Read floppy
+| ------    -----------
+floprd:		bsr	change			| Disk changed ?
+		moveq.l	#ERR11,d0		| Set to "read error"
+		bsr	floplock		| Set parameters
+
+floprd01:	bsr	select			| Select drive and side
+		bsr	go2track		| Position on track
+		bne	floprd02		| Try again on error
+
+		move.w	#ERR01,deferr		| Set default error
+		move.l	edma(a5),a0		| Get final DMA address
+		move.l	cdma(a5),a2		| Get first DMA address
+		move.l	#0x40000,d7		| Set timeout counter
+		move.b	#FL_RM,DSKCMD(a6)	| Start readng the disk
+
+floprd03:	btst	#0,DSKCMD(a6)		| Disk busy yet ?
+		bne	floprd05		| Jump if so
+
+		subq.l	#1,d7			| Decrement timeout counter
+		beq	floprd04		| Jump if timed out
+
+		bra	floprd03		| Go try for busy again
+
+floprd05:	move.l	#0x40000,d7		| Reset timeout counter
+		bra	floprd09		| Go join main read loop
+
+floprd07:	subq.l	#1,d7			| Decrement timeout counter
+		beq	floprd04		| Jump if timed out
+
+		btst	#0,DSKCMD(a6)		| Done yet ?
+		beq	floprd08		| Jump if so
+
+floprd09:	btst	#1,DSKCMD(a6)		| DRQ set ?
+		beq	floprd07		| Jump if not
+
+		move.b	DSKDAT(a6),(a2)+	| Read the byte into the buffer
+		cmp.l	a0,a2			| Done reading ?
+		bne	floprd07		| Jump if not
+
+		.page
+
+floprd08:	move.b	DSKCMD(a6),d0		| Read final status into d0
+		and.b	#0x1C,d0		| Mask for error bits
+		beq	flopok			| Jump if no errors
+
+		bsr	errbits			| Determine error code
+
+floprd02:	cmp.w	#1,retrycnt(a5)		| Re-try ?
+		bne	floprd06		| Jump if not
+
+		bsr	reseek			| Home and repeat the seek
+
+floprd06:	subq.w	#1,retrycnt(a5)		| Update re-try count
+		bpl	floprd01		| Re-try if count still >0
+
+		bra	flopfail		| Failure
+
+floprd04:	move.w	#ERR02,curerr(a5)	| Set error code "not ready"
+		bsr	rs1772			| Reset the WD1772
+		bra	floprd02		| See if it can be retried
+
+		.page
+
+| errbits -- Develop error code for floppy I/O error
+| -------    ---------------------------------------
+errbits:	moveq.l	#ERR13,d1		| Write protect ?
+		btst	#6,d0			| ...
+		bne	errbits1		| Jump if so
+
+		moveq.l	#ERR08,d1		| Record not found ?
+		btst	#4,d0			| ...
+		bne	errbits1		| Jump if so
+
+		moveq.l	#ERR04,d1		| CRC error ?
+		btst	#3,d0			| ...
+		bne	errbits1		| Jump if so
+
+		moveq.l	#ERR12,d1		| Lost data ?
+		btst	#2,d0			| ...
+		bne	errbits1		| Jump if so
+
+		move.w	deferr(a5),d1		| Use default error
+
+errbits1:	move.w	d1,curerr(a5)		| ... as curerr
+		rts				| Return to caller
+
+		.page
+
+| flopwr -- Floppy write
+| ------    ------------
+flopwr:		bsr	change			| Check for disk change
+		moveq.l	#ERR10,d0		| Set write error
+		bsr	floplock		| Set parameters
+		move.w	csect(a5),d0		| Get sector number in d0
+		subq.w	#1,d0			| ... -1
+		or.w	ctrack(a5),d0		| OR with track number
+		or.w	cside(a5),d0		| OR with side number
+		bne	flopwr01		| Jump if not boot sector
+
+		moveq.l	#2,d0			| Media change
+		bsr	setdmode		| Set to "unsure"
+
+flopwr01:	bsr	select			| Select drive and side
+		bsr	go2track		| Seek
+		bne	flopwr06		| Re-try on error
+
+flopwr02:	move.w	#ERR01,curerr(a5)	| Set for default error
+		move.l	cdma(a5),a2		| Get I/O address
+		move.l	#0x40000,d7		| Set timeout counter
+		move.w	ctrack(a5),d0		| Get track number
+		cmpi.w	#40,d0			| See if we need precomp
+		bcs	flopwr10		| Jump if not
+
+		move.b	#FL_WS,DSKCMD(a6)	| Write with precomp
+		bra	flopwr08		| Go join main write loop
+
+flopwr10:	move.b	#FL_WS+FL_NC,DSKCMD(a6)	| Write  (no precomp)
+
+		.page
+
+flopwr08:	btst	#0,DSKCMD(a6)		| Busy yet ?
+		bne	flopwr09		| Jump if so
+
+		subq.l	#1,d7			| Decrement tiemout count
+		bne	flopwr08		| Jump if not timed out
+
+flopwr13:	bsr	rs1772			| Reset WD1772
+		bra	flopwr05		| See if we can retry
+
+flopwr11:	btst	#0,DSKCMD(a6)		| Done ?
+		beq	flopwr04		| Jump if so
+
+flopwr09:	btst	#1,DSKCMD(a6)		| DRQ set ?
+		bne	flopwr12		| Jump if so
+
+		subq.l	#1,d7			| Decrement timeout counter
+		beq	flopwr13		| Jump if timed out
+
+		bra	flopwr11		| Jump if not
+
+flopwr12:	move.b	(a2)+,DSKDAT(a6)	| Write byte to floppy
+		bra	flopwr11		| Go get the next one
+
+		.page
+
+flopwr04:	move.b	DSKCMD(a6),d0		| Get floppy status
+		bsr	errbits			| Set error code
+		btst	#6,d0			| Write protect error ?
+		bne	flopfail		| Fail if so
+
+		and.b	#0x5C,d0		| Mask error bits
+		bne	flopwr05		| Jump if an error occurred
+
+		addq.w	#1,csect(a5)		| Update sector number
+		add.l	#512,cdma(a5)		| Update DMA address
+		subq.w	#1,ccount(a5)		| Decrement sector count
+		beq	flopok			| Jump if zero -- done
+
+		bsr	select1			| Set sector and DMA pointer
+		bra	flopwr02		| Write next sector
+
+flopwr05:	cmp.w	#1,retrycnt(a5)		| Second re-try ?
+		bne	flopwr07		| Jump if not
+
+flopwr06:	bsr	reseek			| Restore and re-seek
+
+flopwr07:	subq.w	#1,retrycnt(a5)		| Update re-try count
+		bpl	flopwr01		| Re-try if still >0
+
+		bra	flopfail		| ... else fail
+
+		.page
+
+| flopfmt -- Format a track on the floppy
+| -------    ----------------------------
+flopfmt:	cmp.l	#FMAGIC,22(a7)		| Is the magic right ?
+		bne	flopfail		| Fail immediately if not
+
+		bsr	change			| Check for disk change
+		moveq.l	#ERR01,d0		| Set default error number
+		bsr	floplock		| Set parameters
+		bsr	select			| Select drive and side
+		move.w	14(a7),spt(a5)		| Set sectors per track,
+		move.w	20(a7),interlv(a5)	| ... interleave,
+		move.w	26(a7),virgin(a5)	| ... initial data,
+		moveq.l	#2,d0			| Disk changed
+		bsr	setdmode		| ...
+		bsr	hseek			| Seek
+		bne	flopfail		| Fail if seek error occurs
+
+		move.w	ctrack(a5),0(a1)	| Current track to DSB
+		move.w	#ERR01,curerr(a5)	| Default to curerr
+		bsr	fmtrack			| Format the track
+		bne	flopfail		| Fail if error occurs
+
+		move.w	spt(a5),ccount(a5)	| Use spt as ccount
+		move.w	#1,csect(a5)		| Start with sector 1
+		bsr	verify1			| Verify the sector
+		move.l	cdma(a5),a2		| Get bad sector list
+		tst.w	(a2)			| Any bad ones ?
+		beq	flopok			| Jump if not
+
+		move.w	#ERR16,curerr(a5)	| ERROR -- "bad sectors"
 		bra	flopfail
-*
-		.page
-*
-* fmtrack -- Do the dirty work of formatting a track
-* -------    ---------------------------------------
-fmtrack:	move.w	#ERR10,deferr(a5)	* Set default error number
-		move.w	#1,d3			* Start with sector 1
-		move.l	cdma(a5),a2		* Get track buffer address
-		move.w	#60-1,d1		* Set count = 60
-		move.b	#$4E,d0			* Write $4E as initial gap
-		bsr	wmult			* ...
-*
-fmtrak01:	move.w	d3,d4			* Save sector number in d4
-*
-fmtrak02:	move.w	#12-1,d1		* Set count = 12
-		clr.b	d0			* Write $00 as sync
-		bsr	wmult			* ...
-		move.w	#3-1,d1			* Set count = 3
-		move.b	#$F5,d0			* Write $F5's
-		bsr	wmult			* ...
-		move.b	#$FE,(a2)+		* Write $FE (address mark)
-		move.b	ctrack+1,(a2)+		* Write track #
-		move.b	cside+1,(a2)+		* Write side #
-		move.b	d4,(a2)+		* Write sector #
-		move.b	#2,(a2)+		* Write sector size code
-		move.b	#$F7,(a2)+		* Write checksum code
-		move.w	#22-1,d1		* Set count = 22
-		move.b	#$4E,d0			* Write gap
-		bsr	wmult			* ...
-		move.w	#12-1,d1		* Set count = 12
-		clr.b	d0			* Write $00 as sync
-		bsr	wmult			* ...
-		move.w	#3-1,d1			* Set count = 3
-		move.b	#$F5,d0			* Write $F5's
-		bsr	wmult			* ...
-		move.b	#$FB,(a2)+		* Write DAM
-		move.w	#256-1,d1		* Set count = 256 words
-*
-		.page
-*
-fmtrak03:	move.b	virgin(a5),(a2)+	* Write virgin data in buffer
-		move.b	virgin+1(a5),(a2)+	* ...
-		dbf	d1,fmtrak03		* ...
-*
-		move.b	#$F7,(a2)+		* Write CRC code
-		move.w	#40-1,d1		* Set count = 40
-		move.b	#$4E,d0			* Write gap
-		bsr	wmult			* ...
-		add.w	interlv(a5),d4		* Add interleave to sector #
-		cmp.w	spt(a5),d4		* Check against spt
-		ble	fmtrak02		* Jump if not >
-*
-		addq.w	#1,d3			* Starting sector +1
+
+		.page
+
+| fmtrack -- Do the dirty work of formatting a track
+| -------    ---------------------------------------
+fmtrack:	move.w	#ERR10,deferr(a5)	| Set default error number
+		move.w	#1,d3			| Start with sector 1
+		move.l	cdma(a5),a2		| Get track buffer address
+		move.w	#60-1,d1		| Set count = 60
+		move.b	#0x4E,d0		| Write 0x4E as initial gap
+		bsr	wmult			| ...
+
+fmtrak01:	move.w	d3,d4			| Save sector number in d4
+
+fmtrak02:	move.w	#12-1,d1		| Set count = 12
+		clr.b	d0			| Write 0x00 as sync
+		bsr	wmult			| ...
+		move.w	#3-1,d1			| Set count = 3
+		move.b	#0xF5,d0		| Write 0xF5's
+		bsr	wmult			| ...
+		move.b	#0xFE,(a2)+		| Write 0xFE (address mark)
+		move.b	ctrack+1,(a2)+		| Write track #
+		move.b	cside+1,(a2)+		| Write side #
+		move.b	d4,(a2)+		| Write sector #
+		move.b	#2,(a2)+		| Write sector size code
+		move.b	#0xF7,(a2)+		| Write checksum code
+		move.w	#22-1,d1		| Set count = 22
+		move.b	#0x4E,d0		| Write gap
+		bsr	wmult			| ...
+		move.w	#12-1,d1		| Set count = 12
+		clr.b	d0			| Write 0x00 as sync
+		bsr	wmult			| ...
+		move.w	#3-1,d1			| Set count = 3
+		move.b	#0xF5,d0		| Write 0xF5's
+		bsr	wmult			| ...
+		move.b	#0xFB,(a2)+		| Write DAM
+		move.w	#256-1,d1		| Set count = 256 words
+
+		.page
+
+fmtrak03:	move.b	virgin(a5),(a2)+	| Write virgin data in buffer
+		move.b	virgin+1(a5),(a2)+	| ...
+		dbf	d1,fmtrak03		| ...
+
+		move.b	#0xF7,(a2)+		| Write CRC code
+		move.w	#40-1,d1		| Set count = 40
+		move.b	#0x4E,d0		| Write gap
+		bsr	wmult			| ...
+		add.w	interlv(a5),d4		| Add interleave to sector #
+		cmp.w	spt(a5),d4		| Check against spt
+		ble	fmtrak02		| Jump if not >
+
+		addq.w	#1,d3			| Starting sector +1
 		cmp.w	interlv(a5),d3
 		ble	fmtrak01
-*
-		move.w	#1401-1,d1		* Set count = 1401
-		move.b	#$4E,d0			* Write final gap
-		bsr	wmult			* ...
-		move.l	cdma(a5),a2		* Get buffer address
-		move.l	#$40000,d7		* Set timeout count
-		move.w	ctrack(a5),d0		* Get track number
-		cmpi.w	#40,d0			* Do we need precomp ?
-		bcs	fmtrak08		* Jump if not
-*
-		move.b	#FL_WT,DSKCMD(a6)	* Start format with precomp
-		bra	fmtrak07		* Go join main format loop
-*
-fmtrak08:	move.b	#FL_WT+FL_NC,DSKCMD(a6)	* Start format without precomp
-*
-		.page
-*
-fmtrak07:	btst	#0,DSKCMD(a6)		* Busy yet ?
-		bne	fmtrak09		* Jump if so
-*
-fmtrak04:	subq.l	#1,d7			* Decrement timeout counter
-		bne	fmtrak07		* Jump if not timed out
-*
-fmtrak05:	bsr	rs1772			* Reset WD1772
-		moveq.l	#1,d7			* Set error flag
-		rts				* Return to caller
-*
-fmtrak11:	btst	#0,DSKCMD(a6)		* Done ?
-		beq	fmtrak06		* Jump if so
-*
-fmtrak09:	btst	#1,DSKCMD(a6)		* DRQ set ?
-		bne	fmtrak10		* Jump if so
-*
-		subq.l	#1,d7			* Decrement timeout coutner
-		beq	fmtrak05		* Jump if timed out
-*
-		bra	fmtrak11		* Go check again
-*
-fmtrak10:	move.b	(a2)+,DSKDAT(a6)	* Write a byte of format
-		bra	fmtrak11		* Go wait for DRQ
-*
-fmtrak06:	move.b	DSKCMD(a6),d0		* Get final status
-		bsr	errbits			* Set possible error code
-		andi.b	#$44,d0			* Check error bits
-		rts				* Return to caller with status
-*
-* wmult -- write multiple bytes into the track buffer
-* -----    ------------------------------------------
-wmult:		move.b	d0,(a2)+		* Move a byte into the buffer
-		dbf	d1,wmult		* Loop until we're done
-*
-		rts				* Return to caller
-*
-		.page
-*
-* flopver -- verify sector(s) on a floppy
-* -------    ----------------------------
-flopver:	bsr	change			* Check for disk change
-		moveq.l	#ERR11,d0		* Set default to "read error"
-		bsr	floplock		* Set parameters
-		bsr	select			* Select drive and side
-		bsr	go2track		* Seek
-		bne	flopfail		* Jump if seek error
-*
-		bsr	verify1			* Verify the data
-		bra	flopok			* Done
-*
-* verify1 -- Verify the data for a sector
-* -------    ----------------------------
-verify1:	move.w	#ERR11,deferr(a5)	* Set default = "read error"
-		move.l	cdma(a5),a2		* Pointer for bad sector list
-		add.l	#512,cdma(a5)		* Update by length of a sector
-*
-verify01:	move.w	#2,retrycnt(a5)		* Set retrycnt for 2 attempts
-		move.w	csect(a5),d7		* Get sector nubmer
-		move.b	d7,DSKSEC(a6)		* Send to WD1772
-*
-verify02:	moveq.l	#0,d6			* Clear bad compare flag
-		move.l	cdma(a5),a0		* Get compare address
-		move.l	#$40000,d7		* Set timeout counter
-		move.b	#FL_RS,DSKCMD(a6)	* Start the read
-*
-verify08:	btst	#0,DSKCMD(a6)		* Busy yet ?
-		bne	verify09		* Jump if so
-*
-		subq.l	#1,d7			* Decrement timeout counter
-		beq	verify13		* Jump if timed out
-*
-		bra	verify08		* Wait for busy some more
-*
-verify09:	move.l	#$40000,d7		* Reset timeout counter
-		bra	verify11		* Go join main compare loop
-*
-verify10:	subq.l	#1,d7			* Decrement timeout counter
-		beq	verify13		* Jump if timed out
-*
-		btst	#0,DSKCMD(a6)		* Done yet ?
-		beq	verify12		* Jump if so
-*
-		.page
-*
-verify11:	btst	#1,DSKCMD(a6)		* DRQ set ?
-		beq	verify10		* Jump if not
-*
-		move.b	DSKDAT(a6),d0		* Read data
-		bra	verify10		* Continue reading
-*
-verify12:	move.b	DSKCMD(a6),d0		* Get final status
-		bsr	errbits			* Determine error code
-		and.b	#$1C,d0			* Mask RNF, CRC, LOST
-		bne	verify06		* Jump to re-try if any set
-*
-verify05:	addq.w	#1,csect(a5)		* Update sector number
-		subq.w	#1,ccount(a5)		* Update sector count
-		bne	verify01		* Jump if more to do
-*
-		sub.l	#512,cdma(a5)		* Reset DMA pointer
-		clr.w	(a2)			* Set NIL in bad sector list
-		rts				* Return to caller
-*
-verify06:	cmp.w	#1,retrycnt(a5)		* Is it the 2nd attempt ?
-		bne	verify07		* Jump if not
-*
-		bsr	reseek			* Restore and re-seek
-*
-verify07:	subq.w	#1,retrycnt(a5)		* Decrement retry count
-		bpl	verify02		* Re-try if still positive
-*
-		move.w	csect(a5),(a2)+		* Add to bad sector list
-		bra	verify05		* Go do next sector
-*
-verify13:	move.w	#ERR02,curerr(a5)	* Set timeout error code
-		bsr	rs1772			* Reset WD1772
-		bra	verify06		* See if we can retry it
-*
-		.page
-*
-* flopvbl -- Floppy VBL timer interrupt handling
-* -------    -----------------------------------
-flopvbl:	movem.l	d0-d1/a0-a1/a5-a6,-(a7)	* Save registers
-		sub.l	a5,a5			* Clear a5 for use as RAM base
-		lea	FLOPPY,a6		* Base of floppy regs
-		st	motoron(a5)		* Set motoron flag
-		move.l	frclock(a5),d0		* Get interrupt count
-		move.b	d0,d1			* ...
-		and.b	#7,d1			* ... MOD 8
-		bne	flopvb02		* Jump if not 8th int
-*
-		move.w	sr,-(a7)		* Save interrupt level
-		ori.w	#IPL7,sr		* Mask off interrupts
-		clr.w	deslflag(a5)		* Clear deselect flag
-		move.b	mc1iorec+cfr1,d0	* Get port status
-		ori.b	#1,d0			* Set drive select bit
-		move.b	d0,MC1ACIA+ACIA_CFR	* Send drive select to port
-		move.b	d0,mc1iorec+cfr1	* Store updated port status
-		move.w	(a7)+,sr		* Restore interrupt level
-		lea	wpstatus(a5),a0		* Point at wpstatus for drive
-		lea	dsb0(a5),a1		* Point at dsb0
-		move.b	DSKCMD(a6),d0		* Read WD1772 status
-		btst	#6,d0			* Test write protect bit
-		sne	(a0)			* ... and save
-*
-		.page
-*
-flopvb02:	move.w	wpstatus(a5),d0		* Get wpstatus of drive A
-		or.w	d0,wplatch(a5)		* OR into wplatch
-		tst.w	deslflag(a5)		* Floppies already deselected ?
-		bne	flopvb03		* Jump if so
-*
-		move.b	DSKCMD(a6),d0		* Read WD1772 status
-		btst	#7,d0			* Motor-on bit set ?
-		bne	flopvb04		* Don't de-select if it is
-*
-		move.w	sr,-(a7)		* Save sr
-		ori.w	#IPL7,sr		* Disable interrupts
-		move.b	mc1iorec+cfr1,d0	* Get cfr1 image
-		bclr	#0,d0			* Clear d0  (drive select)
-		move.b	d0,mc1iorec+cfr1	* Save new value
-		move.b	d0,MC1ACIA+ACIA_CFR	* Send to hardware
-		move.w	(a7)+,sr		* Restore sr  (enable ints)
-		move.w	#1,deslflag(a5)		* Set the deselect flag
-*
-flopvb03:	clr.w	motoron(a5)		* Clear motoron flag
-*
-flopvb04:	movem.l	(a7)+,d0-d1/a0-a1/a5-a6	* Restore registers
-		rts				* Return to caller
-*
-		.page
-*
-* floplock -- Setup floppy parameters
-* --------    -----------------------
-floplock:	movem.l	d3-d7/a3-a6,flpregs	* Save registers
-		move.w	sr,flpsrsv		* Save sr
-		ori.w	#IPL7,sr		* Disable ints
-		sub.l	a5,a5			* Clear a5
-		lea	FLOPPY,a6		* Base of floppy registers
-		st	motoron(a5)		* Set motoron flag
-		move.w	d0,deferr(a5)		* Set default error code
-		move.w	d0,curerr(a5)		* ... current error code
-		move.w	#1,flock(a5)		* Disable flopvbl routine
-		move.l	8(a7),cdma(a5)		* Set cdma
-		move.w	16(a7),cdev(a5)		* ... cdev
-		move.w	18(a7),csect(a5)	* ... csect
-		move.w	20(a7),ctrack(a5)	* ... ctrack
-		move.w	22(a7),cside(a5)	* ... cside
-		move.w	24(a7),ccount(a5)	* ... ccount
-		move.w	#2,retrycnt(a5)		* ... retrycnt
-		lea	dsb0(a5),a1		* Address of dsb0
-		tst.w	cdev(a5)		* Drive A ?
-		beq	floplk01		* Jump if so
-*
-		lea	dsb1(a5),a1		* Drive B, use dsb1
-*
-floplk01:	moveq.l	#0,d7			* Clear out d7
-		move.w	ccount(a5),d7		* Get ccount
-		lsl.w	#8,d7			* ... * sector length  (512)
-		lsl.w	#1,d7			* ...
-		move.l	cdma(a5),a0		* Get DMA start address
-		add.l	d7,a0			* Add length of sectors
-		move.l	a0,edma(a5)		* Set edma  (end DMA address)
-		tst.w	0(a1)			* Check current track
-		bpl	floplk03		* Jump if >= 0
-*
-		bsr	select			* Select the drive
-		clr.w	0(a1)			* Set current track to 0
-		bsr	restore			* Restore drive to track 0
-		beq	floplk03		* Jump if OK
-*
-		moveq.l	#10,d7			* Seek out to track 10
-		bsr	hseek1			* ...
-		bne	floplk02		* Jump if an error occurred
-*
-		bsr	restore			* Try the restore again
-		beq	floplk03		* Jump if OK
-*
-floplk02:	move.w	#$FF00,0(a1)		* Recalibrate error
-*
-floplk03:	rts				* Return to caller
-*
-		.page
-*
-* flopfail -- Floppy I/O failure exit
-* --------    -----------------------
-flopfail:	moveq.l	#1,d0			* Set media change to "unsure"
-		bsr	setdmode		* ...
-		move.w	curerr(a5),d0		* Get curerr
-		ext.l	d0			* ...
-		bra	flopok1			* Go set end status
-*
-* flopok -- Floppy I/O success exit
-* ------    -----------------------
-flopok:		clr.l	d0			* Set error code = 0  (no error)
-*
-flopok1:	move.l	d0,-(a7)		* Push code onto stack
-		move.w	0(a1),d7		* Get track number
-		move.b	d7,DSKDAT(a6)		* Send to WD1772
-		move.w	#FL_SK,d6		* Seek command to d6
-		bsr	flopcmds		* Send command
-		move.w	cdev(a5),d0		* Get drive number
-		lsl.w	#2,d0			* Use as index
-		lea	acctim(a5),a0		* ... into acctim
-		move.l	_hz_200(a5),0(a0,d0)	* Set last access time
+
+		move.w	#1401-1,d1		| Set count = 1401
+		move.b	#0x4E,d0		| Write final gap
+		bsr	wmult			| ...
+		move.l	cdma(a5),a2		| Get buffer address
+		move.l	#0x40000,d7		| Set timeout count
+		move.w	ctrack(a5),d0		| Get track number
+		cmpi.w	#40,d0			| Do we need precomp ?
+		bcs	fmtrak08		| Jump if not
+
+		move.b	#FL_WT,DSKCMD(a6)	| Start format with precomp
+		bra	fmtrak07		| Go join main format loop
+
+fmtrak08:	move.b	#FL_WT+FL_NC,DSKCMD(a6)	| Start format without precomp
+
+		.page
+
+fmtrak07:	btst	#0,DSKCMD(a6)		| Busy yet ?
+		bne	fmtrak09		| Jump if so
+
+fmtrak04:	subq.l	#1,d7			| Decrement timeout counter
+		bne	fmtrak07		| Jump if not timed out
+
+fmtrak05:	bsr	rs1772			| Reset WD1772
+		moveq.l	#1,d7			| Set error flag
+		rts				| Return to caller
+
+fmtrak11:	btst	#0,DSKCMD(a6)		| Done ?
+		beq	fmtrak06		| Jump if so
+
+fmtrak09:	btst	#1,DSKCMD(a6)		| DRQ set ?
+		bne	fmtrak10		| Jump if so
+
+		subq.l	#1,d7			| Decrement timeout coutner
+		beq	fmtrak05		| Jump if timed out
+
+		bra	fmtrak11		| Go check again
+
+fmtrak10:	move.b	(a2)+,DSKDAT(a6)	| Write a byte of format
+		bra	fmtrak11		| Go wait for DRQ
+
+fmtrak06:	move.b	DSKCMD(a6),d0		| Get final status
+		bsr	errbits			| Set possible error code
+		andi.b	#0x44,d0		| Check error bits
+		rts				| Return to caller with status
+
+| wmult -- write multiple bytes into the track buffer
+| -----    ------------------------------------------
+wmult:		move.b	d0,(a2)+		| Move a byte into the buffer
+		dbf	d1,wmult		| Loop until we're done
+
+		rts				| Return to caller
+
+		.page
+
+| flopver -- verify sector(s) on a floppy
+| -------    ----------------------------
+flopver:	bsr	change			| Check for disk change
+		moveq.l	#ERR11,d0		| Set default to "read error"
+		bsr	floplock		| Set parameters
+		bsr	select			| Select drive and side
+		bsr	go2track		| Seek
+		bne	flopfail		| Jump if seek error
+
+		bsr	verify1			| Verify the data
+		bra	flopok			| Done
+
+| verify1 -- Verify the data for a sector
+| -------    ----------------------------
+verify1:	move.w	#ERR11,deferr(a5)	| Set default = "read error"
+		move.l	cdma(a5),a2		| Pointer for bad sector list
+		add.l	#512,cdma(a5)		| Update by length of a sector
+
+verify01:	move.w	#2,retrycnt(a5)		| Set retrycnt for 2 attempts
+		move.w	csect(a5),d7		| Get sector nubmer
+		move.b	d7,DSKSEC(a6)		| Send to WD1772
+
+verify02:	moveq.l	#0,d6			| Clear bad compare flag
+		move.l	cdma(a5),a0		| Get compare address
+		move.l	#0x40000,d7		| Set timeout counter
+		move.b	#FL_RS,DSKCMD(a6)	| Start the read
+
+verify08:	btst	#0,DSKCMD(a6)		| Busy yet ?
+		bne	verify09		| Jump if so
+
+		subq.l	#1,d7			| Decrement timeout counter
+		beq	verify13		| Jump if timed out
+
+		bra	verify08		| Wait for busy some more
+
+verify09:	move.l	#0x40000,d7		| Reset timeout counter
+		bra	verify11		| Go join main compare loop
+
+verify10:	subq.l	#1,d7			| Decrement timeout counter
+		beq	verify13		| Jump if timed out
+
+		btst	#0,DSKCMD(a6)		| Done yet ?
+		beq	verify12		| Jump if so
+
+		.page
+
+verify11:	btst	#1,DSKCMD(a6)		| DRQ set ?
+		beq	verify10		| Jump if not
+
+		move.b	DSKDAT(a6),d0		| Read data
+		bra	verify10		| Continue reading
+
+verify12:	move.b	DSKCMD(a6),d0		| Get final status
+		bsr	errbits			| Determine error code
+		and.b	#0x1C,d0		| Mask RNF, CRC, LOST
+		bne	verify06		| Jump to re-try if any set
+
+verify05:	addq.w	#1,csect(a5)		| Update sector number
+		subq.w	#1,ccount(a5)		| Update sector count
+		bne	verify01		| Jump if more to do
+
+		sub.l	#512,cdma(a5)		| Reset DMA pointer
+		clr.w	(a2)			| Set NIL in bad sector list
+		rts				| Return to caller
+
+verify06:	cmp.w	#1,retrycnt(a5)		| Is it the 2nd attempt ?
+		bne	verify07		| Jump if not
+
+		bsr	reseek			| Restore and re-seek
+
+verify07:	subq.w	#1,retrycnt(a5)		| Decrement retry count
+		bpl	verify02		| Re-try if still positive
+
+		move.w	csect(a5),(a2)+		| Add to bad sector list
+		bra	verify05		| Go do next sector
+
+verify13:	move.w	#ERR02,curerr(a5)	| Set timeout error code
+		bsr	rs1772			| Reset WD1772
+		bra	verify06		| See if we can retry it
+
+		.page
+
+| flopvbl -- Floppy VBL timer interrupt handling
+| -------    -----------------------------------
+flopvbl:	movem.l	d0-d1/a0-a1/a5-a6,-(a7)	| Save registers
+		sub.l	a5,a5			| Clear a5 for use as RAM base
+		lea	FLOPPY,a6		| Base of floppy regs
+		st	motoron(a5)		| Set motoron flag
+		move.l	frclock(a5),d0		| Get interrupt count
+		move.b	d0,d1			| ...
+		and.b	#7,d1			| ... MOD 8
+		bne	flopvb02		| Jump if not 8th int
+
+		move.w	sr,-(a7)		| Save interrupt level
+		ori.w	#IPL7,sr		| Mask off interrupts
+		clr.w	deslflag(a5)		| Clear deselect flag
+		move.b	mc1iorec+cfr1,d0	| Get port status
+		ori.b	#1,d0			| Set drive select bit
+		move.b	d0,MC1ACIA+ACIA_CFR	| Send drive select to port
+		move.b	d0,mc1iorec+cfr1	| Store updated port status
+		move.w	(a7)+,sr		| Restore interrupt level
+		lea	wpstatus(a5),a0		| Point at wpstatus for drive
+		lea	dsb0(a5),a1		| Point at dsb0
+		move.b	DSKCMD(a6),d0		| Read WD1772 status
+		btst	#6,d0			| Test write protect bit
+		sne	(a0)			| ... and save
+
+		.page
+
+flopvb02:	move.w	wpstatus(a5),d0		| Get wpstatus of drive A
+		or.w	d0,wplatch(a5)		| OR into wplatch
+		tst.w	deslflag(a5)		| Floppies already deselected ?
+		bne	flopvb03		| Jump if so
+
+		move.b	DSKCMD(a6),d0		| Read WD1772 status
+		btst	#7,d0			| Motor-on bit set ?
+		bne	flopvb04		| Don't de-select if it is
+
+		move.w	sr,-(a7)		| Save sr
+		ori.w	#IPL7,sr		| Disable interrupts
+		move.b	mc1iorec+cfr1,d0	| Get cfr1 image
+		bclr	#0,d0			| Clear d0  (drive select)
+		move.b	d0,mc1iorec+cfr1	| Save new value
+		move.b	d0,MC1ACIA+ACIA_CFR	| Send to hardware
+		move.w	(a7)+,sr		| Restore sr  (enable ints)
+		move.w	#1,deslflag(a5)		| Set the deselect flag
+
+flopvb03:	clr.w	motoron(a5)		| Clear motoron flag
+
+flopvb04:	movem.l	(a7)+,d0-d1/a0-a1/a5-a6	| Restore registers
+		rts				| Return to caller
+
+		.page
+
+| floplock -- Setup floppy parameters
+| --------    -----------------------
+floplock:	movem.l	d3-d7/a3-a6,flpregs	| Save registers
+		move.w	sr,flpsrsv		| Save sr
+		ori.w	#IPL7,sr		| Disable ints
+		sub.l	a5,a5			| Clear a5
+		lea	FLOPPY,a6		| Base of floppy registers
+		st	motoron(a5)		| Set motoron flag
+		move.w	d0,deferr(a5)		| Set default error code
+		move.w	d0,curerr(a5)		| ... current error code
+		move.w	#1,flock(a5)		| Disable flopvbl routine
+		move.l	8(a7),cdma(a5)		| Set cdma
+		move.w	16(a7),cdev(a5)		| ... cdev
+		move.w	18(a7),csect(a5)	| ... csect
+		move.w	20(a7),ctrack(a5)	| ... ctrack
+		move.w	22(a7),cside(a5)	| ... cside
+		move.w	24(a7),ccount(a5)	| ... ccount
+		move.w	#2,retrycnt(a5)		| ... retrycnt
+		lea	dsb0(a5),a1		| Address of dsb0
+		tst.w	cdev(a5)		| Drive A ?
+		beq	floplk01		| Jump if so
+
+		lea	dsb1(a5),a1		| Drive B, use dsb1
+
+floplk01:	moveq.l	#0,d7			| Clear out d7
+		move.w	ccount(a5),d7		| Get ccount
+		lsl.w	#8,d7			| ... | sector length  (512)
+		lsl.w	#1,d7			| ...
+		move.l	cdma(a5),a0		| Get DMA start address
+		add.l	d7,a0			| Add length of sectors
+		move.l	a0,edma(a5)		| Set edma  (end DMA address)
+		tst.w	0(a1)			| Check current track
+		bpl	floplk03		| Jump if >= 0
+
+		bsr	select			| Select the drive
+		clr.w	0(a1)			| Set current track to 0
+		bsr	restore			| Restore drive to track 0
+		beq	floplk03		| Jump if OK
+
+		moveq.l	#10,d7			| Seek out to track 10
+		bsr	hseek1			| ...
+		bne	floplk02		| Jump if an error occurred
+
+		bsr	restore			| Try the restore again
+		beq	floplk03		| Jump if OK
+
+floplk02:	move.w	#0xFF00,0(a1)		| Recalibrate error
+
+floplk03:	rts				| Return to caller
+
+		.page
+
+| flopfail -- Floppy I/O failure exit
+| --------    -----------------------
+flopfail:	moveq.l	#1,d0			| Set media change to "unsure"
+		bsr	setdmode		| ...
+		move.w	curerr(a5),d0		| Get curerr
+		ext.l	d0			| ...
+		bra	flopok1			| Go set end status
+
+| flopok -- Floppy I/O success exit
+| ------    -----------------------
+flopok:		clr.l	d0			| Set error code = 0  (no error)
+
+flopok1:	move.l	d0,-(a7)		| Push code onto stack
+		move.w	0(a1),d7		| Get track number
+		move.b	d7,DSKDAT(a6)		| Send to WD1772
+		move.w	#FL_SK,d6		| Seek command to d6
+		bsr	flopcmds		| Send command
+		move.w	cdev(a5),d0		| Get drive number
+		lsl.w	#2,d0			| Use as index
+		lea	acctim(a5),a0		| ... into acctim
+		move.l	_hz_200(a5),0(a0,d0)	| Set last access time
 		cmp.w	#1,nflops(a5)
 		bne	flopok01
-*
-		move.l	_hz_200(a5),4(a0)	* Time for other drive
-*
-flopok01:	move.w	flpsrsv,sr		* Restore sr  (enable ints)
-		move.l	(a7)+,d0		* Restore error number to d0
-		movem.l	flpregs,d3-d7/a3-a6	* Restore registers
-		clr.w	flock			* Release flopvbl routine
-		rts				* Return to caller
-*
-		.page
-*
-* hseek -- seek to track in ctrack
-* -----    -----------------------
-hseek:		move.w	ctrack,d7		* Get ctrack
-*
-* hseek1 -- seek to track in d7
-* ------    -------------------
-hseek1:		move.w	#ERR10,curerr		* Set curerr = "seek error"
-		move.b	d7,DSKDAT(a6)		* Send track number to WD1772
-		move.w	#FL_SK,d6		* Seek command
-		bra	flopcmds		* Go send command to WD1772
-*
-* reseek -- Restore, then re-seek
-* ------    ---------------------
-reseek:		move.w	#ERR10,curerr		* Set curerr = "seek error"
-		bsr	restore			* Restore
-		bne	reseek01		* Jump if error occurred
-*
-		clr.w	0(a1)			* Clear current track to 0
-		move.b	#0,DSKTRK(a6)		* Send track to WD1772
-		move.b	#5,DSKDAT(a6)		* Setup to seek to track 5
-		move.w	#FL_SK,d6		* Seek command
-		bsr	flopcmds		* Seek
-		bne	reseek01		* Jump if error
-*
-		move.w	#5,0(a1)		* Update current track = 5
-*
-* go2track -- seek with verify
-* --------    ----------------
-go2track:	move.w	#ERR10,curerr(a5)	* Set curerr = "seek error"
-		move.w	ctrack(a5),d7		* Put track # in d7
-		move.b	d7,DSKDAT(a6)		* Send track to WD1772
-		moveq.l	#FL_SV,d6		* Seek/verify command
-		bsr	flopcmds		* Send command to floppy
-		bne	reseek01		* Jump if error occurred
-*
-		move.w	ctrack(a5),0(a1)	* Update track number in dsb
-		and.b	#$18,d7			* Test for RNF, CRC, LOST
-*
-reseek01:	rts				* Return to caller
-*
-		.page
-*
-* restore -- Restore to track 0
-* -------    ------------------
-restore:	clr.w	d6			* Restore command
-		bsr	flopcmds		* Send to WD1772
-		bne	restor01		* Jump if an error occurred
-*
-		btst	#2,d7			* Check track 0 bit
-		eori	#0004,sr		* Invert Z flag in 680000 sr
-		bne	restor01		* Jump if not track 0
-*
-		clr.w	0(a1)			* Set track = 0 in dsb
-*
-restor01:	rts				* Return to caller
-*
-* flopcmds -- Send command to WD1772 floppy controller
-* --------    ----------------------------------------
-flopcmds:	move.w	2(a1),d0		* Get seek rate from dsb
-		and.b	#$3,d0			* ...
-		or.b	d0,d6			* OR into command word
-		move.l	#$40000,d7		* Set timeout counter
-		btst	#7,DSKCMD(a6)		* Motor on ?
-		bne	flopcm01		* Jump if so
-*
-		move.l	#$60000,d7		* Set longer timeout count
-*
-flopcm01:	move.b	d6,DSKCMD(a6)		* Write command from d6
-*
-		move.l	#$1000,d0		* Set initial busy timeout in d0
-*
-flopcm04:	btst	#0,DSKCMD(a6)		* Controller busy yet ?
-		bne	flopcm02		* Jump if so
-*
-		subq.l	#1,d0			* Decrement timeout counter
-		beq	flopcm03		* Jump if timed out
-*
-		bra	flopcm04		* Wait for busy some more
-*
-flopcm02:	subq.l	#1,d7			* Decrement timeout counter
-		beq	flopcm03		* Jump if timed out
-*
-		btst	#0,DSKCMD(a6)		* WD1772 done ?
-		bne	flopcm02		* Jump if not
-*
-		clr.l	d7			* Clear out upper bits of d7
-		move.b	DSKCMD(a6),d7		* Read status into LS byte of d7
-		clr.l	d6			* Clear error flag in d6
-		rts				* Return to caller
-*
-flopcm03:	bsr	rs1772			* Reset WD1772  (end transfer)
-		moveq.l	#1,d6			* Set error flag in d6
-		rts				* Return to caller
-*
-		.page
-*
-* rs1772 -- Reset WD1772 floppy controller
-* ------    ------------------------------
-rs1772:		move.b	#FL_FR,DSKCMD(a6)	* Send reset to WD1772
-		move.w	#15,d7			* Set delay count
-*
-rs1772a:	dbf	d7,rs1772a		* Delay a while
-		rts				* Return to caller
-*
-* select -- Select drive and side
-* ------    ----------------------
-select:		move.w	sr,-(a7)		* Save sr on stack
-		ori.w	#IPL7,sr		* Disable interrupts
-		clr.w	deslflag(a5)		* Clear deselect flag
-		move.b	mc1iorec+cfr1,d0	* Get current MC1 cfr1 image
-		ori.b	#1,d0			* Select drive  (we only have 1)
-		move.b	d0,mc1iorec+cfr1	* Store updated image
-		move.b	d0,MC1ACIA+ACIA_CFR	* Send it to the MC1 ACIA
-		move.w	cside(a5),d0		* Get side number  (LS bit)
-		and.w	#1,d0			* Mask off garbage bits
-		andi.b	#$FE,mc2iorec+cfr1	* Mask off D0 in MC2 cfr1 image
-		or.b	mc2iorec+cfr1,d0	* OR side with mc2iorec cfr1
-		move.b	d0,mc2iorec+cfr1	* Store updated cfr1 image
-		move.b	d0,MC2ACIA+ACIA_CFR	* Send it to the MC2 ACIA
-		move.w	(a7)+,sr		* Restore interrupts
-		move.w	0(a1),d7		* Get track from dsb
-		move.b	d7,DSKTRK(a6)		* Send it to the WD1772
-		clr.b	tmpdma(a5)		* Clear bits 31..24 of tmpdma
-*
-select1:	move.w	csect(a5),d7		* Get sector number
-		move.b	d7,DSKSEC(a6)		* Send it to the WD1772
-		move.l	cdma(a5),a0		* Setup transfer address in a0
-		rts				* Return to caller
-*
-		.page
-*
-* change -- Check for disk change status
-* ------    ----------------------------
-change:		cmp.w	#1,nflops		* Check # of floppies
+
+		move.l	_hz_200(a5),4(a0)	| Time for other drive
+
+flopok01:	move.w	flpsrsv,sr		| Restore sr  (enable ints)
+		move.l	(a7)+,d0		| Restore error number to d0
+		movem.l	flpregs,d3-d7/a3-a6	| Restore registers
+		clr.w	flock			| Release flopvbl routine
+		rts				| Return to caller
+
+		.page
+
+| hseek -- seek to track in ctrack
+| -----    -----------------------
+hseek:		move.w	ctrack,d7		| Get ctrack
+
+| hseek1 -- seek to track in d7
+| ------    -------------------
+hseek1:		move.w	#ERR10,curerr		| Set curerr = "seek error"
+		move.b	d7,DSKDAT(a6)		| Send track number to WD1772
+		move.w	#FL_SK,d6		| Seek command
+		bra	flopcmds		| Go send command to WD1772
+
+| reseek -- Restore, then re-seek
+| ------    ---------------------
+reseek:		move.w	#ERR10,curerr		| Set curerr = "seek error"
+		bsr	restore			| Restore
+		bne	reseek01		| Jump if error occurred
+
+		clr.w	0(a1)			| Clear current track to 0
+		move.b	#0,DSKTRK(a6)		| Send track to WD1772
+		move.b	#5,DSKDAT(a6)		| Setup to seek to track 5
+		move.w	#FL_SK,d6		| Seek command
+		bsr	flopcmds		| Seek
+		bne	reseek01		| Jump if error
+
+		move.w	#5,0(a1)		| Update current track = 5
+
+| go2track -- seek with verify
+| --------    ----------------
+go2track:	move.w	#ERR10,curerr(a5)	| Set curerr = "seek error"
+		move.w	ctrack(a5),d7		| Put track # in d7
+		move.b	d7,DSKDAT(a6)		| Send track to WD1772
+		moveq.l	#FL_SV,d6		| Seek/verify command
+		bsr	flopcmds		| Send command to floppy
+		bne	reseek01		| Jump if error occurred
+
+		move.w	ctrack(a5),0(a1)	| Update track number in dsb
+		and.b	#0x18,d7		| Test for RNF, CRC, LOST
+
+reseek01:	rts				| Return to caller
+
+		.page
+
+| restore -- Restore to track 0
+| -------    ------------------
+restore:	clr.w	d6			| Restore command
+		bsr	flopcmds		| Send to WD1772
+		bne	restor01		| Jump if an error occurred
+
+		btst	#2,d7			| Check track 0 bit
+		eori	#0004,sr		| Invert Z flag in 680000 sr
+		bne	restor01		| Jump if not track 0
+
+		clr.w	0(a1)			| Set track = 0 in dsb
+
+restor01:	rts				| Return to caller
+
+| flopcmds -- Send command to WD1772 floppy controller
+| --------    ----------------------------------------
+flopcmds:	move.w	2(a1),d0		| Get seek rate from dsb
+		and.b	#0x3,d0			| ...
+		or.b	d0,d6			| OR into command word
+		move.l	#0x40000,d7		| Set timeout counter
+		btst	#7,DSKCMD(a6)		| Motor on ?
+		bne	flopcm01		| Jump if so
+
+		move.l	#0x60000,d7		| Set longer timeout count
+
+flopcm01:	move.b	d6,DSKCMD(a6)		| Write command from d6
+
+		move.l	#0x1000,d0		| Set initial busy timeout in d0
+
+flopcm04:	btst	#0,DSKCMD(a6)		| Controller busy yet ?
+		bne	flopcm02		| Jump if so
+
+		subq.l	#1,d0			| Decrement timeout counter
+		beq	flopcm03		| Jump if timed out
+
+		bra	flopcm04		| Wait for busy some more
+
+flopcm02:	subq.l	#1,d7			| Decrement timeout counter
+		beq	flopcm03		| Jump if timed out
+
+		btst	#0,DSKCMD(a6)		| WD1772 done ?
+		bne	flopcm02		| Jump if not
+
+		clr.l	d7			| Clear out upper bits of d7
+		move.b	DSKCMD(a6),d7		| Read status into LS byte of d7
+		clr.l	d6			| Clear error flag in d6
+		rts				| Return to caller
+
+flopcm03:	bsr	rs1772			| Reset WD1772  (end transfer)
+		moveq.l	#1,d6			| Set error flag in d6
+		rts				| Return to caller
+
+		.page
+
+| rs1772 -- Reset WD1772 floppy controller
+| ------    ------------------------------
+rs1772:		move.b	#FL_FR,DSKCMD(a6)	| Send reset to WD1772
+		move.w	#15,d7			| Set delay count
+
+rs1772a:	dbf	d7,rs1772a		| Delay a while
+		rts				| Return to caller
+
+| select -- Select drive and side
+| ------    ----------------------
+select:		move.w	sr,-(a7)		| Save sr on stack
+		ori.w	#IPL7,sr		| Disable interrupts
+		clr.w	deslflag(a5)		| Clear deselect flag
+		move.b	mc1iorec+cfr1,d0	| Get current MC1 cfr1 image
+		ori.b	#1,d0			| Select drive  (we only have 1)
+		move.b	d0,mc1iorec+cfr1	| Store updated image
+		move.b	d0,MC1ACIA+ACIA_CFR	| Send it to the MC1 ACIA
+		move.w	cside(a5),d0		| Get side number  (LS bit)
+		and.w	#1,d0			| Mask off garbage bits
+		andi.b	#0xFE,mc2iorec+cfr1	| Mask off D0 in MC2 cfr1 image
+		or.b	mc2iorec+cfr1,d0	| OR side with mc2iorec cfr1
+		move.b	d0,mc2iorec+cfr1	| Store updated cfr1 image
+		move.b	d0,MC2ACIA+ACIA_CFR	| Send it to the MC2 ACIA
+		move.w	(a7)+,sr		| Restore interrupts
+		move.w	0(a1),d7		| Get track from dsb
+		move.b	d7,DSKTRK(a6)		| Send it to the WD1772
+		clr.b	tmpdma(a5)		| Clear bits 31..24 of tmpdma
+
+select1:	move.w	csect(a5),d7		| Get sector number
+		move.b	d7,DSKSEC(a6)		| Send it to the WD1772
+		move.l	cdma(a5),a0		| Setup transfer address in a0
+		rts				| Return to caller
+
+		.page
+
+| change -- Check for disk change status
+| ------    ----------------------------
+change:		cmp.w	#1,nflops		| Check # of floppies
 		bne	change02
-*
-		move.w	16(a7),d0		* Drive number to d0
+
+		move.w	16(a7),d0		| Drive number to d0
 		cmp.w	disknum,d0
-		beq	change01		* Jump if =
-*
-		move.w	d0,-(a7)		* Stack drive number
-		move.w	#ERR17,-(a7)		* Stack error code
-		bsr	criter			* Do critical error routine
-		addq.w	#4,a7			* Cleanup stack
-		move.w	#$FFFF,wplatch		* Status for drives = "unsure"
-		move.w	16(a7),disknum		* Save disk number
-*
-change01:	clr.w	16(a7)			* Clear disk number
-*
-change02:	rts				* Return to caller
-*
-* setdmode -- Set drive change mode
-* --------    ---------------------
-setdmode:	lea	dskmode,a0		* Point at disk mode table
-		move.b	d0,-(a7)		* Save mode on stack
-		move.w	cdev(a5),d0		* Get drive number
-		move.b	(a7)+,0(a0,d0)		* Set drive mode / cleanup stack
-		rts				* Return to caller
-*
-		.page
-*
-* bootload -- Load boot sector
-* --------    ----------------
-bootload:	link	a6,#0			* Link stack frames
-		movem.l	d6-d7,-(a7)		* Save registers
-		jsr	_hdvini			* Init drive
-		tst.w	nflops			* See if any connected
-		beq	bootld01		* Jump if drive there
-*
-		moveq.l	#1,d0			* "couldn't load"
+		beq	change01		| Jump if =
+
+		move.w	d0,-(a7)		| Stack drive number
+		move.w	#ERR17,-(a7)		| Stack error code
+		bsr	criter			| Do critical error routine
+		addq.w	#4,a7			| Cleanup stack
+		move.w	#0xFFFF,wplatch		| Status for drives = "unsure"
+		move.w	16(a7),disknum		| Save disk number
+
+change01:	clr.w	16(a7)			| Clear disk number
+
+change02:	rts				| Return to caller
+
+| setdmode -- Set drive change mode
+| --------    ---------------------
+setdmode:	lea	dskmode,a0		| Point at disk mode table
+		move.b	d0,-(a7)		| Save mode on stack
+		move.w	cdev(a5),d0		| Get drive number
+		move.b	(a7)+,0(a0,d0)		| Set drive mode / cleanup stack
+		rts				| Return to caller
+
+		.page
+
+| bootload -- Load boot sector
+| --------    ----------------
+bootload:	link	a6,#0			| Link stack frames
+		movem.l	d6-d7,-(a7)		| Save registers
+		jsr	_hdvini			| Init drive
+		tst.w	nflops			| See if any connected
+		beq	bootld01		| Jump if drive there
+
+		moveq.l	#1,d0			| "couldn't load"
 		bra	bootld02
-*
-bootld01:	moveq.l	#2,d0			* "no drive connected"
-*
-bootld02:	move.w	d0,d7			* Save possible error in d7
+
+bootld01:	moveq.l	#2,d0			| "no drive connected"
+
+bootld02:	move.w	d0,d7			| Save possible error in d7
 		tst.w	nflops
 		beq	bootld04
-*
+
 		cmp.w	#2,bootdev
 		bge	bootld04
-*
-		move.w	#1,(a7)			* Sector count = 1,
-		clr.w	-(a7)			* ... side = 0,
-		clr.w	-(a7)			* ... track = 0,
-		move.w	#1,-(a7)		* ... sector = 1,
-		move.w	bootdev,-(a7)		* ... drive = bootdev,
-		clr.l	-(a7)			* ... filler,
-		move.l	#buffer,-(a7)		* ... buffer address
-		jsr	floprd			* Read the sector
-		add.l	#16,a7			* Cleanup stack
-		tst.l	d0			* Error ?
-		bne	bootld03		* Jump if not
-*
+
+		move.w	#1,(a7)			| Sector count = 1,
+		clr.w	-(a7)			| ... side = 0,
+		clr.w	-(a7)			| ... track = 0,
+		move.w	#1,-(a7)		| ... sector = 1,
+		move.w	bootdev,-(a7)		| ... drive = bootdev,
+		clr.l	-(a7)			| ... filler,
+		move.l	#buffer,-(a7)		| ... buffer address
+		jsr	floprd			| Read the sector
+		add.l	#16,a7			| Cleanup stack
+		tst.l	d0			| Error ?
+		bne	bootld03		| Jump if not
+
 		clr.w	d7
 		bra	bootld04
-*
+
 bootld03:	tst.b	wpstatus
 		bne	bootld04
-*
-		moveq.l	#3,d0			* "unreadable"
+
+		moveq.l	#3,d0			| "unreadable"
 		bra	bootld07
-*
+
 bootld04:	tst.w	d7
 		beq	bootld05
-*
-		move.w	d7,d0			* Get old error code
+
+		move.w	d7,d0			| Get old error code
 		bra	bootld07
-*
-		.page
-*
-bootld05:	move.w	#256,(a7)		* Set count for 256 words
-		move.l	#buffer,-(a7)		* Point at buffer
-		bsr	chksum			* Calculate checksum
-		addq.l	#4,a7			* Cleanup stack
-		cmp.w	#$1234,d0		* Boot sector checksum ?
-		bne	bootld06		* Jump if not
-*
-		clr.w	d0			* Set flag for OK
-		move.w	bootdev,booted		* Save last boot device
+
+		.page
+
+bootld05:	move.w	#256,(a7)		| Set count for 256 words
+		move.l	#buffer,-(a7)		| Point at buffer
+		bsr	chksum			| Calculate checksum
+		addq.l	#4,a7			| Cleanup stack
+		cmp.w	#0x1234,d0		| Boot sector checksum ?
+		bne	bootld06		| Jump if not
+
+		clr.w	d0			| Set flag for OK
+		move.w	bootdev,booted		| Save last boot device
 		bra	bootld07
-*
-bootld06:	moveq.l	#4,d0			* "not valid boot sector"
-*
+
+bootld06:	moveq.l	#4,d0			| "not valid boot sector"
+
 bootld07:	tst.l	(a7)+
-		movem.l	(a7)+,d7		* Restore registers
+		movem.l	(a7)+,d7		| Restore registers
 		unlk	a6
-		rts				* Return to caller
-*
-		.page
-*
-* chksum -- caluculate checksum
-* ------    -------------------
+		rts				| Return to caller
+
+		.page
+
+| chksum -- caluculate checksum
+| ------    -------------------
 chksum:		link	a6,#0
-		movem.l	d6-d7,-(a7)		* Preserve registers
-		clr.w	d7			* Clear sum
-		bra	chksum02		* Jump into loop
-*
-chksum01:	move.l	8(a6),a0		* Get buffer address
-		move.w	(a0),d0			* Get word
-		add.w	d0,d7			* Add to checksum in d7
-		addq.l	#2,8(a6)		* Update buffer address
-*
-chksum02:	move.w	12(a6),d0		* Get word count
-		subq.w	#1,12(a6)		* Decrement it
-		tst.w	d0			* Done ?
-		bne	chksum01		* Loop if not
-*
-		move.w	d7,d0			* Put result in d0
+		movem.l	d6-d7,-(a7)		| Preserve registers
+		clr.w	d7			| Clear sum
+		bra	chksum02		| Jump into loop
+
+chksum01:	move.l	8(a6),a0		| Get buffer address
+		move.w	(a0),d0			| Get word
+		add.w	d0,d7			| Add to checksum in d7
+		addq.l	#2,8(a6)		| Update buffer address
+
+chksum02:	move.w	12(a6),d0		| Get word count
+		subq.w	#1,12(a6)		| Decrement it
+		tst.w	d0			| Done ?
+		bne	chksum01		| Loop if not
+
+		move.w	d7,d0			| Put result in d0
 		tst.l	(a7)+
-		movem.l	(a7)+,d7		* Restore registers
+		movem.l	(a7)+,d7		| Restore registers
 		unlk	a6
-		rts				* Return to caller
-*
-		.page
-*
-* mult32 -- 32 bit signed multiply
-* ------    ----------------------
+		rts				| Return to caller
+
+		.page
+
+| mult32 -- 32 bit signed multiply
+| ------    ----------------------
 mult32:		link	a6,#-4
 		clr.w	d2
 		tst.l	8(a6)
 		bge	mult32a
-*
+
 		neg.l	8(a6)
 		addq.w	#1,d2
-*
+
 mult32a:	tst.l	12(a6)
 		bge	mult32b
-*
+
 		neg.l	12(a6)
 		addq.w	#1,d2
-*
+
 mult32b:	move.w	10(a6),d0
 		mulu	14(a6),d0
@@ -3032,429 +3032,429 @@
 		btst	#0,d2
 		beq	mult32c
-*
+
 		neg.l	d0
-*
+
 mult32c:	unlk	a6
 		rts
-*
-		.page
-*
-* rand -- Generate a random number
-* ----    ------------------------
-rand:		link	a6,#-4			* Reserve stack for temps
-		tst.l	rseed			* See if the seed is zero
-		bne	rand01			* Jump if not
-*
-		move.l	_hz_200,d0		* Pick up the 200 Hz clock
-		moveq.l	#16,d1			* Shift it left
-		asl.l	d1,d0			* ...
-		or.l	_hz_200,d0		* OR in current 200 Hz clock
-		move.l	d0,rseed		* Use that as the seed
-*
-rand01:		move.l	#$BB40E62D,-(a7)	* Put PI on the stack
-		move.l	rseed,-(a7)		* ... and rseed, too
-		bsr	mult32			* Multiply them
-		addq.l	#8,a7			* Cleanup stack
-		addq.l	#1,d0			* Add 1 to the result
-		move.l	d0,rseed		* Save as new seed
+
+		.page
+
+| rand -- Generate a random number
+| ----    ------------------------
+rand:		link	a6,#-4			| Reserve stack for temps
+		tst.l	rseed			| See if the seed is zero
+		bne	rand01			| Jump if not
+
+		move.l	_hz_200,d0		| Pick up the 200 Hz clock
+		moveq.l	#16,d1			| Shift it left
+		asl.l	d1,d0			| ...
+		or.l	_hz_200,d0		| OR in current 200 Hz clock
+		move.l	d0,rseed		| Use that as the seed
+
+rand01:		move.l	#0xBB40E62D,-(a7)	| Put PI on the stack
+		move.l	rseed,-(a7)		| ... and rseed, too
+		bsr	mult32			| Multiply them
+		addq.l	#8,a7			| Cleanup stack
+		addq.l	#1,d0			| Add 1 to the result
+		move.l	d0,rseed		| Save as new seed
 		move.l	rseed,d0
-		asr.l	#8,d0			* Make it a 24 bit number
-		and.l	#$FFFFFF,d0		* ...
-		unlk	a6			* Release stack
-		rts				* Return to caller
-*
-		.page
-*
-* protobt -- Generate a prototype boot sector
-* -------    --------------------------------
+		asr.l	#8,d0			| Make it a 24 bit number
+		and.l	#0xFFFFFF,d0		| ...
+		unlk	a6			| Release stack
+		rts				| Return to caller
+
+		.page
+
+| protobt -- Generate a prototype boot sector
+| -------    --------------------------------
 protobt:	link	a6,#-6
-		movem.l	d5-d7/a5,-(a7)		* Save registers
-		tst.w	18(a6)			* Test execflg
-		bge	protbt03		* Jump if set
-*
-		move.w	#256,(a7)		* Count = 256 words
-		move.l	8(a6),-(a7)		* Address of buffer
-		bsr	chksum			* Calculate checksum
-		addq.l	#4,a7			* Cleanup stack
-		cmp.w	#$1234,d0		* Boot checksum ?
-		beq	protbt01		* Jump if so
-*
-		clr.w	d0			* Not executable
+		movem.l	d5-d7/a5,-(a7)		| Save registers
+		tst.w	18(a6)			| Test execflg
+		bge	protbt03		| Jump if set
+
+		move.w	#256,(a7)		| Count = 256 words
+		move.l	8(a6),-(a7)		| Address of buffer
+		bsr	chksum			| Calculate checksum
+		addq.l	#4,a7			| Cleanup stack
+		cmp.w	#0x1234,d0		| Boot checksum ?
+		beq	protbt01		| Jump if so
+
+		clr.w	d0			| Not executable
 		bra	protbt02
-*
-protbt01:	moveq.l	#1,d0			* Executable
-*
-protbt02:	move.w	d0,18(a6)		* Set execflg
-*
-protbt03:	tst.l	12(a6)			* Serial number ?
-		blt	protbt07		* Jump if not to be changed
-*
-		move.l	12(a6),d0		* Get it into d0
-		cmp.l	#$FFFFFF,d0		* > $FFFFFF
-		ble	protbt04		* Jump if not
-*
-		bsr	rand			* Generate a random number
-		move.l	d0,12(a6)		* Save as s/n
-*
-protbt04:	clr.w	d7			* Clear counter
-		bra	protbt06		* Enter move loop
-*
-		.page
-*
-protbt05:	move.l	12(a6),d0		* Get s/n
-		and.l	#$FF,d0			* Isolate low 8 bits
-		move.w	d7,a1			* Point to next byte
-		add.l	8(a6),a1		* ...
-		move.b	d0,8(a1)		* Write byte in buffer
-		move.l	12(a6),d0		* Get s/n
-		asr.l	#8,d0			* Shift right 8 bits
-		move.l	d0,12(a6)		* Save shifted value
-		addq.w	#1,d7			* Update counter
-*
-protbt06:	cmp.w	#3,d7			* See if we're done
-		blt	protbt05		* Loop if not
-*
-protbt07:	tst.w	16(a6)			* Diskette size ?
-		blt	protbt10		* Jump if not to be changed
-*
-		move.w	16(a6),d6		* Get diskette size
-		muls.w	#19,d6			* ... times 19 as pointer
-		clr.w	d7			* Clear counter
-		bra	protbt09		* Go move in BPB
-*
-protbt08:	move.w	d7,a0			* Get counter
-		add.l	8(a6),a0		* Add base of buffer
-		move.w	d6,a1			* Get BPB pointer
-		add.l	#pbpbtab,a1		* Add base of prototype BPB's
-		move.b	(a1),11(a0)		* Copy BPB data
-		addq.w	#1,d6			* Update pointer
-		addq.w	#1,d7			* Update counter
-*
-protbt09:	cmp.w	#19,d7			* Done ?
-		blt	protbt08		* Loop if not
-*
+
+protbt01:	moveq.l	#1,d0			| Executable
+
+protbt02:	move.w	d0,18(a6)		| Set execflg
+
+protbt03:	tst.l	12(a6)			| Serial number ?
+		blt	protbt07		| Jump if not to be changed
+
+		move.l	12(a6),d0		| Get it into d0
+		cmp.l	#0xFFFFFF,d0		| > 0xFFFFFF
+		ble	protbt04		| Jump if not
+
+		bsr	rand			| Generate a random number
+		move.l	d0,12(a6)		| Save as s/n
+
+protbt04:	clr.w	d7			| Clear counter
+		bra	protbt06		| Enter move loop
+
+		.page
+
+protbt05:	move.l	12(a6),d0		| Get s/n
+		and.l	#0xFF,d0		| Isolate low 8 bits
+		move.w	d7,a1			| Point to next byte
+		add.l	8(a6),a1		| ...
+		move.b	d0,8(a1)		| Write byte in buffer
+		move.l	12(a6),d0		| Get s/n
+		asr.l	#8,d0			| Shift right 8 bits
+		move.l	d0,12(a6)		| Save shifted value
+		addq.w	#1,d7			| Update counter
+
+protbt06:	cmp.w	#3,d7			| See if we're done
+		blt	protbt05		| Loop if not
+
+protbt07:	tst.w	16(a6)			| Diskette size ?
+		blt	protbt10		| Jump if not to be changed
+
+		move.w	16(a6),d6		| Get diskette size
+		muls.w	#19,d6			| ... times 19 as pointer
+		clr.w	d7			| Clear counter
+		bra	protbt09		| Go move in BPB
+
+protbt08:	move.w	d7,a0			| Get counter
+		add.l	8(a6),a0		| Add base of buffer
+		move.w	d6,a1			| Get BPB pointer
+		add.l	#pbpbtab,a1		| Add base of prototype BPB's
+		move.b	(a1),11(a0)		| Copy BPB data
+		addq.w	#1,d6			| Update pointer
+		addq.w	#1,d7			| Update counter
+
+protbt09:	cmp.w	#19,d7			| Done ?
+		blt	protbt08		| Loop if not
+
 protbt10:	clr.w	-6(a6)
 		move.l	8(a6),-4(a6)
 		bra	protbt12
-*
-		.page
-*
-protbt11:	move.l	-4(a6),a0		* Get buffer pointer
-		move.w	(a0),d0			* Get word from buffer
-		add.w	d0,-6(a6)		* Sum for checksum
-		addq.l	#2,-4(a6)		* Point at next word
-*
-protbt12:	move.l	8(a6),d0		* Get buffer address
-		add.l	#$1FE,d0		* Plus sector length
-		cmp.l	-4(a6),d0		* Done ?
-		bhi	protbt11		* Loop if not
-*
-		move.w	#$1234,d0		* Checksum for boot sector
-		sub.w	-6(a6),d0		* Subtract checksum for buffer
+
+		.page
+
+protbt11:	move.l	-4(a6),a0		| Get buffer pointer
+		move.w	(a0),d0			| Get word from buffer
+		add.w	d0,-6(a6)		| Sum for checksum
+		addq.l	#2,-4(a6)		| Point at next word
+
+protbt12:	move.l	8(a6),d0		| Get buffer address
+		add.l	#0x1FE,d0		| Plus sector length
+		cmp.l	-4(a6),d0		| Done ?
+		bhi	protbt11		| Loop if not
+
+		move.w	#0x1234,d0		| Checksum for boot sector
+		sub.w	-6(a6),d0		| Subtract checksum for buffer
 		move.l	-4(a6),a1
-		move.w	d0,(a1)			* Store checksum in buffer
-		tst.w	18(a6)			* Check execflg
-		bne	protbt13		* Boot sector to be executable ?
-*
-		move.l	-4(a6),a0		* Mung checksum so it's not
+		move.w	d0,(a1)			| Store checksum in buffer
+		tst.w	18(a6)			| Check execflg
+		bne	protbt13		| Boot sector to be executable ?
+
+		move.l	-4(a6),a0		| Mung checksum so it's not
 		addq.w	#1,(a0)
-*
+
 protbt13:	tst.l	(a7)+
-		movem.l	(a7)+,d6-d7/a5		* Restore registers
-		unlk	a6			* Release stack
-		rts				* Return to caller
-*
-		.endc
-*
-* criter -- Critical error handler
-* ------    ----------------------
-criter:		move.l	critvec,-(a7)		* Put error vector on stack
-		moveq.l	#-1,d0			* Set default error return
-		rts				* "Return" to handler
-*
-		.page
-*
+		movem.l	(a7)+,d6-d7/a5		| Restore registers
+		unlk	a6			| Release stack
+		rts				| Return to caller
+
+		.endc
+
+| criter -- Critical error handler
+| ------    ----------------------
+criter:		move.l	critvec,-(a7)		| Put error vector on stack
+		moveq.l	#-1,d0			| Set default error return
+		rts				| "Return" to handler
+
+		.page
+
 		.ifne	BUCHLA
-*
-* api_int -- Analog processor interrupt handler
-* -------    ----------------------------------
-api_int:	movem.l	d0-d1/a0-a1,-(a7)	* Save registers
-		clr.l	d0			* Read input port
-		move.b	ANALOG,d0		* ... into d0[7..0]
-		move.b	d0,api_inp		* ... and api_inp
-		btst	#7,d0			* Check for signal number flag
-		bne	api_s0a			* Jump if signal number read
-*
-		lea	api_tv,a0		* Get api_tv base in a0
-		clr.w	d1			* Get api_sv in d1
-		move.b	api_sv,d1		* ...
-		cmpi.b	#6,d1			* Check range
-		bgt	api_sve			* Jump if out of range
-*
-		lsl.w	#2,d1			* Develop jump address
-		move.l	0(a0,d1.W),a1		* ... from api_tv in a1
-		jmp	(a1)			* Jump to state handler
-*
-api_s0:		btst	#7,d0			* Check for signal number flag
-		beq	api_ret			* Jump if not signal number
-*
-api_s0a:	clr.b	api_val			* Clear value byte
-		andi.b	#$7F,d0			* Mask off signal number flag
-		cmpi.b	#82,d0			* See if it's in range
-		bgt	api_err			* Jump if out of range (GT 82)
-*
-		move.b	d0,api_sig		* Store signal number
-		beq	api_pub			* Jump if it was "all off"
-*
-		lea	api_tab,a0		* Get sv table base
-		move.b	0(a0,d0.W),api_sv	* Set sv for next time
-*
-api_ret:	movem.l	(a7)+,d0-d1/a0-a1	* Restore registers
-		rte				* Return to interrupted code
-*
-api_err:	move.b	d0,api_bug		* Catch the bug
-		clr.b	api_sv			* Force state zero
-		bra	api_ret			* Go back to interrupted code
-*
-api_sve:	move.b	d1,api_svb		* Catch the bug
-		clr.b	api_sv			* Force state zero
-		bra	api_ret			* Go back to interrupted code
-*
-		.page
-api_s1:		btst	#0,d0			* See if it takes a value
-		beq	api_s1a			* Jump if not
-*
-		move.b	#2,api_sv		* Set sv for state 2
-		bra	api_ret			* Go return from interrupt
-*
-api_s1a:	clr.b	api_val			* Clear value byte
-		bra	api_pub			* Go output to fifo
-*
-api_s2:		ori.b	#$80,d0			* Set status = 1
-		move.b	d0,api_val		* Set value byte
-		bra	api_pub			* Go output to fifo
-*
-api_s3:		ror.b	#1,d0			* Set status in value byte
-		andi.b	#$80,d0			* ...
-		move.b	d0,api_val		* ...
-		move.b	#4,api_sv		* Set sv for state 4
-		bra	api_ret			* Go return from interrupt
-*
-api_s4:		or.b	d0,api_val		* Set value byte
-		bra	api_pub			* Go output to fifo
-*
-api_s5:		ror.b	#1,d0			* Set status in value byte
-		andi.b	#$80,d0			* ...
-*
-api_s6:		move.b	d0,api_val		* Set value byte
-*
-api_pub:	movea.l	api_fi,a0		* Get fifo input pointer in a0
-		move.w	api_sig,(a0)+		* Store new input
-		cmpa.l	#api_fe,a0		* Wrap around ?
-		blt	api_pb1			* Jump if not
-*
-		movea.l	#api_fum,a0		* Wrap input pointer to start
-*
-api_pb1:	move.l	a0,api_fi		* Update input pointer
-		cmpa.l	api_fo,a0		* Buffer full ?
-		bne	api_pb3			* Jump if not
-*
-		movea.l	api_fo,a1		* Get fifo output pointer in a1
-		adda.l	#2,a1			* Increment it
-		cmpa.l	#api_fe,a1		* Wrap around ?
-		blt	api_pb2			* Jump if not
-*
-		movea.l	#api_fum,a1		* Wrap output pointer to start
-*
-api_pb2:	move.l	a1,api_fo		* Set new output pointer
-*
-api_pb3:	clr.b	api_sv			* Set state to 0
-		bra	api_ret			* Return from interrupt
-*
-		.page
-*
-* api_get -- Get analog input
-* -------    ----------------
-api_get:	move.w	sr,-(a7)		* Save status register
-		ori.w	#IPL3,sr		* Disable ANALOG I/O interrupts
-		movea.l	api_fo,a0		* Get fifo output pointer
-		cmpa.l	api_fi,a0		* See if fifo is empty
-		bne	api_g1			* Jump if not
-*
-		moveq.l	#-1,d0			* Set empty-fifo value
-		move.w	(a7)+,sr		* Restore interrupt mask
-		rts				* Return to caller
-*
-api_g1:		clr.l	d0			* Get fifo value
-		move.w	(a0)+,d0		* ...
-		cmpa.l	#api_fe,a0		* See if pointer wrapped
-		blt	api_g2			* Jump if not
-*
-		movea.l	#api_fum,a0		* Wrap the pointer around
-*
-api_g2:		move.l	a0,api_fo		* Update pointer
-		move.w	(a7)+,sr		* Restore interrupt mask
-		rts				* Return to caller
-*
-* api_zap -- clear analog I/O FIFO
-* -------    ---------------------
-api_zap:	move.w	sr,-(a7)		* Save status register
-		ori.w	#IPL3,sr		* Disable ANALOG I/O interrupts
-		move.l	#api_fum,api_fi		* Clear analog processor fifo
-		move.l	#api_fum,api_fo		* ...
-		move.w	(a7)+,sr		* Restore interrupt mask
+
+| api_int -- Analog processor interrupt handler
+| -------    ----------------------------------
+api_int:	movem.l	d0-d1/a0-a1,-(a7)	| Save registers
+		clr.l	d0			| Read input port
+		move.b	ANALOG,d0		| ... into d0[7..0]
+		move.b	d0,api_inp		| ... and api_inp
+		btst	#7,d0			| Check for signal number flag
+		bne	api_s0a			| Jump if signal number read
+
+		lea	api_tv,a0		| Get api_tv base in a0
+		clr.w	d1			| Get api_sv in d1
+		move.b	api_sv,d1		| ...
+		cmpi.b	#6,d1			| Check range
+		bgt	api_sve			| Jump if out of range
+
+		lsl.w	#2,d1			| Develop jump address
+		move.l	0(a0,d1.W),a1		| ... from api_tv in a1
+		jmp	(a1)			| Jump to state handler
+
+api_s0:		btst	#7,d0			| Check for signal number flag
+		beq	api_ret			| Jump if not signal number
+
+api_s0a:	clr.b	api_val			| Clear value byte
+		andi.b	#0x7F,d0		| Mask off signal number flag
+		cmpi.b	#82,d0			| See if it's in range
+		bgt	api_err			| Jump if out of range (GT 82)
+
+		move.b	d0,api_sig		| Store signal number
+		beq	api_pub			| Jump if it was "all off"
+
+		lea	api_tab,a0		| Get sv table base
+		move.b	0(a0,d0.W),api_sv	| Set sv for next time
+
+api_ret:	movem.l	(a7)+,d0-d1/a0-a1	| Restore registers
+		rte				| Return to interrupted code
+
+api_err:	move.b	d0,api_bug		| Catch the bug
+		clr.b	api_sv			| Force state zero
+		bra	api_ret			| Go back to interrupted code
+
+api_sve:	move.b	d1,api_svb		| Catch the bug
+		clr.b	api_sv			| Force state zero
+		bra	api_ret			| Go back to interrupted code
+
+		.page
+api_s1:		btst	#0,d0			| See if it takes a value
+		beq	api_s1a			| Jump if not
+
+		move.b	#2,api_sv		| Set sv for state 2
+		bra	api_ret			| Go return from interrupt
+
+api_s1a:	clr.b	api_val			| Clear value byte
+		bra	api_pub			| Go output to fifo
+
+api_s2:		ori.b	#0x80,d0		| Set status = 1
+		move.b	d0,api_val		| Set value byte
+		bra	api_pub			| Go output to fifo
+
+api_s3:		ror.b	#1,d0			| Set status in value byte
+		andi.b	#0x80,d0		| ...
+		move.b	d0,api_val		| ...
+		move.b	#4,api_sv		| Set sv for state 4
+		bra	api_ret			| Go return from interrupt
+
+api_s4:		or.b	d0,api_val		| Set value byte
+		bra	api_pub			| Go output to fifo
+
+api_s5:		ror.b	#1,d0			| Set status in value byte
+		andi.b	#0x80,d0		| ...
+
+api_s6:		move.b	d0,api_val		| Set value byte
+
+api_pub:	movea.l	api_fi,a0		| Get fifo input pointer in a0
+		move.w	api_sig,(a0)+		| Store new input
+		cmpa.l	#api_fe,a0		| Wrap around ?
+		blt	api_pb1			| Jump if not
+
+		movea.l	#api_fum,a0		| Wrap input pointer to start
+
+api_pb1:	move.l	a0,api_fi		| Update input pointer
+		cmpa.l	api_fo,a0		| Buffer full ?
+		bne	api_pb3			| Jump if not
+
+		movea.l	api_fo,a1		| Get fifo output pointer in a1
+		adda.l	#2,a1			| Increment it
+		cmpa.l	#api_fe,a1		| Wrap around ?
+		blt	api_pb2			| Jump if not
+
+		movea.l	#api_fum,a1		| Wrap output pointer to start
+
+api_pb2:	move.l	a1,api_fo		| Set new output pointer
+
+api_pb3:	clr.b	api_sv			| Set state to 0
+		bra	api_ret			| Return from interrupt
+
+		.page
+
+| api_get -- Get analog input
+| -------    ----------------
+api_get:	move.w	sr,-(a7)		| Save status register
+		ori.w	#IPL3,sr		| Disable ANALOG I/O interrupts
+		movea.l	api_fo,a0		| Get fifo output pointer
+		cmpa.l	api_fi,a0		| See if fifo is empty
+		bne	api_g1			| Jump if not
+
+		moveq.l	#-1,d0			| Set empty-fifo value
+		move.w	(a7)+,sr		| Restore interrupt mask
+		rts				| Return to caller
+
+api_g1:		clr.l	d0			| Get fifo value
+		move.w	(a0)+,d0		| ...
+		cmpa.l	#api_fe,a0		| See if pointer wrapped
+		blt	api_g2			| Jump if not
+
+		movea.l	#api_fum,a0		| Wrap the pointer around
+
+api_g2:		move.l	a0,api_fo		| Update pointer
+		move.w	(a7)+,sr		| Restore interrupt mask
+		rts				| Return to caller
+
+| api_zap -- clear analog I/O FIFO
+| -------    ---------------------
+api_zap:	move.w	sr,-(a7)		| Save status register
+		ori.w	#IPL3,sr		| Disable ANALOG I/O interrupts
+		move.l	#api_fum,api_fi		| Clear analog processor fifo
+		move.l	#api_fum,api_fo		| ...
+		move.w	(a7)+,sr		| Restore interrupt mask
 		rts
-*
-		.endc
-*
-		.page
-*************************************************************************
-*									*
-*			Constant definitions				*
-*			--------------------				*
-*************************************************************************
-*
+
+		.endc
+
+		.page
+|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+|									|
+|			Constant definitions				|
+|			--------------------				|
+|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+
 		.even
-*
+
 		.ifne	BUCHLA
-*
-* Buchla 700 tables:
-*
-* t13tab -- Trap-13 pointer table -- Primary BIOS functions
-* ------    -----------------------------------------------
-t13tab:		dc.w	12			* Number of Trap-13 routines
-*
-		dc.l	nullrts			* 0 - (getmpb)
-		dc.l	bconstat		* 1 - bconstat
-		dc.l	bconin			* 2 - bconin
-		dc.l	bconout			* 3 - bconout
-		dc.l	rwabs			* 4 - rwabs
-		dc.l	setexec			* 5 - setexec
-		dc.l	nullrts			* 6 - (tickcal)
-		dc.l	getbpb			* 7 - getbpb
-		dc.l	bcostat			* 8 - bcostat
-		dc.l	mediach			* 9 - mediach
-		dc.l	drvmap			* 10 - drvmap
-		dc.l	nullrts			* 11 - (shift)
-*
-		.page
-*
-* t14tab -- Trap-14 pointer table -- Extended BIOS functions (Buchla 700 only)
-* ------    ------------------------------------------------------------------
-t14tab:		dc.w	10			* Number of trap14 routines
-*
-		dc.l	piorec			* 0 - Get iorec address
-		dc.l	setport			* 1 - Set ACIA parameters
-		dc.l	floprd			* 2 - Read floppy
-		dc.l	flopwr			* 3 - Write floppy
-		dc.l	flopfmt			* 4 - Format floppy
-		dc.l	flopver			* 5 - Verify floppy
-		dc.l	protobt			* 6 - Create prototype boot sec.
-		dc.l	rand			* 7 - Generate random number
-		dc.l	api_get			* 8 - Get analog input
-		dc.l	api_zap			* 9 - Clear analog FIFO
-*
-		.endc
-*
+
+| Buchla 700 tables:
+
+| t13tab -- Trap-13 pointer table -- Primary BIOS functions
+| ------    -----------------------------------------------
+t13tab:		dc.w	12			| Number of Trap-13 routines
+
+		dc.l	nullrts			| 0 - (getmpb)
+		dc.l	bconstat		| 1 - bconstat
+		dc.l	bconin			| 2 - bconin
+		dc.l	bconout			| 3 - bconout
+		dc.l	rwabs			| 4 - rwabs
+		dc.l	setexec			| 5 - setexec
+		dc.l	nullrts			| 6 - (tickcal)
+		dc.l	getbpb			| 7 - getbpb
+		dc.l	bcostat			| 8 - bcostat
+		dc.l	mediach			| 9 - mediach
+		dc.l	drvmap			| 10 - drvmap
+		dc.l	nullrts			| 11 - (shift)
+
+		.page
+
+| t14tab -- Trap-14 pointer table -- Extended BIOS functions (Buchla 700 only)
+| ------    ------------------------------------------------------------------
+t14tab:		dc.w	10			| Number of trap14 routines
+
+		dc.l	piorec			| 0 - Get iorec address
+		dc.l	setport			| 1 - Set ACIA parameters
+		dc.l	floprd			| 2 - Read floppy
+		dc.l	flopwr			| 3 - Write floppy
+		dc.l	flopfmt			| 4 - Format floppy
+		dc.l	flopver			| 5 - Verify floppy
+		dc.l	protobt			| 6 - Create prototype boot sec.
+		dc.l	rand			| 7 - Generate random number
+		dc.l	api_get			| 8 - Get analog input
+		dc.l	api_zap			| 9 - Clear analog FIFO
+
+		.endc
+
 		.even
-*
+
 		.ifeq	BUCHLA
-*
-* NASA 3D Helmet tables:
-*
-* t13tab -- Trap-13 pointer table -- Primary BIOS functions
-* ------    -----------------------------------------------
-t13tab:		dc.w	12			* Number of Trap-13 routines
-*
-		dc.l	nullrts			* 0 - (getmpb)
-		dc.l	bconstat		* 1 - bconstat
-		dc.l	bconin			* 2 - bconin
-		dc.l	bconout			* 3 - bconout
-		dc.l	nullrts			* 4 - (rwabs)
-		dc.l	setexec			* 5 - setexec
-		dc.l	nullrts			* 6 - (tickcal)
-		dc.l	nullrts			* 7 - (getbpb)
-		dc.l	bcostat			* 8 - bcostat
-		dc.l	nullrts			* 9 - (mediach)
-		dc.l	nullrts			* 10 - (drvmap)
-		dc.l	nullrts			* 11 - (shift)
-*
-		.page
-*
-* t14tab -- Trap-14 pointer table -- Extended BIOS functions (Buchla 700 only)
-* ------    ------------------------------------------------------------------
-t14tab:		dc.w	10			* Number of trap14 routines
-*
-		dc.l	piorec			* 0 - Get iorec address
-		dc.l	setport			* 1 - Set ACIA parameters
-		dc.l	nullrts			* 2 - (Read floppy)
-		dc.l	nullrts			* 3 - (Write floppy)
-		dc.l	nullrts			* 4 - (Format floppy)
-		dc.l	nullrts			* 5 - (Verify floppy)
-		dc.l	nullrts			* 6 - (Create prototype boot sec.)
-		dc.l	nullrts			* 7 - (Generate random number)
-		dc.l	nullrts			* 8 - (Get analog input)
-		dc.l	nullrts			* 9 - (Clear analog FIFO)
-*
-		.endc
-*
-		.page
-*
-* cdt01 -- Character device dispatch table #1 -- input status
-* -----    --------------------------------------------------
-cdt01:		dc.l	sr1ist			* 0 - PRT -- Printer
-		dc.l	sr2ist			* 1 - AUX -- Serial-2
-		dc.l	sr2ist			* 2 - CON -- Console
-*
+
+| NASA 3D Helmet tables:
+
+| t13tab -- Trap-13 pointer table -- Primary BIOS functions
+| ------    -----------------------------------------------
+t13tab:		dc.w	12			| Number of Trap-13 routines
+
+		dc.l	nullrts			| 0 - (getmpb)
+		dc.l	bconstat		| 1 - bconstat
+		dc.l	bconin			| 2 - bconin
+		dc.l	bconout			| 3 - bconout
+		dc.l	nullrts			| 4 - (rwabs)
+		dc.l	setexec			| 5 - setexec
+		dc.l	nullrts			| 6 - (tickcal)
+		dc.l	nullrts			| 7 - (getbpb)
+		dc.l	bcostat			| 8 - bcostat
+		dc.l	nullrts			| 9 - (mediach)
+		dc.l	nullrts			| 10 - (drvmap)
+		dc.l	nullrts			| 11 - (shift)
+
+		.page
+
+| t14tab -- Trap-14 pointer table -- Extended BIOS functions (Buchla 700 only)
+| ------    ------------------------------------------------------------------
+t14tab:		dc.w	10			| Number of trap14 routines
+
+		dc.l	piorec			| 0 - Get iorec address
+		dc.l	setport			| 1 - Set ACIA parameters
+		dc.l	nullrts			| 2 - (Read floppy)
+		dc.l	nullrts			| 3 - (Write floppy)
+		dc.l	nullrts			| 4 - (Format floppy)
+		dc.l	nullrts			| 5 - (Verify floppy)
+		dc.l	nullrts			| 6 - (Create prototype boot sec.)
+		dc.l	nullrts			| 7 - (Generate random number)
+		dc.l	nullrts			| 8 - (Get analog input)
+		dc.l	nullrts			| 9 - (Clear analog FIFO)
+
+		.endc
+
+		.page
+
+| cdt01 -- Character device dispatch table #1 -- input status
+| -----    --------------------------------------------------
+cdt01:		dc.l	sr1ist			| 0 - PRT -- Printer
+		dc.l	sr2ist			| 1 - AUX -- Serial-2
+		dc.l	sr2ist			| 2 - CON -- Console
+
 		.ifne	BUCHLA
-*
-		dc.l	mc1ist			* 3 - MC1 -- MIDI-1
-		dc.l	mc2ist			* 4 - MC2 -- MIDI-2
-*
-		.endc
-*
-* cdt02 -- Character device dispatch table #2 -- input
-* -----    -------------------------------------------
-cdt02:		dc.l	sr1inp			* 0 - PRT -- Printer
-		dc.l	sr2inp			* 1 - AUX -- Serial-2
-		dc.l	sr2inp			* 2 - CON -- Console
-*
+
+		dc.l	mc1ist			| 3 - MC1 -- MIDI-1
+		dc.l	mc2ist			| 4 - MC2 -- MIDI-2
+
+		.endc
+
+| cdt02 -- Character device dispatch table #2 -- input
+| -----    -------------------------------------------
+cdt02:		dc.l	sr1inp			| 0 - PRT -- Printer
+		dc.l	sr2inp			| 1 - AUX -- Serial-2
+		dc.l	sr2inp			| 2 - CON -- Console
+
 		.ifne	BUCHLA
-*
-		dc.l	mc1inp			* 3 - MC1 -- MIDI-1
-		dc.l	mc2inp			* 4 - MC2 -- MIDI-2
-*
-		.endc
-*
-* cdt03 -- Character device dispatch table #3 -- output
-* -----    --------------------------------------------
-cdt03:		dc.l	sr1out			* 0 - PRT -- Printer
-		dc.l	sr2out			* 1 - AUX -- Serial-2
-		dc.l	sr2out			* 2 - CON -- Console
+
+		dc.l	mc1inp			| 3 - MC1 -- MIDI-1
+		dc.l	mc2inp			| 4 - MC2 -- MIDI-2
+
+		.endc
+
+| cdt03 -- Character device dispatch table #3 -- output
+| -----    --------------------------------------------
+cdt03:		dc.l	sr1out			| 0 - PRT -- Printer
+		dc.l	sr2out			| 1 - AUX -- Serial-2
+		dc.l	sr2out			| 2 - CON -- Console
 		.ifne	BUCHLA
-*
-		dc.l	mc1out			* 3 - MC1 -- MIDI-1
-		dc.l	mc2out			* 4 - MC2 -- MIDI-2
-*
-		.endc
-*
-* cdt04 -- Character device dispatch table #4 -- output status
-* -----    ---------------------------------------------------
-cdt04:		dc.l	sr1ost			* 0 - PRT -- Printer
-		dc.l	sr2ost			* 1 - AUX -- Serial-2
-		dc.l	sr2ost			* 2 - CON -- Console
+
+		dc.l	mc1out			| 3 - MC1 -- MIDI-1
+		dc.l	mc2out			| 4 - MC2 -- MIDI-2
+
+		.endc
+
+| cdt04 -- Character device dispatch table #4 -- output status
+| -----    ---------------------------------------------------
+cdt04:		dc.l	sr1ost			| 0 - PRT -- Printer
+		dc.l	sr2ost			| 1 - AUX -- Serial-2
+		dc.l	sr2ost			| 2 - CON -- Console
 		.ifne	BUCHLA
-*
-		dc.l	mc1ost			* 3 - MC1 -- MIDI-1
-		dc.l	mc2ost			* 4 - MC2 -- MIDI-2
-*
-		.endc
-*
-		.page
-*
-* iorec defaults:
-* ---------------
-* Serial-1:
-* ---------
+
+		dc.l	mc1ost			| 3 - MC1 -- MIDI-1
+		dc.l	mc2ost			| 4 - MC2 -- MIDI-2
+
+		.endc
+
+		.page
+
+| iorec defaults:
+| ---------------
+| Serial-1:
+| ---------
 sr1dflt:	dc.l	sr1ibuf
 		dc.w	SR1IBS
@@ -3472,7 +3472,7 @@
 		dc.b	0,0
 		dc.w	0,0
-*
-* Serial-2:
-* ---------
+
+| Serial-2:
+| ---------
 sr2dflt:	dc.l	sr2ibuf
 		dc.w	SR2IBS
@@ -3490,11 +3490,11 @@
 		dc.b	0,0
 		dc.w	0,0
-*
-		.page
-*
+
+		.page
+
 		.ifne	BUCHLA
-*
-* MIDI-1:
-* -------
+
+| MIDI-1:
+| -------
 mc1dflt:	dc.l	mc1ibuf
 		dc.w	MC1IBS
@@ -3512,7 +3512,7 @@
 		dc.b	0,0
 		dc.w	0,0
-*
-* MIDI-2:
-* -------
+
+| MIDI-2:
+| -------
 mc2dflt:	dc.l	mc2ibuf
 		dc.w	MC2IBS
@@ -3530,307 +3530,307 @@
 		dc.b	0,0
 		dc.w	0,0
-*
-		.endc
-*
-		.page
-*
-* brtable -- Baud rate setup table
-* -------    ---------------------
-brtable:	dc.b	BR_19K2		* 0 - 19200 baud
-		dc.b	BR_9600		* 1 -  9600 baud
-		dc.b	BR_4800		* 2 -  4800 baud
-		dc.b	BR_3600		* 3 -  3600 baud
-		dc.b	BR_2400		* 4 -  2400 baud
-		dc.b	BR_7200		* 5 -  7200 baud  (2000 on Atari)
-		dc.b	BR_1800		* 6 -  1800 baud
-		dc.b	BR_1200		* 7 -  1200 baud
-		dc.b	BR_600		* 8 -   600 baud
-		dc.b	BR_300		* 9 -   300 baud
-*
-* iortab -- iorec pointer table
-* ------    -------------------
-iortab:		dc.l	sr1iorec	* 0 - PRT Serial-1 Printer
-		dc.l	sr2iorec	* 1 - AUX Serial-2 Host
-		dc.l	sr2iorec	* 2 - CON Serial-2 Console
-*
+
+		.endc
+
+		.page
+
+| brtable -- Baud rate setup table
+| -------    ---------------------
+brtable:	dc.b	BR_19K2		| 0 - 19200 baud
+		dc.b	BR_9600		| 1 -  9600 baud
+		dc.b	BR_4800		| 2 -  4800 baud
+		dc.b	BR_3600		| 3 -  3600 baud
+		dc.b	BR_2400		| 4 -  2400 baud
+		dc.b	BR_7200		| 5 -  7200 baud  (2000 on Atari)
+		dc.b	BR_1800		| 6 -  1800 baud
+		dc.b	BR_1200		| 7 -  1200 baud
+		dc.b	BR_600		| 8 -   600 baud
+		dc.b	BR_300		| 9 -   300 baud
+
+| iortab -- iorec pointer table
+| ------    -------------------
+iortab:		dc.l	sr1iorec	| 0 - PRT Serial-1 Printer
+		dc.l	sr2iorec	| 1 - AUX Serial-2 Host
+		dc.l	sr2iorec	| 2 - CON Serial-2 Console
+
 		.ifne	BUCHLA
-*
-		dc.l	mc1iorec	* 3 - MC1 MIDI-1   MIDI port #1
-		dc.l	mc2iorec	* 4 - MC2 MIDI-2   MIDI port #2
-*
-		.endc
-*
-* aciatab -- iorec and ACIA pointer table
-* -------    ----------------------------
-aciatab:	dc.l	sr1iorec,SR1ACIA	* 0 - PRT Serial-1
-		dc.l	sr2iorec,SR2ACIA	* 1 - AUX Serial-2
-		dc.l	sr2iorec,SR2ACIA	* 2 - CON Serial-2
-*
+
+		dc.l	mc1iorec	| 3 - MC1 MIDI-1   MIDI port #1
+		dc.l	mc2iorec	| 4 - MC2 MIDI-2   MIDI port #2
+
+		.endc
+
+| aciatab -- iorec and ACIA pointer table
+| -------    ----------------------------
+aciatab:	dc.l	sr1iorec,SR1ACIA	| 0 - PRT Serial-1
+		dc.l	sr2iorec,SR2ACIA	| 1 - AUX Serial-2
+		dc.l	sr2iorec,SR2ACIA	| 2 - CON Serial-2
+
 		.ifne	BUCHLA
-*
-		dc.l	mc1iorec,MC1ACIA	* 3 - MC1 MIDI-1
-		dc.l	mc2iorec,MC2ACIA	* 4 - MC2 MIDI-2
-*
-		.endc
-*
-		.page
-*
+
+		dc.l	mc1iorec,MC1ACIA	| 3 - MC1 MIDI-1
+		dc.l	mc2iorec,MC2ACIA	| 4 - MC2 MIDI-2
+
+		.endc
+
+		.page
+
 		.ifne	BUCHLA
-*
-* pbpbtab -- Prototype BPB data table  (BPS..NHID)  19 bytes per entry
-* -------    ---------------------------------------------------------
-*
-* 0 -- 40 tracks, single sided (180K)
-*
-pbpbtab:	dc.b	$00,$02,$01,$01,$00,$02,$40,$00
-		dc.b	$68,$01,$FC,$02,$00,$09,$00,$01
-		dc.b	$00,$00,$00
-*
-* 1 -- 40 tracks, double sided (360K)
-*
-		dc.b	$00,$02,$02,$01,$00,$02,$70,$00
-		dc.b	$D0,$02,$FD,$02,$00,$09,$00,$02
-		dc.b	$00,$00,$00
-*
-* 2 -- 80 tracks, single sided (360K)
-*
-		dc.b	$00,$02,$02,$01,$00,$02,$70,$00
-		dc.b	$D0,$02,$F8,$05,$00,$09,$00,$01
-		dc.b	$00,$00,$00
-*
-* 3 -- 80 tracks, double sided (720K)
-*
-		dc.b	$00,$02,$02,$01,$00,$02,$70,$00
-		dc.b	$A0,$05,$F9,$05,$00,$09,$00,$02
-		dc.b	$00,$00,$00
-*
-* VSDD initialization table
-*
+
+| pbpbtab -- Prototype BPB data table  (BPS..NHID)  19 bytes per entry
+| -------    ---------------------------------------------------------
+
+| 0 -- 40 tracks, single sided (180K)
+
+pbpbtab:	dc.b	0x00,0x02,0x01,0x01,0x00,0x02,0x40,0x00
+		dc.b	0x68,0x01,0xFC,0x02,0x00,0x09,0x00,0x01
+		dc.b	0x00,0x00,0x00
+
+| 1 -- 40 tracks, double sided (360K)
+
+		dc.b	0x00,0x02,0x02,0x01,0x00,0x02,0x70,0x00
+		dc.b	0xD0,0x02,0xFD,0x02,0x00,0x09,0x00,0x02
+		dc.b	0x00,0x00,0x00
+
+| 2 -- 80 tracks, single sided (360K)
+
+		dc.b	0x00,0x02,0x02,0x01,0x00,0x02,0x70,0x00
+		dc.b	0xD0,0x02,0xF8,0x05,0x00,0x09,0x00,0x01
+		dc.b	0x00,0x00,0x00
+
+| 3 -- 80 tracks, double sided (720K)
+
+		dc.b	0x00,0x02,0x02,0x01,0x00,0x02,0x70,0x00
+		dc.b	0xA0,0x05,0xF9,0x05,0x00,0x09,0x00,0x02
+		dc.b	0x00,0x00,0x00
+
+| VSDD initialization table
+
 		.even
-*
-vsddtab:	dc.w	$8252		* R0	Mode word 0
-		dc.w	$E474		* R1	Mode word 1
-		dc.w	$0006		* R2	Register window base
-		dc.w	$0100		* R3	Data window base
-		dc.w	$0000		* R4	Data length mask
-		dc.w	$0000		* R5	Data segment base
-		dc.w	$0001		* R6	Priority access count
-		dc.w	$0040		* R7	ODT base
-		dc.w	$0080		* R8	AT base
-		dc.w	$0010		* R9	CLT base
-		dc.w	$0011		* R10	CG bases
-		dc.w	$0000		* R11	AT counter  (R/O)
-*
-		dc.w	$0C08		* R12	HC0 =  3, VC0 =   8
-		dc.w	$140A		* R13	HC1 =  5, VC1 =  10
-		dc.w	$9568		* R14	HC2 = 37, VC2 = 360
-		dc.w	$A16A		* R15	HC3 = 40, VC3 = 362
-*
-vsddit01:	dc.w	$8253		* R0 with UCF = 1, DEN = 0
-vsddit02:	dc.w	$825B		* R0 with UCF = 1, DEN = 1
-*
-		.page
-*
-* analog processor input state table
-*
-api_tab:	dc.b	0,1,1,1,1,1,1,1,1,1	* 0..9
-		dc.b	1,1,1,1,1,1,1,1,1,1	* 10..19
-		dc.b	1,1,1,1,1		* 20..24
-		dc.b	3,3,3,3,3		* 25..29
-		dc.b	3,3,3,3,3,3,3,3,3	* 30..38
-		dc.b	5			* 39
-		dc.b	5,5,5,5,5,5,5,5,5,5	* 40..49
-		dc.b	5,5,5			* 50..52
-		dc.b	3,3,3,3,3,3,3		* 53..59
-		dc.b	5,5,5,5,5,5,5,5,5,5	* 60..69
-		dc.b	5,5,5			* 70..72
-		dc.b	6,6,6,6,6,6,6		* 73..79
-		dc.b	6,6,6			* 80..82
-*
+
+vsddtab:	dc.w	0x8252		| R0	Mode word 0
+		dc.w	0xE474		| R1	Mode word 1
+		dc.w	0x0006		| R2	Register window base
+		dc.w	0x0100		| R3	Data window base
+		dc.w	0x0000		| R4	Data length mask
+		dc.w	0x0000		| R5	Data segment base
+		dc.w	0x0001		| R6	Priority access count
+		dc.w	0x0040		| R7	ODT base
+		dc.w	0x0080		| R8	AT base
+		dc.w	0x0010		| R9	CLT base
+		dc.w	0x0011		| R10	CG bases
+		dc.w	0x0000		| R11	AT counter  (R/O)
+
+		dc.w	0x0C08		| R12	HC0 =  3, VC0 =   8
+		dc.w	0x140A		| R13	HC1 =  5, VC1 =  10
+		dc.w	0x9568		| R14	HC2 = 37, VC2 = 360
+		dc.w	0xA16A		| R15	HC3 = 40, VC3 = 362
+
+vsddit01:	dc.w	0x8253		| R0 with UCF = 1, DEN = 0
+vsddit02:	dc.w	0x825B		| R0 with UCF = 1, DEN = 1
+
+		.page
+
+| analog processor input state table
+
+api_tab:	dc.b	0,1,1,1,1,1,1,1,1,1	| 0..9
+		dc.b	1,1,1,1,1,1,1,1,1,1	| 10..19
+		dc.b	1,1,1,1,1		| 20..24
+		dc.b	3,3,3,3,3		| 25..29
+		dc.b	3,3,3,3,3,3,3,3,3	| 30..38
+		dc.b	5			| 39
+		dc.b	5,5,5,5,5,5,5,5,5,5	| 40..49
+		dc.b	5,5,5			| 50..52
+		dc.b	3,3,3,3,3,3,3		| 53..59
+		dc.b	5,5,5,5,5,5,5,5,5,5	| 60..69
+		dc.b	5,5,5			| 70..72
+		dc.b	6,6,6,6,6,6,6		| 73..79
+		dc.b	6,6,6			| 80..82
+
 		.even
-*
-* analog processor state transfer vector
-*
+
+| analog processor state transfer vector
+
 api_tv:		dc.l	api_s0,api_s1,api_s2,api_s3
 		dc.l	api_s4,api_s5,api_s6
-*
-		.endc
-*
-		.page
-*************************************************************************
-* 									*
-* 			RAM storage definitions				*
-*			-----------------------				*
-*************************************************************************
-*
+
+		.endc
+
+		.page
+|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+| 									|
+| 			RAM storage definitions				|
+|			-----------------------				|
+|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+
 		.bss
 		.even
-*
-* RAM data area
-* -------------
-* WARNING:
-* --------
-* The variables from timevec through rsarea are permanently assigned so
-* that we can link to certain bios variables without having to link to the
-* bios object file itself.  Some of these get defined in hwdefs.s and in
-* hwdefs.s so beware of changing them.
-*
-timevec:	ds.l	1		* System timer trap vector
-critvec:	ds.l	1		* Critical error handler vector
-termvec:	ds.l	1		* Process terminate hook vector
-resvec3:	ds.l	1		* Reserved vector 3
-resvec4:	ds.l	1		* Reserved vector 4
-resvec5:	ds.l	1		* Reserved vector 5
-resvec6:	ds.l	1		* Reserved vector 6
-resvec7:	ds.l	1		* Reserved vector 7
-*
-fc_sw:		ds.w	1		* Frame clock switch (<0=dn, 0=off, >0=up)
-fc_val:		ds.l	1		* Frame clock value  (0..FCMAX)
-*
-_wzcrsh:	ds.w	1		* Crash area: flag for ROMP
-_crshsr:	ds.w	1		* Crash area: SR
-_crshpc:	ds.l	1		* Crash area: PC
-_crshsp:	ds.l	1		* Crash area: SP
-_crshus:	ds.l	1		* Crash area: USP
-_crshvc:	ds.l	1		* Crash area: vector # in MS byte
-_crshrg:	ds.l	16		* Crash area: registers
-_crshst:	ds.w	16		* Crash area: top 16 words of stack
-*
-* The area from biosram to SSTACK-1 is cleared on reset.
-* ------------------------------------------------------
-biosram		.equ	*		* Start of BIOS RAM variables
-*
+
+| RAM data area
+| -------------
+| WARNING:
+| --------
+| The variables from timevec through rsarea are permanently assigned so
+| that we can link to certain bios variables without having to link to the
+| bios object file itself.  Some of these get defined in hwdefs.s and in
+| hwdefs.s so beware of changing them.
+
+timevec:	ds.l	1		| System timer trap vector
+critvec:	ds.l	1		| Critical error handler vector
+termvec:	ds.l	1		| Process terminate hook vector
+resvec3:	ds.l	1		| Reserved vector 3
+resvec4:	ds.l	1		| Reserved vector 4
+resvec5:	ds.l	1		| Reserved vector 5
+resvec6:	ds.l	1		| Reserved vector 6
+resvec7:	ds.l	1		| Reserved vector 7
+
+fc_sw:		ds.w	1		| Frame clock switch (<0=dn, 0=off, >0=up)
+fc_val:		ds.l	1		| Frame clock value  (0..FCMAX)
+
+_wzcrsh:	ds.w	1		| Crash area: flag for ROMP
+_crshsr:	ds.w	1		| Crash area: SR
+_crshpc:	ds.l	1		| Crash area: PC
+_crshsp:	ds.l	1		| Crash area: SP
+_crshus:	ds.l	1		| Crash area: USP
+_crshvc:	ds.l	1		| Crash area: vector # in MS byte
+_crshrg:	ds.l	16		| Crash area: registers
+_crshst:	ds.w	16		| Crash area: top 16 words of stack
+
+| The area from biosram to SSTACK-1 is cleared on reset.
+| ------------------------------------------------------
+biosram:				| Start of BIOS RAM variables
+
 		.ifne	BUCHLA
-*
-_hz_1k:		ds.l	1		* 1000 Hz clock
-_hz_200:	ds.l	1		* 200 Hz clock
-frclock:	ds.l	1		* 50 Hz clock
-t1count:	ds.w	1		* Timer 1 count
-t2count:	ds.w	1		* Timer 2 count
-t3count:	ds.w	1		* Timer 3 count
-*
-seekrate:	ds.w	1		* Seek rate
-cdev:		ds.w	1		* Current drive
-ctrack:		ds.w	1		* Current track
-csect:		ds.w	1		* Current sector
-cside:		ds.w	1		* Current side
-ccount:		ds.w	1		* Current sector count
-spt:		ds.w	1		* Sectors per track
-interlv:	ds.w	1		* Sector interleave count
-virgin:		ds.w	1		* Initial formatting data
-deferr:		ds.w	1		* Default error number
-curerr:		ds.w	1		* Current error number
-*
-cdma:		ds.l	1		* Current DMA address
-edma:		ds.l	1		* Ending DMA address
-tmpdma:		ds.l	1		* Temporary DMA address
-*
-		.endc
-*
-rseed:		ds.l	1		* Random number seed
-*
-savptr:		ds.l	1		* Pointer to register save area
-*
-_rsflag:	ds.l	1		* Register save area overflow flag
-		ds.l	18*32		* Register save area  (32 levels)
-rsarea:		ds.l	1		* Dummy long word at top of save area
-*
-* ***** end of the permanently assigned bios variables *****
-*
-		.page
-*
+
+_hz_1k:		ds.l	1		| 1000 Hz clock
+_hz_200:	ds.l	1		| 200 Hz clock
+frclock:	ds.l	1		| 50 Hz clock
+t1count:	ds.w	1		| Timer 1 count
+t2count:	ds.w	1		| Timer 2 count
+t3count:	ds.w	1		| Timer 3 count
+
+seekrate:	ds.w	1		| Seek rate
+cdev:		ds.w	1		| Current drive
+ctrack:		ds.w	1		| Current track
+csect:		ds.w	1		| Current sector
+cside:		ds.w	1		| Current side
+ccount:		ds.w	1		| Current sector count
+spt:		ds.w	1		| Sectors per track
+interlv:	ds.w	1		| Sector interleave count
+virgin:		ds.w	1		| Initial formatting data
+deferr:		ds.w	1		| Default error number
+curerr:		ds.w	1		| Current error number
+
+cdma:		ds.l	1		| Current DMA address
+edma:		ds.l	1		| Ending DMA address
+tmpdma:		ds.l	1		| Temporary DMA address
+
+		.endc
+
+rseed:		ds.l	1		| Random number seed
+
+savptr:		ds.l	1		| Pointer to register save area
+
+_rsflag:	ds.l	1		| Register save area overflow flag
+		ds.l	18|32		| Register save area  (32 levels)
+rsarea:		ds.l	1		| Dummy long word at top of save area
+
+| ||||| end of the permanently assigned bios variables |||||
+
+		.page
+
 		.ifne	BUCHLA
-*
-acctim:		ds.l	2		* Accumulated disk time table
-maxactim:	ds.l	1		* Maximum acctim value
-hdv_init:	ds.l	1		* Disk init vector
-hdv_bpb:	ds.l	1		* Disk get bpb vector
-hdv_rw:		ds.l	1		* Disk r/w vector
-hdv_boot:	ds.l	1		* Disk boot vector
-hdv_mchg:	ds.l	1		* Disk media change vector
-drvbits:	ds.l	1		* Drive map bits
-dskbufp:	ds.l	1		* Disk buffer pointer
-		.page
-nflops:		ds.w	1		* Number of drives
-disknum:	ds.w	1		* Current disk number
-booted:		ds.w	1		* Most recent boot device or -1
-flock:		ds.w	1		* Floppy semaphore
-fverify:	ds.w	1		* Floppy verify flag
-*
-tdiv1:		ds.w	1		* Timer divider 1  (divides _hz_1k)
-tdiv2:		ds.w	1		* Timer divider 2  (divides _hz_200)
-*
-retrycnt:	ds.w	1		* Re-try count
-wpstatus:	ds.w	1		* Write protect status table
-wplatch:	ds.w	1		* Write protect latch table
-bootdev:	ds.w	1		* Boot device number
-*
-motoron:	ds.w	1		* Motor-on flag
-deslflag:	ds.w	1		* Drive deselect flag
-*
-		.endc
-*
-flpsrsv:	ds.w	1		* Status register save area
-flpregs:	ds.l	16		* Register save area
-*
+
+acctim:		ds.l	2		| Accumulated disk time table
+maxactim:	ds.l	1		| Maximum acctim value
+hdv_init:	ds.l	1		| Disk init vector
+hdv_bpb:	ds.l	1		| Disk get bpb vector
+hdv_rw:		ds.l	1		| Disk r/w vector
+hdv_boot:	ds.l	1		| Disk boot vector
+hdv_mchg:	ds.l	1		| Disk media change vector
+drvbits:	ds.l	1		| Drive map bits
+dskbufp:	ds.l	1		| Disk buffer pointer
+		.page
+nflops:		ds.w	1		| Number of drives
+disknum:	ds.w	1		| Current disk number
+booted:		ds.w	1		| Most recent boot device or -1
+flock:		ds.w	1		| Floppy semaphore
+fverify:	ds.w	1		| Floppy verify flag
+
+tdiv1:		ds.w	1		| Timer divider 1  (divides _hz_1k)
+tdiv2:		ds.w	1		| Timer divider 2  (divides _hz_200)
+
+retrycnt:	ds.w	1		| Re-try count
+wpstatus:	ds.w	1		| Write protect status table
+wplatch:	ds.w	1		| Write protect latch table
+bootdev:	ds.w	1		| Boot device number
+
+motoron:	ds.w	1		| Motor-on flag
+deslflag:	ds.w	1		| Drive deselect flag
+
+		.endc
+
+flpsrsv:	ds.w	1		| Status register save area
+flpregs:	ds.l	16		| Register save area
+
 		.ifne	BUCHLA
-*
-dsb0:		ds.l	1		* Drive A DSB
-dsb1:		ds.l	1		* Drive B DSB
-*
-dskmode:	ds.b	2		* Disk change mode table
-dskerrs:	ds.w	2		* Disk error code table
-drvbpbs:	ds.w	16*2		* Disk BPB save area
-*
-		.endc
-*
-		.page
-*
-sr1iorec:	ds.b	IORECLN		* Serial-1 iorec structure
-sr2iorec:	ds.b	IORECLN		* Serial-2 iorec structure
-*
+
+dsb0:		ds.l	1		| Drive A DSB
+dsb1:		ds.l	1		| Drive B DSB
+
+dskmode:	ds.b	2		| Disk change mode table
+dskerrs:	ds.w	2		| Disk error code table
+drvbpbs:	ds.w	16|2		| Disk BPB save area
+
+		.endc
+
+		.page
+
+sr1iorec:	ds.b	IORECLN		| Serial-1 iorec structure
+sr2iorec:	ds.b	IORECLN		| Serial-2 iorec structure
+
 		.ifne	BUCHLA
-*
-mc1iorec:	ds.b	IORECLN		* MIDI-1 iorec structure
-mc2iorec:	ds.b	IORECLN		* MIDI-2 iorec structure
-*
-		.endc
-*
-sr1ibuf:	ds.b	SR1IBS		* Serial-1 input buffer
-sr1obuf:	ds.b	SR1OBS		* Serial-1 output buffer
-sr2ibuf:	ds.b	SR2IBS		* Serial-2 input buffer
-sr2obuf:	ds.b	SR2OBS		* Serial-2 output buffer
-*
+
+mc1iorec:	ds.b	IORECLN		| MIDI-1 iorec structure
+mc2iorec:	ds.b	IORECLN		| MIDI-2 iorec structure
+
+		.endc
+
+sr1ibuf:	ds.b	SR1IBS		| Serial-1 input buffer
+sr1obuf:	ds.b	SR1OBS		| Serial-1 output buffer
+sr2ibuf:	ds.b	SR2IBS		| Serial-2 input buffer
+sr2obuf:	ds.b	SR2OBS		| Serial-2 output buffer
+
 		.ifne	BUCHLA
-*
-mc1ibuf:	ds.b	MC1IBS		* MIDI-1 input buffer
-mc1obuf:	ds.b	MC1OBS		* MIDI-1 output buffer
-mc2ibuf:	ds.b	MC2IBS		* MIDI-2 input buffer
-mc2obuf:	ds.b	MC2OBS		* MIDI-2 output buffer
-*
-api_inp:	ds.b	1		* Analog processor input byte
-api_bug:	ds.b	1		* Analog processor signal # "bug trap"
-api_sv:		ds.b	1		* Analog processor state
-api_svb:	ds.b	1		* Analog processor state "bug trap"
-*
+
+mc1ibuf:	ds.b	MC1IBS		| MIDI-1 input buffer
+mc1obuf:	ds.b	MC1OBS		| MIDI-1 output buffer
+mc2ibuf:	ds.b	MC2IBS		| MIDI-2 input buffer
+mc2obuf:	ds.b	MC2OBS		| MIDI-2 output buffer
+
+api_inp:	ds.b	1		| Analog processor input byte
+api_bug:	ds.b	1		| Analog processor signal # "bug trap"
+api_sv:		ds.b	1		| Analog processor state
+api_svb:	ds.b	1		| Analog processor state "bug trap"
+
 		.even
-*
-api_sig:	ds.b	1		* Analog signal number
-api_val:	ds.b	1		* Analog value
-*
-api_fi:		ds.l	1		* Analog processor FIFO input pointer
-api_fo:		ds.l	1		* Analog processor FIFO output pointer
-api_fum:	ds.w	APISIZE		* Analog processor FIFO
-api_fe		.equ	*		* End of analog processor FIFO
-*
-		.endc
-*
+
+api_sig:	ds.b	1		| Analog signal number
+api_val:	ds.b	1		| Analog value
+
+api_fi:		ds.l	1		| Analog processor FIFO input pointer
+api_fo:		ds.l	1		| Analog processor FIFO output pointer
+api_fum:	ds.w	APISIZE		| Analog processor FIFO
+api_fe:					| End of analog processor FIFO
+
+		.endc
+
 		.even
-*
-basepage:	ds.l	64		* Pseudo base page
-*
-buffer:		ds.b	1024		* Default disk buffer
-*
-biostop		.equ	*		* End of BIOS RAM
-*
+
+basepage:	ds.l	64		| Pseudo base page
+
+buffer:		ds.b	1024		| Default disk buffer
+
+biostop:				| End of BIOS RAM
+
 		.end
Index: rom/lowram.s
===================================================================
--- rom/lowram.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
+++ rom/lowram.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -0,0 +1,169 @@
+| ------------------------------------------------------------------------------
+| lowram.s -- create a GEMDOS compatible basepage for the Buchla 700
+| Version 10 -- 1988-03-28 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+| Provides a GEMDOS compatible basepage and calls start_ to
+| get things rolling for applications on the Buchla 700.
+
+| Also sets the stack pointer to the high end of RAM.
+
+| WARNING:  This code ONLY works for programs loaded into RAM.
+| ------------------------------------------------------------------------------
+| We expect the following to be the relative layout of memory:
+
+|	lowram		load address  (this chunk of code)
+|	 ...
+|	p_lowtpa	start of 'TPA' / basepage address
+|	 ...
+|	start_		first module  (starts 'text' area)
+|	 ...
+|	 ...			-text-
+|	 ...
+|	_etext		end of 'text' area + 1
+|	basedat		start of 'data' area  (will usually be _etext)
+|	 ...
+|	 ...			-data-
+|	 ...
+|	_edata		end of 'data' area + 1
+|	basebss		start of 'bss' area   (will usually be _edata)
+|	 ...
+|	 ...			-BSS-
+|	 ...
+|	_end		end of actual 'bss' area + 1
+|	 ...
+|	 ...			-heap-
+|	 ...
+|	HI_RAM-0x400	end of pseudo 'bss' area  (cleared by fsmain.s)
+|	 ...
+|	 ...			-stack margin-
+|	 ...
+|	HI_RAM		end of RAM + 1,  initial stack address
+| ------------------------------------------------------------------------------
+| The startup code in fsmain.s uses the bss length to know how much RAM
+| to clear.  We give it HI_RAM-0x400-basebss, and put the stack at HI_RAM.
+| The startup code clears from p_bbase through p_bbase+p_blen-1, inclusive.
+| This keeps fsmain.s from wiping itself out when it zaps the bss area.
+
+| The startup code (start_) in fsmain.s is entered with the address of
+| the basepage passed as a long word parameter on the top of the stack.
+| ------------------------------------------------------------------------------
+		.text
+
+		.page
+
+| Globals defined here:
+
+		.xdef	LOWRAM
+		.xdef	_Lo_RAM
+		.xdef	_Hi_RAM
+
+		.xdef	basebss
+		.xdef	basedat
+		.xdef	p_lowtpa
+		.xdef	p_env
+
+		.xdef	_p_tlen
+		.xdef	_p_dlen
+
+| Globals referred to here:
+
+		.xref	start_			| entry point in fsmain.s
+		.xref	_panic			| entry point in fsmain.s
+
+		.xref	_edata			| supplied by loader
+		.xref	_etext			| supplied by loader
+
+| ------------------------------------------------------------------------------
+| Memory setup:
+| ------------
+| The equate for HI_RAM must be set to match the memory configuration used.
+
+| 	For a  512K system, _Hi_RAM = 0x080000
+| 	For a 1024K system, _Hi_RAM = 0x100000
+
+_Hi_RAM		=	0x100000		| highest RAM address + 1
+
+		.page
+
+| LOWRAM -- Startup code for Buchla 700 application programs
+| ------    ------------------------------------------------
+_Lo_RAM:
+LOWRAM:		lea	basebss,a0		| setup bss base
+		move.l	a0,p_bbase		| ...
+		lea	_Hi_RAM-0x400,a1	| setup faked bss length
+		suba.l	a0,a1			| ...
+		move.l	a1,p_blen		| ...
+
+		lea	basedat,a0		| setup data base
+		move.l	a0,p_dbase		| ...
+		lea	_edata,a1		| setup data length
+		suba.l	a0,a1			| ...
+		move.l	a1,p_dlen		| ...
+
+		lea	start_,a0		| setup text base
+		move.l	a0,p_tbase		| ...
+		lea	_etext,a1		| setup text length
+		suba.l	a0,a1			| ...
+		move.l	a1,p_tlen		| ...
+
+		lea	_Hi_RAM,a7		| setup stack pointer
+
+		lea	p_lowtpa,a0		| setup TPA base
+		move.l	a0,p_lowtpa		| ...
+		move.l	a7,p_hitpa		| setup high TPA
+
+		move.l	#p_lowtpa,-(a7)		| Pass basepage address
+		jsr	start_			| Start things going
+		addq.l	#4,a7			| Clean up stack
+
+		move.l	#pmsg,-(a7)		| OOPS:  panic()
+		jsr	_panic			| ... shouldn't ever return
+		addq.l	#4,a7
+
+hstop:		stop	#0x2000			| "Die, sucker!"
+		bra	hstop
+
+		.page
+
+| The mess below is the basepage.  It defines the start of the pseudo 'TPA'.
+| This MUST live in the 'text' segment for things to work.
+
+p_lowtpa:	dc.l	0			| low address of TPA
+p_hitpa:	dc.l	0			| high address + 1 of TPA
+p_tbase:	dc.l	0			| low address of text segment
+p_tlen:		dc.l	0			| length of text segment
+p_dbase:	dc.l	0			| low address of data segment
+p_dlen:		dc.l	0			| length of data segment
+p_bbase:	dc.l	0			| low address of BSS segment
+p_blen:		dc.l	0			| length of BSS segment
+p_dta:		dc.l	0			| pointer to DTA
+p_parent:	dc.l	0			| pointet to parent basepage
+		dc.l	0
+p_env:		dc.l	0			| pointer to environment string
+		ds.l	20
+p_cmdlin:	dc.b	0			| command line tail image
+		ds.b	127
+
+current:
+BPLEN		=	current-p_lowtpa	| MUST be 0x0100 (or we goofed)
+
+_p_tlen		=	p_tlen			| text length for MIDAS-VII
+_p_dlen		=	p_dlen			| data length for MIDAS-VII
+
+| ------------------------------------------------------------------------------
+		.data
+| ------------------------------------------------------------------------------
+		.even
+
+basedat:	dc.b	"||||| data |||||"		| start of data
+
+pmsg:		dc.b	"returned from start_()",0	| panic() message
+
+| ------------------------------------------------------------------------------
+		.bss
+| ------------------------------------------------------------------------------
+		.even
+
+basebss:	ds.l	1				| start of BSS
+
+		.end
Index: rom/timeint.s
===================================================================
--- rom/timeint.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ rom/timeint.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,328 +1,328 @@
-* ------------------------------------------------------------------------------
-* timeint.s -- timer interrupt handler
-* Version 9 -- 1988-06-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 -- timer interrupt handler
+| Version 9 -- 1988-06-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	_timers		* timer array -- short timers[NTIMERS]
-		.xdef	_vi_clk		* VSDD scroll delay timer
-		.xdef	_vi_tag		* VSDD VI tag
-		.xdef	line		* Line we entered on
-*
-		.xref	lclsadr		* score object base address
-		.xref	lclscrl		* score object scroll offset
-		.xref	_v_odtab	* VSDD object descriptor table
-		.xref	_v_regs		* VSDD registers
-*
-		.page
-* ==============================================================================
-*
-* 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 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 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
-*
-* ------------------------------------------------------------------------------
-*
-* 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
-*
-* VSDD register offsets:
-* ----------------------
-VSDD_R5		.equ	10		* VSDD bank control register
-VSDD_R11	.equ	22		* VSDD access table register
-*
-* ==============================================================================
-*
-* 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
-*
-* ==============================================================================
-*
-		.page
-* ==============================================================================
-* _tsetup -- tsetup() -- timer setup function
-* ==============================================================================
-*
-_tsetup:	move.w	sr,-(a7)		* Save old interrupt mask
-		ori.w	#IPL7,sr		* Disable interrupts
-*
-		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
-		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
-* ==============================================================================
+
+		.xdef	_tsetup		| tsetup() -- timer setup function
+		.xdef	timeint		| timer interrupt handler
+
+		.xdef	_timers		| timer array -- short timers[NTIMERS]
+		.xdef	_vi_clk		| VSDD scroll delay timer
+		.xdef	_vi_tag		| VSDD VI tag
+		.xdef	line		| Line we entered on
+
+		.xref	lclsadr		| score object base address
+		.xref	lclscrl		| score object scroll offset
+		.xref	_v_odtab	| VSDD object descriptor table
+		.xref	_v_regs		| VSDD registers
+
+		.page
+| ==============================================================================
+
+| 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 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 ONLY.
+
+FLOPVBL		=	0x001015EE	| floppy VI handler address	<<<=====
+
+| ==============================================================================
+
+		.page
+
+| Hardware address equates:
+| -------------------------
+TI_VEC		=	0x00000070	| Timer interrupt autovector
+
+TIMER		=	0x003A0001	| Timer 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
+
+| VSDD register offsets:
+| ----------------------
+VSDD_R5		=	10		| VSDD bank control register
+VSDD_R11	=	22		| VSDD access table register
+
+| ==============================================================================
+
+| 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
+
+| ==============================================================================
+
+		.page
+| ==============================================================================
+| _tsetup -- tsetup() -- timer setup function
+| ==============================================================================
+
+_tsetup:	move.w	sr,-(a7)		| Save old interrupt mask
+		ori.w	#IPL7,sr		| Disable interrupts
+
+		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
+		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[16];
-*
-_vi_clk:	ds.w	1		* VSDD scroll delay timer
-_vi_tag:	ds.w	1		* VSDD VI 'needs service' tag
-*
-bank:		ds.w	1		* VSDD bank we enterd with
-line:		ds.w	1		* Line we came in on (for analysis)
-* ==============================================================================
-*
+| ==============================================================================
+
+| 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[16];
+
+_vi_clk:	ds.w	1		| VSDD scroll delay timer
+_vi_tag:	ds.w	1		| VSDD VI 'needs service' tag
+
+bank:		ds.w	1		| VSDD bank we enterd with
+line:		ds.w	1		| Line we came in on (for analysis)
+| ==============================================================================
+
 		.end
Index: util/asm.py
===================================================================
--- util/asm.py	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
+++ util/asm.py	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -0,0 +1,47 @@
+#!/usr/bin/env python3
+
+import sys
+import re
+
+def convert_line(line):
+    if line == "*":
+        return ""
+
+    # |foo .equ *| -> |foo:|
+
+    m = re.match(r"^([a-z0-9_]+)\t+.equ\t+\*(.*)$", line)
+
+    if m != None:
+        lab = m.group(1) + ":"
+        com = m.group(2).strip()
+        line = lab + "\t\t\t\t\t"[len(lab) // 8:] + com
+
+    # |foo: dc.b '(...)'| -> |foo: dc.b "(...)"|
+
+    m = re.match(r"((?:^[a-z0-9]+:)?\t+dc.b\t+)'([^']+)'(.*)$", line)
+
+    if m != None:
+        line = m.group(1) + "\"" + m.group(2) + "\"" + m.group(3)
+
+    line = line.replace("*", "|")
+    line = line.replace("$", "0x")
+    line = line.replace(".equ", "=")
+    return line
+
+def convert(in_path, out_path):
+    lines = []
+
+    with open(in_path, "r") as f:
+        for line in f:
+            line = line.rstrip()
+            line = convert_line(line)
+            lines.append(line)
+
+    with open(out_path, "w") as f:
+        for line in lines:
+            print(line, file = f)
+
+if len(sys.argv) != 3:
+    raise Exception("usage: asm.py in-path out-path")
+
+convert(sys.argv[1], sys.argv[2])
Index: vlib/acctrl.s
===================================================================
--- vlib/acctrl.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/acctrl.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,127 +1,127 @@
-* ------------------------------------------------------------------------------
-* acctrl.s -- VSDD access table control functions
-* Version 6 -- 1987-04-13 -- D.N. Lynx Crowe
-* (c) Copyright 1987 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-*	objclr(obj)
-*	unsigned int obj;
-*
-*		Clear bits in access table for object 'obj'.
-*		Disables object 'obj'.
-*
-*	objoff(obj, line, num)
-*	unsigned int obj, line, num;
-*
-*		Disable object obj at line thru line+num.
-*
-*	objon(obj, line, num)
-*	unsigned int obj, line, num;
-*
-*		Enable object obj at line thru line+num.
-*
-*
-*	Assumes VSDD is looking at bank 0.
-*	Assumes a screen height of 350 lines.
-*	No error checks are done, so beware.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| acctrl.s -- VSDD access table control functions
+| Version 6 -- 1987-04-13 -- D.N. Lynx Crowe
+| (c) Copyright 1987 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+|	objclr(obj)
+|	unsigned int obj;
+
+|		Clear bits in access table for object 'obj'.
+|		Disables object 'obj'.
+
+|	objoff(obj, line, num)
+|	unsigned int obj, line, num;
+
+|		Disable object obj at line thru line+num.
+
+|	objon(obj, line, num)
+|	unsigned int obj, line, num;
+
+|		Enable object obj at line thru line+num.
+
+
+|	Assumes VSDD is looking at bank 0.
+|	Assumes a screen height of 350 lines.
+|	No error checks are done, so beware.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_objclr,_objoff,_objon
-*
+
 		.xref	_v_actab
-*
-SCSIZE		.equ	350		* Screen height
-*
-OBJ		.equ	8		* Object number argument offset
-LINE		.equ	10		* Beginning line argument offset
-NUM		.equ	12		* Object height argument offset
-* ------------------------------------------------------------------------------
+
+SCSIZE		=	350		| Screen height
+
+OBJ		=	8		| Object number argument offset
+LINE		=	10		| Beginning line argument offset
+NUM		=	12		| Object height argument offset
+| ------------------------------------------------------------------------------
 		.page
-* ------------------------------------------------------------------------------
-*
-*	objclr(obj)
-*	unsigned int obj;
-*
-*		Disables object obj in access table by turning on
-*		its bit in all words of the access table.
-* ------------------------------------------------------------------------------
-_objclr:	link	a6,#0		* Link stack frames
-		move.w	OBJ(a6),d1	* Get object bit number in d1
-		lea	_v_actab,a0	* Get base of object table in a0
-		move.w	#SCSIZE-1,d2	* Put line count in d2
-*
-objclr1:	move.w	(a0),d0		* Get access table word
-		bset.l	d1,d0		* Set the bit
-		move.w	d0,(a0)+	* Update word in access table
-		dbf	d2,objclr1	* Loop until done
-*
-		unlk	a6		* Unlink stack frame
-		rts			* Return to caller
-*
+| ------------------------------------------------------------------------------
+
+|	objclr(obj)
+|	unsigned int obj;
+
+|		Disables object obj in access table by turning on
+|		its bit in all words of the access table.
+| ------------------------------------------------------------------------------
+_objclr:	link	a6,#0		| Link stack frames
+		move.w	OBJ(a6),d1	| Get object bit number in d1
+		lea	_v_actab,a0	| Get base of object table in a0
+		move.w	#SCSIZE-1,d2	| Put line count in d2
+
+objclr1:	move.w	(a0),d0		| Get access table word
+		bset.l	d1,d0		| Set the bit
+		move.w	d0,(a0)+	| Update word in access table
+		dbf	d2,objclr1	| Loop until done
+
+		unlk	a6		| Unlink stack frame
+		rts			| Return to caller
+
 		.page
-* ------------------------------------------------------------------------------
-*	objoff(obj, line, num)
-*	unsigned int obj, line, num;
-*
-*		Turn on access table bits for object 'obj' at
-*		lines 'line' through 'line'+'num'.  Disables the object.
-*		Assumes object bits were set at those locations.
-* ------------------------------------------------------------------------------
-_objoff:	link	a6,#0		* Link stack frames
-		move.w	OBJ(a6),d1	* Get object bit number into d1
-		move.w	LINE(a6),d2	* Get top line number
-		add.w	d2,d2		* Convert to word offset
-		lea	_v_actab,a0	* Get base address of access table
-		move.w	0(a0,d2),d0	* Get top line access word
-		bset.l	d1,d0		* Set object bit
-		move.w	d0,0(a0,d2)	* Update word in access table
-		tst.w	NUM(a6)		* Number of lines = 0 ?
-		beq	objoff1		* Done if so
-*
-		move.w	NUM(a6),d2	* Get object depth
-		add.w	LINE(a6),d2	* Add to top line number
-		cmpi.w	#SCSIZE,d2	* Bottom line >= screen height ?
-		bge	objoff1		* Done if so
-*
-		add.w	d2,d2		* Convert to word offset
-		move.w	0(a0,d2),d0	* Get bottom line access word
-		bset.l	d1,d0		* Set object bit
-		move.w	d0,0(a0,d2)	* Update word in access table
-*
-objoff1:	unlk	a6		* Unlink stack frame
-		rts			* Return to caller
-*
+| ------------------------------------------------------------------------------
+|	objoff(obj, line, num)
+|	unsigned int obj, line, num;
+
+|		Turn on access table bits for object 'obj' at
+|		lines 'line' through 'line'+'num'.  Disables the object.
+|		Assumes object bits were set at those locations.
+| ------------------------------------------------------------------------------
+_objoff:	link	a6,#0		| Link stack frames
+		move.w	OBJ(a6),d1	| Get object bit number into d1
+		move.w	LINE(a6),d2	| Get top line number
+		add.w	d2,d2		| Convert to word offset
+		lea	_v_actab,a0	| Get base address of access table
+		move.w	0(a0,d2),d0	| Get top line access word
+		bset.l	d1,d0		| Set object bit
+		move.w	d0,0(a0,d2)	| Update word in access table
+		tst.w	NUM(a6)		| Number of lines = 0 ?
+		beq	objoff1		| Done if so
+
+		move.w	NUM(a6),d2	| Get object depth
+		add.w	LINE(a6),d2	| Add to top line number
+		cmpi.w	#SCSIZE,d2	| Bottom line >= screen height ?
+		bge	objoff1		| Done if so
+
+		add.w	d2,d2		| Convert to word offset
+		move.w	0(a0,d2),d0	| Get bottom line access word
+		bset.l	d1,d0		| Set object bit
+		move.w	d0,0(a0,d2)	| Update word in access table
+
+objoff1:	unlk	a6		| Unlink stack frame
+		rts			| Return to caller
+
 		.page
-* ------------------------------------------------------------------------------
-*	objon(obj, line, num)
-*	unsigned int obj, line, num;
-*
-*		Turn off access table bits for object 'obj'
-*		at 'line' thru 'line'+'num'.  Enables the object.
-* ------------------------------------------------------------------------------
-_objon:		link	a6,#0		* Link stack frames
-		move.w	OBJ(a6),d1	* Get object bit number into d1
-		move.w	LINE(a6),d2	* Get top line number
-		add.w	d2,d2		* Convert to word offset
-		lea	_v_actab,a0	* Get base address of access table
-		move.w	0(a0,d2),d0	* Get top line access word
-		bclr.l	d1,d0		* Clear object bit
-		move.w	d0,0(a0,d2)	* Update word in access table
-		tst.w	NUM(a6)		* Number of lines = 0 ?
-		beq	objon1		* Done if so
-*
-		move.w	NUM(a6),d2	* Get object depth
-		add.w	LINE(a6),d2	* Add top line number
-		cmpi.w	#SCSIZE,d2	* Bottom line >= screen height ?
-		bge	objon1		* Done if so
-*
-		add.w	d2,d2		* Convert to word offset
-		move.w	0(a0,d2),d0	* Get bottom line access word
-		bclr.l	d1,d0		* Clear object bit
-		move.w	d0,0(a0,d2)	* Update word in access table
-*
-objon1:		unlk	a6		* Unlink stack frame
-		rts			* Return to caller
-*
+| ------------------------------------------------------------------------------
+|	objon(obj, line, num)
+|	unsigned int obj, line, num;
+
+|		Turn off access table bits for object 'obj'
+|		at 'line' thru 'line'+'num'.  Enables the object.
+| ------------------------------------------------------------------------------
+_objon:		link	a6,#0		| Link stack frames
+		move.w	OBJ(a6),d1	| Get object bit number into d1
+		move.w	LINE(a6),d2	| Get top line number
+		add.w	d2,d2		| Convert to word offset
+		lea	_v_actab,a0	| Get base address of access table
+		move.w	0(a0,d2),d0	| Get top line access word
+		bclr.l	d1,d0		| Clear object bit
+		move.w	d0,0(a0,d2)	| Update word in access table
+		tst.w	NUM(a6)		| Number of lines = 0 ?
+		beq	objon1		| Done if so
+
+		move.w	NUM(a6),d2	| Get object depth
+		add.w	LINE(a6),d2	| Add top line number
+		cmpi.w	#SCSIZE,d2	| Bottom line >= screen height ?
+		bge	objon1		| Done if so
+
+		add.w	d2,d2		| Convert to word offset
+		move.w	0(a0,d2),d0	| Get bottom line access word
+		bclr.l	d1,d0		| Clear object bit
+		move.w	d0,0(a0,d2)	| Update word in access table
+
+objon1:		unlk	a6		| Unlink stack frame
+		rts			| Return to caller
+
 		.end
Index: vlib/glcplot.s
===================================================================
--- vlib/glcplot.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/glcplot.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,68 +1,68 @@
-* ------------------------------------------------------------------------------
-* glcplot.s -- plot a pixel on the LCD display
-* Version 2 -- 1987-04-23 -- D.N. Lynx Crowe
-* (c) Copyright 1987 -- D.N. Lynx Crowe
-*
-*	GLCplot(x, y, val)
-*	unsigned x, y, val);
-*
-*		Plot a pixel at ('x', 'y') using lcdbase as the plane address
-*		in GLC RAM.  If 'val' is zero, the pixel is cleared,
-*		otherwise the pixel is cleared.  No error checking is done.
-*		Limits:  0 LE x LE 511,  0 LE y LE 63.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| glcplot.s -- plot a pixel on the LCD display
+| Version 2 -- 1987-04-23 -- D.N. Lynx Crowe
+| (c) Copyright 1987 -- D.N. Lynx Crowe
+
+|	GLCplot(x, y, val)
+|	unsigned x, y, val);
+
+|		Plot a pixel at ('x', 'y') using lcdbase as the plane address
+|		in GLC RAM.  If 'val' is zero, the pixel is cleared,
+|		otherwise the pixel is cleared.  No error checking is done.
+|		Limits:  0 LE x LE 511,  0 LE y LE 63.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_GLCplot
 		.xref	_lcd_a0,_lcd_a1,_lcdbase
-*
-XLOC		.equ	8			* 'x' parameter offset
-YLOC		.equ	10			* 'y' parameter offset
-VAL		.equ	12			* 'val' parameter offset
-*
-G_CRSWR		.equ	$46			* GLC set cursor command
-G_MWRITE	.equ	$42			* GLC write command
-G_MREAD		.equ	$43			* GLC read command
-*
+
+XLOC		=	8			| 'x' parameter offset
+YLOC		=	10			| 'y' parameter offset
+VAL		=	12			| 'val' parameter offset
+
+G_CRSWR		=	0x46			| GLC set cursor command
+G_MWRITE	=	0x42			| GLC write command
+G_MREAD		=	0x43			| GLC read command
+
 		.page
-*
-_GLCplot:	link	a6,#0			* Link stack frames
-		moveq	#63,d0			* d0 = (63-y) * 85
-		sub.w	YLOC(a6),d0		* ...
-		mulu	#85,d0			* ...
-		clr.l	d1			* d1 = x/6
-		move.w	XLOC(a6),d1		* ...
-		divu	#6,d1			* ...
-		add.w	d1,d0			* d0 = (63-y)*85 + (x/6)
-		swap	d1			* d2 = 7 - (x%6) % 8
-		moveq	#7,d2			* ...
-		sub.w	d1,d2			* ...
-		andi.w	#7,d2			* ...
-		lsr.w	#3,d1			* d1 = (x%6) / 8
-		add.w	d1,d0			* d0 = cursor address
-		add.w	_lcdbase,d0		* ...
-		move.w	d0,d1			* d1 = cursor address, too
-		move.b	#G_CRSWR,_lcd_a1	* Send cursor address to GLC
-		move.b	d0,_lcd_a0		* ...
-		lsr.w	#8,d0			* ...
-		move.b	d0,_lcd_a0		* ...
-		move.b	#G_MREAD,_lcd_a1	* Read old pixel byte
-		move.b	_lcd_a1,d0		* ... into d0
-		tst.w	VAL(a6)			* Check val for zero
-		beq	glcplt1			* Jump if val EQ 0
-*
-		bset	d2,d0			* Set the pixel to 1
-		bra	glcplt2			* Go write pixel to GLC
-*
-glcplt1:	bclr	d2,d0			* Clear the pixel to 0
-*
-glcplt2:	move.b	#G_CRSWR,_lcd_a1	* Send cursor address to GLC
-		move.b	d1,_lcd_a0		* ...
-		lsr.w	#8,d1			* ...
-		move.b	d1,_lcd_a0		* ...
-		move.b	#G_MWRITE,_lcd_a1	* Setup GLC to write pixel
-		move.b	d0,_lcd_a0		* Write pixel
-		unlk	a6			* Unlink stack frames
-		rts				* Return to caller
-*
+
+_GLCplot:	link	a6,#0			| Link stack frames
+		moveq	#63,d0			| d0 = (63-y) | 85
+		sub.w	YLOC(a6),d0		| ...
+		mulu	#85,d0			| ...
+		clr.l	d1			| d1 = x/6
+		move.w	XLOC(a6),d1		| ...
+		divu	#6,d1			| ...
+		add.w	d1,d0			| d0 = (63-y)|85 + (x/6)
+		swap	d1			| d2 = 7 - (x%6) % 8
+		moveq	#7,d2			| ...
+		sub.w	d1,d2			| ...
+		andi.w	#7,d2			| ...
+		lsr.w	#3,d1			| d1 = (x%6) / 8
+		add.w	d1,d0			| d0 = cursor address
+		add.w	_lcdbase,d0		| ...
+		move.w	d0,d1			| d1 = cursor address, too
+		move.b	#G_CRSWR,_lcd_a1	| Send cursor address to GLC
+		move.b	d0,_lcd_a0		| ...
+		lsr.w	#8,d0			| ...
+		move.b	d0,_lcd_a0		| ...
+		move.b	#G_MREAD,_lcd_a1	| Read old pixel byte
+		move.b	_lcd_a1,d0		| ... into d0
+		tst.w	VAL(a6)			| Check val for zero
+		beq	glcplt1			| Jump if val EQ 0
+
+		bset	d2,d0			| Set the pixel to 1
+		bra	glcplt2			| Go write pixel to GLC
+
+glcplt1:	bclr	d2,d0			| Clear the pixel to 0
+
+glcplt2:	move.b	#G_CRSWR,_lcd_a1	| Send cursor address to GLC
+		move.b	d1,_lcd_a0		| ...
+		lsr.w	#8,d1			| ...
+		move.b	d1,_lcd_a0		| ...
+		move.b	#G_MWRITE,_lcd_a1	| Setup GLC to write pixel
+		move.b	d0,_lcd_a0		| Write pixel
+		unlk	a6			| Unlink stack frames
+		rts				| Return to caller
+
 		.end
Index: vlib/tsplot4.s
===================================================================
--- vlib/tsplot4.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/tsplot4.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,154 +1,154 @@
-* ------------------------------------------------------------------------------
-* tsplot4.s -- output characters to a 4-bit / pixel graphics window
-*    with variable vertical pitch
-* Version 1 -- 1987-08-04 -- D.N. Lynx Crowe
-* (c) Copyright 1987 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-*	tsplot4(obase, nw, fg, row, col, str. pitch)
-*	int *obase, nw, fg, row, col, pitch;
-*	char *str;
-*
-*		Outputs characters from the string at 'str' to an 'nw'
-*		character wide 4-bit per pixel graphics window at 'obase'
-*		at ('row','col'), using 'fg' as the foreground color.
-*		Uses cgtable[][256] as the VSDD formatted character
-*		generator table.  Assumes 12 bit high characters in the
-*		cgtable.  Uses 'pitch' as the vertical spacing between
-*		character rows.  No error checks are done.
-*		The string must fit the output area (no overlaps, single line).
-*
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| tsplot4.s -- output characters to a 4-bit / pixel graphics window
+|    with variable vertical pitch
+| Version 1 -- 1987-08-04 -- D.N. Lynx Crowe
+| (c) Copyright 1987 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+|	tsplot4(obase, nw, fg, row, col, str. pitch)
+|	int |obase, nw, fg, row, col, pitch;
+|	char |str;
+
+|		Outputs characters from the string at 'str' to an 'nw'
+|		character wide 4-bit per pixel graphics window at 'obase'
+|		at ('row','col'), using 'fg' as the foreground color.
+|		Uses cgtable[][256] as the VSDD formatted character
+|		generator table.  Assumes 12 bit high characters in the
+|		cgtable.  Uses 'pitch' as the vertical spacing between
+|		character rows.  No error checks are done.
+|		The string must fit the output area (no overlaps, single line).
+
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_tsplot4
-*
+
 		.xref	_cgtable
-*
-* Argument offsets from a6:
-*
-OBASE		.equ	8		* LONG - Output area base address
-NW		.equ	12		* WORD - Character width of output area
-FG		.equ	14		* WORD - Foreground color
-ROW		.equ	16		* WORD - Row
-COL		.equ	18		* WORD - Column
-STR		.equ	20		* LONG - String base address
-PITCH		.equ	24		* WORD - Vertical spacing between rows
-*
-* Program constant definitions:
-*
-HPIX		.equ	8		* Character width in pixels
-VPIX		.equ	12		* Character height in pixels
-HCW		.equ	4		* Horizontal character width (bytes)
-PSHIFT		.equ	12		* Pixel shift into MS bits
-HSHIFT		.equ	4		* Pixel right shift
-*
+
+| Argument offsets from a6:
+
+OBASE		=	8		| LONG - Output area base address
+NW		=	12		| WORD - Character width of output area
+FG		=	14		| WORD - Foreground color
+ROW		=	16		| WORD - Row
+COL		=	18		| WORD - Column
+STR		=	20		| LONG - String base address
+PITCH		=	24		| WORD - Vertical spacing between rows
+
+| Program constant definitions:
+
+HPIX		=	8		| Character width in pixels
+VPIX		=	12		| Character height in pixels
+HCW		=	4		| Horizontal character width (bytes)
+PSHIFT		=	12		| Pixel shift into MS bits
+HSHIFT		=	4		| Pixel right shift
+
 		.page
-*
-* Register usage:
-*
-*	d0	output word and scratch
-*	d1	CG word and scratch
-*	d2	pixel counter
-*
-*	d3	foreground color (in the 4 ms bits)
-*	d4	background color (in the 4 ms bits)
-*	d5	width of the area in bytes
-*	d6	scan line counter
-*
-*	a0	CG table pointer
-*	a1	output area scan line pointer
-*	a2	input string character pointer
-*
-*	a3	output area character base pointer
-*
-*	a6	frame pointer
-*	a7	stack pointer
-*
+
+| Register usage:
+
+|	d0	output word and scratch
+|	d1	CG word and scratch
+|	d2	pixel counter
+
+|	d3	foreground color (in the 4 ms bits)
+|	d4	background color (in the 4 ms bits)
+|	d5	width of the area in bytes
+|	d6	scan line counter
+
+|	a0	CG table pointer
+|	a1	output area scan line pointer
+|	a2	input string character pointer
+
+|	a3	output area character base pointer
+
+|	a6	frame pointer
+|	a7	stack pointer
+
 		.page
-*
-_tsplot4:	link	a6,#0		* Link stack frames
-		movem.l	d3-d6/a3,-(a7)	* Save registers we use
-		move.w	#PSHIFT,d1	* Set shift constant
-		move.w	FG(a6),d3	* Setup foreground color
-		lsl.w	d1,d3		* ... in ms 4 bits of d3.W
-		move.w	NW(a6),d5	* Get line width in d5.W
-		lsl.w	#2,d5		* Multiply width by 4 for offset
-		move.w	ROW(a6),d0	* Calculate output address
-		move.w	PITCH(a6),d1	* ... PITCH
-		mulu	d1,d0		* ... * ROW
-		add.w	#VPIX-1,d0	* ... + VPIX-1
-		mulu	d5,d0		* ... * NW
-		clr.l	d1		* ...
-		move.w	COL(a6),d1	* ... + 
-		lsl.w	#2,d1		* ... COL * 4
-		add.l	d1,d0		* ...
-		add.l	OBASE(a6),d0	* ... + OBASE
-		movea.l	d0,a3		* Leave output address in a3
-		movea.l	STR(a6),a2	* Put string address in a2
-*
-cgl0:		clr.l	d0		* Clear out upper bits of d0
-		move.b	(a2)+,d0	* Get next character
-		beq	cgl5		* Done if character EQ 0
-*
-		movea.l	a3,a1		* Establish output pointer in a1
-		adda.l	#HCW,a3		* Update output pointer for next char.
-		lea	_cgtable,a0	* Establish CG pointer in a0
-		lsl.w	#1,d0		* ... 2 * character
-		adda.w	d0,a0		* ... + _cgtable address
-		move.w	#VPIX-1,d6	* Set scan line counter in d6
-*
+
+_tsplot4:	link	a6,#0		| Link stack frames
+		movem.l	d3-d6/a3,-(a7)	| Save registers we use
+		move.w	#PSHIFT,d1	| Set shift constant
+		move.w	FG(a6),d3	| Setup foreground color
+		lsl.w	d1,d3		| ... in ms 4 bits of d3.W
+		move.w	NW(a6),d5	| Get line width in d5.W
+		lsl.w	#2,d5		| Multiply width by 4 for offset
+		move.w	ROW(a6),d0	| Calculate output address
+		move.w	PITCH(a6),d1	| ... PITCH
+		mulu	d1,d0		| ... | ROW
+		add.w	#VPIX-1,d0	| ... + VPIX-1
+		mulu	d5,d0		| ... | NW
+		clr.l	d1		| ...
+		move.w	COL(a6),d1	| ... +
+		lsl.w	#2,d1		| ... COL | 4
+		add.l	d1,d0		| ...
+		add.l	OBASE(a6),d0	| ... + OBASE
+		movea.l	d0,a3		| Leave output address in a3
+		movea.l	STR(a6),a2	| Put string address in a2
+
+cgl0:		clr.l	d0		| Clear out upper bits of d0
+		move.b	(a2)+,d0	| Get next character
+		beq	cgl5		| Done if character EQ 0
+
+		movea.l	a3,a1		| Establish output pointer in a1
+		adda.l	#HCW,a3		| Update output pointer for next char.
+		lea	_cgtable,a0	| Establish CG pointer in a0
+		lsl.w	#1,d0		| ... 2 | character
+		adda.w	d0,a0		| ... + _cgtable address
+		move.w	#VPIX-1,d6	| Set scan line counter in d6
+
 		.page
-cgl1:		move.w	(a0),d1		* Get character generator word in d1
-		move.w	#(HPIX/2)-1,d2	* Set pixel counter in d2
-		clr.l	d4		* Get old output word as background
-		move.w	(a1),d4		* ...
-		swap	d4		* ...
-*
-cgl2:		lsr.w	#HSHIFT,d0	* Shift output word right 1 pixel
-		lsr.l	#HSHIFT,d4	* Shift background word 1 pixel
-		andi.l	#$FFFFF000,d4	* Mask for upper 4 bits of d4.W
-		btst.l	#0,d1		* Check CG word ls bit
-		beq	cgl3		* Set background color if bit EQ 0
-*
-		or.w	d3,d0		* OR foreground color into output word
-		bra	cgl4		* Go update CG word
-*
-cgl3:		or.w	d4,d0		* OR background color into output word
-*
-cgl4:		lsr.w	#1,d1		* Shift CG word right 1 pixel
-		dbf	d2,cgl2		* Loop for first 4 pixels
-*
-		move.w	d0,(a1)+	* Store first output word in scan line
-		move.w	#(HPIX/2)-1,d2	* Set pixel counter in d2
-		clr.l	d4		* Get old output word as background
-		move.w	(a1),d4		* ...
-		swap	d4		* ...
-*
-cgl2a:		lsr.w	#HSHIFT,d0	* Shift output word right 1 pixel
-		lsr.l	#HSHIFT,d4	* Shift background word 1 pixel
-		andi.l	#$FFFFF000,d4	* Mask for upper bits of d4.W
-		btst.l	#0,d1		* Check CG word ls bit
-		beq	cgl3a		* Set background color if bit EQ 0
-*
-		or.w	d3,d0		* OR foreground color into output word
-		bra	cgl4a		* Go update CG word
-*
-cgl3a:		or.w	d4,d0		* OR background color into output word
-*
-cgl4a:		lsr.w	#1,d1		* Shift CG word right 1 pixel
-		dbf	d2,cgl2a	* Loop for last 4 pixels
-*
-		move.w	d0,(a1)		* Store second output word in scan line
-		suba.w	d5,a1		* Update output pointer
-		suba.w	#2,a1		* ...
-		adda.l	#512,a0		* Update CG pointer for next scan line
-		dbf	d6,cgl1		* Loop for all scan lines
-*
-		bra	cgl0		* Loop for next character
-*
-cgl5:		movem.l	(a7)+,d3-d6/a3	* Restore registers
-		unlk	a6		* Unlink stack frames
-		rts			* Return to caller
-*
+cgl1:		move.w	(a0),d1		| Get character generator word in d1
+		move.w	#(HPIX/2)-1,d2	| Set pixel counter in d2
+		clr.l	d4		| Get old output word as background
+		move.w	(a1),d4		| ...
+		swap	d4		| ...
+
+cgl2:		lsr.w	#HSHIFT,d0	| Shift output word right 1 pixel
+		lsr.l	#HSHIFT,d4	| Shift background word 1 pixel
+		andi.l	#0xFFFFF000,d4	| Mask for upper 4 bits of d4.W
+		btst.l	#0,d1		| Check CG word ls bit
+		beq	cgl3		| Set background color if bit EQ 0
+
+		or.w	d3,d0		| OR foreground color into output word
+		bra	cgl4		| Go update CG word
+
+cgl3:		or.w	d4,d0		| OR background color into output word
+
+cgl4:		lsr.w	#1,d1		| Shift CG word right 1 pixel
+		dbf	d2,cgl2		| Loop for first 4 pixels
+
+		move.w	d0,(a1)+	| Store first output word in scan line
+		move.w	#(HPIX/2)-1,d2	| Set pixel counter in d2
+		clr.l	d4		| Get old output word as background
+		move.w	(a1),d4		| ...
+		swap	d4		| ...
+
+cgl2a:		lsr.w	#HSHIFT,d0	| Shift output word right 1 pixel
+		lsr.l	#HSHIFT,d4	| Shift background word 1 pixel
+		andi.l	#0xFFFFF000,d4	| Mask for upper bits of d4.W
+		btst.l	#0,d1		| Check CG word ls bit
+		beq	cgl3a		| Set background color if bit EQ 0
+
+		or.w	d3,d0		| OR foreground color into output word
+		bra	cgl4a		| Go update CG word
+
+cgl3a:		or.w	d4,d0		| OR background color into output word
+
+cgl4a:		lsr.w	#1,d1		| Shift CG word right 1 pixel
+		dbf	d2,cgl2a	| Loop for last 4 pixels
+
+		move.w	d0,(a1)		| Store second output word in scan line
+		suba.w	d5,a1		| Update output pointer
+		suba.w	#2,a1		| ...
+		adda.l	#512,a0		| Update CG pointer for next scan line
+		dbf	d6,cgl1		| Loop for all scan lines
+
+		bra	cgl0		| Loop for next character
+
+cgl5:		movem.l	(a7)+,d3-d6/a3	| Restore registers
+		unlk	a6		| Unlink stack frames
+		rts			| Return to caller
+
 		.end
Index: vlib/vbank.s
===================================================================
--- vlib/vbank.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vbank.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,112 +1,112 @@
-* ------------------------------------------------------------------------------
-* vbank.s -- VSDD bank switching control functions
-* Version 3 -- 1989-12-19 -- D.N. Lynx Crowe
-*
-*	unsigned
-*	vbank(b)
-*	unsigned b;
-*
-*		Set VSDD Data Segment bank to b.
-*		Return old bank select value.
-*
-*
-*	vfwait()
-*
-*		Wait for a FRAMESTOP update to transpire.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| vbank.s -- VSDD bank switching control functions
+| Version 3 -- 1989-12-19 -- D.N. Lynx Crowe
+
+|	unsigned
+|	vbank(b)
+|	unsigned b;
+
+|		Set VSDD Data Segment bank to b.
+|		Return old bank select value.
+
+
+|	vfwait()
+
+|		Wait for a FRAMESTOP update to transpire.
+| ------------------------------------------------------------------------------
 		.xdef	_vbank
 		.xdef	_vfwait
-*
+
 		.xref	_v_regs
-*
+
 		.text
-*
-B		.equ	8
-*
-OLDB		.equ	d6
-NEWB		.equ	d7
-*
-VSDD_R5		.equ	10
-VSDD_R11	.equ	22
-*
-VT_BASE		.equ	128		* word offset of VSDD Access Table
-*
-VT_1		.equ	VT_BASE+300	* high time
-VT_2		.equ	VT_BASE+2	* low time
-*
+
+B		=	8
+
+OLDB		=	d6
+NEWB		=	d7
+
+VSDD_R5		=	10
+VSDD_R11	=	22
+
+VT_BASE		=	128		| word offset of VSDD Access Table
+
+VT_1		=	VT_BASE+300	| high time
+VT_2		=	VT_BASE+2	| low time
+
 		.page
-* ------------------------------------------------------------------------------
-*	vbank(b) -- change VSDD Data Segment bank to b.  Return old bank.
-*	Assumes a 128K byte window, sets S15..S11 to zero.
-* ------------------------------------------------------------------------------
-*
+| ------------------------------------------------------------------------------
+|	vbank(b) -- change VSDD Data Segment bank to b.  Return old bank.
+|	Assumes a 128K byte window, sets S15..S11 to zero.
+| ------------------------------------------------------------------------------
 
-_vbank:		link	a6,#0			* link stack frames
-		movem.l	d5-d7,-(sp)		* preserve registers
-		move.w	_v_regs+VSDD_R5,OLDB	* get v_regs[5]
-		lsr.w	#6,OLDB			* extract BS bits
-		move.w	OLDB,d0			* ...
-		andi.w	#2,d0			* ...
-		move.w	OLDB,d1			* ...
-		lsr.w	#2,d1			* ...
-		andi.w	#1,d1			* ...
-		or.w	d1,d0			* ...
-		move.w	d0,OLDB			* ...
-		cmp.w	B(a6),OLDB		* see if they're what we want
-		bne	L2			* jump if not
-*
-		move.w	B(a6),d0		* setup to return b
+
+_vbank:		link	a6,#0			| link stack frames
+		movem.l	d5-d7,-(sp)		| preserve registers
+		move.w	_v_regs+VSDD_R5,OLDB	| get v_regs[5]
+		lsr.w	#6,OLDB			| extract BS bits
+		move.w	OLDB,d0			| ...
+		andi.w	#2,d0			| ...
+		move.w	OLDB,d1			| ...
+		lsr.w	#2,d1			| ...
+		andi.w	#1,d1			| ...
+		or.w	d1,d0			| ...
+		move.w	d0,OLDB			| ...
+		cmp.w	B(a6),OLDB		| see if they're what we want
+		bne	L2			| jump if not
+
+		move.w	B(a6),d0		| setup to return b
 		bra	L1
-*
-L2:		move.w	B(a6),NEWB		* get bank bits from b
-		lsl.w	#6,NEWB			* shift bits from b into BS bits
-		move.w	NEWB,d0			* ...
-		andi.w	#128,d0			* ...
-		lsl.w	#2,NEWB			* ...
-		andi.w	#256,NEWB		* ...
-		or.w	NEWB,d0			* ...
-		move.w	d0,_v_regs+VSDD_R5	* set v_regs[5] with new BS bits
-*
-vw1b:		cmp.w	#VT_1,_v_regs+VSDD_R11	* wait for FRAMESTOP
-		bcc	vw1b			* ...
-*
-vw2b:		cmp.w	#VT_1,_v_regs+VSDD_R11	* ...
-		bcs	vw2b			* ...
-*
-vw3b:		cmp.w	#VT_1,_v_regs+VSDD_R11	* ...
-		bcc	vw3b			* ...
-*
-vw4b:		cmp.w	#VT_2,_v_regs+VSDD_R11	* ...
-		bcs	vw4b			* ...
-*
-		move.w	OLDB,d0			* setup to return OLDB
-*
-L1:		tst.l	(sp)+			* fixup stack
-		movem.l	(sp)+,OLDB-NEWB		* restore registers
-		unlk	a6			* unlink stack frames
-		rts				* return to caller
-*
+
+L2:		move.w	B(a6),NEWB		| get bank bits from b
+		lsl.w	#6,NEWB			| shift bits from b into BS bits
+		move.w	NEWB,d0			| ...
+		andi.w	#128,d0			| ...
+		lsl.w	#2,NEWB			| ...
+		andi.w	#256,NEWB		| ...
+		or.w	NEWB,d0			| ...
+		move.w	d0,_v_regs+VSDD_R5	| set v_regs[5] with new BS bits
+
+vw1b:		cmp.w	#VT_1,_v_regs+VSDD_R11	| wait for FRAMESTOP
+		bcc	vw1b			| ...
+
+vw2b:		cmp.w	#VT_1,_v_regs+VSDD_R11	| ...
+		bcs	vw2b			| ...
+
+vw3b:		cmp.w	#VT_1,_v_regs+VSDD_R11	| ...
+		bcc	vw3b			| ...
+
+vw4b:		cmp.w	#VT_2,_v_regs+VSDD_R11	| ...
+		bcs	vw4b			| ...
+
+		move.w	OLDB,d0			| setup to return OLDB
+
+L1:		tst.l	(sp)+			| fixup stack
+		movem.l	(sp)+,OLDB-NEWB		| restore registers
+		unlk	a6			| unlink stack frames
+		rts				| return to caller
+
 		.page
-*
-* ------------------------------------------------------------------------------
-*	vfwait() -- Wait for a FRAMESTOP update to transpire.
-* ------------------------------------------------------------------------------
-*
-_vfwait:	link	a6,#0			* link stack frames
-*
-vw1a:		cmp.w	#VT_1,_v_regs+VSDD_R11	* wait for FRAMESTOP
-		bcc	vw1a			* ...
-*
-vw2a:		cmp.w	#VT_1,_v_regs+VSDD_R11	* ...
-		bcs	vw2a			* ...
-*
-vw3a:		cmp.w	#VT_1,_v_regs+VSDD_R11	* ...
-		bcc	vw3a			* ...
-*
-vw4a:		cmp.w	#VT_2,_v_regs+VSDD_R11	* ...
-		bcs	vw4a			* ...
-*
-		unlk	a6			* unlink stack frames
-		rts				* return to caller
-*
+
+| ------------------------------------------------------------------------------
+|	vfwait() -- Wait for a FRAMESTOP update to transpire.
+| ------------------------------------------------------------------------------
+
+_vfwait:	link	a6,#0			| link stack frames
+
+vw1a:		cmp.w	#VT_1,_v_regs+VSDD_R11	| wait for FRAMESTOP
+		bcc	vw1a			| ...
+
+vw2a:		cmp.w	#VT_1,_v_regs+VSDD_R11	| ...
+		bcs	vw2a			| ...
+
+vw3a:		cmp.w	#VT_1,_v_regs+VSDD_R11	| ...
+		bcc	vw3a			| ...
+
+vw4a:		cmp.w	#VT_2,_v_regs+VSDD_R11	| ...
+		bcs	vw4a			| ...
+
+		unlk	a6			| unlink stack frames
+		rts				| return to caller
+
 		.end
Index: vlib/vclrav.s
===================================================================
--- vlib/vclrav.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vclrav.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,51 +1,51 @@
-* ------------------------------------------------------------------------------
-* vclrav.s -- clear a character's attributes in video RAM
-* Version 1 -- 1988-10-11 -- D.N. Lynx Crowe
-* (c) Copyright 1988 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-*	vclrav(adr, row, col, atr, len)
-*	unsigned int *adr, row, col, atr, len;
-*
-*		Clears attribute 'atr' at ('row', 'col') in the
-*		full attribute text object at 'adr'
-*		using a line length of 'len'.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| vclrav.s -- clear a character's attributes in video RAM
+| Version 1 -- 1988-10-11 -- D.N. Lynx Crowe
+| (c) Copyright 1988 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+|	vclrav(adr, row, col, atr, len)
+|	unsigned int |adr, row, col, atr, len;
+
+|		Clears attribute 'atr' at ('row', 'col') in the
+|		full attribute text object at 'adr'
+|		using a line length of 'len'.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_vclrav
-*
-P_ADR		.equ	8
-P_ROW		.equ	12
-P_COL		.equ	14
-P_ATR		.equ	16
-P_LEN		.equ	18
-*
-_vclrav:	link	a6,#0		* Link stack frame pointer
-		move.w	P_ROW(a6),d0	* Get row
-		mulu	P_LEN(a6),d0	* Multiply by len
-		clr.l	d1		* Clear out d1
-		move.w	P_COL(a6),d1	* Get col
-		add.l	d1,d0		* Add col into d0 to get char. #
-		move.l	d0,d1		* Develop cw = (cn/2)*6 in d1
-		andi.l	#$FFFFFFFE,d1	* ...
-		move.l	d1,d2		* ...
-		add.l	d1,d1		* ...
-		add.l	d2,d1		* ...
-		add.l	P_ADR(a6),d1	* Add sbase to cw
-		movea.l	d1,a0		* a0 points at the word with the char.
-		btst.l	#0,d0		* Odd char. location ?
-		bne	vclrav1		* Jump if so
-*
-		addq.l	#2,a0		* Point at the attribute word
-		bra	vclravx		* Go set attribute
-*
-vclrav1:	addq.l	#4,a0		* Point at the attribute word
-*
-vclravx:	move.w	P_ATR(a6),d0	* Get attribute mask
-		not.w	d0		* Complement the mask
-		and.w	d0,(a0)		* Clear attributes in video RAM
-		unlk	a6		* Unlink the stack frame
-		rts			* Return to caller
-*
+
+P_ADR		=	8
+P_ROW		=	12
+P_COL		=	14
+P_ATR		=	16
+P_LEN		=	18
+
+_vclrav:	link	a6,#0		| Link stack frame pointer
+		move.w	P_ROW(a6),d0	| Get row
+		mulu	P_LEN(a6),d0	| Multiply by len
+		clr.l	d1		| Clear out d1
+		move.w	P_COL(a6),d1	| Get col
+		add.l	d1,d0		| Add col into d0 to get char. #
+		move.l	d0,d1		| Develop cw = (cn/2)|6 in d1
+		andi.l	#0xFFFFFFFE,d1	| ...
+		move.l	d1,d2		| ...
+		add.l	d1,d1		| ...
+		add.l	d2,d1		| ...
+		add.l	P_ADR(a6),d1	| Add sbase to cw
+		movea.l	d1,a0		| a0 points at the word with the char.
+		btst.l	#0,d0		| Odd char. location ?
+		bne	vclrav1		| Jump if so
+
+		addq.l	#2,a0		| Point at the attribute word
+		bra	vclravx		| Go set attribute
+
+vclrav1:	addq.l	#4,a0		| Point at the attribute word
+
+vclravx:	move.w	P_ATR(a6),d0	| Get attribute mask
+		not.w	d0		| Complement the mask
+		and.w	d0,(a0)		| Clear attributes in video RAM
+		unlk	a6		| Unlink the stack frame
+		rts			| Return to caller
+
 		.end
Index: vlib/vcputs.s
===================================================================
--- vlib/vcputs.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vcputs.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,140 +1,140 @@
-* ------------------------------------------------------------------------------
-* vcputs.s -- output a character string to a 4-bit per pixel graphics window
-* Version 3 -- 1987-07-31 -- D.N. Lynx Crowe
-* (c) Copyright 1987 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-*	vcputs(obase, nw, fg, bg, row, col, str)
-*	int *obase, nw, fg, bg, row, col;
-*	char *str;
-*
-*		Outputs characters from the string at 'str' to an 'nw'
-*		character wide 4-bit per pixel graphics window at 'obase'
-*		at ('row','col'), using 'fg' as the foreground color, and
-*		'bg' as the background color.  Uses cgtable[][256] as the
-*		VSDD formatted character generator table.
-*		No error checks are done.
-*
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| vcputs.s -- output a character string to a 4-bit per pixel graphics window
+| Version 3 -- 1987-07-31 -- D.N. Lynx Crowe
+| (c) Copyright 1987 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+|	vcputs(obase, nw, fg, bg, row, col, str)
+|	int |obase, nw, fg, bg, row, col;
+|	char |str;
+
+|		Outputs characters from the string at 'str' to an 'nw'
+|		character wide 4-bit per pixel graphics window at 'obase'
+|		at ('row','col'), using 'fg' as the foreground color, and
+|		'bg' as the background color.  Uses cgtable[][256] as the
+|		VSDD formatted character generator table.
+|		No error checks are done.
+
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_vcputs
-*
+
 		.xref	_cgtable
-*
-* Argument offsets from a6:
-*
-OBASE		.equ	8		* Output area base address
-NW		.equ	12		* Character width of output area
-FG		.equ	14		* Foreground color
-BG		.equ	16		* Background color
-ROW		.equ	18		* Row
-COL		.equ	20		* Column
-STR		.equ	22		* String base address
-*
-* Program constant definitions:
-*
-HPIX		.equ	8		* Character width in pixels
-VPIX		.equ	12		* Character height in pixels
-HCW		.equ	4		* Horizontal character width (bytes)
-PSHIFT		.equ	12		* Pixel shift into MS bits
-HSHIFT		.equ	4		* Pixel right shift
-*
+
+| Argument offsets from a6:
+
+OBASE		=	8		| Output area base address
+NW		=	12		| Character width of output area
+FG		=	14		| Foreground color
+BG		=	16		| Background color
+ROW		=	18		| Row
+COL		=	20		| Column
+STR		=	22		| String base address
+
+| Program constant definitions:
+
+HPIX		=	8		| Character width in pixels
+VPIX		=	12		| Character height in pixels
+HCW		=	4		| Horizontal character width (bytes)
+PSHIFT		=	12		| Pixel shift into MS bits
+HSHIFT		=	4		| Pixel right shift
+
 		.page
-*
-* Register usage:
-*
-*	d0	output word and scratch
-*	d1	CG word and scratch
-*	d2	pixel counter
-*
-*	d3	foreground color (in the 4 ms bits)
-*	d4	background color (in the 4 ms bits)
-*	d5	width of the area in bytes
-*	d6	scan line counter
-*
-*	a0	CG table pointer
-*	a1	output area scan line pointer
-*	a2	input string character pointer
-*
-*	a3	output area character base pointer
-*
+
+| Register usage:
+
+|	d0	output word and scratch
+|	d1	CG word and scratch
+|	d2	pixel counter
+
+|	d3	foreground color (in the 4 ms bits)
+|	d4	background color (in the 4 ms bits)
+|	d5	width of the area in bytes
+|	d6	scan line counter
+
+|	a0	CG table pointer
+|	a1	output area scan line pointer
+|	a2	input string character pointer
+
+|	a3	output area character base pointer
+
 		.page
-*
-_vcputs:	link	a6,#0		* Link stack frames
-		movem.l	d3-d6/a3,-(a7)	* Save registers we use
-		move.w	#PSHIFT,d1	* Set shift constant
-		move.w	FG(a6),d3	* Setup foreground color
-		lsl.w	d1,d3		* ... in ms 4 bits of d3.W
-		move.w	BG(a6),d4	* Setup background color
-		lsl.w	d1,d4		* ... in ms 4 bits of d4.W
-		move.w	NW(a6),d5	* Get line width in d5.W
-		lsl.w	#2,d5		* Multiply width by 4 for offset
-		move.w	ROW(a6),d0	* Calculate output address
-		move.w	#VPIX,d1	* ... VPIX
-		mulu	d1,d0		* ... * ROW
-		add.w	#VPIX-1,d0	* ... + VPIX-1
-		mulu	d5,d0		* ... * NW
-		clr.l	d1		* ...
-		move.w	COL(a6),d1	* ... + 
-		lsl.w	#2,d1		* ... COL * 4
-		add.l	d1,d0		* ...
-		add.l	OBASE(a6),d0	* ... + OBASE
-		movea.l	d0,a3		* Leave output address in a3
-		movea.l	STR(a6),a2	* Put string address in a2
-*
-cgl0:		clr.l	d0		* Clear out upper bits of d0
-		move.b	(a2)+,d0	* Get next character
-		beq	cgl5		* Done if character EQ 0
-*
-		movea.l	a3,a1		* Establish output pointer in a1
-		adda.l	#HCW,a3		* Update output pointer for next char.
-		lea	_cgtable,a0	* Establish CG pointer in a0
-		lsl.w	#1,d0		* ... 2 * character
-		adda.w	d0,a0		* ... + _cgtable address
-		move.w	#VPIX-1,d6	* Set scan line counter in d6
-*
+
+_vcputs:	link	a6,#0		| Link stack frames
+		movem.l	d3-d6/a3,-(a7)	| Save registers we use
+		move.w	#PSHIFT,d1	| Set shift constant
+		move.w	FG(a6),d3	| Setup foreground color
+		lsl.w	d1,d3		| ... in ms 4 bits of d3.W
+		move.w	BG(a6),d4	| Setup background color
+		lsl.w	d1,d4		| ... in ms 4 bits of d4.W
+		move.w	NW(a6),d5	| Get line width in d5.W
+		lsl.w	#2,d5		| Multiply width by 4 for offset
+		move.w	ROW(a6),d0	| Calculate output address
+		move.w	#VPIX,d1	| ... VPIX
+		mulu	d1,d0		| ... | ROW
+		add.w	#VPIX-1,d0	| ... + VPIX-1
+		mulu	d5,d0		| ... | NW
+		clr.l	d1		| ...
+		move.w	COL(a6),d1	| ... +
+		lsl.w	#2,d1		| ... COL | 4
+		add.l	d1,d0		| ...
+		add.l	OBASE(a6),d0	| ... + OBASE
+		movea.l	d0,a3		| Leave output address in a3
+		movea.l	STR(a6),a2	| Put string address in a2
+
+cgl0:		clr.l	d0		| Clear out upper bits of d0
+		move.b	(a2)+,d0	| Get next character
+		beq	cgl5		| Done if character EQ 0
+
+		movea.l	a3,a1		| Establish output pointer in a1
+		adda.l	#HCW,a3		| Update output pointer for next char.
+		lea	_cgtable,a0	| Establish CG pointer in a0
+		lsl.w	#1,d0		| ... 2 | character
+		adda.w	d0,a0		| ... + _cgtable address
+		move.w	#VPIX-1,d6	| Set scan line counter in d6
+
 		.page
-cgl1:		move.w	(a0),d1		* Get character generator word in d1
-		move.w	#(HPIX/2)-1,d2	* Set pixel counter in d2
-*
-cgl2:		lsr.w	#HSHIFT,d0	* Shift output word right 1 pixel
-		btst.l	#0,d1		* Check CG word ls bit
-		beq	cgl3		* Set background color if bit EQ 0
-*
-		or.w	d3,d0		* OR foreground color into output word
-		bra	cgl4		* Go update CG word
-*
-cgl3:		or.w	d4,d0		* OR background color into output word
-*
-cgl4:		lsr.w	#1,d1		* Shift CG word right 1 pixel
-		dbf	d2,cgl2		* Loop for first 4 pixels
-*
-		move.w	d0,(a1)+	* Store first output word in scan line
-		move.w	#(HPIX/2)-1,d2	* Set pixel counter in d2
-*
-cgl2a:		lsr.w	#HSHIFT,d0	* Shift output word right 1 pixel
-		btst.l	#0,d1		* Check CG word ls bit
-		beq	cgl3a		* Set background color if bit EQ 0
-*
-		or.w	d3,d0		* OR foreground color into output word
-		bra	cgl4a		* Go update CG word
-*
-cgl3a:		or.w	d4,d0		* OR background color into output word
-*
-cgl4a:		lsr.w	#1,d1		* Shift CG word right 1 pixel
-		dbf	d2,cgl2a	* Loop for last 4 pixels
-*
-		move.w	d0,(a1)		* Store second output word in scan line
-		suba.w	d5,a1		* Update output pointer
-		suba.w	#2,a1		* ...
-		adda.l	#512,a0		* Update CG pointer for next scan line
-		dbf	d6,cgl1		* Loop for all scan lines
-*
-		bra	cgl0		* Loop for next character
-*
-cgl5:		movem.l	(a7)+,d3-d6/a3	* Restore registers
-		unlk	a6		* Unlink stack frames
-		rts			* Return to caller
-*
+cgl1:		move.w	(a0),d1		| Get character generator word in d1
+		move.w	#(HPIX/2)-1,d2	| Set pixel counter in d2
+
+cgl2:		lsr.w	#HSHIFT,d0	| Shift output word right 1 pixel
+		btst.l	#0,d1		| Check CG word ls bit
+		beq	cgl3		| Set background color if bit EQ 0
+
+		or.w	d3,d0		| OR foreground color into output word
+		bra	cgl4		| Go update CG word
+
+cgl3:		or.w	d4,d0		| OR background color into output word
+
+cgl4:		lsr.w	#1,d1		| Shift CG word right 1 pixel
+		dbf	d2,cgl2		| Loop for first 4 pixels
+
+		move.w	d0,(a1)+	| Store first output word in scan line
+		move.w	#(HPIX/2)-1,d2	| Set pixel counter in d2
+
+cgl2a:		lsr.w	#HSHIFT,d0	| Shift output word right 1 pixel
+		btst.l	#0,d1		| Check CG word ls bit
+		beq	cgl3a		| Set background color if bit EQ 0
+
+		or.w	d3,d0		| OR foreground color into output word
+		bra	cgl4a		| Go update CG word
+
+cgl3a:		or.w	d4,d0		| OR background color into output word
+
+cgl4a:		lsr.w	#1,d1		| Shift CG word right 1 pixel
+		dbf	d2,cgl2a	| Loop for last 4 pixels
+
+		move.w	d0,(a1)		| Store second output word in scan line
+		suba.w	d5,a1		| Update output pointer
+		suba.w	#2,a1		| ...
+		adda.l	#512,a0		| Update CG pointer for next scan line
+		dbf	d6,cgl1		| Loop for all scan lines
+
+		bra	cgl0		| Loop for next character
+
+cgl5:		movem.l	(a7)+,d3-d6/a3	| Restore registers
+		unlk	a6		| Unlink stack frames
+		rts			| Return to caller
+
 		.end
Index: vlib/vcputsv.s
===================================================================
--- vlib/vcputsv.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vcputsv.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,147 +1,147 @@
-* ------------------------------------------------------------------------------
-* vcputsv.s -- output characters to a 4-bit / pixel graphics window
-* with variable vertical pitch
-* Version 2 -- 1987-08-03 -- D.N. Lynx Crowe
-* (c) Copyright 1987 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-*	vcputsv(obase, nw, fg, bg, row, col, str. pitch)
-*	int *obase, nw, fg, bg, row, col, pitch;
-*	char *str;
-*
-*		Outputs characters from the string at 'str' to an 'nw'
-*		character wide 4-bit per pixel graphics window at 'obase'
-*		at ('row','col'), using 'fg' as the foreground color, and
-*		'bg' as the background color.  Uses cgtable[][256] as the
-*		VSDD formatted character generator table.  Assumes 12 bit
-*		high characters in the cgtable.  Uses 'pitch' as the vertical
-*		spacing between character rows.  No error checks are done.
-*		The string must fit the output area (no overlaps, single line).
-*
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| vcputsv.s -- output characters to a 4-bit / pixel graphics window
+| with variable vertical pitch
+| Version 2 -- 1987-08-03 -- D.N. Lynx Crowe
+| (c) Copyright 1987 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+|	vcputsv(obase, nw, fg, bg, row, col, str. pitch)
+|	int |obase, nw, fg, bg, row, col, pitch;
+|	char |str;
+
+|		Outputs characters from the string at 'str' to an 'nw'
+|		character wide 4-bit per pixel graphics window at 'obase'
+|		at ('row','col'), using 'fg' as the foreground color, and
+|		'bg' as the background color.  Uses cgtable[][256] as the
+|		VSDD formatted character generator table.  Assumes 12 bit
+|		high characters in the cgtable.  Uses 'pitch' as the vertical
+|		spacing between character rows.  No error checks are done.
+|		The string must fit the output area (no overlaps, single line).
+
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_vcputsv
-*
+
 		.xref	_cgtable
-*
-* Argument offsets from a6:
-*
-OBASE		.equ	8		* LONG - Output area base address
-NW		.equ	12		* WORD - Character width of output area
-FG		.equ	14		* WORD - Foreground color
-BG		.equ	16		* WORD - Background color
-ROW		.equ	18		* WORD - Row
-COL		.equ	20		* WORD - Column
-STR		.equ	22		* LONG - String base address
-PITCH		.equ	26		* WORD - Vertical spacing between rows
-*
-* Program constant definitions:
-*
-HPIX		.equ	8		* Character width in pixels
-VPIX		.equ	12		* Character height in pixels
-HCW		.equ	4		* Horizontal character width (bytes)
-PSHIFT		.equ	12		* Pixel shift into MS bits
-HSHIFT		.equ	4		* Pixel right shift
-*
+
+| Argument offsets from a6:
+
+OBASE		=	8		| LONG - Output area base address
+NW		=	12		| WORD - Character width of output area
+FG		=	14		| WORD - Foreground color
+BG		=	16		| WORD - Background color
+ROW		=	18		| WORD - Row
+COL		=	20		| WORD - Column
+STR		=	22		| LONG - String base address
+PITCH		=	26		| WORD - Vertical spacing between rows
+
+| Program constant definitions:
+
+HPIX		=	8		| Character width in pixels
+VPIX		=	12		| Character height in pixels
+HCW		=	4		| Horizontal character width (bytes)
+PSHIFT		=	12		| Pixel shift into MS bits
+HSHIFT		=	4		| Pixel right shift
+
 		.page
-*
-* Register usage:
-*
-*	d0	output word and scratch
-*	d1	CG word and scratch
-*	d2	pixel counter
-*
-*	d3	foreground color (in the 4 ms bits)
-*	d4	background color (in the 4 ms bits)
-*	d5	width of the area in bytes
-*	d6	scan line counter
-*
-*	a0	CG table pointer
-*	a1	output area scan line pointer
-*	a2	input string character pointer
-*
-*	a3	output area character base pointer
-*
-*	a6	frame pointer
-*	a7	stack pointer
-*
+
+| Register usage:
+
+|	d0	output word and scratch
+|	d1	CG word and scratch
+|	d2	pixel counter
+
+|	d3	foreground color (in the 4 ms bits)
+|	d4	background color (in the 4 ms bits)
+|	d5	width of the area in bytes
+|	d6	scan line counter
+
+|	a0	CG table pointer
+|	a1	output area scan line pointer
+|	a2	input string character pointer
+
+|	a3	output area character base pointer
+
+|	a6	frame pointer
+|	a7	stack pointer
+
 		.page
-*
-_vcputsv:	link	a6,#0		* Link stack frames
-		movem.l	d3-d6/a3,-(a7)	* Save registers we use
-		move.w	#PSHIFT,d1	* Set shift constant
-		move.w	FG(a6),d3	* Setup foreground color
-		lsl.w	d1,d3		* ... in ms 4 bits of d3.W
-		move.w	BG(a6),d4	* Setup background color
-		lsl.w	d1,d4		* ... in ms 4 bits of d4.W
-		move.w	NW(a6),d5	* Get line width in d5.W
-		lsl.w	#2,d5		* Multiply width by 4 for offset
-		move.w	ROW(a6),d0	* Calculate output address
-		move.w	PITCH(a6),d1	* ... PITCH
-		mulu	d1,d0		* ... * ROW
-		add.w	#VPIX-1,d0	* ... + VPIX-1
-		mulu	d5,d0		* ... * NW
-		clr.l	d1		* ...
-		move.w	COL(a6),d1	* ... + 
-		lsl.w	#2,d1		* ... COL * 4
-		add.l	d1,d0		* ...
-		add.l	OBASE(a6),d0	* ... + OBASE
-		movea.l	d0,a3		* Leave output address in a3
-		movea.l	STR(a6),a2	* Put string address in a2
-*
-cgl0:		clr.l	d0		* Clear out upper bits of d0
-		move.b	(a2)+,d0	* Get next character
-		beq	cgl5		* Done if character EQ 0
-*
-		movea.l	a3,a1		* Establish output pointer in a1
-		adda.l	#HCW,a3		* Update output pointer for next char.
-		lea	_cgtable,a0	* Establish CG pointer in a0
-		lsl.w	#1,d0		* ... 2 * character
-		adda.w	d0,a0		* ... + _cgtable address
-		move.w	#VPIX-1,d6	* Set scan line counter in d6
-*
+
+_vcputsv:	link	a6,#0		| Link stack frames
+		movem.l	d3-d6/a3,-(a7)	| Save registers we use
+		move.w	#PSHIFT,d1	| Set shift constant
+		move.w	FG(a6),d3	| Setup foreground color
+		lsl.w	d1,d3		| ... in ms 4 bits of d3.W
+		move.w	BG(a6),d4	| Setup background color
+		lsl.w	d1,d4		| ... in ms 4 bits of d4.W
+		move.w	NW(a6),d5	| Get line width in d5.W
+		lsl.w	#2,d5		| Multiply width by 4 for offset
+		move.w	ROW(a6),d0	| Calculate output address
+		move.w	PITCH(a6),d1	| ... PITCH
+		mulu	d1,d0		| ... | ROW
+		add.w	#VPIX-1,d0	| ... + VPIX-1
+		mulu	d5,d0		| ... | NW
+		clr.l	d1		| ...
+		move.w	COL(a6),d1	| ... +
+		lsl.w	#2,d1		| ... COL | 4
+		add.l	d1,d0		| ...
+		add.l	OBASE(a6),d0	| ... + OBASE
+		movea.l	d0,a3		| Leave output address in a3
+		movea.l	STR(a6),a2	| Put string address in a2
+
+cgl0:		clr.l	d0		| Clear out upper bits of d0
+		move.b	(a2)+,d0	| Get next character
+		beq	cgl5		| Done if character EQ 0
+
+		movea.l	a3,a1		| Establish output pointer in a1
+		adda.l	#HCW,a3		| Update output pointer for next char.
+		lea	_cgtable,a0	| Establish CG pointer in a0
+		lsl.w	#1,d0		| ... 2 | character
+		adda.w	d0,a0		| ... + _cgtable address
+		move.w	#VPIX-1,d6	| Set scan line counter in d6
+
 		.page
-cgl1:		move.w	(a0),d1		* Get character generator word in d1
-		move.w	#(HPIX/2)-1,d2	* Set pixel counter in d2
-*
-cgl2:		lsr.w	#HSHIFT,d0	* Shift output word right 1 pixel
-		btst.l	#0,d1		* Check CG word ls bit
-		beq	cgl3		* Set background color if bit EQ 0
-*
-		or.w	d3,d0		* OR foreground color into output word
-		bra	cgl4		* Go update CG word
-*
-cgl3:		or.w	d4,d0		* OR background color into output word
-*
-cgl4:		lsr.w	#1,d1		* Shift CG word right 1 pixel
-		dbf	d2,cgl2		* Loop for first 4 pixels
-*
-		move.w	d0,(a1)+	* Store first output word in scan line
-		move.w	#(HPIX/2)-1,d2	* Set pixel counter in d2
-*
-cgl2a:		lsr.w	#HSHIFT,d0	* Shift output word right 1 pixel
-		btst.l	#0,d1		* Check CG word ls bit
-		beq	cgl3a		* Set background color if bit EQ 0
-*
-		or.w	d3,d0		* OR foreground color into output word
-		bra	cgl4a		* Go update CG word
-*
-cgl3a:		or.w	d4,d0		* OR background color into output word
-*
-cgl4a:		lsr.w	#1,d1		* Shift CG word right 1 pixel
-		dbf	d2,cgl2a	* Loop for last 4 pixels
-*
-		move.w	d0,(a1)		* Store second output word in scan line
-		suba.w	d5,a1		* Update output pointer
-		suba.w	#2,a1		* ...
-		adda.l	#512,a0		* Update CG pointer for next scan line
-		dbf	d6,cgl1		* Loop for all scan lines
-*
-		bra	cgl0		* Loop for next character
-*
-cgl5:		movem.l	(a7)+,d3-d6/a3	* Restore registers
-		unlk	a6		* Unlink stack frames
-		rts			* Return to caller
-*
+cgl1:		move.w	(a0),d1		| Get character generator word in d1
+		move.w	#(HPIX/2)-1,d2	| Set pixel counter in d2
+
+cgl2:		lsr.w	#HSHIFT,d0	| Shift output word right 1 pixel
+		btst.l	#0,d1		| Check CG word ls bit
+		beq	cgl3		| Set background color if bit EQ 0
+
+		or.w	d3,d0		| OR foreground color into output word
+		bra	cgl4		| Go update CG word
+
+cgl3:		or.w	d4,d0		| OR background color into output word
+
+cgl4:		lsr.w	#1,d1		| Shift CG word right 1 pixel
+		dbf	d2,cgl2		| Loop for first 4 pixels
+
+		move.w	d0,(a1)+	| Store first output word in scan line
+		move.w	#(HPIX/2)-1,d2	| Set pixel counter in d2
+
+cgl2a:		lsr.w	#HSHIFT,d0	| Shift output word right 1 pixel
+		btst.l	#0,d1		| Check CG word ls bit
+		beq	cgl3a		| Set background color if bit EQ 0
+
+		or.w	d3,d0		| OR foreground color into output word
+		bra	cgl4a		| Go update CG word
+
+cgl3a:		or.w	d4,d0		| OR background color into output word
+
+cgl4a:		lsr.w	#1,d1		| Shift CG word right 1 pixel
+		dbf	d2,cgl2a	| Loop for last 4 pixels
+
+		move.w	d0,(a1)		| Store second output word in scan line
+		suba.w	d5,a1		| Update output pointer
+		suba.w	#2,a1		| ...
+		adda.l	#512,a0		| Update CG pointer for next scan line
+		dbf	d6,cgl1		| Loop for all scan lines
+
+		bra	cgl0		| Loop for next character
+
+cgl5:		movem.l	(a7)+,d3-d6/a3	| Restore registers
+		unlk	a6		| Unlink stack frames
+		rts			| Return to caller
+
 		.end
Index: vlib/viint.s
===================================================================
--- vlib/viint.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/viint.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,232 +1,232 @@
-* ------------------------------------------------------------------------------
-* viint.s -- VSDD Vertical Interval interrupt handler for the Buchla 700
-* Version 17 -- 1989-12-19 -- D.N. Lynx Crowe
-*
-*	VIint
-*
-*		VSDD Vertical Interval interrupt handler.  Enables display of
-*		any object whose bit is set in vi_ctl.  Bit 0 = object 0, etc.
-*
-*		SetPri() uses BIOS(B_SETV, 25, VIint) to set the interrupt
-*		vector and lets VIint() enable the object.  If vi_dis
-*		is set, SetPri() won't enable the interrupt or set the vector
-*		so that several objects can be started up at once.
-*
-*		This routine also sets the base address and scroll offset
-*		for the score display object if vi_sadr is non-zero,
-*		after a delay for VSDD FRAMESTOP synchronization.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| viint.s -- VSDD Vertical Interval interrupt handler for the Buchla 700
+| Version 17 -- 1989-12-19 -- D.N. Lynx Crowe
+
+|	VIint
+
+|		VSDD Vertical Interval interrupt handler.  Enables display of
+|		any object whose bit is set in vi_ctl.  Bit 0 = object 0, etc.
+
+|		SetPri() uses BIOS(B_SETV, 25, VIint) to set the interrupt
+|		vector and lets VIint() enable the object.  If vi_dis
+|		is set, SetPri() won't enable the interrupt or set the vector
+|		so that several objects can be started up at once.
+
+|		This routine also sets the base address and scroll offset
+|		for the score display object if vi_sadr is non-zero,
+|		after a delay for VSDD FRAMESTOP synchronization.
+| ------------------------------------------------------------------------------
 		.text
-*
-		.xdef	_VIint			* Vertical Interval int. handler
-*
-		.xdef	_vi_sadr		* score object base address
-		.xdef	_vi_scrl		* score object scroll offset
-		.xdef	lclsadr			* local scroll address
-		.xdef	lclscrl			* local scroll offset
-		.xdef	vdelay			* VSDD scroll delay
-*
-		.xdef	VIct1			* VSDD interrupt R11 
-		.xdef	VIct2			* VSDD interrupt R11 
-		.xdef	VIct3			* VSDD interrupt R11 
-		.xdef	VIct4			* VSDD interrupt R11 
-*
-		.xref	_v_regs			* VSDD registers
-		.xref	_v_odtab		* VSDD object descriptor table
-*
-		.xref	_vi_clk			* scroll delay timer
-		.xref	_vi_ctl			* unblank control word
-		.xref	_vi_tag			* VSDD 'needs service' tag
-*
-		.page
-*
-* Miscellaneous equates:
-* ----------------------
-*
-DELAY		.equ	17			* FRAMESTOP sync delay in Ms
-STACKSR		.equ	32			* offset to sr on stack
-V_BLA		.equ	4			* V_BLA (blank) bit number
-VSDD_R5		.equ	10			* VSDD R5 byte offset in _v_regs
-VSDD_R11	.equ	22			* VSDD R11 byte offset in _v_regs
-*
-VT_BASE		.equ	128			* word offset of VSDD Access Table
-*
-VT_1		.equ	VT_BASE+300		* high time
-VT_2		.equ	VT_BASE+2		* low time
-* ------------------------------------------------------------------------------
-*
-* Stack picture after movem.l at entry:
-* -------------------------------------
-*
-*	LONG	PC	+34
-*	WORD	SR	+32	STACKSR
-*	LONG	A6	+28
-*	LONG	A2	+24
-*	LONG	A1	+20
-*	LONG	A0	+16
-*	LONG	D3	+12
-*	LONG	D2	+8
-*	LONG	D1	+4
-*	LONG	D0	+0
-*
-* ------------------------------------------------------------------------------
-*
-		.page
-*
-* _VIint -- Vertical interval interrupt handler
-* ------    -----------------------------------
-_VIint:		movem.l	d0-d3/a0-a2/a6,-(a7)	* save registers
-		addi.w	#$0100,STACKSR(a7)	* raise IPL in sr on the stack
-*
-		move.w	_v_regs+VSDD_R11,VIct1	* save the VSDD R11 value
-*
-		tst.w	_vi_sadr		* see if we should scroll
-		beq	viunbl			* jump if not
-*
-* ------------------------------------------------------------------------------
-* setup delayed scroll parameters
-* ------------------------------------------------------------------------------
-		move.w	_v_regs+VSDD_R5,d0	* get VSDD R5
-		move.w	d0,d1			* save it for later
-		andi.w	#$0180,d0		* see if we're already in bank 0
-		beq	dlyscrl			* jump if so
-*
-		clr.w	_v_regs+VSDD_R5		* set bank 0
-*
-		move.w	_v_regs+VSDD_R11,VIct2	* save the VSDD R11 value
-*
-vw1a:		cmp.w	#VT_1,_v_regs+VSDD_R11	* wait for FRAMESTOP
-		bcc	vw1a			* ...
-*
-vw2a:		cmp.w	#VT_1,_v_regs+VSDD_R11	* ...
-		bcs	vw2a			* ...
-*
-vw3a:		cmp.w	#VT_1,_v_regs+VSDD_R11	* ...
-		bcc	vw3a			* ...
-*
-vw4a:		cmp.w	#VT_2,_v_regs+VSDD_R11	* ...
-		bcs	vw4a			* ...
-*
-dlyscrl:	tst.w	_vi_tag			* wait for previous scroll
-		bne	dlyscrl			* ...
-*
-		move.w	_vi_sadr,lclsadr	* save address for timeint
-		move.w	_vi_scrl,lclscrl	* save offset for timeint
-		clr.w	_vi_sadr		* reset for next time
-		clr.w	_vi_scrl		* ...
-		move.w	vdelay,_vi_clk		* set the scroll delay timer
-		st	_vi_tag			* set the 'need service' tag
-* ------------------------------------------------------------------------------
-* check for unblank requests
-* ------------------------------------------------------------------------------
-		move.w	_vi_ctl,d2		* get the unblank control word
-		beq	viexit			* exit if nothing to unblank
-*
-		bra	unblnk			* go unblank some objects
-*
-viunbl:		move.w	_vi_ctl,d2		* get the unblank control word
-		beq	vidone			* exit if nothing to unblank
-*
-		move.w	_v_regs+VSDD_R5,d0	* get VSDD R5
-		move.w	d0,d1			* save it for later
-		andi.w	#$0180,d0		* see if we're already in bank 0
-		beq	unblnk			* jump if so
-*
-		clr.w	_v_regs+VSDD_R5		* set bank 0
-*
-		move.w	_v_regs+VSDD_R11,VIct3	* save the VSDD R11 value
-*
-vw1b:		cmp.w	#VT_1,_v_regs+VSDD_R11	* wait for FRAMESTOP
-		bcc	vw1b			* ...
-*
-vw2b:		cmp.w	#VT_1,_v_regs+VSDD_R11	* ...
-		bcs	vw2b			* ...
-*
-vw3b:		cmp.w	#VT_1,_v_regs+VSDD_R11	* ...
-		bcc	vw3b			* ...
-*
-vw4b:		cmp.w	#VT_2,_v_regs+VSDD_R11	* ...
-		bcs	vw4b			* ...
-*
-		.page
-*
-* ------------------------------------------------------------------------------
-* unblank objects indicated by contents of d2  (loaded earlier from _vi_ctl)
-* ------------------------------------------------------------------------------
-*
-unblnk:		clr.w	d3			* clear the counter
-		clr.w	_vi_ctl			* clear the unblank control word
-		lea	_v_odtab,a1		* point at first object
-*
-vicheck:	btst	d3,d2			* check the object bit
-		beq	vinext			* go check next one if not set
-*
-		move.w	(a1),d0			* get v_odtab[obj][0]
-		bclr	#V_BLA,d0		* clear the blanking bit
-		move.w	d0,(a1)			* set v_odtab[obj][0]
-*
-vinext:		cmpi.w	#15,d3			* see if we're done
-		beq	viexit			* jump if so
-*
-		addq.l	#8,a1			* point at next object
-		addq.w	#1,d3			* increment object counter
-		bra	vicheck			* go check next object
-*
-* ------------------------------------------------------------------------------
-* switch back to the bank the interrupted code was using if we changed it
-* ------------------------------------------------------------------------------
-*
-viexit:		move.w	d1,d0			* see if we were in bank 0
-		andi.w	#$0180,d0		* ...
-		beq	vidone			* jump if so
-*
-viwait:		tst.w	_vi_tag			* wait for timer to run out
-		bne	viwait			* ... so timeint sees bank 0
-*
-		move.w	d1,_v_regs+VSDD_R5	* restore v_regs[5] to old bank
-*
-		move.w	_v_regs+VSDD_R11,VIct4	* save the VSDD R11 value
-*
-vw1c:		cmp.w	#VT_1,_v_regs+VSDD_R11	* wait for FRAMESTOP
-		bcc	vw1c			* ...
-*
-vw2c:		cmp.w	#VT_1,_v_regs+VSDD_R11	* ...
-		bcs	vw2c			* ...
-*
-vw3c:		cmp.w	#VT_1,_v_regs+VSDD_R11	* ...
-		bcc	vw3c			* ...
-*
-vw4c:		cmp.w	#VT_2,_v_regs+VSDD_R11	* ...
-		bcs	vw4c			* ...
-*
-* ------------------------------------------------------------------------------
-* restore registers and return to interrupted code
-* ------------------------------------------------------------------------------
-*
-vidone:		movem.l	(a7)+,d0-d3/a0-a2/a6	* restore registers
-		rte				* return from interrupt
-*
-		.page
-*
-* ------------------------------------------------------------------------------
+
+		.xdef	_VIint			| Vertical Interval int. handler
+
+		.xdef	_vi_sadr		| score object base address
+		.xdef	_vi_scrl		| score object scroll offset
+		.xdef	lclsadr			| local scroll address
+		.xdef	lclscrl			| local scroll offset
+		.xdef	vdelay			| VSDD scroll delay
+
+		.xdef	VIct1			| VSDD interrupt R11
+		.xdef	VIct2			| VSDD interrupt R11
+		.xdef	VIct3			| VSDD interrupt R11
+		.xdef	VIct4			| VSDD interrupt R11
+
+		.xref	_v_regs			| VSDD registers
+		.xref	_v_odtab		| VSDD object descriptor table
+
+		.xref	_vi_clk			| scroll delay timer
+		.xref	_vi_ctl			| unblank control word
+		.xref	_vi_tag			| VSDD 'needs service' tag
+
+		.page
+
+| Miscellaneous equates:
+| ----------------------
+
+DELAY		=	17			| FRAMESTOP sync delay in Ms
+STACKSR		=	32			| offset to sr on stack
+V_BLA		=	4			| V_BLA (blank) bit number
+VSDD_R5		=	10			| VSDD R5 byte offset in _v_regs
+VSDD_R11	=	22			| VSDD R11 byte offset in _v_regs
+
+VT_BASE		=	128			| word offset of VSDD Access Table
+
+VT_1		=	VT_BASE+300		| high time
+VT_2		=	VT_BASE+2		| low time
+| ------------------------------------------------------------------------------
+
+| Stack picture after movem.l at entry:
+| -------------------------------------
+
+|	LONG	PC	+34
+|	WORD	SR	+32	STACKSR
+|	LONG	A6	+28
+|	LONG	A2	+24
+|	LONG	A1	+20
+|	LONG	A0	+16
+|	LONG	D3	+12
+|	LONG	D2	+8
+|	LONG	D1	+4
+|	LONG	D0	+0
+
+| ------------------------------------------------------------------------------
+
+		.page
+
+| _VIint -- Vertical interval interrupt handler
+| ------    -----------------------------------
+_VIint:		movem.l	d0-d3/a0-a2/a6,-(a7)	| save registers
+		addi.w	#0x0100,STACKSR(a7)	| raise IPL in sr on the stack
+
+		move.w	_v_regs+VSDD_R11,VIct1	| save the VSDD R11 value
+
+		tst.w	_vi_sadr		| see if we should scroll
+		beq	viunbl			| jump if not
+
+| ------------------------------------------------------------------------------
+| setup delayed scroll parameters
+| ------------------------------------------------------------------------------
+		move.w	_v_regs+VSDD_R5,d0	| get VSDD R5
+		move.w	d0,d1			| save it for later
+		andi.w	#0x0180,d0		| see if we're already in bank 0
+		beq	dlyscrl			| jump if so
+
+		clr.w	_v_regs+VSDD_R5		| set bank 0
+
+		move.w	_v_regs+VSDD_R11,VIct2	| save the VSDD R11 value
+
+vw1a:		cmp.w	#VT_1,_v_regs+VSDD_R11	| wait for FRAMESTOP
+		bcc	vw1a			| ...
+
+vw2a:		cmp.w	#VT_1,_v_regs+VSDD_R11	| ...
+		bcs	vw2a			| ...
+
+vw3a:		cmp.w	#VT_1,_v_regs+VSDD_R11	| ...
+		bcc	vw3a			| ...
+
+vw4a:		cmp.w	#VT_2,_v_regs+VSDD_R11	| ...
+		bcs	vw4a			| ...
+
+dlyscrl:	tst.w	_vi_tag			| wait for previous scroll
+		bne	dlyscrl			| ...
+
+		move.w	_vi_sadr,lclsadr	| save address for timeint
+		move.w	_vi_scrl,lclscrl	| save offset for timeint
+		clr.w	_vi_sadr		| reset for next time
+		clr.w	_vi_scrl		| ...
+		move.w	vdelay,_vi_clk		| set the scroll delay timer
+		st	_vi_tag			| set the 'need service' tag
+| ------------------------------------------------------------------------------
+| check for unblank requests
+| ------------------------------------------------------------------------------
+		move.w	_vi_ctl,d2		| get the unblank control word
+		beq	viexit			| exit if nothing to unblank
+
+		bra	unblnk			| go unblank some objects
+
+viunbl:		move.w	_vi_ctl,d2		| get the unblank control word
+		beq	vidone			| exit if nothing to unblank
+
+		move.w	_v_regs+VSDD_R5,d0	| get VSDD R5
+		move.w	d0,d1			| save it for later
+		andi.w	#0x0180,d0		| see if we're already in bank 0
+		beq	unblnk			| jump if so
+
+		clr.w	_v_regs+VSDD_R5		| set bank 0
+
+		move.w	_v_regs+VSDD_R11,VIct3	| save the VSDD R11 value
+
+vw1b:		cmp.w	#VT_1,_v_regs+VSDD_R11	| wait for FRAMESTOP
+		bcc	vw1b			| ...
+
+vw2b:		cmp.w	#VT_1,_v_regs+VSDD_R11	| ...
+		bcs	vw2b			| ...
+
+vw3b:		cmp.w	#VT_1,_v_regs+VSDD_R11	| ...
+		bcc	vw3b			| ...
+
+vw4b:		cmp.w	#VT_2,_v_regs+VSDD_R11	| ...
+		bcs	vw4b			| ...
+
+		.page
+
+| ------------------------------------------------------------------------------
+| unblank objects indicated by contents of d2  (loaded earlier from _vi_ctl)
+| ------------------------------------------------------------------------------
+
+unblnk:		clr.w	d3			| clear the counter
+		clr.w	_vi_ctl			| clear the unblank control word
+		lea	_v_odtab,a1		| point at first object
+
+vicheck:	btst	d3,d2			| check the object bit
+		beq	vinext			| go check next one if not set
+
+		move.w	(a1),d0			| get v_odtab[obj][0]
+		bclr	#V_BLA,d0		| clear the blanking bit
+		move.w	d0,(a1)			| set v_odtab[obj][0]
+
+vinext:		cmpi.w	#15,d3			| see if we're done
+		beq	viexit			| jump if so
+
+		addq.l	#8,a1			| point at next object
+		addq.w	#1,d3			| increment object counter
+		bra	vicheck			| go check next object
+
+| ------------------------------------------------------------------------------
+| switch back to the bank the interrupted code was using if we changed it
+| ------------------------------------------------------------------------------
+
+viexit:		move.w	d1,d0			| see if we were in bank 0
+		andi.w	#0x0180,d0		| ...
+		beq	vidone			| jump if so
+
+viwait:		tst.w	_vi_tag			| wait for timer to run out
+		bne	viwait			| ... so timeint sees bank 0
+
+		move.w	d1,_v_regs+VSDD_R5	| restore v_regs[5] to old bank
+
+		move.w	_v_regs+VSDD_R11,VIct4	| save the VSDD R11 value
+
+vw1c:		cmp.w	#VT_1,_v_regs+VSDD_R11	| wait for FRAMESTOP
+		bcc	vw1c			| ...
+
+vw2c:		cmp.w	#VT_1,_v_regs+VSDD_R11	| ...
+		bcs	vw2c			| ...
+
+vw3c:		cmp.w	#VT_1,_v_regs+VSDD_R11	| ...
+		bcc	vw3c			| ...
+
+vw4c:		cmp.w	#VT_2,_v_regs+VSDD_R11	| ...
+		bcs	vw4c			| ...
+
+| ------------------------------------------------------------------------------
+| restore registers and return to interrupted code
+| ------------------------------------------------------------------------------
+
+vidone:		movem.l	(a7)+,d0-d3/a0-a2/a6	| restore registers
+		rte				| return from interrupt
+
+		.page
+
+| ------------------------------------------------------------------------------
 		.data
-* ------------------------------------------------------------------------------
-*
-vdelay:		.dc.w	DELAY			* VSDD scroll delay
-*
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+
+vdelay:		.dc.w	DELAY			| VSDD scroll delay
+
+| ------------------------------------------------------------------------------
 		.bss
-* ------------------------------------------------------------------------------
-*
-_vi_sadr:	.ds.w	1			* score object base address
-_vi_scrl:	.ds.w	1			* score object scroll offset
-*
-lclsadr:	.ds.w	1			* local copy of vi_sadr
-lclscrl:	.ds.w	1			* local copy of vi_scrl
-*
-VIct1:		.ds.w	1			* VSDD R11 value at interrupt
-VIct2:		.ds.w	1			* VSDD R11 value at interrupt
-VIct3:		.ds.w	1			* VSDD R11 value at interrupt
-VIct4:		.ds.w	1			* VSDD R11 value at interrupt
-*
+| ------------------------------------------------------------------------------
+
+_vi_sadr:	.ds.w	1			| score object base address
+_vi_scrl:	.ds.w	1			| score object scroll offset
+
+lclsadr:	.ds.w	1			| local copy of vi_sadr
+lclscrl:	.ds.w	1			| local copy of vi_scrl
+
+VIct1:		.ds.w	1			| VSDD R11 value at interrupt
+VIct2:		.ds.w	1			| VSDD R11 value at interrupt
+VIct3:		.ds.w	1			| VSDD R11 value at interrupt
+VIct4:		.ds.w	1			| VSDD R11 value at interrupt
+
 		.end
Index: vlib/vputa.s
===================================================================
--- vlib/vputa.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vputa.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,48 +1,48 @@
-* ------------------------------------------------------------------------------
-* vputa.s -- store character attributes in video RAM
-* Version 1 -- 1988-03-14 -- D.N. Lynx Crowe
-* (c) Copyright 1988 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-*	vputa(sbase, row, col, attrib)
-*	unsigned int *sbase, row, col, attrib;
-*
-*		Stores attribute value 'attrib' for the character
-*		located at ('row','col') in VSDD RAM starting at 'sbase'.
-*		Assumes a 64 character line and full character attributes.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| vputa.s -- store character attributes in video RAM
+| Version 1 -- 1988-03-14 -- D.N. Lynx Crowe
+| (c) Copyright 1988 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+|	vputa(sbase, row, col, attrib)
+|	unsigned int |sbase, row, col, attrib;
+
+|		Stores attribute value 'attrib' for the character
+|		located at ('row','col') in VSDD RAM starting at 'sbase'.
+|		Assumes a 64 character line and full character attributes.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_vputa
-*
-SBASE		.equ	8		* LONG - 'sbase'
-ROW		.equ	12		* WORD - 'row'
-COL		.equ	14		* WORD - 'col'
-ATTR		.equ	16		* WORD - 'attrib'
-*
-_vputa:		link	a6,#0		* Link stack frame pointer
-		clr.l	d0		* Clear out d0
-		move.w	ROW(a6),d0	* Get row
-		lsl.l	#6,d0		* Multiply by 64  (shift left 6)
-		move.w	COL(a6),d1	* Get col
-		andi.l	#$0000003F,d1	* Mask down to 6 bits
-		or.l	d1,d0		* OR into d0 to get char. #
-		move.w	d0,d1		* Develop cw = (cn/2)*6 in d1
-		andi.l	#$FFFFFFFE,d1	* ...
-		move.l	d1,d2		* ...
-		add.l	d1,d1		* ...
-		add.l	d2,d1		* ...
-		add.l	SBASE(a6),d1	* Add sbase to cw
-		movea.l	d1,a0		* a0 points at the word with the char.
-		btst.l	#0,d0		* Odd char. location ?
-		bne	vputa1		* Jump if so
-*
-		move.w	ATTR(a6),2(a0)	* Store new attribute word in video RAM
-*
-vputax:		unlk	a6		* Unlink the stack frame
-		rts			* Done -- return to caller
-*
-vputa1:		move.w	ATTR(a6),4(a0)	* Store new attribute word in video RAM
-		bra	vputax		* Done -- go return to caller
-*
+
+SBASE		=	8		| LONG - 'sbase'
+ROW		=	12		| WORD - 'row'
+COL		=	14		| WORD - 'col'
+ATTR		=	16		| WORD - 'attrib'
+
+_vputa:		link	a6,#0		| Link stack frame pointer
+		clr.l	d0		| Clear out d0
+		move.w	ROW(a6),d0	| Get row
+		lsl.l	#6,d0		| Multiply by 64  (shift left 6)
+		move.w	COL(a6),d1	| Get col
+		andi.l	#0x0000003F,d1	| Mask down to 6 bits
+		or.l	d1,d0		| OR into d0 to get char. #
+		move.w	d0,d1		| Develop cw = (cn/2)|6 in d1
+		andi.l	#0xFFFFFFFE,d1	| ...
+		move.l	d1,d2		| ...
+		add.l	d1,d1		| ...
+		add.l	d2,d1		| ...
+		add.l	SBASE(a6),d1	| Add sbase to cw
+		movea.l	d1,a0		| a0 points at the word with the char.
+		btst.l	#0,d0		| Odd char. location ?
+		bne	vputa1		| Jump if so
+
+		move.w	ATTR(a6),2(a0)	| Store new attribute word in video RAM
+
+vputax:		unlk	a6		| Unlink the stack frame
+		rts			| Done -- return to caller
+
+vputa1:		move.w	ATTR(a6),4(a0)	| Store new attribute word in video RAM
+		bra	vputax		| Done -- go return to caller
+
 		.end
Index: vlib/vputc.s
===================================================================
--- vlib/vputc.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vputc.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,56 +1,56 @@
-* ------------------------------------------------------------------------------
-* vputc.s -- store a character and attributes in video RAM
-* Version 3 -- 1987-03-30 -- D.N. Lynx Crowe
-* (c) Copyright 1987 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-*	vputc(sbase, row, col, c, attrib)
-*	unsigned int *sbase, row, col, c, attrib;
-*
-*		Stores character c at (row,col) in sbase with
-*		attribute value attrib.
-* ------------------------------------------------------------------------------
-*
+| ------------------------------------------------------------------------------
+| vputc.s -- store a character and attributes in video RAM
+| Version 3 -- 1987-03-30 -- D.N. Lynx Crowe
+| (c) Copyright 1987 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+|	vputc(sbase, row, col, c, attrib)
+|	unsigned int |sbase, row, col, c, attrib;
+
+|		Stores character c at (row,col) in sbase with
+|		attribute value attrib.
+| ------------------------------------------------------------------------------
+
 		.text
-*
+
 		.xdef	_vputc
-*
-_vputc:		link	a6,#0		* Link stack frame pointer
-		clr.l	d0		* Clear out d0
-		move.w	12(a6),d0	* Get row
-		lsl.l	#6,d0		* Multiply by 64  (shift left 6)
-		move.w	14(a6),d1	* Get col
-		andi.l	#$0000003F,d1	* Mask down to 6 bits
-		or.l	d1,d0		* OR into d0 to get char. #
-		move.w	d0,d1		* Develop cw = (cn/2)*6 in d1
-		andi.l	#$FFFFFFFE,d1	* ...
-		move.l	d1,d2		* ...
-		lsl.l	#1,d1		* ...
-		add.l	d2,d1		* ...
-		add.l	8(a6),d1	* Add sbase to cw
-		movea.l	d1,a0		* a0 points at the word with the char.
-		btst.l	#0,d0		* Odd char. location ?
-		bne	vputc1		* Jump if so
-*
-		move.w	16(a6),d0	* Get ch
-		andi.w	#$00FF,d0	* Mask off garbage bits
-		move.w	(a0),d1		* Get word from video RAM
-		andi.w	#$FF00,d1	* Mask off old even character
-		or.w	d0,d1		* OR in the new character
-		move.w	d1,(a0)+	* Store the updated word in video RAM
-		move.w	18(a6),(a0)	* Store new attribute word in video RAM
-*
-vputcx:		unlk	a6		* Unlink the stack frame
-		rts			* Return to caller
-*
-vputc1:		move.w	16(a6),d0	* Get ch
-		lsl.w	#8,d0		* Shift to high (odd) byte
-		move.w	(a0),d1		* Get word from video RAM
-		andi.w	#$00FF,d1	* Mask off old odd character
-		or.w	d0,d1		* OR in the new character
-		move.w	d1,(a0)+	* Store the updated word in video RAM
-		addq.l	#2,a0		* Point at the attribute word
-		move.w	18(a6),(a0)	* Store new attributes in video RAM
-		bra	vputcx		* Done -- go return to caller
-*
+
+_vputc:		link	a6,#0		| Link stack frame pointer
+		clr.l	d0		| Clear out d0
+		move.w	12(a6),d0	| Get row
+		lsl.l	#6,d0		| Multiply by 64  (shift left 6)
+		move.w	14(a6),d1	| Get col
+		andi.l	#0x0000003F,d1	| Mask down to 6 bits
+		or.l	d1,d0		| OR into d0 to get char. #
+		move.w	d0,d1		| Develop cw = (cn/2)|6 in d1
+		andi.l	#0xFFFFFFFE,d1	| ...
+		move.l	d1,d2		| ...
+		lsl.l	#1,d1		| ...
+		add.l	d2,d1		| ...
+		add.l	8(a6),d1	| Add sbase to cw
+		movea.l	d1,a0		| a0 points at the word with the char.
+		btst.l	#0,d0		| Odd char. location ?
+		bne	vputc1		| Jump if so
+
+		move.w	16(a6),d0	| Get ch
+		andi.w	#0x00FF,d0	| Mask off garbage bits
+		move.w	(a0),d1		| Get word from video RAM
+		andi.w	#0xFF00,d1	| Mask off old even character
+		or.w	d0,d1		| OR in the new character
+		move.w	d1,(a0)+	| Store the updated word in video RAM
+		move.w	18(a6),(a0)	| Store new attribute word in video RAM
+
+vputcx:		unlk	a6		| Unlink the stack frame
+		rts			| Return to caller
+
+vputc1:		move.w	16(a6),d0	| Get ch
+		lsl.w	#8,d0		| Shift to high (odd) byte
+		move.w	(a0),d1		| Get word from video RAM
+		andi.w	#0x00FF,d1	| Mask off old odd character
+		or.w	d0,d1		| OR in the new character
+		move.w	d1,(a0)+	| Store the updated word in video RAM
+		addq.l	#2,a0		| Point at the attribute word
+		move.w	18(a6),(a0)	| Store new attributes in video RAM
+		bra	vputcx		| Done -- go return to caller
+
 		.end
Index: vlib/vputcv.s
===================================================================
--- vlib/vputcv.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vputcv.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,64 +1,64 @@
-* ------------------------------------------------------------------------------
-* vputcv.s -- store a character and attributes in video RAM
-* Version 1 -- 1988-10-05 -- D.N. Lynx Crowe
-* (c) Copyright 1988 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-*	vputcv(adr, row, col, chr, atr, cols)
-*	unsigned int *adr, row, col, chr, atr, cols;
-*
-*		Stores character 'chr' at ('row', 'col') in the
-*		full attribute text object at 'adr' with
-*		attribute value 'atr' using a line length of 'len'.
-* ------------------------------------------------------------------------------
-*
+| ------------------------------------------------------------------------------
+| vputcv.s -- store a character and attributes in video RAM
+| Version 1 -- 1988-10-05 -- D.N. Lynx Crowe
+| (c) Copyright 1988 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+|	vputcv(adr, row, col, chr, atr, cols)
+|	unsigned int |adr, row, col, chr, atr, cols;
+
+|		Stores character 'chr' at ('row', 'col') in the
+|		full attribute text object at 'adr' with
+|		attribute value 'atr' using a line length of 'len'.
+| ------------------------------------------------------------------------------
+
 		.text
-*
+
 		.xdef	_vputcv
-*
-P_ADR		.equ	8
-P_ROW		.equ	12
-P_COL		.equ	14
-P_CHR		.equ	16
-P_ATR		.equ	18
-P_LEN		.equ	20
-*
+
+P_ADR		=	8
+P_ROW		=	12
+P_COL		=	14
+P_CHR		=	16
+P_ATR		=	18
+P_LEN		=	20
+
 		.page
-*
-_vputcv:	link	a6,#0		* Link stack frame pointer
-		move.w	P_ROW(a6),d0	* Get row
-		mulu	P_LEN(a6),d0	* Multiply by len
-		clr.l	d1		* Clear out d1
-		move.w	P_COL(a6),d1	* Get col
-		add.l	d1,d0		* Add col into d0 to get char. #
-		move.l	d0,d1		* Develop cw = (cn/2)*6 in d1
-		andi.l	#$FFFFFFFE,d1	* ...
-		move.l	d1,d2		* ...
-		add.l	d1,d1		* ...
-		add.l	d2,d1		* ...
-		add.l	P_ADR(a6),d1	* Add sbase to cw
-		movea.l	d1,a0		* a0 points at the word with the char.
-		btst.l	#0,d0		* Odd char. location ?
-		bne	vputcv1		* Jump if so
-*
-		move.w	P_CHR(a6),d0	* Get chr
-		andi.w	#$00FF,d0	* Mask off garbage bits
-		move.w	(a0),d1		* Get word from video RAM
-		andi.w	#$FF00,d1	* Mask off old even character
-		or.w	d0,d1		* OR in the new character
-		move.w	d1,(a0)+	* Store the updated word in video RAM
-		bra	vputcvx		* Done -- go return to caller
-*
-vputcv1:	move.w	P_CHR(a6),d0	* Get chr
-		lsl.w	#8,d0		* Shift to high (odd) byte
-		move.w	(a0),d1		* Get word from video RAM
-		andi.w	#$00FF,d1	* Mask off old odd character
-		or.w	d0,d1		* OR in the new character
-		move.w	d1,(a0)+	* Store the updated word in video RAM
-		addq.l	#2,a0		* Point at the attribute word
-*
-vputcvx:	move.w	P_ATR(a6),(a0)	* Store new attributes in video RAM
-		unlk	a6		* Unlink the stack frame
-		rts			* Return to caller
-*
+
+_vputcv:	link	a6,#0		| Link stack frame pointer
+		move.w	P_ROW(a6),d0	| Get row
+		mulu	P_LEN(a6),d0	| Multiply by len
+		clr.l	d1		| Clear out d1
+		move.w	P_COL(a6),d1	| Get col
+		add.l	d1,d0		| Add col into d0 to get char. #
+		move.l	d0,d1		| Develop cw = (cn/2)|6 in d1
+		andi.l	#0xFFFFFFFE,d1	| ...
+		move.l	d1,d2		| ...
+		add.l	d1,d1		| ...
+		add.l	d2,d1		| ...
+		add.l	P_ADR(a6),d1	| Add sbase to cw
+		movea.l	d1,a0		| a0 points at the word with the char.
+		btst.l	#0,d0		| Odd char. location ?
+		bne	vputcv1		| Jump if so
+
+		move.w	P_CHR(a6),d0	| Get chr
+		andi.w	#0x00FF,d0	| Mask off garbage bits
+		move.w	(a0),d1		| Get word from video RAM
+		andi.w	#0xFF00,d1	| Mask off old even character
+		or.w	d0,d1		| OR in the new character
+		move.w	d1,(a0)+	| Store the updated word in video RAM
+		bra	vputcvx		| Done -- go return to caller
+
+vputcv1:	move.w	P_CHR(a6),d0	| Get chr
+		lsl.w	#8,d0		| Shift to high (odd) byte
+		move.w	(a0),d1		| Get word from video RAM
+		andi.w	#0x00FF,d1	| Mask off old odd character
+		or.w	d0,d1		| OR in the new character
+		move.w	d1,(a0)+	| Store the updated word in video RAM
+		addq.l	#2,a0		| Point at the attribute word
+
+vputcvx:	move.w	P_ATR(a6),(a0)	| Store new attributes in video RAM
+		unlk	a6		| Unlink the stack frame
+		rts			| Return to caller
+
 		.end
Index: vlib/vputp.s
===================================================================
--- vlib/vputp.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vputp.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,109 +1,109 @@
-* ------------------------------------------------------------------------------
-* vputp.s -- put a pixel into a 4-bit per pixel bitmap object
-* Version 4 -- 1987-08-04 -- D.N. Lynx Crowe
-* (c) Copyright 1987 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*	int
-*	vputp(octad, xloc, yloc, val)
-*	struct octent *octad;
-*	int xloc, yloc;
-*
-*		Puts the pixel value 'val' at ('xloc','yloc') in the
-*		4-bit per pixel bitmap object described by 'octad'.
-*
-*	-----
-*	struct octent {
-*
-*		uint	ysize,
-*			xsize;
-*
-*		int	objx,
-*			objy;
-*
-*		uint	*obase;
-*
-*		char	opri,
-*			obank;
-*
-*		uint	odtw0,
-*			odtw1;
-*	};
-*
+| ------------------------------------------------------------------------------
+| vputp.s -- put a pixel into a 4-bit per pixel bitmap object
+| Version 4 -- 1987-08-04 -- D.N. Lynx Crowe
+| (c) Copyright 1987 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+|	int
+|	vputp(octad, xloc, yloc, val)
+|	struct octent |octad;
+|	int xloc, yloc;
+
+|		Puts the pixel value 'val' at ('xloc','yloc') in the
+|		4-bit per pixel bitmap object described by 'octad'.
+
+|	-----
+|	struct octent {
+
+|		uint	ysize,
+|			xsize;
+
+|		int	objx,
+|			objy;
+
+|		uint	|obase;
+
+|		char	opri,
+|			obank;
+
+|		uint	odtw0,
+|			odtw1;
+|	};
+
 		.text
-*
+
 		.xdef	_vputp
-*
-OCTAD		.equ	8
-XLOC		.equ	12
-YLOC		.equ	14
-VAL		.equ	16
-*
-YSIZE		.equ	0
-XSIZE		.equ	2
-OBJX		.equ	4
-OBJY		.equ	6
-OBASE		.equ	8
-OPRI		.equ	12
-OBANK		.equ	13
-ODTW0		.equ	14
-ODTW1		.equ	16
-*
+
+OCTAD		=	8
+XLOC		=	12
+YLOC		=	14
+VAL		=	16
+
+YSIZE		=	0
+XSIZE		=	2
+OBJX		=	4
+OBJY		=	6
+OBASE		=	8
+OPRI		=	12
+OBANK		=	13
+ODTW0		=	14
+ODTW1		=	16
+
 		.page
-*
-_vputp:		link	a6,#0			* Link stack frames
-		movea.l	OCTAD(a6),a1		* Get OCTAD base into a1
-		move.w	XLOC(a6),d0		* Get XLOC into d0
-		cmp.w	XSIZE(a1),d0		* Check XLOC range
-		bge	vputerr			* ERROR if too large
-*
-		tst.w	d0			* Check XLOC sign
-		bmi	vputerr			* ERROR if negative
-*
-		move.w	YLOC(a6),d1		* Get YLOC into d1 to test
-		cmp.w	YSIZE(a1),d1		* Check YLOC range
-		bge	vputerr			* ERROR if too large
-*
-		tst.w	d1			* Check YLOC sign
-		bmi	vputerr			* ERROR if negative
-*
-		lsr.w	#2,d0			* Divide XLOC by 4
-		move.w	XSIZE(a1),d1		* Get width into d1
-		lsr.w	#2,d1			* Divide width by 4
-		mulu	YLOC(a6),d1		* Multiply width/4 by YLOC
-		ext.l	d0			* Extend XLOC/4 to a long
-		add.l	d0,d1			* ... and add it to d1
-		lsl.l	#1,d1			* Make d1 a word offset
-		add.l	OBASE(a1),d1		* Add OBASE to d1
-		movea.l	d1,a0			* Make a0 point at bitmap data
-		move.w	XLOC(a6),d0		* Get XLOC
-		andi.l	#$03,d0			* Mask to low 2 bits
-		add.l	d0,d0			* Multiply by 2 for word index
-		move.l	d0,d1			* Save index in d1
-		add.l	#MTAB,d0		* Add mask table base
-		movea.l	d0,a2			* a2 points at mask
-		add.l	#STAB,d1		* Add shift table base to index
-		move.l	d1,a1			* a1 points at shift count
-		move.w	(a1),d0			* Get shift count in d0
-		move.w	VAL(a6),d1		* Get new pixel in d1
-		andi.w	#$0F,d1			* Mask down to 4 bits
-		lsl.w	d0,d1			* Shift into position for OR
-		move.w	(a0),d0			* Get old bitmap word in d0
-		and.w	(a2),d0			* Mask out old pixel
-		or.w	d1,d0			* OR in new pixel
-		move.w	d0,(a0)			* Store updated word in bitmap
-		clr.l	d0			* Set return value = 0 = OK
-*
-vputexit:	unlk	a6			* Unlink stack frame
-		rts				* Return to caller
-*
-vputerr:	moveq.l	#-1,d0			* Set return value = -1 = ERROR
-		bra	vputexit		* Go unlink stack and return
-*
+
+_vputp:		link	a6,#0			| Link stack frames
+		movea.l	OCTAD(a6),a1		| Get OCTAD base into a1
+		move.w	XLOC(a6),d0		| Get XLOC into d0
+		cmp.w	XSIZE(a1),d0		| Check XLOC range
+		bge	vputerr			| ERROR if too large
+
+		tst.w	d0			| Check XLOC sign
+		bmi	vputerr			| ERROR if negative
+
+		move.w	YLOC(a6),d1		| Get YLOC into d1 to test
+		cmp.w	YSIZE(a1),d1		| Check YLOC range
+		bge	vputerr			| ERROR if too large
+
+		tst.w	d1			| Check YLOC sign
+		bmi	vputerr			| ERROR if negative
+
+		lsr.w	#2,d0			| Divide XLOC by 4
+		move.w	XSIZE(a1),d1		| Get width into d1
+		lsr.w	#2,d1			| Divide width by 4
+		mulu	YLOC(a6),d1		| Multiply width/4 by YLOC
+		ext.l	d0			| Extend XLOC/4 to a long
+		add.l	d0,d1			| ... and add it to d1
+		lsl.l	#1,d1			| Make d1 a word offset
+		add.l	OBASE(a1),d1		| Add OBASE to d1
+		movea.l	d1,a0			| Make a0 point at bitmap data
+		move.w	XLOC(a6),d0		| Get XLOC
+		andi.l	#0x03,d0		| Mask to low 2 bits
+		add.l	d0,d0			| Multiply by 2 for word index
+		move.l	d0,d1			| Save index in d1
+		add.l	#MTAB,d0		| Add mask table base
+		movea.l	d0,a2			| a2 points at mask
+		add.l	#STAB,d1		| Add shift table base to index
+		move.l	d1,a1			| a1 points at shift count
+		move.w	(a1),d0			| Get shift count in d0
+		move.w	VAL(a6),d1		| Get new pixel in d1
+		andi.w	#0x0F,d1		| Mask down to 4 bits
+		lsl.w	d0,d1			| Shift into position for OR
+		move.w	(a0),d0			| Get old bitmap word in d0
+		and.w	(a2),d0			| Mask out old pixel
+		or.w	d1,d0			| OR in new pixel
+		move.w	d0,(a0)			| Store updated word in bitmap
+		clr.l	d0			| Set return value = 0 = OK
+
+vputexit:	unlk	a6			| Unlink stack frame
+		rts				| Return to caller
+
+vputerr:	moveq.l	#-1,d0			| Set return value = -1 = ERROR
+		bra	vputexit		| Go unlink stack and return
+
 		.page
-*
+
 		.data
-*
-MTAB:		dc.w	$FFF0,$FF0F,$F0FF,$0FFF	* Mask table
-STAB:		dc.w	0,4,8,12		* Shift table
-*
+
+MTAB:		dc.w	0xFFF0,0xFF0F,0xF0FF,0x0FFF	| Mask table
+STAB:		dc.w	0,4,8,12		| Shift table
+
 		.end
Index: vlib/vsetav.s
===================================================================
--- vlib/vsetav.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vsetav.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,50 +1,50 @@
-* ------------------------------------------------------------------------------
-* vsetav.s -- set a character's attributes in video RAM
-* Version 1 -- 1988-10-11 -- D.N. Lynx Crowe
-* (c) Copyright 1988 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-*	vsetav(adr, row, col, atr, len)
-*	unsigned int *adr, row, col, atr, len;
-*
-*		Sets attribute 'atr' at ('row', 'col') in the
-*		full attribute text object at 'adr'
-*		using a line length of 'len'.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| vsetav.s -- set a character's attributes in video RAM
+| Version 1 -- 1988-10-11 -- D.N. Lynx Crowe
+| (c) Copyright 1988 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+|	vsetav(adr, row, col, atr, len)
+|	unsigned int |adr, row, col, atr, len;
+
+|		Sets attribute 'atr' at ('row', 'col') in the
+|		full attribute text object at 'adr'
+|		using a line length of 'len'.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_vsetav
-*
-P_ADR		.equ	8
-P_ROW		.equ	12
-P_COL		.equ	14
-P_ATR		.equ	16
-P_LEN		.equ	18
-*
-_vsetav:	link	a6,#0		* Link stack frame pointer
-		move.w	P_ROW(a6),d0	* Get row
-		mulu	P_LEN(a6),d0	* Multiply by len
-		clr.l	d1		* Clear out d1
-		move.w	P_COL(a6),d1	* Get col
-		add.l	d1,d0		* Add col into d0 to get char. #
-		move.l	d0,d1		* Develop cw = (cn/2)*6 in d1
-		andi.l	#$FFFFFFFE,d1	* ...
-		move.l	d1,d2		* ...
-		add.l	d1,d1		* ...
-		add.l	d2,d1		* ...
-		add.l	P_ADR(a6),d1	* Add sbase to cw
-		movea.l	d1,a0		* a0 points at the word with the char.
-		btst.l	#0,d0		* Odd char. location ?
-		bne	vsetav1		* Jump if so
-*
-		addq.l	#2,a0		* Point at the attribute word
-		bra	vsetavx		* Go set attribute
-*
-vsetav1:	addq.l	#4,a0		* Point at the attribute word
-*
-vsetavx:	move.w	P_ATR(a6),d0	* Get new attributes
-		or.w	d0,(a0)		* Set new attributes in video RAM
-		unlk	a6		* Unlink the stack frame
-		rts			* Return to caller
-*
+
+P_ADR		=	8
+P_ROW		=	12
+P_COL		=	14
+P_ATR		=	16
+P_LEN		=	18
+
+_vsetav:	link	a6,#0		| Link stack frame pointer
+		move.w	P_ROW(a6),d0	| Get row
+		mulu	P_LEN(a6),d0	| Multiply by len
+		clr.l	d1		| Clear out d1
+		move.w	P_COL(a6),d1	| Get col
+		add.l	d1,d0		| Add col into d0 to get char. #
+		move.l	d0,d1		| Develop cw = (cn/2)|6 in d1
+		andi.l	#0xFFFFFFFE,d1	| ...
+		move.l	d1,d2		| ...
+		add.l	d1,d1		| ...
+		add.l	d2,d1		| ...
+		add.l	P_ADR(a6),d1	| Add sbase to cw
+		movea.l	d1,a0		| a0 points at the word with the char.
+		btst.l	#0,d0		| Odd char. location ?
+		bne	vsetav1		| Jump if so
+
+		addq.l	#2,a0		| Point at the attribute word
+		bra	vsetavx		| Go set attribute
+
+vsetav1:	addq.l	#4,a0		| Point at the attribute word
+
+vsetavx:	move.w	P_ATR(a6),d0	| Get new attributes
+		or.w	d0,(a0)		| Set new attributes in video RAM
+		unlk	a6		| Unlink the stack frame
+		rts			| Return to caller
+
 		.end
Index: vlib/vsetcv.s
===================================================================
--- vlib/vsetcv.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vsetcv.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,52 +1,52 @@
-* ------------------------------------------------------------------------------
-* vsetcv.s -- set a character's colors in video RAM
-* Version 1 -- 1988-10-11 -- D.N. Lynx Crowe
-* (c) Copyright 1988 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-*	vsetcv(adr, row, col, cfb, len)
-*	unsigned int *adr, row, col, cfb, len;
-*
-*		Sets colors 'cfb' at ('row', 'col') in the
-*		full attribute text object at 'adr'
-*		using a line length of 'len'.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| vsetcv.s -- set a character's colors in video RAM
+| Version 1 -- 1988-10-11 -- D.N. Lynx Crowe
+| (c) Copyright 1988 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+|	vsetcv(adr, row, col, cfb, len)
+|	unsigned int |adr, row, col, cfb, len;
+
+|		Sets colors 'cfb' at ('row', 'col') in the
+|		full attribute text object at 'adr'
+|		using a line length of 'len'.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_vsetcv
-*
-P_ADR		.equ	8
-P_ROW		.equ	12
-P_COL		.equ	14
-P_CFB		.equ	16
-P_LEN		.equ	18
-*
-_vsetcv:	link	a6,#0		* Link stack frame pointer
-		move.w	P_ROW(a6),d0	* Get row
-		mulu	P_LEN(a6),d0	* Multiply by len
-		clr.l	d1		* Clear out d1
-		move.w	P_COL(a6),d1	* Get col
-		add.l	d1,d0		* Add col into d0 to get char. #
-		move.l	d0,d1		* Develop cw = (cn/2)*6 in d1
-		andi.l	#$FFFFFFFE,d1	* ...
-		move.l	d1,d2		* ...
-		add.l	d1,d1		* ...
-		add.l	d2,d1		* ...
-		add.l	P_ADR(a6),d1	* Add sbase to cw
-		movea.l	d1,a0		* a0 points at the word with the char.
-		btst.l	#0,d0		* Odd char. location ?
-		bne	vsetcv1		* Jump if so
-*
-		addq.l	#2,a0		* Point at the attribute word
-		bra	vsetcvx		* Go set attribute
-*
-vsetcv1:	addq.l	#4,a0		* Point at the attribute word
-*
-vsetcvx:	move.w	(a0),d0		* Get old attributes
-		andi.w	#$FF00,d0	* Remove old colors
-		or.w	P_CFB(a6),d0	* Get new colors
-		move.w	d0,(a0)		* Set new attributes in video RAM
-		unlk	a6		* Unlink the stack frame
-		rts			* Return to caller
-*
+
+P_ADR		=	8
+P_ROW		=	12
+P_COL		=	14
+P_CFB		=	16
+P_LEN		=	18
+
+_vsetcv:	link	a6,#0		| Link stack frame pointer
+		move.w	P_ROW(a6),d0	| Get row
+		mulu	P_LEN(a6),d0	| Multiply by len
+		clr.l	d1		| Clear out d1
+		move.w	P_COL(a6),d1	| Get col
+		add.l	d1,d0		| Add col into d0 to get char. #
+		move.l	d0,d1		| Develop cw = (cn/2)|6 in d1
+		andi.l	#0xFFFFFFFE,d1	| ...
+		move.l	d1,d2		| ...
+		add.l	d1,d1		| ...
+		add.l	d2,d1		| ...
+		add.l	P_ADR(a6),d1	| Add sbase to cw
+		movea.l	d1,a0		| a0 points at the word with the char.
+		btst.l	#0,d0		| Odd char. location ?
+		bne	vsetcv1		| Jump if so
+
+		addq.l	#2,a0		| Point at the attribute word
+		bra	vsetcvx		| Go set attribute
+
+vsetcv1:	addq.l	#4,a0		| Point at the attribute word
+
+vsetcvx:	move.w	(a0),d0		| Get old attributes
+		andi.w	#0xFF00,d0	| Remove old colors
+		or.w	P_CFB(a6),d0	| Get new colors
+		move.w	d0,(a0)		| Set new attributes in video RAM
+		unlk	a6		| Unlink the stack frame
+		rts			| Return to caller
+
 		.end
Index: vlib/vsplot4.s
===================================================================
--- vlib/vsplot4.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vsplot4.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,157 +1,157 @@
-* ------------------------------------------------------------------------------
-* vsplot4.s -- output characters to a 4-bit / pixel graphics window
-*    with variable vertical pitch, etc.
-* Version 1 -- 1988-10-07 -- D.N. Lynx Crowe
-* (c) Copyright 1988 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-*	vsplot4(obase, nw, fg, row, col, str, pitch, ht, cgtab)
-*	uint *obase, nw, fg, row, col, pitch, ht, cgtab[][256];
-*	char *str;
-*
-*		Outputs characters from the string at 'str' to an 'nw'
-*		character wide 4-bit per pixel graphics window at 'obase'
-*		at ('row','col'), using 'fg' as the foreground color.
-*		Uses cgtab[][256] as the VSDD formatted character
-*		generator table.  Assumes 'ht' bit high characters in the
-*		cgtable.  Uses 'pitch' as the vertical spacing between
-*		character rows.  No error checks are done.
-*		The string must fit the output area (no overlaps, single line).
-*		This function leaves the zero pixels alone and just sets the
-*		one pixels to the foreground color, allowing overlapping
-*		character cells.
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| vsplot4.s -- output characters to a 4-bit / pixel graphics window
+|    with variable vertical pitch, etc.
+| Version 1 -- 1988-10-07 -- D.N. Lynx Crowe
+| (c) Copyright 1988 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+|	vsplot4(obase, nw, fg, row, col, str, pitch, ht, cgtab)
+|	uint |obase, nw, fg, row, col, pitch, ht, cgtab[][256];
+|	char |str;
+
+|		Outputs characters from the string at 'str' to an 'nw'
+|		character wide 4-bit per pixel graphics window at 'obase'
+|		at ('row','col'), using 'fg' as the foreground color.
+|		Uses cgtab[][256] as the VSDD formatted character
+|		generator table.  Assumes 'ht' bit high characters in the
+|		cgtable.  Uses 'pitch' as the vertical spacing between
+|		character rows.  No error checks are done.
+|		The string must fit the output area (no overlaps, single line).
+|		This function leaves the zero pixels alone and just sets the
+|		one pixels to the foreground color, allowing overlapping
+|		character cells.
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_vsplot4
-*
-* Argument offsets from a6:
-*
-OBASE		.equ	8		* LONG - Output area base address
-NW		.equ	12		* WORD - Character width of output area
-FG		.equ	14		* WORD - Foreground color
-ROW		.equ	16		* WORD - Row
-COL		.equ	18		* WORD - Column
-STR		.equ	20		* LONG - String base address
-PITCH		.equ	24		* WORD - Vertical spacing between rows
-HT		.equ	26		* WORD - Character height
-CGTAB		.equ	28		* LONG - Character generator pionter
-*
-* Program constant definitions:
-*
-HPIX		.equ	8		* Character width in pixels
-HCW		.equ	4		* Horizontal character width (bytes)
-PSHIFT		.equ	12		* Pixel shift into MS bits
-HSHIFT		.equ	4		* Pixel right shift
-*
+
+| Argument offsets from a6:
+
+OBASE		=	8		| LONG - Output area base address
+NW		=	12		| WORD - Character width of output area
+FG		=	14		| WORD - Foreground color
+ROW		=	16		| WORD - Row
+COL		=	18		| WORD - Column
+STR		=	20		| LONG - String base address
+PITCH		=	24		| WORD - Vertical spacing between rows
+HT		=	26		| WORD - Character height
+CGTAB		=	28		| LONG - Character generator pionter
+
+| Program constant definitions:
+
+HPIX		=	8		| Character width in pixels
+HCW		=	4		| Horizontal character width (bytes)
+PSHIFT		=	12		| Pixel shift into MS bits
+HSHIFT		=	4		| Pixel right shift
+
 		.page
-*
-* Register usage:
-*
-*	d0	output word and scratch
-*	d1	CG word and scratch
-*	d2	pixel counter
-*
-*	d3	foreground color (in the 4 ms bits)
-*	d4	background color (in the 4 ms bits)
-*	d5	width of the area in bytes
-*	d6	scan line counter
-*
-*	a0	CG table pointer
-*	a1	output area scan line pointer
-*	a2	input string character pointer
-*
-*	a3	output area character base pointer
-*
-*	a6	frame pointer
-*	a7	stack pointer
-*
+
+| Register usage:
+
+|	d0	output word and scratch
+|	d1	CG word and scratch
+|	d2	pixel counter
+
+|	d3	foreground color (in the 4 ms bits)
+|	d4	background color (in the 4 ms bits)
+|	d5	width of the area in bytes
+|	d6	scan line counter
+
+|	a0	CG table pointer
+|	a1	output area scan line pointer
+|	a2	input string character pointer
+
+|	a3	output area character base pointer
+
+|	a6	frame pointer
+|	a7	stack pointer
+
 		.page
-*
-_vsplot4:	link	a6,#0		* Link stack frames
-		movem.l	d3-d6/a3,-(a7)	* Save registers we use
-		move.w	#PSHIFT,d1	* Set shift constant
-		move.w	FG(a6),d3	* Setup foreground color
-		lsl.w	d1,d3		* ... in ms 4 bits of d3.W
-		move.w	NW(a6),d5	* Get line width in d5.W
-		lsl.w	#2,d5		* Multiply width by 4 for offset
-		move.w	ROW(a6),d0	* Calculate output address
-		move.w	PITCH(a6),d1	* ... PITCH
-		mulu	d1,d0		* ... * ROW
-		add.w	HT(a6),d0	* ... + HT-1
-		subq.w	#1,d0		* ...
-		mulu	d5,d0		* ... * NW
-		clr.l	d1		* ...
-		move.w	COL(a6),d1	* ... + 
-		lsl.w	#2,d1		* ... COL * 4
-		add.l	d1,d0		* ...
-		add.l	OBASE(a6),d0	* ... + OBASE
-		movea.l	d0,a3		* Leave output address in a3
-		movea.l	STR(a6),a2	* Put string address in a2
-*
-cgl0:		clr.l	d0		* Clear out upper bits of d0
-		move.b	(a2)+,d0	* Get next character
-		beq	cgl5		* Done if character EQ 0
-*
-		movea.l	a3,a1		* Establish output pointer in a1
-		adda.l	#HCW,a3		* Update output pointer for next char.
-		movea.l	CGTAB(a6),a0	* Establish CG pointer in a0
-		lsl.w	#1,d0		* ... 2 * character
-		adda.w	d0,a0		* ... + cgtab address
-		move.w	HT(a6),d6	* Set scan line counter in d6
-		subq.w	#1,d6		* ...
-*
+
+_vsplot4:	link	a6,#0		| Link stack frames
+		movem.l	d3-d6/a3,-(a7)	| Save registers we use
+		move.w	#PSHIFT,d1	| Set shift constant
+		move.w	FG(a6),d3	| Setup foreground color
+		lsl.w	d1,d3		| ... in ms 4 bits of d3.W
+		move.w	NW(a6),d5	| Get line width in d5.W
+		lsl.w	#2,d5		| Multiply width by 4 for offset
+		move.w	ROW(a6),d0	| Calculate output address
+		move.w	PITCH(a6),d1	| ... PITCH
+		mulu	d1,d0		| ... | ROW
+		add.w	HT(a6),d0	| ... + HT-1
+		subq.w	#1,d0		| ...
+		mulu	d5,d0		| ... | NW
+		clr.l	d1		| ...
+		move.w	COL(a6),d1	| ... +
+		lsl.w	#2,d1		| ... COL | 4
+		add.l	d1,d0		| ...
+		add.l	OBASE(a6),d0	| ... + OBASE
+		movea.l	d0,a3		| Leave output address in a3
+		movea.l	STR(a6),a2	| Put string address in a2
+
+cgl0:		clr.l	d0		| Clear out upper bits of d0
+		move.b	(a2)+,d0	| Get next character
+		beq	cgl5		| Done if character EQ 0
+
+		movea.l	a3,a1		| Establish output pointer in a1
+		adda.l	#HCW,a3		| Update output pointer for next char.
+		movea.l	CGTAB(a6),a0	| Establish CG pointer in a0
+		lsl.w	#1,d0		| ... 2 | character
+		adda.w	d0,a0		| ... + cgtab address
+		move.w	HT(a6),d6	| Set scan line counter in d6
+		subq.w	#1,d6		| ...
+
 		.page
-cgl1:		move.w	(a0),d1		* Get character generator word in d1
-		move.w	#(HPIX/2)-1,d2	* Set pixel counter in d2
-		clr.l	d4		* Get old output word as background
-		move.w	(a1),d4		* ...
-		swap	d4		* ...
-*
-cgl2:		lsr.w	#HSHIFT,d0	* Shift output word right 1 pixel
-		lsr.l	#HSHIFT,d4	* Shift background word 1 pixel
-		andi.l	#$FFFFF000,d4	* Mask for upper 4 bits of d4.W
-		btst.l	#0,d1		* Check CG word ls bit
-		beq	cgl3		* Set background color if bit EQ 0
-*
-		or.w	d3,d0		* OR foreground color into output word
-		bra	cgl4		* Go update CG word
-*
-cgl3:		or.w	d4,d0		* OR background color into output word
-*
-cgl4:		lsr.w	#1,d1		* Shift CG word right 1 pixel
-		dbf	d2,cgl2		* Loop for first 4 pixels
-*
-		move.w	d0,(a1)+	* Store first output word in scan line
-		move.w	#(HPIX/2)-1,d2	* Set pixel counter in d2
-		clr.l	d4		* Get old output word as background
-		move.w	(a1),d4		* ...
-		swap	d4		* ...
-*
-cgl2a:		lsr.w	#HSHIFT,d0	* Shift output word right 1 pixel
-		lsr.l	#HSHIFT,d4	* Shift background word 1 pixel
-		andi.l	#$FFFFF000,d4	* Mask for upper bits of d4.W
-		btst.l	#0,d1		* Check CG word ls bit
-		beq	cgl3a		* Set background color if bit EQ 0
-*
-		or.w	d3,d0		* OR foreground color into output word
-		bra	cgl4a		* Go update CG word
-*
-cgl3a:		or.w	d4,d0		* OR background color into output word
-*
-cgl4a:		lsr.w	#1,d1		* Shift CG word right 1 pixel
-		dbf	d2,cgl2a	* Loop for last 4 pixels
-*
-		move.w	d0,(a1)		* Store second output word in scan line
-		suba.w	d5,a1		* Update output pointer
-		suba.w	#2,a1		* ...
-		adda.l	#512,a0		* Update CG pointer for next scan line
-		dbf	d6,cgl1		* Loop for all scan lines
-*
-		bra	cgl0		* Loop for next character
-*
-cgl5:		movem.l	(a7)+,d3-d6/a3	* Restore registers
-		unlk	a6		* Unlink stack frames
-		rts			* Return to caller
-*
+cgl1:		move.w	(a0),d1		| Get character generator word in d1
+		move.w	#(HPIX/2)-1,d2	| Set pixel counter in d2
+		clr.l	d4		| Get old output word as background
+		move.w	(a1),d4		| ...
+		swap	d4		| ...
+
+cgl2:		lsr.w	#HSHIFT,d0	| Shift output word right 1 pixel
+		lsr.l	#HSHIFT,d4	| Shift background word 1 pixel
+		andi.l	#0xFFFFF000,d4	| Mask for upper 4 bits of d4.W
+		btst.l	#0,d1		| Check CG word ls bit
+		beq	cgl3		| Set background color if bit EQ 0
+
+		or.w	d3,d0		| OR foreground color into output word
+		bra	cgl4		| Go update CG word
+
+cgl3:		or.w	d4,d0		| OR background color into output word
+
+cgl4:		lsr.w	#1,d1		| Shift CG word right 1 pixel
+		dbf	d2,cgl2		| Loop for first 4 pixels
+
+		move.w	d0,(a1)+	| Store first output word in scan line
+		move.w	#(HPIX/2)-1,d2	| Set pixel counter in d2
+		clr.l	d4		| Get old output word as background
+		move.w	(a1),d4		| ...
+		swap	d4		| ...
+
+cgl2a:		lsr.w	#HSHIFT,d0	| Shift output word right 1 pixel
+		lsr.l	#HSHIFT,d4	| Shift background word 1 pixel
+		andi.l	#0xFFFFF000,d4	| Mask for upper bits of d4.W
+		btst.l	#0,d1		| Check CG word ls bit
+		beq	cgl3a		| Set background color if bit EQ 0
+
+		or.w	d3,d0		| OR foreground color into output word
+		bra	cgl4a		| Go update CG word
+
+cgl3a:		or.w	d4,d0		| OR background color into output word
+
+cgl4a:		lsr.w	#1,d1		| Shift CG word right 1 pixel
+		dbf	d2,cgl2a	| Loop for last 4 pixels
+
+		move.w	d0,(a1)		| Store second output word in scan line
+		suba.w	d5,a1		| Update output pointer
+		suba.w	#2,a1		| ...
+		adda.l	#512,a0		| Update CG pointer for next scan line
+		dbf	d6,cgl1		| Loop for all scan lines
+
+		bra	cgl0		| Loop for next character
+
+cgl5:		movem.l	(a7)+,d3-d6/a3	| Restore registers
+		unlk	a6		| Unlink stack frames
+		rts			| Return to caller
+
 		.end
Index: vlib/vvputsv.s
===================================================================
--- vlib/vvputsv.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vvputsv.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,148 +1,148 @@
-* ------------------------------------------------------------------------------
-* vvputsv.s -- output characters to a 4-bit / pixel graphics window
-* with variable vertical pitch
-* Version 1 -- 1988-10-07 -- D.N. Lynx Crowe
-* (c) Copyright 1988 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-*	vvputsv(obase, nw, fg, bg, row, col, str, pitch, ht, cgtab)
-*	uint *obase, nw, fg, bg, row, col, pitch, ht, cgtab[][256];
-*	char *str;
-*
-*		Outputs characters from the string at 'str' to an 'nw'
-*		character wide 4-bit per pixel graphics window at 'obase'
-*		at ('row','col'), using 'fg' as the foreground color, and
-*		'bg' as the background color.  Uses cgtab[][256] as the
-*		VSDD formatted character generator table.  Assumes 'ht' line
-*		high characters in the cg table.  Uses 'pitch' as the vertical
-*		spacing between character rows.  No error checks are done.
-*		The string must fit the output area (no overlaps, single line).
-*
-* ------------------------------------------------------------------------------
+| ------------------------------------------------------------------------------
+| vvputsv.s -- output characters to a 4-bit / pixel graphics window
+| with variable vertical pitch
+| Version 1 -- 1988-10-07 -- D.N. Lynx Crowe
+| (c) Copyright 1988 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+|	vvputsv(obase, nw, fg, bg, row, col, str, pitch, ht, cgtab)
+|	uint |obase, nw, fg, bg, row, col, pitch, ht, cgtab[][256];
+|	char |str;
+
+|		Outputs characters from the string at 'str' to an 'nw'
+|		character wide 4-bit per pixel graphics window at 'obase'
+|		at ('row','col'), using 'fg' as the foreground color, and
+|		'bg' as the background color.  Uses cgtab[][256] as the
+|		VSDD formatted character generator table.  Assumes 'ht' line
+|		high characters in the cg table.  Uses 'pitch' as the vertical
+|		spacing between character rows.  No error checks are done.
+|		The string must fit the output area (no overlaps, single line).
+
+| ------------------------------------------------------------------------------
 		.text
-*
+
 		.xdef	_vvputsv
-*
-* Argument offsets from a6:
-*
-OBASE		.equ	8		* LONG - Output area base address
-NW		.equ	12		* WORD - Character width of output area
-FG		.equ	14		* WORD - Foreground color
-BG		.equ	16		* WORD - Background color
-ROW		.equ	18		* WORD - Row
-COL		.equ	20		* WORD - Column
-STR		.equ	22		* LONG - String base address
-PITCH		.equ	26		* WORD - Vertical spacing between rows
-HT		.equ	28		* WORD - Character height  (LE PITCH)
-CGTAB		.equ	30		* LONG - Character generator table
-*
-* Program constant definitions:
-*
-HPIX		.equ	8		* Character width in pixels
-HCW		.equ	4		* Horizontal character width (bytes)
-PSHIFT		.equ	12		* Pixel shift into MS bits
-HSHIFT		.equ	4		* Pixel right shift
-*
+
+| Argument offsets from a6:
+
+OBASE		=	8		| LONG - Output area base address
+NW		=	12		| WORD - Character width of output area
+FG		=	14		| WORD - Foreground color
+BG		=	16		| WORD - Background color
+ROW		=	18		| WORD - Row
+COL		=	20		| WORD - Column
+STR		=	22		| LONG - String base address
+PITCH		=	26		| WORD - Vertical spacing between rows
+HT		=	28		| WORD - Character height  (LE PITCH)
+CGTAB		=	30		| LONG - Character generator table
+
+| Program constant definitions:
+
+HPIX		=	8		| Character width in pixels
+HCW		=	4		| Horizontal character width (bytes)
+PSHIFT		=	12		| Pixel shift into MS bits
+HSHIFT		=	4		| Pixel right shift
+
 		.page
-*
-* Register usage:
-*
-*	d0	output word and scratch
-*	d1	CG word and scratch
-*	d2	pixel counter
-*
-*	d3	foreground color (in the 4 ms bits)
-*	d4	background color (in the 4 ms bits)
-*	d5	width of the area in bytes
-*	d6	scan line counter
-*
-*	a0	CG table pointer
-*	a1	output area scan line pointer
-*	a2	input string character pointer
-*
-*	a3	output area character base pointer
-*
-*	a6	frame pointer
-*	a7	stack pointer
-*
+
+| Register usage:
+
+|	d0	output word and scratch
+|	d1	CG word and scratch
+|	d2	pixel counter
+
+|	d3	foreground color (in the 4 ms bits)
+|	d4	background color (in the 4 ms bits)
+|	d5	width of the area in bytes
+|	d6	scan line counter
+
+|	a0	CG table pointer
+|	a1	output area scan line pointer
+|	a2	input string character pointer
+
+|	a3	output area character base pointer
+
+|	a6	frame pointer
+|	a7	stack pointer
+
 		.page
-*
-_vvputsv:	link	a6,#0		* Link stack frames
-		movem.l	d3-d6/a3,-(a7)	* Save registers we use
-		move.w	#PSHIFT,d1	* Set shift constant
-		move.w	FG(a6),d3	* Setup foreground color
-		lsl.w	d1,d3		* ... in ms 4 bits of d3.W
-		move.w	BG(a6),d4	* Setup background color
-		lsl.w	d1,d4		* ... in ms 4 bits of d4.W
-		move.w	NW(a6),d5	* Get line width in d5.W
-		lsl.w	#2,d5		* Multiply width by 4 for offset
-		move.w	ROW(a6),d0	* Calculate output address
-		move.w	PITCH(a6),d1	* ... PITCH
-		mulu	d1,d0		* ... * ROW
-		add.w	#HT(a6),d0	* ... + HT-1
-		subq.w	#1,d0		* ...
-		mulu	d5,d0		* ... * NW
-		clr.l	d1		* ...
-		move.w	COL(a6),d1	* ... + 
-		lsl.w	#2,d1		* ... COL * 4
-		add.l	d1,d0		* ...
-		add.l	OBASE(a6),d0	* ... + OBASE
-		movea.l	d0,a3		* Leave output address in a3
-		movea.l	STR(a6),a2	* Put string address in a2
-*
-cgl0:		clr.l	d0		* Clear out upper bits of d0
-		move.b	(a2)+,d0	* Get next character
-		beq	cgl5		* Done if character EQ 0
-*
-		movea.l	a3,a1		* Establish output pointer in a1
-		adda.l	#HCW,a3		* Update output pointer for next char.
-		movea.l	CGTAB(a6),a0	* Establish CG pointer in a0
-		lsl.w	#1,d0		* ... 2 * character
-		adda.w	d0,a0		* ... + cg table address
-		move.w	HT(a6),d6	* Set scan line counter in d6
-		subq.w	#1,d6		* ... to HT-1
-*
+
+_vvputsv:	link	a6,#0		| Link stack frames
+		movem.l	d3-d6/a3,-(a7)	| Save registers we use
+		move.w	#PSHIFT,d1	| Set shift constant
+		move.w	FG(a6),d3	| Setup foreground color
+		lsl.w	d1,d3		| ... in ms 4 bits of d3.W
+		move.w	BG(a6),d4	| Setup background color
+		lsl.w	d1,d4		| ... in ms 4 bits of d4.W
+		move.w	NW(a6),d5	| Get line width in d5.W
+		lsl.w	#2,d5		| Multiply width by 4 for offset
+		move.w	ROW(a6),d0	| Calculate output address
+		move.w	PITCH(a6),d1	| ... PITCH
+		mulu	d1,d0		| ... | ROW
+		add.w	HT(a6),d0	| ... + HT-1
+		subq.w	#1,d0		| ...
+		mulu	d5,d0		| ... | NW
+		clr.l	d1		| ...
+		move.w	COL(a6),d1	| ... +
+		lsl.w	#2,d1		| ... COL | 4
+		add.l	d1,d0		| ...
+		add.l	OBASE(a6),d0	| ... + OBASE
+		movea.l	d0,a3		| Leave output address in a3
+		movea.l	STR(a6),a2	| Put string address in a2
+
+cgl0:		clr.l	d0		| Clear out upper bits of d0
+		move.b	(a2)+,d0	| Get next character
+		beq	cgl5		| Done if character EQ 0
+
+		movea.l	a3,a1		| Establish output pointer in a1
+		adda.l	#HCW,a3		| Update output pointer for next char.
+		movea.l	CGTAB(a6),a0	| Establish CG pointer in a0
+		lsl.w	#1,d0		| ... 2 | character
+		adda.w	d0,a0		| ... + cg table address
+		move.w	HT(a6),d6	| Set scan line counter in d6
+		subq.w	#1,d6		| ... to HT-1
+
 		.page
-cgl1:		move.w	(a0),d1		* Get character generator word in d1
-		move.w	#(HPIX/2)-1,d2	* Set pixel counter in d2
-*
-cgl2:		lsr.w	#HSHIFT,d0	* Shift output word right 1 pixel
-		btst.l	#0,d1		* Check CG word ls bit
-		beq	cgl3		* Set background color if bit EQ 0
-*
-		or.w	d3,d0		* OR foreground color into output word
-		bra	cgl4		* Go update CG word
-*
-cgl3:		or.w	d4,d0		* OR background color into output word
-*
-cgl4:		lsr.w	#1,d1		* Shift CG word right 1 pixel
-		dbf	d2,cgl2		* Loop for first 4 pixels
-*
-		move.w	d0,(a1)+	* Store first output word in scan line
-		move.w	#(HPIX/2)-1,d2	* Set pixel counter in d2
-*
-cgl2a:		lsr.w	#HSHIFT,d0	* Shift output word right 1 pixel
-		btst.l	#0,d1		* Check CG word ls bit
-		beq	cgl3a		* Set background color if bit EQ 0
-*
-		or.w	d3,d0		* OR foreground color into output word
-		bra	cgl4a		* Go update CG word
-*
-cgl3a:		or.w	d4,d0		* OR background color into output word
-*
-cgl4a:		lsr.w	#1,d1		* Shift CG word right 1 pixel
-		dbf	d2,cgl2a	* Loop for last 4 pixels
-*
-		move.w	d0,(a1)		* Store second output word in scan line
-		suba.w	d5,a1		* Update output pointer
-		suba.w	#2,a1		* ...
-		adda.l	#512,a0		* Update CG pointer for next scan line
-		dbf	d6,cgl1		* Loop for all scan lines
-*
-		bra	cgl0		* Loop for next character
-*
-cgl5:		movem.l	(a7)+,d3-d6/a3	* Restore registers
-		unlk	a6		* Unlink stack frames
-		rts			* Return to caller
-*
+cgl1:		move.w	(a0),d1		| Get character generator word in d1
+		move.w	#(HPIX/2)-1,d2	| Set pixel counter in d2
+
+cgl2:		lsr.w	#HSHIFT,d0	| Shift output word right 1 pixel
+		btst.l	#0,d1		| Check CG word ls bit
+		beq	cgl3		| Set background color if bit EQ 0
+
+		or.w	d3,d0		| OR foreground color into output word
+		bra	cgl4		| Go update CG word
+
+cgl3:		or.w	d4,d0		| OR background color into output word
+
+cgl4:		lsr.w	#1,d1		| Shift CG word right 1 pixel
+		dbf	d2,cgl2		| Loop for first 4 pixels
+
+		move.w	d0,(a1)+	| Store first output word in scan line
+		move.w	#(HPIX/2)-1,d2	| Set pixel counter in d2
+
+cgl2a:		lsr.w	#HSHIFT,d0	| Shift output word right 1 pixel
+		btst.l	#0,d1		| Check CG word ls bit
+		beq	cgl3a		| Set background color if bit EQ 0
+
+		or.w	d3,d0		| OR foreground color into output word
+		bra	cgl4a		| Go update CG word
+
+cgl3a:		or.w	d4,d0		| OR background color into output word
+
+cgl4a:		lsr.w	#1,d1		| Shift CG word right 1 pixel
+		dbf	d2,cgl2a	| Loop for last 4 pixels
+
+		move.w	d0,(a1)		| Store second output word in scan line
+		suba.w	d5,a1		| Update output pointer
+		suba.w	#2,a1		| ...
+		adda.l	#512,a0		| Update CG pointer for next scan line
+		dbf	d6,cgl1		| Loop for all scan lines
+
+		bra	cgl0		| Loop for next character
+
+cgl5:		movem.l	(a7)+,d3-d6/a3	| Restore registers
+		unlk	a6		| Unlink stack frames
+		rts			| Return to caller
+
 		.end
Index: vlib/vwputp.s
===================================================================
--- vlib/vwputp.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vwputp.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,108 +1,108 @@
-* ------------------------------------------------------------------------------
-* vwputp.s -- put a pixel into a 2-bit per pixel bitmap object
-* Version 2 -- 1987-04-14 -- D.N. Lynx Crowe
-* (c) Copyright 1987 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*	int
-*	vwputp(octad, xloc, yloc, val)
-*	struct octent *octad;
-*	int xloc, yloc;
-*
-*		Writes the pixel value 'val' into the 2-bit per pixel
-*		bitmap object described by 'octad' at ('xloc','yloc').
-*
-*	-----
-*
-*	struct octent {
-*
-*		uint	ysize,
-*			xsize;
-*
-*		int	objx,
-*			objy;
-*
-*		uint	*obase;
-*
-*		char	opri,
-*			oflags;
-*
-*		uint	odtw0,
-*			odtw1;
-*	};
-*
-*	Upper left corner of screen is (0,0) origin.
-*
+| ------------------------------------------------------------------------------
+| vwputp.s -- put a pixel into a 2-bit per pixel bitmap object
+| Version 2 -- 1987-04-14 -- D.N. Lynx Crowe
+| (c) Copyright 1987 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+|	int
+|	vwputp(octad, xloc, yloc, val)
+|	struct octent |octad;
+|	int xloc, yloc;
+
+|		Writes the pixel value 'val' into the 2-bit per pixel
+|		bitmap object described by 'octad' at ('xloc','yloc').
+
+|	-----
+
+|	struct octent {
+
+|		uint	ysize,
+|			xsize;
+
+|		int	objx,
+|			objy;
+
+|		uint	|obase;
+
+|		char	opri,
+|			oflags;
+
+|		uint	odtw0,
+|			odtw1;
+|	};
+
+|	Upper left corner of screen is (0,0) origin.
+
 		.text
-*
+
 		.xdef	_vputp
-*
-OCTAD		.equ	8
-XLOC		.equ	12
-YLOC		.equ	14
-VAL		.equ	16
-*
-YSIZE		.equ	0
-XSIZE		.equ	2
-OBJX		.equ	4
-OBJY		.equ	6
-OBASE		.equ	8
-OPRI		.equ	12
-OFLAGS		.equ	13
-ODTW0		.equ	14
-ODTW1		.equ	16
-*
+
+OCTAD		=	8
+XLOC		=	12
+YLOC		=	14
+VAL		=	16
+
+YSIZE		=	0
+XSIZE		=	2
+OBJX		=	4
+OBJY		=	6
+OBASE		=	8
+OPRI		=	12
+OFLAGS		=	13
+ODTW0		=	14
+ODTW1		=	16
+
 		.page
-*
-_vwputp:	link	a6,#0			* Link stack frames
-		movea.l	OCTAD(a6),a1		* Get OCTAD base into a1
-		move.w	XLOC(a6),d0		* Get XLOC into d0
-		cmp.w	XSIZE(a1),d0		* Check XLOC range
-		bge	vputerr			* ERROR if too large
-*
-		tst.w	d0			* Check XLOC sign
-		bmi	vputerr			* ERROR if negative
-*
-		move.w	YLOC(a6),d1		* Get YLOC into d1 to test
-		cmp.w	YSIZE(a1),d1		* Check YLOC range
-		bge	vputerr			* ERROR if too large
-*
-		tst.w	d1			* Check YLOC sign
-		bmi	vputerr			* ERROR if negative
-*
-		lsr.w	#3,d0			* Divide XLOC by 8
-		move.w	XSIZE(a1),d1		* Get width into d1
-		lsr.w	#3,d1			* Divide width by 8
-		mulu	YLOC(a6),d1		* Multiply width/8 by YLOC
-		ext.l	d0			* Extend XLOC/8 to a long
-		add.l	d0,d1			* ... and add it to d1
-		add.l	OBASE(a1),d1		* Add OBASE to d1
-		movea.l	d1,a0			* Make a0 point at bitmap data
-		move.w	XLOC(a6),d0		* Get XLOC
-		andi.l	#$07,d0			* Mask to low 3 bits
-		add.l	d0,d0			* Multiply by 2 for word index
-		move.l	d0,d1			* Save index in d1
-		add.l	#MTAB,d0		* Add mask table base
-		movea.l	d0,a2			* a2 points at mask
-		add.l	#STAB,d1		* Add shift table base to index
-		move.l	d1,a1			* a1 points at shift count
-		move.w	(a1),d0			* Get shift count in d0
-		move.w	VAL(a6),d1		* Get new pixel in d1
-		andi.w	#$03,d1			* Mask down to 2 bits
-		lsl.w	d0,d1			* Shift into position for OR
-		move.w	(a0),d0			* Get old bitmap word in d0
-		and.w	(a2),d0			* Mask out old pixel
-		or.w	d1,d0			* OR in new pixel
-		move.w	d0,(a0)			* Store updated word in bitmap
-		clr.l	d0			* Set return value = 0 = OK
-*
-vputexit:	unlk	a6			* Unlink stack frame
-		rts				* Return to caller
-*
-vputerr:	moveq.l	#-1,d0			* Set return value = -1 = ERROR
-		bra	vputexit		* Go unlink stack and return
-*
-MTAB:		dc.w	$FFFC,$FFF3,$FFCF,$FF3F	* Mask table
-		dc.w	$FCFF,$F3FF,$CFFF,$3FFF
-STAB:		dc.w	0,2,4,6,8,10,12,14	* Shift table
-*
+
+_vwputp:	link	a6,#0			| Link stack frames
+		movea.l	OCTAD(a6),a1		| Get OCTAD base into a1
+		move.w	XLOC(a6),d0		| Get XLOC into d0
+		cmp.w	XSIZE(a1),d0		| Check XLOC range
+		bge	vputerr			| ERROR if too large
+
+		tst.w	d0			| Check XLOC sign
+		bmi	vputerr			| ERROR if negative
+
+		move.w	YLOC(a6),d1		| Get YLOC into d1 to test
+		cmp.w	YSIZE(a1),d1		| Check YLOC range
+		bge	vputerr			| ERROR if too large
+
+		tst.w	d1			| Check YLOC sign
+		bmi	vputerr			| ERROR if negative
+
+		lsr.w	#3,d0			| Divide XLOC by 8
+		move.w	XSIZE(a1),d1		| Get width into d1
+		lsr.w	#3,d1			| Divide width by 8
+		mulu	YLOC(a6),d1		| Multiply width/8 by YLOC
+		ext.l	d0			| Extend XLOC/8 to a long
+		add.l	d0,d1			| ... and add it to d1
+		add.l	OBASE(a1),d1		| Add OBASE to d1
+		movea.l	d1,a0			| Make a0 point at bitmap data
+		move.w	XLOC(a6),d0		| Get XLOC
+		andi.l	#0x07,d0		| Mask to low 3 bits
+		add.l	d0,d0			| Multiply by 2 for word index
+		move.l	d0,d1			| Save index in d1
+		add.l	#MTAB,d0		| Add mask table base
+		movea.l	d0,a2			| a2 points at mask
+		add.l	#STAB,d1		| Add shift table base to index
+		move.l	d1,a1			| a1 points at shift count
+		move.w	(a1),d0			| Get shift count in d0
+		move.w	VAL(a6),d1		| Get new pixel in d1
+		andi.w	#0x03,d1		| Mask down to 2 bits
+		lsl.w	d0,d1			| Shift into position for OR
+		move.w	(a0),d0			| Get old bitmap word in d0
+		and.w	(a2),d0			| Mask out old pixel
+		or.w	d1,d0			| OR in new pixel
+		move.w	d0,(a0)			| Store updated word in bitmap
+		clr.l	d0			| Set return value = 0 = OK
+
+vputexit:	unlk	a6			| Unlink stack frame
+		rts				| Return to caller
+
+vputerr:	moveq.l	#-1,d0			| Set return value = -1 = ERROR
+		bra	vputexit		| Go unlink stack and return
+
+MTAB:		dc.w	0xFFFC,0xFFF3,0xFFCF,0xFF3F	| Mask table
+		dc.w	0xFCFF,0xF3FF,0xCFFF,0x3FFF
+STAB:		dc.w	0,2,4,6,8,10,12,14	| Shift table
+
 		.end
Index: vlib/vwputs.s
===================================================================
--- vlib/vwputs.s	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ vlib/vwputs.s	(revision 4f508e6879b14fc73a3587ac6cd023ca6262eae8)
@@ -1,118 +1,118 @@
-* ------------------------------------------------------------------------------
-* vwputs.s -- output a character string to a 2-bit per pixel graphics window
-* Version 9 -- 1987-07-28 -- D.N. Lynx Crowe
-* (c) Copyright 1987 -- D.N. Lynx Crowe
-* ------------------------------------------------------------------------------
-*
-*	vwputs(obase, nw, fg, bg, row, col, str)
-*	int *obase, nw, fg, bg, row, col;
-*	char *str;
-*
-*		Outputs characters from the string at 'str' to an 'nw'
-*		character wide 2-bit per pixel graphics window at 'obase'
-*		at ('row','col'), using 'fg' as the foreground color, and
-*		'bg' as the background color.  Uses cgtable[][256] as the
-*		VSDD formatted character generator table.
-*		No error checks are done.
-* ------------------------------------------------------------------------------
-*
+| ------------------------------------------------------------------------------
+| vwputs.s -- output a character string to a 2-bit per pixel graphics window
+| Version 9 -- 1987-07-28 -- D.N. Lynx Crowe
+| (c) Copyright 1987 -- D.N. Lynx Crowe
+| ------------------------------------------------------------------------------
+
+|	vwputs(obase, nw, fg, bg, row, col, str)
+|	int |obase, nw, fg, bg, row, col;
+|	char |str;
+
+|		Outputs characters from the string at 'str' to an 'nw'
+|		character wide 2-bit per pixel graphics window at 'obase'
+|		at ('row','col'), using 'fg' as the foreground color, and
+|		'bg' as the background color.  Uses cgtable[][256] as the
+|		VSDD formatted character generator table.
+|		No error checks are done.
+| ------------------------------------------------------------------------------
+
 		.text
 		.xdef	_vwputs
-*
+
 		.xref	_cgtable
-*
-* Argument offsets from a6:
-*
-OBASE		.equ	8		* L:  Output area base address
-NW		.equ	12		* W:  Character width of output area
-FG		.equ	14		* W:  Foreground color
-BG		.equ	16		* W:  Background color
-ROW		.equ	18		* W:  Row
-COL		.equ	20		* W:  Column
-STR		.equ	22		* L:  String base address
-*
-* Miscellaneous constants:
-*
-HPIX		.equ	8		* Horizontal pixels in the character
-*
-NVPIX		.equ	12		* Vertical pixels in the character
-VPITCH		.equ	12		* Vertical pitch between characters
-*
-* Register usage:
-*
-*	d0	output word and scratch
-*	d1	CG word and scratch
-*	d2	pixel counter
-*	d3	foreground color (in the 2 ms bits)
-*	d4	background color (in the 2 ms bits)
-*	d5	width of the area in bytes
-*	d6	scan line counter
-*
-*	a0	CG table pointer
-*	a1	output area scan line pointer
-*	a2	input character pointer
-*	a3	output area character pointer
-*
+
+| Argument offsets from a6:
+
+OBASE		=	8		| L:  Output area base address
+NW		=	12		| W:  Character width of output area
+FG		=	14		| W:  Foreground color
+BG		=	16		| W:  Background color
+ROW		=	18		| W:  Row
+COL		=	20		| W:  Column
+STR		=	22		| L:  String base address
+
+| Miscellaneous constants:
+
+HPIX		=	8		| Horizontal pixels in the character
+
+NVPIX		=	12		| Vertical pixels in the character
+VPITCH		=	12		| Vertical pitch between characters
+
+| Register usage:
+
+|	d0	output word and scratch
+|	d1	CG word and scratch
+|	d2	pixel counter
+|	d3	foreground color (in the 2 ms bits)
+|	d4	background color (in the 2 ms bits)
+|	d5	width of the area in bytes
+|	d6	scan line counter
+
+|	a0	CG table pointer
+|	a1	output area scan line pointer
+|	a2	input character pointer
+|	a3	output area character pointer
+
 		.page
-*
-_vwputs:	link	a6,#0		* Link stack frames
-		movem.l	d3-d6/a3,-(a7)	* Save registers we use
-		move.w	#14,d1		* Set shift constant
-		move.w	FG(a6),d3	* Setup foreground color
-		lsl.w	d1,d3		* ... in ms 2 bits of d3
-		move.w	BG(a6),d4	* Setup background color
-		lsl.w	d1,d4		* ... in ms 2 bits of d4
-		move.w	NW(a6),d5	* Get width in characters in d5
-		lsl.w	#1,d5		* ... make it words
-		move.w	ROW(a6),d0	* Calculate output address
-		move.w	#VPITCH,d1	* ...
-		mulu	d1,d0		* ... ROW * VPITCH
-		add.w	#NVPIX-1,d0	* ... + NVPIX-1
-		mulu	d5,d0		* ... * NW
-		clr.l	d1		* ...
-		move.w	COL(a6),d1	* ... + (COL * 2)
-		lsl.l	#1,d1		* ...
-		add.l	d1,d0		* ...
-		add.l	OBASE(a6),d0	* ... + OBASE
-		movea.l	d0,a3		* Leave output address in a3
-		movea.l	STR(a6),a2	* Put string address in a2
-*
+
+_vwputs:	link	a6,#0		| Link stack frames
+		movem.l	d3-d6/a3,-(a7)	| Save registers we use
+		move.w	#14,d1		| Set shift constant
+		move.w	FG(a6),d3	| Setup foreground color
+		lsl.w	d1,d3		| ... in ms 2 bits of d3
+		move.w	BG(a6),d4	| Setup background color
+		lsl.w	d1,d4		| ... in ms 2 bits of d4
+		move.w	NW(a6),d5	| Get width in characters in d5
+		lsl.w	#1,d5		| ... make it words
+		move.w	ROW(a6),d0	| Calculate output address
+		move.w	#VPITCH,d1	| ...
+		mulu	d1,d0		| ... ROW | VPITCH
+		add.w	#NVPIX-1,d0	| ... + NVPIX-1
+		mulu	d5,d0		| ... | NW
+		clr.l	d1		| ...
+		move.w	COL(a6),d1	| ... + (COL | 2)
+		lsl.l	#1,d1		| ...
+		add.l	d1,d0		| ...
+		add.l	OBASE(a6),d0	| ... + OBASE
+		movea.l	d0,a3		| Leave output address in a3
+		movea.l	STR(a6),a2	| Put string address in a2
+
 		.page
-cgl0:		clr.l	d0		* Clear out upper bits of d0
-		move.b	(a2)+,d0	* Get next character
-		beq	cgl5		* Done if character EQ 0
-*
-		movea.l	a3,a1		* Establish output pointer in a1
-		adda.l	#2,a3		* Update output pointer for next char.
-		lea	_cgtable,a0	* Establish CG pointer in a0
-		lsl.w	#1,d0		* ... 2 * character
-		adda.w	d0,a0		* ... + _cgtable address
-		move.w	#NVPIX-1,d6	* Set scan line counter in d6
-*
-cgl1:		move.w	#HPIX-1,d2	* Set pixel counter in d2
-		move.w	(a0),d1		* Get character generator word in d1
-*
-cgl2:		lsr.w	#2,d0		* Shift output word right 1 pixel
-		btst.l	#0,d1		* Check CG word ls bit
-		beq	cgl3		* Set background color if bit EQ 0
-*
-		or.w	d3,d0		* OR foreground color into output word
-		bra	cgl4		* Go update CG word
-*
-cgl3:		or.w	d4,d0		* OR background color into  output word
-*
-cgl4:		lsr.w	#1,d1		* Shift CG word right 1 pixel
-		dbf	d2,cgl2		* Loop for all 8 pixels
-*
-		move.w	d0,(a1)		* Store output word in output bitmap
-		suba.w	d5,a1		* Update output pointer
-		adda.l	#512,a0		* Update CG pointer for next scan line
-		dbf	d6,cgl1		* Loop for all scan lines
-*
-		bra	cgl0		* Loop for next character
-*
-cgl5:		movem.l	(a7)+,d3-d6/a3	* Restore registers
-		unlk	a6		* Unlink stack frames
-		rts			* Return to caller
-*
+cgl0:		clr.l	d0		| Clear out upper bits of d0
+		move.b	(a2)+,d0	| Get next character
+		beq	cgl5		| Done if character EQ 0
+
+		movea.l	a3,a1		| Establish output pointer in a1
+		adda.l	#2,a3		| Update output pointer for next char.
+		lea	_cgtable,a0	| Establish CG pointer in a0
+		lsl.w	#1,d0		| ... 2 | character
+		adda.w	d0,a0		| ... + _cgtable address
+		move.w	#NVPIX-1,d6	| Set scan line counter in d6
+
+cgl1:		move.w	#HPIX-1,d2	| Set pixel counter in d2
+		move.w	(a0),d1		| Get character generator word in d1
+
+cgl2:		lsr.w	#2,d0		| Shift output word right 1 pixel
+		btst.l	#0,d1		| Check CG word ls bit
+		beq	cgl3		| Set background color if bit EQ 0
+
+		or.w	d3,d0		| OR foreground color into output word
+		bra	cgl4		| Go update CG word
+
+cgl3:		or.w	d4,d0		| OR background color into  output word
+
+cgl4:		lsr.w	#1,d1		| Shift CG word right 1 pixel
+		dbf	d2,cgl2		| Loop for all 8 pixels
+
+		move.w	d0,(a1)		| Store output word in output bitmap
+		suba.w	d5,a1		| Update output pointer
+		adda.l	#512,a0		| Update CG pointer for next scan line
+		dbf	d6,cgl1		| Loop for all scan lines
+
+		bra	cgl0		| Loop for next character
+
+cgl5:		movem.l	(a7)+,d3-d6/a3	| Restore registers
+		unlk	a6		| Unlink stack frames
+		rts			| Return to caller
+
 		.end
