Skip to content
Denis Maslennikov edited this page Nov 13, 2017 · 8 revisions

memcpy

memcpy toaddr fromaddr len

Parameters:

  • toaddr : any address of the 64k RAM byte you want to write
  • fromaddr : any address of the 64k RAM byte where you want to copy from
  • len : the length of the memory block you want to copy

Description:

This function allow to copy a continuous block of the RAM memory of TIC to an another address. Address 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