diff --git a/stm50flw0x0x.c b/stm50flw0x0x.c
index c06bab9..edb76cc 100644
--- a/stm50flw0x0x.c
+++ b/stm50flw0x0x.c
@@ -33,9 +33,9 @@
 
 void protect_stm50flw0x0x(volatile uint8_t *bios)
 {
-	*(volatile uint8_t *)(bios + 0x5555) = 0xAA;
-	*(volatile uint8_t *)(bios + 0x2AAA) = 0x55;
-	*(volatile uint8_t *)(bios + 0x5555) = 0xA0;
+	writeb(0xAA, bios + 0x5555);
+	writeb(0x55, bios + 0x2AAA);
+	writeb(0xA0, bios + 0x5555);
 
 	usleep(200);
 }
@@ -47,37 +47,37 @@
 	uint32_t largeid1, largeid2;
 
 	/* Issue JEDEC Product ID Entry command */
-	*(volatile uint8_t *)(bios + 0x5555) = 0xAA;
+	writeb(0xAA, bios + 0x5555);
 	myusec_delay(10);
-	*(volatile uint8_t *)(bios + 0x2AAA) = 0x55;
+	writeb(0x55, bios + 0x2AAA);
 	myusec_delay(10);
-	*(volatile uint8_t *)(bios + 0x5555) = 0x90;
+	writeb(0x90, bios + 0x5555);
 	myusec_delay(40);
 
 	/* Read product ID */
-	id1 = *(volatile uint8_t *)bios;
-	id2 = *(volatile uint8_t *)(bios + 0x01);
+	id1 = readb(bios);
+	id2 = readb(bios + 0x01);
 	largeid1 = id1;
 	largeid2 = id2;
 
 	/* Check if it is a continuation ID, this should be a while loop. */
 	if (id1 == 0x7F) {
 		largeid1 <<= 8;
-		id1 = *(volatile uint8_t *)(bios + 0x100);
+		id1 = readb(bios + 0x100);
 		largeid1 |= id1;
 	}
 	if (id2 == 0x7F) {
 		largeid2 <<= 8;
-		id2 = *(volatile uint8_t *)(bios + 0x101);
+		id2 = readb(bios + 0x101);
 		largeid2 |= id2;
 	}
 
 	/* Issue JEDEC Product ID Exit command */
-	*(volatile uint8_t *)(bios + 0x5555) = 0xAA;
+	writeb(0xAA, bios + 0x5555);
 	myusec_delay(10);
-	*(volatile uint8_t *)(bios + 0x2AAA) = 0x55;
+	writeb(0x55, bios + 0x2AAA);
 	myusec_delay(10);
-	*(volatile uint8_t *)(bios + 0x5555) = 0xF0;
+	writeb(0xF0, bios + 0x5555);
 	myusec_delay(40);
 
 	printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, largeid1,
@@ -96,21 +96,21 @@
 	uint8_t id1;
 	// id2;
 
-	*bios = 0x70;
-	if ((*bios & 0x80) == 0) {	// it's busy
-		while ((*bios & 0x80) == 0) ;
+	writeb(0x70, bios);
+	if ((readb(bios) & 0x80) == 0) {	// it's busy
+		while ((readb(bios) & 0x80) == 0) ;
 	}
 	// put another command to get out of status register mode
 
-	*bios = 0x90;
+	writeb(0x90, bios);
 	myusec_delay(10);
 
-	id1 = *(volatile uint8_t *)bios;
+	id1 = readb(bios);
 
 	// this is needed to jam it out of "read id" mode
-	*(volatile uint8_t *)(bios + 0x5555) = 0xAA;
-	*(volatile uint8_t *)(bios + 0x2AAA) = 0x55;
-	*(volatile uint8_t *)(bios + 0x5555) = 0xF0;
+	writeb(0xAA, bios + 0x5555);
+	writeb(0x55, bios + 0x2AAA);
+	writeb(0xF0, bios + 0x5555);
 }
 
 /*
@@ -142,8 +142,8 @@
 		// unlock each 4k-sector
 		for (j = 0; j < 0x10000; j += 0x1000) {
 			printf_debug("unlocking at 0x%x\n", offset + j);
-			*(flash_addr + offset + j) = unlock_sector;
-			if (*(flash_addr + offset + j) != unlock_sector) {
+			writeb(unlock_sector, flash_addr + offset + j);
+			if (readb(flash_addr + offset + j) != unlock_sector) {
 				printf("Cannot unlock sector @ 0x%x\n",
 				       offset + j);
 				return -1;
@@ -151,8 +151,8 @@
 		}
 	} else {
 		printf_debug("unlocking at 0x%x\n", offset);
-		*(flash_addr + offset) = unlock_sector;
-		if (*(flash_addr + offset) != unlock_sector) {
+		writeb(unlock_sector, flash_addr + offset);
+		if (readb(flash_addr + offset) != unlock_sector) {
 			printf("Cannot unlock sector @ 0x%x\n", offset);
 			return -1;
 		}
@@ -167,17 +167,17 @@
 	int j;
 
 	// clear status register
-	*bios = 0x50;
+	writeb(0x50, bios);
 	printf_debug("Erase at %p\n", bios);
 	// now start it
-	*(volatile uint8_t *)(bios) = 0x20;
-	*(volatile uint8_t *)(bios) = 0xd0;
+	writeb(0x20, bios);
+	writeb(0xd0, bios);
 	myusec_delay(10);
 
 	wait_stm50flw0x0x(flash->virtual_memory);
 
 	for (j = 0; j < flash->page_size; j++) {
-		if (*(bios + j) != 0xFF) {
+		if (readb(bios + j) != 0xFF) {
 			printf("Erase failed at 0x%x\n", offset + j);
 			return -1;
 		}
@@ -197,8 +197,8 @@
 
 	/* transfer data from source to destination */
 	for (i = 0; i < page_size; i++) {
-		*dst = 0x40;
-		*dst++ = *src++;
+		writeb(0x40, dst);
+		writeb(*src++, dst++);
 		wait_stm50flw0x0x(bios);
 	}
 
@@ -210,7 +210,7 @@
 	dst = d;
 	src = s;
 	for (i = 0; i < page_size; i++) {
-		if (*dst != *src) {
+		if (readb(dst) != *src) {
 			rc = -1;
 			break;
 		}
