changeset 138:57c0210d578c

Fix error with postbyte for constant offset from W modes
author lost@l-w.ca
date Fri, 19 Aug 2011 17:46:19 -0600
parents b62f5389b859
children 7c07c1a2a17c
files lwasm/insn_indexed.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lwasm/insn_indexed.c	Wed Aug 17 22:34:58 2011 -0600
+++ b/lwasm/insn_indexed.c	Fri Aug 19 17:46:19 2011 -0600
@@ -256,7 +256,7 @@
 
 		if (l -> lint == 2)
 		{
-			l -> pb = indir ? 0xb0 : 0xcf;
+			l -> pb = indir ? 0xb0 : 0xaf;
 			l -> lint = 2;
 			return;
 		}
@@ -386,7 +386,7 @@
 					break;
 			
 				case 4: // W
-					pb = (l -> pb & 0x80) ? 0xD0 : 0xCF;
+					pb = (l -> pb & 0x80) ? 0xB0 : 0xAF;
 					break;
 				
 				case 5: // PCR
@@ -422,7 +422,7 @@
 					}
 					else
 					{
-						pb = (l -> pb & 0x80) ? 0xD0 : 0xCF;
+						pb = (l -> pb & 0x80) ? 0xB0 : 0xAF;
 						l -> lint = 2;
 					}
 					break;
@@ -490,7 +490,7 @@
 				break;
 			
 			case 4: // W
-				pb = (l -> pb & 0x80) ? 0xD0 : 0xCF;
+				pb = (l -> pb & 0x80) ? 0xB0 : 0xAF;
 				break;
 				
 			case 5: // PCR
@@ -524,7 +524,7 @@
 				}
 				else
 				{
-					pb = (l -> pb & 0x80) ? 0xD0 : 0xCF;
+					pb = (l -> pb & 0x80) ? 0xB0 : 0xAF;
 					l -> lint = 2;
 				}
 				break;