File tree 1 file changed +4
-14
lines changed
1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change 18
18
)
19
19
(list inst op1 op2 op3)))
20
20
21
- (defun permutations (list )
22
- " Return a list of all the permutations of the input."
23
- (if list
24
- (mapcan
25
- (lambda (e )
26
- (mapcar
27
- (lambda (perm ) (cons e perm))
28
- (permutations (remove e list ))))
29
- list )
30
- '(())))
31
-
32
21
; ; an amplifier is
33
22
; ; - a program
34
23
; ; - a program counter
52
41
(defun prog-set-output (raw-addr val mode )
53
42
; ; (print (concat "prog-set-output: " (prin1-to-string (list raw-addr val mode))))
54
43
(let ((addr
55
- (if (= mode 0 )
56
- (prog-get raw-addr)
57
- (+ (prog-get raw-addr) (prog-rel-base)))))
44
+ (+ (prog-get raw-addr)
45
+ (if (= mode 0 )
46
+ 0
47
+ (prog-rel-base)))))
58
48
(puthash addr val program)))
59
49
(defun prog-pc () (gethash 'pc amp))
60
50
(defun prog-rel-base () (gethash 'rel-base amp))
You can’t perform that action at this time.
0 commit comments