Skip to content
🌋️
Alchemy
Theme: Weyard
Theme: Modern
Mode: Auto
Mode: Light
Mode: Dark
Alchemy
Source
Reference
Loading...
Searching...
No Matches
iowrite.h
Go to the documentation of this file.
1
#ifndef ALCHEMY_TBS_IOWRITE_H
2
#define ALCHEMY_TBS_IOWRITE_H
3
4
/// @file
5
/// Io_Write16, a 16-bit write to a register or memory.
6
7
#include "
types.h
"
8
9
/// Writes a value to a 16-bit register or memory location.
10
/// A statement macro (S2: a layer the whole game uses, 106 sites): the value is
11
/// built in a word before the address and the store stays where it is written.
12
/// An inline function with a u32 parameter builds the same value but lets the
13
/// store move.
14
#define Io_Write16(v, reg) \
15
do { \
16
u32 value_ = (v); \
17
*(reg) = value_; \
18
} while (0)
19
20
#endif
types.h
The integer types, TRUE, UNUSED and the fixed-address macros.
include
system
iowrite.h