Index: ram/etiosc.c
===================================================================
--- ram/etiosc.c	(revision fa3880436faee3a802167a6643a177727fdf94ea)
+++ ram/etiosc.c	(revision 572daa7c12f5c9498343313d6d5350492c787d9e)
@@ -11,5 +11,5 @@
 
 /*		    C  C# D  D# E  F  F# G  G# A  A# B	*/
-int16_t	notes[]  = {2, 2, 3, 3, 4, 5, 5, 6, 6, 0, 0, 1};
+int8_t	notes[]  = {2, 2, 3, 3, 4, 5, 5, 6, 6, 0, 0, 1};
 
 /*		        A     B     C     D     E     F     G	*/
@@ -19,5 +19,5 @@
 
 /*		    C  C# D  D# E  F  F# G  G# A  A# B	*/
-int16_t	sharps[] = {7, 9, 7, 9, 7, 7, 9, 7, 9, 7, 9, 7};
+int8_t	sharps[] = {7, 9, 7, 9, 7, 7, 9, 7, 9, 7, 9, 7};
 
 int16_t	shrpflt[] = {  0, -100,    100};
@@ -55,6 +55,6 @@
 			if (rat EQ ratio[inum + den]) {
 
-				ebuf[0] = num + '0';
-				ebuf[2] = den + '0';
+				ebuf[0] = (int8_t)(num + '0');
+				ebuf[2] = (int8_t)(den + '0');
 				return;
 			}
@@ -74,12 +74,12 @@
 
 	cv -= 160;
-	buf[0] = cv / 1200;
-	rem = cv - (buf[0] * 1200);
+	buf[0] = (int8_t)(cv / 1200);
+	rem = (int8_t)(cv - (buf[0] * 1200));
 	tmp = rem / 100;
 	rem -= (tmp * 100);
 	buf[1] = notes[tmp];
 	buf[2] = sharps[tmp];
-	buf[3] = rem / 10;
-	buf[4] = rem - (buf[3] * 10);
+	buf[3] = (int8_t)(rem / 10);
+	buf[4] = (int8_t)(rem - (buf[3] * 10));
 }
 
@@ -208,5 +208,5 @@
 
 		ip->idhos1v = val << 1;
-		ip->idhos1c = (ip->idhos1c & ~OC_MOD) | bform;
+		ip->idhos1c = (int8_t)((ip->idhos1c & ~OC_MOD) | bform);
 		break;
 
@@ -214,5 +214,5 @@
 
 		ip->idhos2v = val << 1;
-		ip->idhos2c = (ip->idhos2c & ~OC_MOD) | bform;
+		ip->idhos2c = (int8_t)((ip->idhos2c & ~OC_MOD) | bform);
 		break;
 
@@ -220,5 +220,5 @@
 
 		ip->idhos3v = val << 1;
-		ip->idhos3c = (ip->idhos3c & ~OC_MOD) | bform;
+		ip->idhos3c = (int8_t)((ip->idhos3c & ~OC_MOD) | bform);
 		break;
 
@@ -226,10 +226,10 @@
 
 		ip->idhos4v = val << 1;
-		ip->idhos4c = (ip->idhos4c & ~OC_MOD) | bform;
-		break;
-	}
-
-	ip->idhfnc[v].idftmd = (ip->idhfnc[v].idftmd & ~I_NRATIO)
-		| ((bform & 2) ? I_NRATIO : 0);
+		ip->idhos4c = (int8_t)((ip->idhos4c & ~OC_MOD) | bform);
+		break;
+	}
+
+	ip->idhfnc[v].idftmd = (int8_t)((ip->idhfnc[v].idftmd & ~I_NRATIO)
+		| ((bform & 2) ? I_NRATIO : 0));
 }
 
@@ -377,9 +377,9 @@
 		strcpy(dspbuf, "Pch ");
 		cnvc2p(&dspbuf[4], (val >> 1));
-		dspbuf[4] += '0';
-		dspbuf[5] += 'A';
+		dspbuf[4] = (int8_t)(dspbuf[4] + '0');
+		dspbuf[5] = (int8_t)(dspbuf[5] + 'A');
 		dspbuf[6] = sfdsp[dspbuf[6] - 7];
-		dspbuf[7] += '0';
-		dspbuf[8] += '0';
+		dspbuf[7] = (int8_t)(dspbuf[7] + '0');
+		dspbuf[8] = (int8_t)(dspbuf[8] + '0');
 		dspbuf[9] = ' ';
 		dspbuf[10] = ocs;
@@ -529,15 +529,15 @@
 	case 0:
 
-		ip->idhos1c = (ip->idhos1c & ~OC_SYN) | (t ? OC_SYN : 0);
+		ip->idhos1c = (int8_t)((ip->idhos1c & ~OC_SYN) | (t ? OC_SYN : 0));
 		break;
 
 	case 1:
 
-		ip->idhos2c = (ip->idhos2c & ~OC_SYN) | (t ? OC_SYN : 0);
+		ip->idhos2c = (int8_t)((ip->idhos2c & ~OC_SYN) | (t ? OC_SYN : 0));
 		break;
 
 	case 2:
 
-		ip->idhos3c = (ip->idhos3c & ~OC_SYN) | (t ? OC_SYN : 0);
+		ip->idhos3c = (int8_t)((ip->idhos3c & ~OC_SYN) | (t ? OC_SYN : 0));
 		break;
 
@@ -632,8 +632,8 @@
 			} else {
 
-				ebuf[stccol - 41] = k + '0';
+				ebuf[stccol - 41] = (int8_t)(k + '0');
 			}
 
-			dspbuf[0] = (k > 9) ? k : (k + '0');
+			dspbuf[0] = (int8_t)((k > 9) ? k : (k + '0'));
 			dspbuf[1] = '\0';
 
@@ -656,5 +656,5 @@
 				if (k) {
 
-					ebuf[0] = dspbuf[0] = k + '0';
+					ebuf[0] = dspbuf[0] = (int8_t)(k + '0');
 					dspbuf[1] = '\0';
 
@@ -677,5 +677,5 @@
 				if (k) {
 
-					ebuf[2] = dspbuf[0] = k + '0';
+					ebuf[2] = dspbuf[0] = (int8_t)(k + '0');
 					dspbuf[1] = '\0';
 
@@ -700,6 +700,6 @@
 				return(FAILURE);
 
-			ebuf[stccol - 40] = k + '0';
-			dspbuf[0] = k + '0';
+			ebuf[stccol - 40] = (int8_t)(k + '0');
+			dspbuf[0] = (int8_t)(k + '0');
 			dspbuf[1] = '\0';
 
@@ -726,6 +726,6 @@
 			case 40:
 
-				ebuf[0] = k;
-				dspbuf[0] = k + '0';
+				ebuf[0] = (int8_t)k;
+				dspbuf[0] = (int8_t)(k + '0');
 				break;
 
@@ -735,6 +735,6 @@
 					return(FAILURE);
 
-				ebuf[1] = k;
-				dspbuf[0] = k + 'A';
+				ebuf[1] = (int8_t)k;
+				dspbuf[0] = (int8_t)(k + 'A');
 				break;
 
@@ -743,5 +743,5 @@
 				if (k EQ 7) {		/* blank */
 
-					ebuf[2] = k;
+					ebuf[2] = (int8_t)k;
 					dspbuf[0] = sfdsp[0];
 					break;
@@ -749,5 +749,5 @@
 				} else if (k EQ 8) {	/* flat */
 
-					ebuf[2] = k;
+					ebuf[2] = (int8_t)k;
 					dspbuf[0] = sfdsp[1];
 					break;
@@ -755,5 +755,5 @@
 				} else if (k EQ 9) {	/* sharp */
 
-					ebuf[2] = k;
+					ebuf[2] = (int8_t)k;
 					dspbuf[0] = sfdsp[2];
 					break;
@@ -764,6 +764,6 @@
 			case 44:
 
-				ebuf[stccol - 40] = k;
-				dspbuf[0] = k + '0';
+				ebuf[stccol - 40] = (int8_t)k;
+				dspbuf[0] = (int8_t)(k + '0');
 				break;
 			}
