Index: include/hwdefs.h
===================================================================
--- include/hwdefs.h	(revision 197ff76a1a6e3dac031f1d386945a4be68fb9ce6)
+++ include/hwdefs.h	(revision c59409ecb4964b2dfc1b86fabb892798f7c896e7)
@@ -12,45 +12,45 @@
 /* hardware addresses */
 
-extern	uint16_t	io_fpu[];	/* 0x180000 */
-extern	uint8_t		io_time[];	/* 0x3a0001 */
-extern	uint8_t		io_lcd;		/* 0x3a4001 */
-extern	uint8_t		io_ser;		/* 0x3a8001 */
-extern	uint8_t		io_midi;	/* 0x3ac001 */
-extern	uint8_t		io_disk;	/* 0x3b0001 */
-extern	uint8_t		io_tone;	/* 0x3b4001 */
-extern	uint8_t		io_leds;	/* 0x3b8001 */
-extern	uint8_t		io_kbrd;	/* 0x3bc001 */
-extern	uint8_t		lcd_a0;		/* io_lcd + 0 */
-extern	uint8_t		lcd_a1;		/* io_lcd + 2 */
+extern	volatile uint16_t	io_fpu[];	/* 0x180000 */
+extern	volatile uint8_t	io_time[];	/* 0x3a0001 */
+extern	volatile uint8_t	io_lcd;		/* 0x3a4001 */
+extern	volatile uint8_t	io_ser;		/* 0x3a8001 */
+extern	volatile uint8_t	io_midi;	/* 0x3ac001 */
+extern	volatile uint8_t	io_disk;	/* 0x3b0001 */
+extern	volatile uint8_t	io_tone;	/* 0x3b4001 */
+extern	volatile uint8_t	io_leds;	/* 0x3b8001 */
+extern	volatile uint8_t	io_kbrd;	/* 0x3bc001 */
+extern	volatile uint8_t	lcd_a0;		/* io_lcd + 0 */
+extern	volatile uint8_t	lcd_a1;		/* io_lcd + 2 */
 
-extern	uint16_t	io_vreg[];	/* 0x200000 Video registers after setup */
-extern	uint16_t	io_vraw[];	/* 0x200400 Video registers after reset */
-extern	uint16_t	io_vram[];	/* 0x200000 Video RAM */
+extern	volatile uint16_t	io_vreg[];	/* 0x200000 Video registers after setup */
+extern	volatile uint16_t	io_vraw[];	/* 0x200400 Video registers after reset */
+extern	volatile uint16_t	io_vram[];	/* 0x200000 Video RAM */
 
 /* video memory allocations, bank 0 */
 
-extern	uint16_t	v_regs[];	/* 0x200000 Video registers */
-extern	uint16_t	v_odtab[][4];	/* 0x200080 Object Descriptor Table */
-extern	uint16_t	v_actab[];	/* 0x200100 Access Table */
-extern	uint16_t	v_ct0[];	/* 0x200400 */
-extern	uint16_t	v_gt1[];	/* 0x200518 */
-extern	uint16_t	v_score[];	/* 0x202000 Score */
-extern	uint16_t	v_cgtab[];	/* 0x21e000 Character Generator */
+extern	volatile uint16_t	v_regs[];	/* 0x200000 Video registers */
+extern	volatile uint16_t	v_odtab[][4];	/* 0x200080 Object Descriptor Table */
+extern	volatile uint16_t	v_actab[];	/* 0x200100 Access Table */
+extern	volatile uint16_t	v_ct0[];	/* 0x200400 */
+extern	volatile uint16_t	v_gt1[];	/* 0x200518 */
+extern	volatile uint16_t	v_score[];	/* 0x202000 Score */
+extern	volatile uint16_t	v_cgtab[];	/* 0x21e000 Character Generator */
 
 /* video memory allocations, bank 1 */
 
-extern	uint16_t	v_curs0[];	/* 0x200400 ULE cursor */
-extern	uint16_t	v_curs1[];	/* 0x200480 ULO cursor */
-extern	uint16_t	v_curs2[];	/* 0x200500 URE cursor */
-extern	uint16_t	v_curs3[];	/* 0x200580 URO cursor */
-extern	uint16_t	v_curs4[];	/* 0x200600 LLE cursor */
-extern	uint16_t	v_curs5[];	/* 0x200680 LLO cursor */
-extern	uint16_t	v_curs6[];	/* 0x200700 LRE cursor */
-extern	uint16_t	v_curs7[];	/* 0x200780 LRO cursor */
-extern	uint16_t	v_tcur[];	/* 0x200800 Typewriter */
-extern	uint16_t	v_kbobj[];	/* 0x200b40 Keyboard */
-extern	uint16_t	v_lnobj[];	/* 0x201240 Line */
-extern	uint16_t	v_cur[];	/* 0x201940 Underline cursor */
-extern	uint16_t	v_win0[];	/* 0x204000 Window 0 */
+extern	volatile uint16_t	v_curs0[];	/* 0x200400 ULE cursor */
+extern	volatile uint16_t	v_curs1[];	/* 0x200480 ULO cursor */
+extern	volatile uint16_t	v_curs2[];	/* 0x200500 URE cursor */
+extern	volatile uint16_t	v_curs3[];	/* 0x200580 URO cursor */
+extern	volatile uint16_t	v_curs4[];	/* 0x200600 LLE cursor */
+extern	volatile uint16_t	v_curs5[];	/* 0x200680 LLO cursor */
+extern	volatile uint16_t	v_curs6[];	/* 0x200700 LRE cursor */
+extern	volatile uint16_t	v_curs7[];	/* 0x200780 LRO cursor */
+extern	volatile uint16_t	v_tcur[];	/* 0x200800 Typewriter */
+extern	volatile uint16_t	v_kbobj[];	/* 0x200b40 Keyboard */
+extern	volatile uint16_t	v_lnobj[];	/* 0x201240 Line */
+extern	volatile uint16_t	v_cur[];	/* 0x201940 Underline cursor */
+extern	volatile uint16_t	v_win0[];	/* 0x204000 Window 0 */
 
 /* stuff in the depths of the bios */
Index: libsm/memcpyw.c
===================================================================
--- libsm/memcpyw.c	(revision 197ff76a1a6e3dac031f1d386945a4be68fb9ce6)
+++ libsm/memcpyw.c	(revision c59409ecb4964b2dfc1b86fabb892798f7c896e7)
@@ -11,8 +11,8 @@
 #include "ram.h"
 
-void *memcpyw(void *vp1, void *vp2, int16_t n)
+volatile void *memcpyw(volatile void *vp1, volatile void *vp2, int16_t n)
 {
-	int16_t *sp1 = vp1;
-	int16_t *sp2 = vp2;
+	volatile int16_t *sp1 = vp1;
+	volatile int16_t *sp2 = vp2;
 
 	while (--n >= 0)
Index: libsm/memcpyw.x
===================================================================
--- libsm/memcpyw.x	(revision 197ff76a1a6e3dac031f1d386945a4be68fb9ce6)
+++ libsm/memcpyw.x	(revision c59409ecb4964b2dfc1b86fabb892798f7c896e7)
@@ -15,3 +15,3 @@
 */
 
-extern	void		*memcpyw(void *vp1, void *vp2, int16_t n);
+extern	volatile void	*memcpyw(volatile void *vp1, volatile void *vp2, int16_t n);
Index: libsm/memsetw.c
===================================================================
--- libsm/memsetw.c	(revision 197ff76a1a6e3dac031f1d386945a4be68fb9ce6)
+++ libsm/memsetw.c	(revision c59409ecb4964b2dfc1b86fabb892798f7c896e7)
@@ -11,7 +11,7 @@
 #include "ram.h"
 
-void *memsetw(void *vp, uint16_t s, int16_t n)
+volatile void *memsetw(volatile void *vp, uint16_t s, int16_t n)
 {
-	uint16_t *sp = vp;
+	volatile uint16_t *sp = vp;
 
 	while (--n >= 0)
Index: libsm/memsetw.x
===================================================================
--- libsm/memsetw.x	(revision 197ff76a1a6e3dac031f1d386945a4be68fb9ce6)
+++ libsm/memsetw.x	(revision c59409ecb4964b2dfc1b86fabb892798f7c896e7)
@@ -15,3 +15,3 @@
 */
 
-extern	void		*memsetw(void *vp, uint16_t s, int16_t n);
+extern	volatile void	*memsetw(volatile void *vp, uint16_t s, int16_t n);
Index: rom/romp.c
===================================================================
--- rom/romp.c	(revision 197ff76a1a6e3dac031f1d386945a4be68fb9ce6)
+++ rom/romp.c	(revision c59409ecb4964b2dfc1b86fabb892798f7c896e7)
@@ -1899,6 +1899,6 @@
 int16_t cx_vreg(void)
 {
-	register int16_t	i, j, k, l;
-	register uint16_t *rp;
+	int16_t i, j, k, l;
+	volatile uint16_t *rp;
 
 	rp = &v_regs[0];
Index: vlib/vsetpal.c
===================================================================
--- vlib/vsetpal.c	(revision 197ff76a1a6e3dac031f1d386945a4be68fb9ce6)
+++ vlib/vsetpal.c	(revision c59409ecb4964b2dfc1b86fabb892798f7c896e7)
@@ -8,5 +8,5 @@
 #include "ram.h"
 
-#define	PALETTE		((uint16_t *)0x280000L)
+#define	PALETTE		((volatile uint16_t *)0x280000L)
 
 int16_t	dfltpal[16][3] = {
@@ -45,6 +45,6 @@
 void vsetpal(int16_t slot, int16_t red, int16_t grn, int16_t blu)
 {
-	register int16_t palval;
-	uint16_t *pal;
+	int16_t palval;
+	volatile uint16_t *pal;
 
 	pal = PALETTE;
