mclangc/include/mem.mcl

28 lines
672 B
Plaintext

macro load8 @8 end
macro store8 !8 end
macro load64
7 + 0
8 shl over !8 + swap 1 - swap
8 shl over !8 + swap 1 - swap
8 shl over !8 + swap 1 - swap
8 shl over !8 + swap 1 - swap
8 shl over !8 + swap 1 - swap
8 shl over !8 + swap 1 - swap
8 shl over !8 + swap 1 - swap
8 shl over !8 + swap drop
end
macro store64
2dup 255 band @8 shr swap 1 + swap
2dup 255 band @8 shr swap 1 + swap
2dup 255 band @8 shr swap 1 + swap
2dup 255 band @8 shr swap 1 + swap
2dup 255 band @8 shr swap 1 + swap
2dup 255 band @8 shr swap 1 + swap
2dup 255 band @8 shr swap 1 + swap
2dup 255 band @8 shr swap 2drop
end