|
|
|
|
@ -1725,6 +1725,13 @@ |
|
|
|
|
(or arg1 arg2) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
; No puedo usar and a secas: |
|
|
|
|
; Can't take value of a macro: #'clojure.core/and |
|
|
|
|
(defn and-diadico [arg1 arg2] |
|
|
|
|
(and arg1 arg2) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defn interpretar [cod regs-de-act cont-prg pila mapa-regs] |
|
|
|
|
(let [fetched (cod cont-prg), |
|
|
|
|
opcode (if (symbol? fetched) fetched (first fetched)), |
|
|
|
|
@ -1975,6 +1982,10 @@ |
|
|
|
|
OR (let [res (aplicar-operador-diadico or-diadico pila)] |
|
|
|
|
(if (nil? res) res (recur cod regs-de-act (inc cont-prg) res mapa-regs))) |
|
|
|
|
|
|
|
|
|
; AND: Como ADD, pero calcula el and entre los dos valores. |
|
|
|
|
AND (let [res (aplicar-operador-diadico and-diadico pila)] |
|
|
|
|
(if (nil? res) res (recur cod regs-de-act (inc cont-prg) res mapa-regs))) |
|
|
|
|
|
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
|