Skip to content
Josh Goebel edited this page Jan 25, 2021 · 8 revisions

memcpy

memcpy to from length

Parameters:

  • to : the address you want to write to
  • from : the address you want to copy from
  • length : the length of the memory block you want to copy (in bytes)

Description:

This function allows you to copy a continuous block of TIC's RAM from one address to another. Addresses are specified are in hexadecimal format, values are decimal.

Example memcpy

Example

-- demo memcpy
function TIC()
	cls()

	-- draw something to the screen
	for y=1,16 do
		line(0,y,240,y,y-1)
	end

	-- copy the drawing to an another place a couple of times
	for i=1,4 do
		memcpy((i*28)*120, 0x0000, 2400)
	end

end
Clone this wiki locally