mirror of
https://github.com/irmen/prog8.git
synced 2024-11-23 07:32:10 +00:00
e9edffa9f0
Just use an explicit sys.memcopy(src, dest, sizeof(dest)) or assign array members individually.
31 lines
645 B
Lua
31 lines
645 B
Lua
%import floats
|
|
%import textio
|
|
%option no_sysinit
|
|
%zeropage basicsafe
|
|
|
|
main {
|
|
|
|
sub start() {
|
|
uword[4] words1 = [1,2,3,4]
|
|
uword[4] words2 = [99,88,77,66]
|
|
|
|
for cx16.r0 in words1 {
|
|
txt.print_uw(cx16.r0)
|
|
txt.spc()
|
|
}
|
|
txt.nl()
|
|
sys.memcopy(words2, words1, sizeof(words1))
|
|
for cx16.r0 in words1 {
|
|
txt.print_uw(cx16.r0)
|
|
txt.spc()
|
|
}
|
|
txt.nl()
|
|
sys.memcopy([2222,3333,4444,5555], words1, sizeof(words1))
|
|
for cx16.r0 in words1 {
|
|
txt.print_uw(cx16.r0)
|
|
txt.spc()
|
|
}
|
|
txt.nl()
|
|
}
|
|
}
|