Memory drawing routine