From 75db422f7b9c73f1057bf3187c73bfaeb6003a0b Mon Sep 17 00:00:00 2001 From: Aleksei Eaves Date: Sun, 14 Apr 2024 12:50:36 +1000 Subject: Shifted things around --- utilities.lisp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'utilities.lisp') 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))) -- cgit v1.2.3