Compare commits

...

2 Commits

Author SHA1 Message Date
tA
d784136e2b Merge branch 'master' of lain.church:tA/zybino
because im a fuarkwit
2020-06-11 17:20:45 +12:00
tA
27cf7b6a57 slight refactor of single function 2020-06-11 17:20:26 +12:00

12
vm.rkt
View File

@ -165,11 +165,13 @@
(lambda (m)
(let ([c (get-carry m)]
[z (get-zero m)])
(case cc
[(NZ) (if (not z) (set-pc addr m) m)]
[(Z) (if z (set-pc addr) m)]
[(NC) (if (not c) (set-pc addr) m)]
[(C) (if c (set-pc addr) m)]))))
(if (case cc
[(NZ) (not z)]
[(Z) z]
[(NC) (not c)]
[(C) c])
(set-pc addr m)
m))))
(define (jp-uncond addr)
(lambda (m)