18 lines
409 B
Plaintext
18 lines
409 B
Plaintext
|
(import-macros {:sss ! : compile} :ssc.macros)
|
||
|
|
||
|
#(compile $1
|
||
|
(fn memcpy ((long src) (long dst) count)
|
||
|
(let (bank (| (hiword dst) (byteswap (hiword src))))
|
||
|
(asm (lda bank)
|
||
|
(sta [{:abs #(+ ($1:lookup-addr :inst) 1)}])
|
||
|
(lda src) (tax)
|
||
|
(lda dst) (tay)
|
||
|
(lda count)
|
||
|
(dec)
|
||
|
(phb)
|
||
|
inst
|
||
|
(mvn 0 0)
|
||
|
(plb))))
|
||
|
)
|
||
|
|