diff src/asm.c @ 57:c44170825b16

Implement lsli and lsri in assembler
author Michael Pavone <pavone@retrodev.com>
date Thu, 01 Sep 2016 21:52:48 -0700
parents f9846719aa26
children bed2d84eeabe
line wrap: on
line diff
--- a/src/asm.c	Wed Aug 31 23:50:20 2016 -0700
+++ b/src/asm.c	Thu Sep 01 21:52:48 2016 -0700
@@ -122,6 +122,18 @@
 		}
 		return ret;
 	}
+	if (!strcmp("lsli", mnemonic) || !strcmp("lsri", mnemonic)) {
+		ret.base = LSI << 4 | SINGLE_SOURCE;
+		if (mnemonic[2] == 'r') {
+			ret.base |= 0x800;
+		}
+		ret.immed_min = 1;
+		ret.immed_max = 8;
+		ret.first_shift = 8;
+		ret.second_shift = 12;
+		ret.expected_args = 2;
+		return ret;
+	}
 	index = find_string_arr(mnemonics_single_reg, mnemonic, SETVBR+1);
 	if (index > SETVBR) {
 		ret.base = 0xFFFF;