4void memory_copy (
byte* source,
byte* dest, u_dword num_bytes) {
5 for (
int i = 0; i < num_bytes; ++i) {
6 *(dest + i) = *(source + i);
10void memory_clear (
byte* start, u_dword num_bytes,
byte sample) {
11 for (
int i = 0; i < num_bytes; ++i) {
12 *(start + i) = sample;
16void memory_fill (
byte* dest,
byte* source, u_dword source_bytes, u_dword times) {
17 for (
int i = 0; i < times; ++i) {
18 for (
int j = 0; j < source_bytes; ++j) {
19 *(dest + (i * source_bytes + j)) = *(source + j);
24boolean memory_compare (
byte* comp1,
byte* comp2, u_dword length) {
26 for (
int i = 0; i < length; ++i) {
27 equal &= (*(comp1 + i) == *(comp2 + i));