diff options
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 |