feat: add simple macro for opcodes
This commit is contained in:
parent
290a2ad681
commit
99f6e167ea
@ -1,5 +1,10 @@
|
|||||||
(local util (require :host.util))
|
(local util (require :host.util))
|
||||||
|
|
||||||
|
(macro construct-code [& forms]
|
||||||
|
`(bor
|
||||||
|
,(unpack
|
||||||
|
(icollect [i n (ipairs forms)] `(lshift ,(. n 1) ,(. n 2))))))
|
||||||
|
|
||||||
(local conditions {:equal 0x0
|
(local conditions {:equal 0x0
|
||||||
:not-equal 0x1
|
:not-equal 0x1
|
||||||
:carry 0x2
|
:carry 0x2
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user