diff options
Diffstat (limited to 'utilities.lisp')
-rw-r--r-- | utilities.lisp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/utilities.lisp b/utilities.lisp index c231f72..cb6aa51 100644 --- a/utilities.lisp +++ b/utilities.lisp @@ -73,3 +73,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA return-value)) ;; Return nil if string was not a hexadecimal number. nil)) + +(defun valid-instruction? (instruction addressing-mode) + "Is instruction and addressing mode combination correct?" + (cond + ((member addressing-mode + (caddr (assoc instruction *instructions*))) t) + (t nil))) |