Index: ram/stmproc.c
===================================================================
--- ram/stmproc.c	(revision f537c488e3ca6b17dfadd4ee520aa9bb0c36d7ae)
+++ ram/stmproc.c	(revision 6f49665befe6989838fdd6ecbda8ec8cd9f5e69b)
@@ -38,15 +38,15 @@
 #endif
 
-uint16_t	dtfree;			/* defent free list index */
-uint16_t	ptfree;			/* patch free list index */
-
-uint16_t	dpepred;		/* defent predecessor index */
-uint16_t	dpecpos;		/* current defent index */
-uint16_t	dpesucc;		/* defent successor index */
-
-int8_t	ptdsbuf[50];			/* patch display build buffer */
-
-int8_t	defptr[NDEFSTMS];		/* definition index table */
-int8_t	stmptr[NDEFSTMS];		/* stimulus index table */
+int16_t		dtfree;			/* defent free list index */
+int16_t		ptfree;			/* patch free list index */
+
+int16_t		dpepred;		/* defent predecessor index */
+int16_t		dpecpos;		/* current defent index */
+int16_t		dpesucc;		/* defent successor index */
+
+int8_t		ptdsbuf[50];		/* patch display build buffer */
+
+int16_t		defptr[NDEFSTMS];	/* definition index table */
+int16_t		stmptr[NDEFSTMS];	/* stimulus index table */
 
 struct	defent	defents[RAWDEFS];	/* definition control table */
@@ -58,5 +58,5 @@
 uint16_t	ptewrds[NPTEQELS];	/* patch trigger fifo entries */
 
-int8_t	dmatch[] = {			/* addat1 match tags */
+uint8_t		dmatch[] = {		/* addat1 match tags */
 
 	0, 0, 0, 0, 0, 0, 0, 0,		/*  0 ..  7 */
@@ -74,5 +74,5 @@
 void initpt(void)
 {
-	register uint16_t i;
+	int16_t i;
 
 	/* initialize the trigger fifo */
@@ -110,7 +110,7 @@
 */
 
-uint16_t pt_alc(void)
-{
-	register uint16_t pe;
+int16_t pt_alc(void)
+{
+	int16_t pe;
 
 	if (0 NE (pe = ptfree))
@@ -126,5 +126,5 @@
 */
 
-void pt_del(uint16_t pe)
+void pt_del(int16_t pe)
 {
 	patches[pe].nextstm = ptfree;
@@ -138,7 +138,7 @@
 */
 
-uint16_t dt_alc(void)
-{
-	register uint16_t de;
+int16_t dt_alc(void)
+{
+	int16_t de;
 
 	if (0 NE (de = dtfree))
@@ -154,5 +154,5 @@
 */
 
-void dt_del(uint16_t de)
+void dt_del(int16_t de)
 {
 	defents[de].nextdef = dtfree;
@@ -171,5 +171,5 @@
 */
 
-int16_t cprdpe(uint16_t np)
+int16_t cprdpe(int16_t np)
 {
 	register uint16_t ca, cb, ct;
@@ -230,5 +230,5 @@
 int16_t finddpe(void)
 {
-	register uint16_t c, idef;
+	int16_t c, idef;
 
 	dpepred = 0;		/* initialize dpepred = 0  (no predecessor) */
@@ -316,5 +316,5 @@
 */
 
-int16_t cprpte(uint16_t np)
+int16_t cprpte(int16_t np)
 {
 	register uint16_t ca, cb, ct;
@@ -382,5 +382,5 @@
 int16_t findpte(void)
 {
-	register uint16_t c, istim;
+	int16_t c, istim;
 
 	ptepred = 0;		/* initialize ptepred = 0  (no predecessor) */
@@ -703,5 +703,5 @@
 */
 
-void dpte(int16_t pe, int16_t row, int16_t atr)
+void dpte(int16_t pe, int16_t row, uint16_t atr)
 {
 	register int16_t i;
@@ -962,7 +962,8 @@
 void stmproc(uint16_t trg)
 {
-	register struct defent	*nextdef;
-	register struct patch	*nextpch;
-	register uint16_t adspec, adsuba, np, stim;
+	struct defent *nextdef;
+	struct patch *nextpch;
+	uint16_t adspec, adsuba, stim;
+	int16_t np;
 	uint16_t addat1, adrtag;
 
Index: ram/stmproc.x
===================================================================
--- ram/stmproc.x	(revision f537c488e3ca6b17dfadd4ee520aa9bb0c36d7ae)
+++ ram/stmproc.x	(revision 6f49665befe6989838fdd6ecbda8ec8cd9f5e69b)
@@ -18,16 +18,16 @@
 
 extern	struct	defent	defents[RAWDEFS];
-extern	int8_t		defptr[NDEFSTMS];
-extern	int8_t		dmatch[];
-extern	uint16_t	dpecpos;
-extern	uint16_t	dpepred;
-extern	uint16_t	dpesucc;
-extern	uint16_t	dtfree;
+extern	int16_t		defptr[NDEFSTMS];
+extern	uint8_t		dmatch[];
+extern	int16_t		dpecpos;
+extern	int16_t		dpepred;
+extern	int16_t		dpesucc;
+extern	int16_t		dtfree;
 extern	struct	patch	patches[MAXPATCH];
 extern	int8_t		ptdsbuf[50];
 extern	struct	wordq	ptefifo;
 extern	uint16_t	ptewrds[NPTEQELS];
-extern	uint16_t	ptfree;
-extern	int8_t		stmptr[NDEFSTMS];
+extern	int16_t		ptfree;
+extern	int16_t		stmptr[NDEFSTMS];
 
 /*
@@ -37,10 +37,10 @@
 */
 
-extern	int16_t		cprdpe(uint16_t np);
-extern	int16_t		cprpte(uint16_t np);
-extern	void		dpte(int16_t pe, int16_t row, int16_t atr);
+extern	int16_t		cprdpe(int16_t np);
+extern	int16_t		cprpte(int16_t np);
+extern	void		dpte(int16_t pe, int16_t row, uint16_t atr);
 extern	void		dptw(void);
-extern	uint16_t	dt_alc(void);
-extern	void		dt_del(uint16_t de);
+extern	int16_t		dt_alc(void);
+extern	void		dt_del(int16_t de);
 extern	void		entrpte(void);
 extern	int16_t		find1st(void);
@@ -50,6 +50,6 @@
 extern	int16_t		findpte(void);
 extern	void		initpt(void);
-extern	uint16_t	pt_alc(void);
-extern	void		pt_del(uint16_t pe);
+extern	int16_t		pt_alc(void);
+extern	void		pt_del(int16_t pe);
 extern	void		srdspte(void);
 extern	void		stmproc(uint16_t trg);
