summaryrefslogtreecommitdiffhomepage
path: root/misc
diff options
context:
space:
mode:
authorlitvin <litvindev@gmail.com>2015-01-12 10:18:17 +0300
committerjao <jao@gnu.org>2015-03-03 19:24:16 +0100
commit09b22f2e082350f398dcd142b6af70a30f105ce1 (patch)
tree7a6237a66ba550a3a96da5a371de11af036d2a9b /misc
parentb83ce265d72783b8cc60e4020ec87908470cb8b6 (diff)
downloadmdk-09b22f2e082350f398dcd142b6af70a30f105ce1.tar.gz
mdk-09b22f2e082350f398dcd142b6af70a30f105ce1.tar.bz2
Add missed instructions: SLB,SRB,JAE,JAO,JXE,JXO (from volume 2, section 4.5.2)
Diffstat (limited to 'misc')
-rw-r--r--misc/mixal-mode.el42
1 files changed, 41 insertions, 1 deletions
diff --git a/misc/mixal-mode.el b/misc/mixal-mode.el
index deb5f92..a2eaafb 100644
--- a/misc/mixal-mode.el
+++ b/misc/mixal-mode.el
@@ -101,7 +101,7 @@ value.")
(defvar mixal-operation-codes
'("NOP" "ADD" "FADD" "SUB" "FSUB" "MUL" "FMUL" "DIV" "FDIV" "NUM" "CHAR"
- "HLT" "SLA" "SRA" "SLAX" "SRAX" "SLC" "SRC" "MOVE" "LDA" "LD1" "LD2" "LD3"
+ "HLT" "SLA" "SRA" "SLAX" "SRAX" "SLC" "SRC" "SLB" "SRB" "MOVE" "LDA" "LD1" "LD2" "LD3"
"LD4" "LD5" "LD6" "LDX" "LDAN" "LD1N" "LD2N" "LD3N" "LD4N" "LD5N" "LD6N"
"LDXN" "STA" "ST1" "ST2" "ST3" "ST4" "ST5" "ST6" "STX" "STJ" "STZ" "JBUS"
"IOC" "IN" "OUT" "JRAD" "JMP" "JSJ" "JOV" "JNOV"
@@ -112,6 +112,8 @@ value.")
"JANN" "J1NN" "J2NN" "J3NN" "J4NN" "J5NN" "J6NN" "JXNN"
"JANZ" "J1NZ" "J2NZ" "J3NZ" "J4NZ" "J5NZ" "J6NZ" "JXNZ"
"JANP" "J1NP" "J2NP" "J3NP" "J4NP" "J5NP" "J6NP" "JXNP"
+ "JAE" "JXE"
+ "JAO" "JXO"
"INCA" "DECA" "ENTA" "ENNA" "INC1" "DEC1" "ENT1" "ENN1"
"INC2" "DEC2" "ENT2" "ENN2" "INC3" "DEC3" "ENT3" "ENN3" "INC4" "DEC4"
"ENT4" "ENN4" "INC5" "DEC5" "ENT5" "ENN5" "INC6" "DEC6" "ENT6" "ENN6"
@@ -824,6 +826,20 @@ been executed when there was no jump."
1)
(mixal-add-operation-code
+ 'JAE 'jump "jump A even" 40 6
+ "Jump if the content of rA is even.
+Register J is set to the value of the next instruction that would have
+been executed when there was no jump."
+ 1)
+
+(mixal-add-operation-code
+ 'JAO 'jump "jump A odd" 40 7
+ "Jump if the content of rA is odd.
+Register J is set to the value of the next instruction that would have
+been executed when there was no jump."
+ 1)
+
+(mixal-add-operation-code
'JXN 'jump "jump X negative" 47 0
"Jump if the content of rX is negative.
Register J is set to the value of the next instruction that would have
@@ -871,6 +887,20 @@ been executed when there was no jump."
1)
(mixal-add-operation-code
+ 'JXE 'jump "jump X even" 47 6
+ "Jump if the content of rX is even.
+Register J is set to the value of the next instruction that would have
+been executed when there was no jump."
+ 1)
+
+(mixal-add-operation-code
+ 'JXO 'jump "jump X odd" 47 7
+ "Jump if the content of rX is odd.
+Register J is set to the value of the next instruction that would have
+been executed when there was no jump."
+ 1)
+
+(mixal-add-operation-code
'J1N 'jump "jump I1 negative" (+ 40 1) 0
"Jump if the content of rI1 is negative.
Register J is set to the value of the next instruction that would have
@@ -1199,6 +1229,16 @@ The bytes that fall off to the right will be added to the left."
2)
(mixal-add-operation-code
+ 'SLB 'miscellaneous "shift left AX binary" 6 6
+ "Shift AX, M binary places left."
+ 2)
+
+(mixal-add-operation-code
+ 'SRB 'miscellaneous "shift right AX binary" 6 7
+ "Shift AX, M binary places right."
+ 2)
+
+(mixal-add-operation-code
'MOVE 'miscellaneous "move" 7 'number
"Move MOD words from M to the location stored in rI1."
'(+ 1 (* 2 number)))