Index: ram/lcdlbls.c
===================================================================
--- ram/lcdlbls.c	(revision 6099cacb5e0cb602156d4647cb268ee3302d40a5)
+++ ram/lcdlbls.c	(revision 494d8ff4f4bb8c9810829308fd317401507e1edb)
@@ -616,5 +616,5 @@
 		if (ltagged) {	/* cancel tag mode */
 
-			dslslot(tagslot, exp_c(LCFBX01), loadrow);
+			dslslot(tagslot, LCFBX01, loadrow);
 			ltagged = FALSE;
 		}
Index: ram/ldfield.c
===================================================================
--- ram/ldfield.c	(revision 6099cacb5e0cb602156d4647cb268ee3302d40a5)
+++ ram/ldfield.c	(revision 494d8ff4f4bb8c9810829308fd317401507e1edb)
@@ -158,5 +158,5 @@
 				/* select file to delete */
 
-				dslslot(ldslot, exp_c(LD_DELC), ldrow);
+				dslslot(ldslot, LD_DELC, ldrow);
 				ldelsw = TRUE;
 				return; /* SUCCESS */
@@ -394,5 +394,5 @@
 	ltagged = TRUE;
 
-	dslslot(slot, exp_c(LD_SELC), row);
+	dslslot(slot, LD_SELC, row);
 	return;
 }
Index: ram/ldselbx.c
===================================================================
--- ram/ldselbx.c	(revision 6099cacb5e0cb602156d4647cb268ee3302d40a5)
+++ ram/ldselbx.c	(revision 494d8ff4f4bb8c9810829308fd317401507e1edb)
@@ -224,5 +224,5 @@
 		} else {
 
-			dslslot(ldslot, exp_c(ldbox[1][4]), ldrow);
+			dslslot(ldslot, ldbox[1][4], ldrow);
 		}
 	}
@@ -290,5 +290,5 @@
 		rc = TRUE;
 		ldelsw = FALSE;
-		dslslot(ldslot, exp_c(ldbox[1][4]), ldrow);
+		dslslot(ldslot, ldbox[1][4], ldrow);
 	}
 
@@ -746,5 +746,5 @@
 							return(ndx_scr(ldslot));
 
-						dslslot(ldslot, exp_c(LD_SELC), ldrow);
+						dslslot(ldslot, LD_SELC, ldrow);
 						return(SUCCESS);
 					}
Index: ram/libdsp.c
===================================================================
--- ram/libdsp.c	(revision 6099cacb5e0cb602156d4647cb268ee3302d40a5)
+++ ram/libdsp.c	(revision 494d8ff4f4bb8c9810829308fd317401507e1edb)
@@ -174,5 +174,5 @@
 */
 
-void ldwmsg(int8_t *line1, int8_t *line2, int8_t *line3, uint16_t fgcolor, uint16_t bgcolor)
+void ldwmsg(int8_t *line1, int8_t *line2, int8_t *line3, int16_t fgcolor, int16_t bgcolor)
 {
 	lderrsw = FALSE;		/* clear error switch */
@@ -183,7 +183,4 @@
 		return;
 
-	bgcolor = exp_c(bgcolor);	/* expand background color */
-	fgcolor = exp_c(fgcolor);	/* expand foreground color */
-
 	if (v_regs[5] & 0x0180)
 		vbank(0);
@@ -192,5 +189,5 @@
 
 	vbfill4(librob, 128, ldbox[10][0], ldbox[10][1],
-		ldbox[10][2], ldbox[10][3], bgcolor);
+		ldbox[10][2], ldbox[10][3], exp_c(bgcolor));
 
 	if ((int8_t *)NULL NE line1)
@@ -413,5 +410,5 @@
 	clmask = _thebpb->clsizb - 1;
 
-	rclusts = (bytes / _thebpb->clsizb)
+	rclusts = (int16_t)(bytes / _thebpb->clsizb)
 		  + ((bytes & clmask) ? 1 : 0);
 
@@ -436,5 +433,5 @@
 	case FT_ASG:	/* Assignment file */
 
-		k = (sizeof (struct asgent) * (int32_t)NASGLIB) + LH_LEN;
+		k = (sizeof (struct asgent) * (int32_t)NASGLIB) + (int32_t)LH_LEN;
 		break;
 
@@ -443,30 +440,30 @@
 	case FT_ORC:
 
-		k = ((OR_LEN1 + (2 * OR_LEN2)) * (int32_t)NINORC) + LH_LEN;
+		k = ((OR_LEN1 + (2 * OR_LEN2)) * (int32_t)NINORC) + (int32_t)LH_LEN;
 		break;
 
 	case FT_PAT:	/* Patch file */
 
-		k = ptsizer() + LH_LEN;
+		k = ptsizer() + (int32_t)LH_LEN;
 		break;
 
 	case FT_SCR:	/* Score file */
 
-		k = scsizer() + LH_LEN;
+		k = scsizer() + (int32_t)LH_LEN;
 		break;
 
 	case FT_SEQ:	/* Sequence file */
 
-		k = sqsizer() + LH_LEN;
+		k = sqsizer() + (int32_t)LH_LEN;
 		break;
 
 	case FT_TUN:	/* Tuning file */
 
-		k = (NTUNSLIB * 256L) + (NTUNSLIB * 32L) + LH_LEN;
+		k = (NTUNSLIB * 256L) + (NTUNSLIB * 32L) + (int32_t)LH_LEN;
 		break;
 
 	case FT_WAV:	/* Waveshape file */
 
-		k = ((int32_t)NUMWAVS * OR_LEN2) + LH_LEN;
+		k = ((int32_t)NUMWAVS * OR_LEN2) + (int32_t)LH_LEN;
 		break;
 
@@ -746,7 +743,7 @@
 */
 
-void dslslot(int16_t slot, uint16_t fg, int16_t row)
-{
-	register uint16_t color, chilon, chilorc;
+void dslslot(int16_t slot, int16_t fg, int16_t row)
+{
+	int16_t color, chilon, chilorc;
 	int16_t c;
 	int8_t buf[40];
@@ -755,7 +752,7 @@
 		return;
 
-	color   = exp_c(fg);		/* foreground color */
-	chilon  = exp_c(ldbox[1][4]);
-	chilorc = exp_c(HILORC);
+	color   = fg;		/* foreground color */
+	chilon  = ldbox[1][4];
+	chilorc = HILORC;
 
 	/* file type */
@@ -798,6 +795,7 @@
 int16_t showcat(void)
 {
-	register int16_t fcslot, fcrow, fcount;
-	register uint16_t color;
+	int16_t fcslot, fcrow, fcount;
+	uint16_t bg;
+	int16_t fg;
 
 	if (ndisp NE 0)
@@ -806,5 +804,5 @@
 	ldswin(0);			/* fix up the title */
 
-	color = exp_c(ldbox[1][5]);	/* background color */
+	bg = exp_c(ldbox[1][5]);	/* background color */
 
 	if (v_regs[5] & 0x0180)
@@ -812,7 +810,7 @@
 
 	vbfill4(librob, 128, ldbox[1][0], ldbox[1][1],
-		ldbox[1][2], ldbox[1][3], color);
-
-	color = ldbox[1][4];		/* foreground color */
+		ldbox[1][2], ldbox[1][3], bg);
+
+	fg = ldbox[1][4];		/* foreground color */
 
 	fcrow  = 1;
@@ -823,5 +821,5 @@
 		if (ocslot(fcslot))  {
 
-			dslslot(fcslot, color, fcrow);
+			dslslot(fcslot, fg, fcrow);
 			fcrow++;
 			fcount++;
@@ -1295,5 +1293,6 @@
 void ldswin(int16_t n)
 {
-	register int16_t cx, cy;
+	uint16_t cx;
+	int16_t cy;
 
 	if (ndisp NE 0)
@@ -1352,5 +1351,5 @@
 
 		if (lrasw)
-			cy = exp_c(LD_SELC);
+			cy = LD_SELC;
 		else
 			cy = ldbox[n][4];
@@ -1370,5 +1369,5 @@
 			    (ldkind EQ FT_ORL) OR
 			    (ldkind EQ FT_ORH))
-				cy = exp_c(LD_SELC);
+				cy = LD_SELC;
 			else
 				cy = ldbox[n][4];
@@ -1386,31 +1385,31 @@
 	case 9:		/* "Store" status */
 
-		cy = exp_c(lstrsw ? LD_SELC : ldbox[n][4]);
+		cy = lstrsw ? LD_SELC : ldbox[n][4];
 		tsplot4(librob, 64, cy, 22, 10, "Store", 14);
 
-		cy = exp_c(lscrsw ? LD_SELC : ldbox[n][4]);
+		cy = lscrsw ? LD_SELC : ldbox[n][4];
 		tsplot4(librob, 64, cy, 22, 17, "Score", 14);
 
-		cy = exp_c(lorchsw ? LD_SELC : ldbox[n][4]);
+		cy = lorchsw ? LD_SELC : ldbox[n][4];
 		tsplot4(librob, 64, cy, 22, 24, "Hi Orch", 14);
 
 
-		cy = exp_c(lwavsw ? LD_SELC : ldbox[n][4]);
+		cy = lwavsw ? LD_SELC : ldbox[n][4];
 		tsplot4(librob, 64, cy, 23, 10, "Waves", 14);
 
-		cy = exp_c(lpatsw ? LD_SELC : ldbox[n][4]);
+		cy = lpatsw ? LD_SELC : ldbox[n][4];
 		tsplot4(librob, 64, cy, 23, 17, "Patch", 14);
 
-		cy = exp_c(lorclsw ? LD_SELC : ldbox[n][4]);
+		cy = lorclsw ? LD_SELC : ldbox[n][4];
 		tsplot4(librob, 64, cy, 23, 24, "Lo Orch", 14);
 
 
-		cy = exp_c(lasgsw ? LD_SELC : ldbox[n][4]);
+		cy = lasgsw ? LD_SELC : ldbox[n][4];
 		tsplot4(librob, 64, cy, 24, 10, "Assgn", 14);
 
-		cy = exp_c(lseqsw ? LD_SELC : ldbox[n][4]);
+		cy = lseqsw ? LD_SELC : ldbox[n][4];
 		tsplot4(librob, 64, cy, 24, 17, "Seqnc", 14);
 
-		cy = exp_c(ltunsw ? LD_SELC : ldbox[n][4]);
+		cy = ltunsw ? LD_SELC : ldbox[n][4];
 		tsplot4(librob, 64, cy, 24, 24, "Tunings", 14);
 
@@ -1452,5 +1451,5 @@
 		vbank(0);
 
-	vputp(ldoct, x, y, exp_c(pen));
+	vputp(ldoct, x, y, pen);
 }
 
Index: ram/libdsp.x
===================================================================
--- ram/libdsp.x	(revision 6099cacb5e0cb602156d4647cb268ee3302d40a5)
+++ ram/libdsp.x	(revision 494d8ff4f4bb8c9810829308fd317401507e1edb)
@@ -34,5 +34,5 @@
 extern	void		clrcat(void);
 extern	int16_t		clreq(int32_t bytes);
-extern	void		dslslot(int16_t slot, uint16_t fg, int16_t row);
+extern	void		dslslot(int16_t slot, int16_t fg, int16_t row);
 extern	uint16_t	exp_c(int16_t c);
 extern	int16_t		fcindex(void);
@@ -47,5 +47,5 @@
 extern	void		ldpoint(int16_t x, int16_t y, int16_t pen);
 extern	void		ldswin(int16_t n);
-extern	void		ldwmsg(int8_t *line1, int8_t *line2, int8_t *line3, uint16_t fgcolor, uint16_t bgcolor);
+extern	void		ldwmsg(int8_t *line1, int8_t *line2, int8_t *line3, int16_t fgcolor, int16_t bgcolor);
 extern	void		libdsp(void);
 extern	int16_t		lin2slt(int16_t line);
