/
mem_op.h
32 lines (26 loc) · 1.69 KB
/
mem_op.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// ____________________________
// ██▀▀█▀▀██▀▀▀▀▀▀▀█▀▀█ │ ▄ ▄
// ██ ▀ █▄ ▀██▄ ▀ ▄█ ▄▀▀ █ │ ██▀█ ▄███ ▄█▄█ ▄█▀▄ ██▄▀ █ ██
// █ █ █ ▀▀ ▄█ █ █ ▀▄█ █▄ │ ██ █ ▀█▄▄ ██ █ ▀█▄▀ ██ ▀██
// ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀────────┘ ▀▀
// by Guillaume 'Aoineko' Blanchard under CC BY-SA license
//─────────────────────────────────────────────────────────────────────────────
// Memory operations
//─────────────────────────────────────────────────────────────────────────────
#pragma once
#include "core.h"
//=============================================================================
// FUNCTIONS
//=============================================================================
// Function: Mem_LShift
// Left-shift all bytes in a memory buffer
void Mem_LShift(const u8* ptr, u16 size);
// Function: Mem_RShift
// Right-shift all bytes in a memory buffer
void Mem_RShift(const u8* ptr, u16 size);
// Function: Mem_Inc
// Increment all bytes in a memory buffer
void Mem_Inc(const u8* ptr, u16 size);
// Function: Mem_Dec
// Decrement all bytes in a memory buffer
void Mem_Dec(const u8* ptr, u16 size);