Low-level CPU information, high-precision timing, and full multi-instruction x64 disassembly using Zydis.
The System API provides:
High-Resolution Performance Timers
x64 Instruction Disassembly using Zydis
Full operand breakdown: registers, memory operands, immediates, pointer operands, etc.
All functions are global inside AngelScript.
📘 Available Functions
Function
Returns
Description
"AuthenticAMD", "GenuineIntel"
"AMD Ryzen 9 7900X 12-Core Processor"
Function
Returns
Description
Raw CPU timestamp counter
Fast but CPU-frequency dependent
High-resolution performance counter
Use with perf_frequency()
For converting perf_time → seconds
📌 Example (timing a loop)
🧩 Zydis Disassembly API
Function
Returns
Description
void zydis_disasm(const array<uint8>& in bytes, array<dictionary@>& out out_insts)
Full decode starting at RIP=0
void zydis_disasm(const array<uint8>& in bytes, uint64 runtime_rip, array<dictionary@>& out out_insts)
Full decode with custom RIP
Both return a list of instructions, where each item is a dictionary with metadata and operand array.
🧱 Instruction Structure (disasm_instruction_t)
Each instruction dictionary contains:
Full Intel disassembly text
🔍 Operand Structure (operand_t)
Each operand dictionary contains:
"reg" / "mem" / "imm" / "ptr"
Register operand
Whether displacement exists
Pointer operand
🚀 AngelScript Example
This example shows CPU info, timing, and full multi-instruction disassembly — the same script you used for validation.
🔥 Example Output
📅 Date & Time API
Provides local date/time information, including readable names, 12-hour formatting, and Unix timestamps.
dictionary@ get_datetime()
Returns a dictionary with the following keys:
"January", "February", ...
uint64 get_timestamp()
Returns a Unix timestamp in UTC, measured in seconds since 1970-01-01.
🧪 Example: Getting Time & Date
Thread Priority
bool set_thread_to_highest_priority() — Set current thread to highest priority.
bool set_thread_to_lowest_priority() — Set current thread to lowest priority.
bool set_thread_to_normal_priority() — Set current thread to normal priority.
What this is useful for:
Use these helpers when you have a callback (os thread) that must stay responsive (e.g., high-frequency polling, tight timing loops, heavy disassembly / scan batches, or avoiding stutter in critical update logic). You can temporarily raise priority during a burst of work, then restore normal afterward to avoid starving other threads and the UI.