Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update microcode generator

  • Loading branch information...
commit 4701d7c641bc4ac3be1ce3f12f336c41ccf1435f 1 parent de2823f
@atgreen authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 scripts/microcoder.lisp
View
10 scripts/microcoder.lisp
@@ -36,7 +36,7 @@
(loop for filepos = (file-position in)
for line = (read-line in nil)
until (let ((s (cl-ppcre:split "\\|" line)))
- (equal (length s) 9)))
+ (equal (length s) 10)))
(read-line in nil)
;; We're at the table contents now. Parse it and write our new
@@ -48,11 +48,11 @@
for line = (read-line in nil)
while line do
(let ((s (cl-ppcre:split "\\|" line)))
- (if (equal 9 (length s))
- (destructuring-bind (junk1 name code wr? rA? rB? rm? wm? &rest junk2)
+ (if (equal 10 (length s))
+ (destructuring-bind (junk1 name code wA? wB? rA? rB? rm? wm? &rest junk2)
(mapcar (lambda (v) (string-trim " " v)) s)
(setf (aref opcode-array (parse-integer code :radix 2))
- (list name wr? rA? rB? rm? wm?))))))
+ (list name wA? wB? rA? rB? rm? wm?))))))
(loop for i from 0 to 63
do (let ((o (aref opcode-array i)))
(if o
@@ -63,7 +63,7 @@
((equal n 1) (format out "1"))
(t (error "bad table entry")))))
(cdr o))
- (format out "00000"))
+ (format out "000000"))
(format out "~%"))))
(close in)))
Please sign in to comment.
Something went wrong with that request. Please try again.