diff options
author | aleksei <aleksei@aj.org> | 2024-04-12 13:53:21 +1000 |
---|---|---|
committer | aleksei <aleksei@aj.org> | 2024-04-12 13:53:21 +1000 |
commit | 84ad1b97a5095cf6010593ec96e7d43d77fc0fa5 (patch) | |
tree | 36a00eb699bb0ce7cd7d18dc1bf608d9714538c0 /6502.lisp | |
parent | 82632e220e3a0c2f72c463f8c07b9678d7399972 (diff) |
Added syntax evaluation for asm lines
Diffstat (limited to '6502.lisp')
-rw-r--r-- | 6502.lisp | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -202,6 +202,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (NOP 234 (implied)) (BRK 0 (implied)))) + + +(defun extract-keys (list) + "Extract the keys of associative lists." + (let ((ret nil)) + (progn + (dolist (i list) + (setf ret + (cons (car i) ret))) + (reverse ret)))) + +;; Generated list of opcodes. +(setf + *opcodes* + (extract-keys *instructions*)) + (defun valid-instruction? (instruction addressing-mode) "Is instruction and addressing mode combination correct?" (cond |