Index: rom/romp.c
===================================================================
--- rom/romp.c	(revision 33b5477cc55f55fdeb5a70526c020aaaaee92017)
+++ rom/romp.c	(revision 298f0b49046f56c70f4d3b46209dd56d8851e64e)
@@ -324,7 +324,8 @@
 */
 
-void cx_exit(void)
+int16_t cx_exit(void)
 {
 	longjmp(&restart, 1);		/* restart ROMP */
+	return(TRUE);			/* not reached */
 }
 
@@ -335,7 +336,8 @@
 */
 
-void cx_rest(void)
+int16_t cx_rest(void)
 {
 	rjumpto(ROMADDR);
+	return(TRUE);			/* not reached */
 }
 
@@ -363,14 +365,14 @@
 	} else {
 
-		for (i = 0; i < 8; i++)		/* clear d0..d7 */
+		for (i = 0; i < 8; i++)			/* clear d0..d7 */
 			regptr->d_reg[i] = 0L;
 
-		for (i = 0; i < 7; i++)		/* clear a0..a6 */
-			regptr->a_reg[i] = (int8_t *)0L;
-
-		regptr->a_reg[7] = ISTACK;	/* setup initial stack */
-
-		regptr->reg_sr = INITSR;	/* setup sr */
-		regptr->reg_pc = B_buf_a;	/* setup pc */
+		for (i = 0; i < 7; i++)			/* clear a0..a6 */
+			regptr->a_reg[i] = 0L;
+
+		regptr->a_reg[7] = ISTACK;		/* setup initial stack */
+
+		regptr->reg_sr = INITSR;		/* setup sr */
+		regptr->reg_pc = (uint32_t)B_buf_a;	/* setup pc */
 
 		return(TRUE);
@@ -451,5 +453,5 @@
 
 		for (i = 0; i < 7; i++)		/* clear a0..a6 */
-			regptr->a_reg[i] = (int8_t *)0L;
+			regptr->a_reg[i] = 0L;
 
 		regptr->a_reg[7] = ISTACK;	/* setup initial stack */
@@ -975,5 +977,5 @@
 */
 
-void putn(int32_t num, int16_t cw, int16_t unit)
+void putn(uint32_t num, int16_t cw, int16_t unit)
 {
 	register int16_t	d;
@@ -1001,5 +1003,5 @@
 */
 
-void puthn(int32_t num, int16_t cw, int16_t unit)
+void puthn(uint32_t num, int16_t cw, int16_t unit)
 {
 	register int16_t	d;
@@ -1034,5 +1036,5 @@
 	while (nwide--) {
 
-		puthn((int32_t)(0xFF & *loc), 2, unit);
+		puthn((uint32_t)(0xFF & *loc), 2, unit);
 		BIOS(B_PUTC, unit, ' ');
 
@@ -1068,5 +1070,5 @@
 void padr(int32_t adr, int16_t unit)
 {
-	puthn(adr, 8, unit);
+	puthn((uint32_t)adr, 8, unit);
 	BIOS(B_PUTC, unit, ' ');
 	BIOS(B_PUTC, unit, '-');
@@ -1413,5 +1415,5 @@
 */
 
-void cx_zap(void)
+int16_t cx_zap(void)
 {
 	register int16_t *p, *q;
@@ -1426,4 +1428,5 @@
 
 	rjumpto(ROMADDR);
+	return(TRUE);			/* not reached */
 }
 
@@ -1527,31 +1530,31 @@
 		writeln(cmdunit, "\r\n\nBPB values:\r\n");
 		writeln(cmdunit, "\r\n   recsiz   ");
-		putn((int32_t)bpp->recsiz, 5, cmdunit);
+		putn((uint32_t)bpp->recsiz, 5, cmdunit);
 		writeln(cmdunit, "\r\n   clsiz     ");
-		putn((int32_t)bpp->clsiz, 4, cmdunit);
+		putn((uint32_t)bpp->clsiz, 4, cmdunit);
 		writeln(cmdunit, "\r\n   clsizb   ");
-		putn((int32_t)bpp->clsizb, 5, cmdunit);
+		putn((uint32_t)bpp->clsizb, 5, cmdunit);
 		writeln(cmdunit, "\r\n   rdlen     ");
-		putn((int32_t)bpp->rdlen, 4, cmdunit);
+		putn((uint32_t)bpp->rdlen, 4, cmdunit);
 		writeln(cmdunit, "\r\n   fsiz      ");
-		putn((int32_t)bpp->fsiz, 4, cmdunit);
+		putn((uint32_t)bpp->fsiz, 4, cmdunit);
 		writeln(cmdunit, "\r\n   fatrec   ");
-		putn((int32_t)bpp->fatrec, 5, cmdunit);
+		putn((uint32_t)bpp->fatrec, 5, cmdunit);
 		writeln(cmdunit, "\r\n   datrec   ");
-		putn((int32_t)bpp->datrec, 5, cmdunit);
+		putn((uint32_t)bpp->datrec, 5, cmdunit);
 		writeln(cmdunit, "\r\n   numcl    ");
-		putn((int32_t)bpp->numcl, 5, cmdunit);
+		putn((uint32_t)bpp->numcl, 5, cmdunit);
 		writeln(cmdunit, "\r\n   bflags    ");
-		puthn((int32_t)bpp->bflags, 4, cmdunit);
+		puthn((uint32_t)bpp->bflags, 4, cmdunit);
 		writeln(cmdunit, "\r\n   ntracks   ");
-		putn((int32_t)bpp->ntracks, 4, cmdunit);
+		putn((uint32_t)bpp->ntracks, 4, cmdunit);
 		writeln(cmdunit, "\r\n   nsides    ");
-		putn((int32_t)bpp->nsides, 4, cmdunit);
+		putn((uint32_t)bpp->nsides, 4, cmdunit);
 		writeln(cmdunit, "\r\n   sec/cyl  ");
-		putn((int32_t)bpp->dspc, 5, cmdunit);
+		putn((uint32_t)bpp->dspc, 5, cmdunit);
 		writeln(cmdunit, "\r\n   sec/trk  ");
-		putn((int32_t)bpp->dspt, 5, cmdunit);
+		putn((uint32_t)bpp->dspt, 5, cmdunit);
 		writeln(cmdunit, "\r\n   hidden    ");
-		putn((int32_t)bpp->hidden, 4, cmdunit);
+		putn((uint32_t)bpp->hidden, 4, cmdunit);
 		writeln(cmdunit, "\r\n\n");
 		return(TRUE);
@@ -1585,9 +1588,9 @@
 
 				writeln(cmdunit, "\r\n\n** Breakpoint 0 at ");
-				puthn((int32_t)p_ba0, 8, cmdunit);
+				puthn((uint32_t)p_ba0, 8, cmdunit);
 				writeln(cmdunit, " was ");
-				puthn(0xFFFFL & (int32_t)(*p_ba0), 4, cmdunit);
+				puthn(0xFFFFL & (uint32_t)(*p_ba0), 4, cmdunit);
 				writeln(cmdunit, " instead of ");
-				puthn(0xFFFFL & (int32_t)BPINST, 4, cmdunit);
+				puthn(0xFFFFL & (uint32_t)BPINST, 4, cmdunit);
 				writeln(cmdunit, " **\r\n\n");
 			}
@@ -1612,9 +1615,9 @@
 
 				writeln(cmdunit, "\r\n\n** Breakpoint 1 at ");
-				puthn((int32_t)p_ba1, 8, cmdunit);
+				puthn((uint32_t)p_ba1, 8, cmdunit);
 				writeln(cmdunit, " was ");
-				puthn(0xFFFFL & (int32_t)(*p_ba1), 4, cmdunit);
+				puthn(0xFFFFL & (uint32_t)(*p_ba1), 4, cmdunit);
 				writeln(cmdunit, " instead of ");
-				puthn(0xFFFFL & (int32_t)BPINST, 4, cmdunit);
+				puthn(0xFFFFL & (uint32_t)BPINST, 4, cmdunit);
 				writeln(cmdunit, " **\r\n\n");
 			}
@@ -1943,5 +1946,5 @@
 	if (rnum < 17) {	/* a0..a7 -- address register */
 
-		regptr->a_reg[rnum-9] = (int8_t *)p_value;
+		regptr->a_reg[rnum-9] = p_value;
 		return(TRUE);
 	}
@@ -1965,5 +1968,5 @@
 			return(FALSE);
 
-		regptr->reg_pc = (int8_t *)p_value;
+		regptr->reg_pc = p_value;
 		return(TRUE);
 	}
@@ -1974,5 +1977,5 @@
 			return(FALSE);
 
-		regptr->a_reg[7] = (int8_t *)p_value;
+		regptr->a_reg[7] = p_value;
 		return(TRUE);
 	}
@@ -2103,7 +2106,7 @@
 
 				writeln(cmdunit, "  ");
-				putn((int32_t)l++, 2, cmdunit);
+				putn((uint32_t)l++, 2, cmdunit);
 				writeln(cmdunit, ":");
-				puthn((int32_t)*rp++, 4, cmdunit);
+				puthn((uint32_t)*rp++, 4, cmdunit);
 			}
 
@@ -2254,5 +2257,5 @@
 				writeln(cmdunit, NACK);
 				writeln(cmdunit, "** Load error ");
-				putn((int32_t)rc, 3, cmdunit);
+				putn((uint32_t)rc, 3, cmdunit);
 				writeln(cmdunit, " **\r\n\n");
 				return(FALSE);
@@ -2279,5 +2282,5 @@
 			writeln(cmdunit, NACK);
 			writeln(cmdunit, "** Load aborted on ");
-			puthn(rc, 2, cmdunit);
+			puthn((uint32_t)rc, 2, cmdunit);
 			writeln(cmdunit, " **\r\n\n");
 			return(FALSE);
@@ -2313,5 +2316,5 @@
 
 			writeln(cmdunit, "\r\n** FILL failed at ");
-			puthn((int32_t)cp, 8, cmdunit);
+			puthn((uint32_t)cp, 8, cmdunit);
 			writeln(cmdunit, " **\r\n");
 			return(FALSE);
@@ -2379,11 +2382,11 @@
 
 				writeln(cmdunit, "\r\n** COPY failed from ");
-				puthn((int32_t)from, 8, cmdunit);
+				puthn((uint32_t)from, 8, cmdunit);
 				writeln(cmdunit, " to ");
-				puthn((int32_t)to, 8, cmdunit);
+				puthn((uint32_t)to, 8, cmdunit);
 				writeln(cmdunit, " with (from) = ");
-				puthn((int32_t)(*from), 2, cmdunit);
+				puthn((uint32_t)(*from), 2, cmdunit);
 				writeln(cmdunit, " and (to) = ");
-				puthn((int32_t)(*to), 2, cmdunit);
+				puthn((uint32_t)(*to), 2, cmdunit);
 				writeln(cmdunit, " **\r\n");
 				return(FALSE);
@@ -2404,11 +2407,11 @@
 
 				writeln(cmdunit, "\r\n** COPY failed from ");
-				puthn((int32_t)from, 8, cmdunit);
+				puthn((uint32_t)from, 8, cmdunit);
 				writeln(cmdunit, " to ");
-				puthn((int32_t)to, 8, cmdunit);
+				puthn((uint32_t)to, 8, cmdunit);
 				writeln(cmdunit, " with (from) = ");
-				puthn((int32_t)(*from), 2, cmdunit);
+				puthn((uint32_t)(*from), 2, cmdunit);
 				writeln(cmdunit, " and (to) = ");
-				puthn((int32_t)(*to), 2, cmdunit);
+				puthn((uint32_t)(*to), 2, cmdunit);
 				writeln(cmdunit, " **\r\n");
 				return(FALSE);
@@ -2487,5 +2490,5 @@
 	while (nwide--) {
 
-		puthn((int32_t)(0xFFFFL & *loc), 4, unit);
+		puthn((uint32_t)(0xFFFFL & *loc), 4, unit);
 		BIOS(B_PUTC,unit, ' ');
 
@@ -2519,5 +2522,5 @@
 	while (nwide--) {
 
-		puthn(*loc, 8, unit);
+		puthn((uint32_t)*loc, 8, unit);
 		BIOS(B_PUTC,unit, ' ');
 
@@ -2796,5 +2799,5 @@
 
 		vc = *monptr & 0x0FF;
-		puthn((int32_t)vc, 2, cmdunit);
+		puthn((uint32_t)vc, 2, cmdunit);
 		writeln(cmdunit, "\r\n");
 
@@ -2806,5 +2809,5 @@
 
 				vc = vcc;
-				puthn((int32_t)vc, 2, cmdunit);
+				puthn((uint32_t)vc, 2, cmdunit);
 				writeln(cmdunit, "\r\n");
 			}
@@ -2818,5 +2821,5 @@
 		vsp = (int16_t *)monptr;
 		vs = *vsp;
-		puthn((int32_t)vs, 4, cmdunit);
+		puthn((uint32_t)vs, 4, cmdunit);
 		writeln(cmdunit, "\r\n");
 
@@ -2828,5 +2831,5 @@
 
 				vs = vss;
-				puthn((int32_t)vs, 4, cmdunit);
+				puthn((uint32_t)vs, 4, cmdunit);
 				writeln(cmdunit, "\r\n");
 			}
@@ -2843,5 +2846,5 @@
 		vlp = (int32_t *)monptr;
 		vl = *vlp;
-		puthn(vl, 8, cmdunit);
+		puthn((uint32_t)vl, 8, cmdunit);
 		writeln(cmdunit, "\r\n");
 
@@ -2853,5 +2856,5 @@
 
 				vl = vll;
-				puthn(vl, 8, cmdunit);
+				puthn((uint32_t)vl, 8, cmdunit);
 				writeln(cmdunit, "\r\n");
 			}
@@ -3089,5 +3092,5 @@
 
 		writeln(cmdunit, "\r\nERROR reading disk:  ");
-		puthn(rc, 8, cmdunit);
+		puthn((uint32_t)rc, 8, cmdunit);
 		writeln(cmdunit, "\r\n\n");
 		return(FALSE);
@@ -3122,5 +3125,5 @@
 
 		writeln(cmdunit, "\r\nERROR writing disk:  ");
-		puthn(rc, 8, cmdunit);
+		puthn((uint32_t)rc, 8, cmdunit);
 		writeln(cmdunit, "\r\n\n");
 		return(FALSE);
@@ -3173,9 +3176,9 @@
 
 	writeln(cmdunit, "\r\nPC =  ");
-	puthn((int32_t)rp->reg_pc, 8, cmdunit);
+	puthn((uint32_t)rp->reg_pc, 8, cmdunit);
 
 	srtemp = rp->reg_sr;
 	writeln(cmdunit, ",    SR = ");
-	puthn( (int32_t)srtemp & 0xFFFFL, 4, cmdunit);
+	puthn((uint32_t)srtemp & 0xFFFFL, 4, cmdunit);
 
 /* 
@@ -3184,5 +3187,5 @@
 
 	writeln(cmdunit, "  (IPL = ");
-	puthn( (int32_t)(srtemp >> 8) & 0x7L, 1, cmdunit);
+	puthn((uint32_t)(srtemp >> 8) & 0x7L, 1, cmdunit);
 	writeln(cmdunit, ", ");
 
@@ -3270,9 +3273,9 @@
 
 	writeln(cmdunit, "\r\n\nPC =  ");
-	puthn((int32_t)crshpc, 8, cmdunit);
+	puthn(crshpc, 8, cmdunit);
 
 	srtemp = crshsr;
 	writeln(cmdunit, ",    SR = ");
-	puthn((int32_t)srtemp & 0xFFFFL, 4, cmdunit);
+	puthn((uint32_t)srtemp & 0xFFFFL, 4, cmdunit);
 
 /* 
@@ -3281,5 +3284,5 @@
 
 	writeln(cmdunit, "  (IPL = ");
-	puthn((int32_t)(srtemp >> 8) & 0x7L, 1, cmdunit);
+	puthn((uint32_t)(srtemp >> 8) & 0x7L, 1, cmdunit);
 	writeln(cmdunit, ", ");
 
@@ -3327,5 +3330,5 @@
 */
 	writeln(cmdunit, "TRAP vector number = ");
-	putn((int32_t)crshvc[0], 2, cmdunit);
+	putn((uint32_t)crshvc[0], 2, cmdunit);
 
 	cause = "  (no handler for interrupt)";
@@ -3470,5 +3473,5 @@
 	rc = FALSE;
 
-	if ((int8_t *)p_ba0 EQ regptr->reg_pc) {
+	if (p_ba0 EQ regptr->reg_pc) {
 
 		if (*p_ba0 EQ BPINST) {
@@ -3482,9 +3485,9 @@
 
 			writeln(cmdunit, "** Breakpoint word at ");
-			puthn(p_ba0, 8 , cmdunit);
+			puthn((uint32_t)p_ba0, 8 , cmdunit);
 			writeln(cmdunit, " was ");
-			puthn(0xFFFFL & (int32_t)(*p_ba0), 4, cmdunit);
+			puthn(0xFFFFL & (uint32_t)(*p_ba0), 4, cmdunit);
 			writeln(cmdunit, " instead of ");
-			puthn((int32_t)BPINST, 4, cmdunit);
+			puthn((uint32_t)BPINST, 4, cmdunit);
 			writeln(cmdunit, " **\r\n\n");
 			rc = TRUE;
@@ -3496,5 +3499,5 @@
 */
 
-	if ((int8_t *)p_ba1 EQ regptr->reg_pc) {
+	if (p_ba1 EQ regptr->reg_pc) {
 
 		if (*p_ba1 EQ BPINST) {
@@ -3508,9 +3511,9 @@
 
 			writeln(cmdunit, "** Breakpoint word at ");
-			puthn((int32_t)p_ba0, 8 , cmdunit);
+			puthn((uint32_t)p_ba0, 8 , cmdunit);
 			writeln(cmdunit, " was ");
-			puthn(0xFFFFL & (int32_t)(*p_ba1), 4, cmdunit);
+			puthn(0xFFFFL & (uint32_t)(*p_ba1), 4, cmdunit);
 			writeln(cmdunit, " instead of ");
-			puthn((int32_t)BPINST, 4, cmdunit);
+			puthn((uint32_t)BPINST, 4, cmdunit);
 			writeln(cmdunit, " **\r\n\n");
 			rc = TRUE;
@@ -3532,9 +3535,9 @@
 
 			writeln(cmdunit, "** Breakpoint word at ");
-			puthn(p_ba0, 8 , cmdunit);
+			puthn((uint32_t)p_ba0, 8 , cmdunit);
 			writeln(cmdunit, " was ");
-			puthn(0xFFFFL & (int32_t)(*p_ba0), 4, cmdunit);
+			puthn(0xFFFFL & (uint32_t)(*p_ba0), 4, cmdunit);
 			writeln(cmdunit, " instead of ");
-			puthn((int32_t)BPINST, 4, cmdunit);
+			puthn((uint32_t)BPINST, 4, cmdunit);
 			writeln(cmdunit, " **\r\n\n");
 			rc = TRUE;
@@ -3558,9 +3561,9 @@
 
 			writeln(cmdunit, "** Breakpoint word at ");
-			puthn((int32_t)p_ba0, 8 , cmdunit);
+			puthn((uint32_t)p_ba0, 8 , cmdunit);
 			writeln(cmdunit, " was ");
-			puthn(0xFFFFL & (int32_t)(*p_ba1), 4, cmdunit);
+			puthn(0xFFFFL & (uint32_t)(*p_ba1), 4, cmdunit);
 			writeln(cmdunit, " instead of ");
-			puthn((int32_t)BPINST, 4, cmdunit);
+			puthn((uint32_t)BPINST, 4, cmdunit);
 			writeln(cmdunit, " **\r\n\n");
 			rc = TRUE;
@@ -3617,5 +3620,5 @@
 
 		for (i = 0; i < 7; i++)		/* clear a0..a6 */
-			regptr->a_reg[i] = (int8_t *)0L;
+			regptr->a_reg[i] = 0L;
 
 		regptr->a_reg[7] = ISTACK;	/* setup initial stack */
@@ -3682,7 +3685,7 @@
 	writeln(cmdunit, "\r\n  BIOS Version ");
 	pcptr = (int8_t *)PRM_VERS;
-	putn((int32_t)*pcptr++, 2, cmdunit);
+	putn((uint32_t)*pcptr++, 2, cmdunit);
 	BIOS(B_PUTC, cmdunit, '.');
-	putn((int32_t)*pcptr++, 2, cmdunit);
+	putn((uint32_t)*pcptr++, 2, cmdunit);
 	writeln(cmdunit, promdate);
 
